- 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.
Also use the same source filter for path deps.
The default source filter currently filters:
- Filters gitignore (if it exists, non-recursive)
- Filters pycache/pyc files
- Uses cleanSourceFilter to filter out .git/.hg, .o/.so, editor backup files & nix result symlinks
We need to check pyproject.toml & poetry.lock constraints
_separately_.
Consider the following scenario:
- `poetry` depends on `tox` which in turn depends on `virtualenv`.
- `poetry` _also_ depends directly on virtualenv, but only for older
python versions.
In this case we don't want `virtualenv` as a direct input to `poetry`
but we _do_ want it as an input for `tox`.