Tested by temporarily setting `meta.broken = true;` in
`mk-poetry-dep.nix`, and then
$ nix-build tools -A env
error: Package ‘python3.9-click-8.1.3’ in /home/user/h/poetry2nix/tools/poetry.lock:0 is marked as broken, refusing to evaluate.
a) To temporarily allo[...]
As you can see, the location of the lock file is reported, which
is especially useful in Nixpkgs, which contains multiple lockfiles.
This used to be just the location of a generic python builder, which
is generally not what the user wants.
I've exposed the `poetrylockPos` variable as a parameter that callers
may set. This is intended as a contingency more so than a feature that
is useful to users. That's why I've decided not to document it,
because it would just add noise.
`isSource` can be true e.g. when the package comes from a private
registry but we can still figure out e.g. manylinux dependencies based
on the fiename
- normalize package names to match PEP-503
- don't assume build dependencies on setuptools{,-scm}
- automatically generate overrides for setuptools{,-scm}
- pull known build systems directly from nixpkgs
- fix a bunch of mostly unrelated warnings
Co-authored-by: Phillip Cloud <417981+cpcloud@users.noreply.github.com>
Previously we randomly encountered issues where the Pypi mirror URLs
wouldn't be correct with packages whos first character is frequently
written in upper case (e.g. SqlAlchemy, MarkupSafe, ...). The Pypi
mirrors are aparently not consistent in the naming of the file locations
which lead to random errors after package version bumps.
By falling back to the API lookup (that we already did for wheels) we
can workaround that situation.
Currently Poetry does not have a notion of build-time
dependencies (setup-requires) in it's lock file.
When installing a dependency built with Poetry this has to be added
via an override which is really bad UX.
This change always adds Poetry as an interim solution until we have
resolved this in upstream Poetry.
We're only looking at the major.minor currently. We need to look
major.minor.patch instead.
This is made slighty problematic non-cpython where the patch version
doesn't match. If major.minor is the same for both the Python version
& the derivation version we default to derivation.version otherwise we
set the pythonVersion to pythonVersion major.minor.0.
This shouldn't be required and I think that these are actually
packaging bugs and not something that poetry2nix should really be
concerned with.
Closes#84
We should never have to use `format = "setuptools"` since pip can
_also_ handle setuptools packages.
This uses a custom pipBuildHook that removes pyproject.toml in case
there is also a setup.py in the same sources.