fresh-mechanic-68429
08/07/2024, 4:23 PM.yaml files in our internal pants plugin (which we publish to our internal pypi feed)
This is our python_distribution
python_distribution(
name="dist",
dependencies=[
":version",
":resources",
"//our/package",
],
provides=python_artifact(
name="our.package",
),
generate_setup=False,
repositories=[
"@our_feed",
],
)
Where the files are included via resources target within the package. I see them as transitive filedeps pants filedeps --transitive :dist but not in the wheel via pants package :distcareful-address-89803
08/07/2024, 7:31 PMfiles target somewhere, or something you have is excluding the files (MANIFEST.in?)fresh-mechanic-68429
08/07/2024, 7:43 PMpyproject.toml. No MANIFEST.in
I narrowed this down to being related to generate_setup=False
When I remove/flip that to True it works correctly for the wheel. I did have to disable sdist publishing though sdist=False and set version="__PLACEHOLDER__", in the python_artifact . We're using vcs_version (thats the :version target above) but the version is still required for some reason (and unused afaict)careful-address-89803
08/07/2024, 8:03 PMgenerate_setup=True , Pants sees the files and is putting them into the sandbox where it runs commands to package the distribution. What build backend are you using? Are you sure there's nothing limiting the files included, and that you've set your build backend to include these files? (with setuptools that would be [tool.setuptools.package-data] .) Does it work if you build your distribution without Pants (maybe python -m pip wheel --no-deps .)?happy-kitchen-89482
08/07/2024, 8:19 PMgenerate_setup=False your setup.py has to copy the files into the wheel itself, like it does for sources. generate_setup=True will take care of it for you.fresh-mechanic-68429
08/07/2024, 8:20 PMhappy-kitchen-89482
08/07/2024, 8:45 PMhappy-kitchen-89482
08/07/2024, 8:45 PMhappy-kitchen-89482
08/07/2024, 8:46 PM