gorgeous-winter-99296
10/20/2022, 7:47 PMpyproject.toml
to python_distribution
the code isn't packaged if set via dependency. E.g.
dependencies=[
":pyproject",
"//pants-plugins/backends/kubernetes:kubernetes",
],
packages no code, while
dependencies=[
"//pants-plugins/backends/kubernetes:kubernetes",
],
properly includes all code. I believe from the website the first variant should work too. It does get traversed while finding deps, but not actually included.happy-kitchen-89482
10/20/2022, 8:26 PMgenerate_setup=False
on the target?gorgeous-winter-99296
10/21/2022, 8:04 AMpdm
, and for that one I had to put the below block in my pyproject.toml. Maybe another one would work with pants directly?happy-kitchen-89482
10/21/2022, 3:07 PMpdm
, but it looks like itās a pep-517 build backend? So, yeah, today there are two options: āPants runs your build backend, but you have to write its configā, in which case you follow https://www.pantsbuild.org/docs/python-distributions#pep-517, or āPants generates a setup.py and runs setuptools for youā. It sounds like you want the former.[build-system]
table in pyproject.toml
to specify your backend, in this case, I guess, pdmgorgeous-winter-99296
10/21/2022, 3:14 PMtool.pdm.build.includes
it does correctly bundle the code. I just didn't expect that to be required...happy-kitchen-89482
10/21/2022, 3:16 PMpyproject.toml
??pyproject.toml
template, similar to how Pants does this internally today for setup.py{{}}
placeholders in it with the appropriate dataāgorgeous-winter-99296
10/21/2022, 3:19 PMfuture-oxygen-10553
10/21/2022, 3:29 PMbut it just gets put into the sandbox for packaging and I have to actually say in my pyproject.toml what files should be included.@happy-kitchen-89482 Iām actually concerned about this aspect as well for the PEP 517 generation. Each backend has its own configuration method to figure out what files should be packaged, especially if the package name is different from the import name.
happy-kitchen-89482
10/21/2022, 3:54 PMfuture-oxygen-10553
10/21/2022, 3:54 PMhappy-kitchen-89482
10/21/2022, 3:55 PMfuture-oxygen-10553
10/21/2022, 3:55 PM