Skip to content

Commit b112e87

Browse files
Use find_packages() to get nested packages (closes openapi-generators#575)
When openapi-python-client is used to with the --meta=setup option the generated setup.py needs to use setuptools.find_packages() to find the top-level and all of the nested pacakges in the directory so that distributions include them
1 parent 65cf25b commit b112e87

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: openapi_python_client/templates/setup.py.jinja

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import pathlib
22

3-
from setuptools import setup
3+
from setuptools import setup, find_packages
44

55
here = pathlib.Path(__file__).parent.resolve()
66
long_description = (here / "README.md").read_text(encoding="utf-8")
@@ -11,7 +11,7 @@ setup(
1111
description="{{ package_description }}",
1212
long_description=long_description,
1313
long_description_content_type="text/markdown",
14-
packages=["{{ package_name }}"],
14+
packages=find_packages(),
1515
python_requires=">=3.7, <4",
1616
install_requires=["httpx >= 0.15.0, < 0.22.0", "attrs >= 21.3.0", "python-dateutil >= 2.8.0, < 3"],
1717
package_data={"{{ package_name }}": ["py.typed"]},

0 commit comments

Comments
 (0)