You have to list all packages in setup, including subpackages:
setup(
name = "mytestmodule",
version = "0.0.1",
description = ("A simple module."),
packages=['mymodule', 'mymodule.subdir'],
)
Or you can use setuptools‘s magic function find_packages:
from setuptools import setup, find_packages
setup(
name = "mytestmodule",
version = "0.0.1",
description = ("A simple module."),
packages=find_packages(),
)
This is mentioned here:
If you have sub-packages, they must be explicitly listed in packages,
but any entries in package_dir automatically extend to sub-packages.
(In other words, the Distutils does not scan your source tree, trying
to figure out which directories correspond to Python packages by
looking for__init__.pyfiles.)