I’m trying to package the in-place python package at the moment (pypi, github). The repo does not include a setup.py file and instead has a pyproject.toml file. According to this SO thread this is a new official format for Python projects and will eventually supersede setup.py.
However, AFAICT nixpkgs has no support for this new project format. At least I’m getting an error:
...
patching sources
configuring
no configure script, doing nothing
building
Executing setuptoolsBuildPhase
Traceback (most recent call last):
File "/build/source/nix_run_setup", line 8, in <module>
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
File "/nix/store/1g54cwl6m78rgrqsnn1pp29dbvldpvsd-python3-3.9.6/lib/python3.9/tokenize.py", line 392, in open
buffer = _builtin_open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'setup.py'
builder for '/nix/store/bh1v55qnzafaf5lacvz642axyqxwfiym-python3.9-in-place-0.5.0.drv' failed with exit code 1
How should we go about packaging these kinds of projects in nixpkgs?
I don’t know if nixpkgs maintainers feel comfortable with importing a third party (python-on-nix) on nixpkgs natively, but I think both projects could cooperate to achieve more together
I think python-on-nix has a lot of potential for changing the landscape for the better. Just to mention a few architectural changes with respect to nixpkgs:
we can have many versions of the same package
therefore updating a package does not break others
adding/updating an average package is only running $ just new <project> <version>, all automatic
we use pip directly, which knows how to install every package ever published to pypi, including pyproject.toml ones like the one you mention
I’m not against exploring alternative approaches to packaging the python ecosystem, but in this case I’m not interested in switching my project around to use a different packaging system with a whole different package set.
Btw, I noticed that you have jaxlib packaged but not jax. How does python-on-nix handle packages with CUDA/etc dependencies? Do you support the GPU/TPU versions of jaxlib?