diff --git a/setup.py b/setup.py index 3cf26d1e..a9960a82 100644 --- a/setup.py +++ b/setup.py @@ -122,6 +122,10 @@ # Note that this is a string of words separated by whitespace, not a list. keywords='sample setuptools development', # Optional + # When your source code is in a subdirectory under the project root, e.g. + # `src/`, it is necessary to specify the `package_dir` argument. + package_dir={'': 'src'}, # Optional + # You can just specify package directories manually here if your project is # simple. Or you can use find_packages(). # @@ -131,7 +135,7 @@ # # py_modules=["my_module"], # - packages=find_packages(exclude=['contrib', 'docs', 'tests']), # Required + packages=find_packages(where='src'), # Required # Specify which Python versions you support. In contrast to the # 'Programming Language' classifiers above, 'pip install' will check this diff --git a/sample/__init__.py b/src/sample/__init__.py similarity index 100% rename from sample/__init__.py rename to src/sample/__init__.py diff --git a/sample/package_data.dat b/src/sample/package_data.dat similarity index 100% rename from sample/package_data.dat rename to src/sample/package_data.dat