def make_subpackages(module):
    """
    foo.bar.ham
    >>>
        foo
        foo.bar
        foo.bar.ham

    Parameters
    ----------
    module : str

    Returns
    -------
    out : list[str]
    """
    p = module.split('.')
    out = []
    for i in range(1, len(p) + 1):
        out.append('.'.join(p[:i]))
    return out