thankful-stone-5860
02/15/2024, 3:44 PMpython_distribution isn't including my pyproject.toml in chroot event though the target is in the dependencies.thankful-stone-5860
02/15/2024, 3:46 PMtmp sandbox and reran __run.sh and it built correctly.thankful-stone-5860
02/15/2024, 3:58 PMfiles target with the pyproject.toml, README.md, and LICENSE files as sources . I did get the following error:
09:54:32.36 [ERROR] 1 Exception encountered:
Engine traceback:
in `package` goal
ProcessExecutionFailure: Process 'Run setuptools.build_meta for //:dss-sdk' failed with exit code 1.
stdout:
stderr:
usage: backend_shim.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: backend_shim.py --help [cmd1 cmd2 ...]
or: backend_shim.py --help-commands
or: backend_shim.py cmd --help
error: invalid command 'bdist_wheel'thankful-stone-5860
02/15/2024, 3:59 PMwheel=False to the python_distribution target and it build the tar.gz correctly.thankful-stone-5860
02/15/2024, 3:59 PMgorgeous-winter-99296
02/15/2024, 6:01 PMthankful-stone-5860
02/15/2024, 8:34 PMpyproject.toml file in the sandbox. So, it would build with the directory name and version 0.0.0. The pyproject.toml was configured with:
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
...
I eventually created a files target like:
files(
name="build_files",
sources=["pyproject.toml"],
)
and added that as a dependency to python_distribution. It finally included it in the sandbox, but failed to build the wheel and raised an Exception. I figured out I had to add "wheel" to the requires like this:
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
...
And then it built (kinda). It still failed because it didn't have the README and LICENSE files in the sandbox as well, so I modified the files target like so:
files(
name="build_files",
sources=["pyproject.toml", "README.md", "LICENSE"],
)
And THEN it built both artifacts correctly as I expected.thankful-stone-5860
02/15/2024, 8:41 PMpip install ... correctly because of some strange issue with setuptools. By ensuring I had both the tar and the wheel, I was able to pants publish :: and pip install ... correctly (from TestPyPi).thankful-stone-5860
02/15/2024, 8:42 PMthankful-stone-5860
02/15/2024, 8:45 PMpython_artifact() and it still builds correctly. Not sure if that's some weird emergent behavior or a regression. It will complain about no name kwarg when I set generate_setup to True.thankful-stone-5860
02/15/2024, 8:47 PMgorgeous-winter-99296
02/15/2024, 10:44 PMgenerate_setup Pants will need info for itself, while in a pyproject.toml world we expect that file to be mostly configured correctly. This includes pulling down the setuptools/wheel dependencies -- I use pdm for building wheels, so those are of no use for example.thankful-stone-5860
02/15/2024, 10:46 PMcrooked-honey-24238
02/16/2024, 4:47 AMgorgeous-winter-99296
02/16/2024, 11:46 AMgorgeous-winter-99296
02/16/2024, 11:47 AMthankful-stone-5860
02/16/2024, 3:46 PMcrooked-honey-24238
02/16/2024, 4:21 PM