cool-easter-32542
09/16/2023, 12:40 PMsetup-py goal currently generates a setup.py that uses the packages kwarg to indicate source packages in the distribution:
pants/src/python/pants/backend/python/tasks/setup_py.py
Lines 610 to 645 in </pantsbuild/pants/commit/33a6d51db91ea1fe69c39117c8878abcb824cdfb|33a6d51>
We collect packages here assuming old-style explicit __init__.py delineated packages:
pants/src/python/pants/backend/python/tasks/setup_py.py
Lines 500 to 527 in </pantsbuild/pants/commit/33a6d51db91ea1fe69c39117c8878abcb824cdfb|33a6d51>
This leads to disfunctional packages, particularaly when trying to create a bdist via bdist_wheel - no sources are included at all.
As an aside, sources not being included is papered over for sdists where it looks like they are properly added due to:
pants/src/python/pants/backend/python/tasks/setup_py.py
Lines 644 to 645 in </pantsbuild/pants/commit/33a6d51db91ea1fe69c39117c8878abcb824cdfb|33a6d51>
pantsbuild/pants