gorgeous-winter-9929610/20/2022, 7:47 PM
the code isn't packaged if set via dependency. E.g.
packages no code, while
dependencies=[ ":pyproject", "//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.
dependencies=[ "//pants-plugins/backends/kubernetes:kubernetes", ],
happy-kitchen-8948210/20/2022, 8:26 PM
on the target?
gorgeous-winter-9929610/21/2022, 8:04 AM
, 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-8948210/21/2022, 3:07 PM
, 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.
to specify your backend, in this case, I guess, pdm
gorgeous-winter-9929610/21/2022, 3:14 PM
it does correctly bundle the code. I just didn't expect that to be required...
happy-kitchen-8948210/21/2022, 3:16 PM
template, similar to how Pants does this internally today for setup.py
placeholders in it with the appropriate data”
gorgeous-winter-9929610/21/2022, 3:19 PM
future-oxygen-1055310/21/2022, 3:29 PM
but 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-8948210/21/2022, 3:54 PM
future-oxygen-1055310/21/2022, 3:54 PM
happy-kitchen-8948210/21/2022, 3:55 PM
future-oxygen-1055310/21/2022, 3:55 PM