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`.
- Strip libraries and executables.
If they are not stripped, they will retain debug symbols that often reference
compilers (standard library includes), or dev outputs
(headers that are not needed at runtime).
- Put buildSystemPkgs in buildInputs instead of propagatedBuildInputs.
This removes intreehooks and Poetry from runtime closure.
During fixupPhase, scripts in $out/bin are wrapped, and the wrapping
script walks all propagatedBuildInputs when collecting PATH and
PYTHONPATH.
Adding overrides is an uphill battle we are never going to win and
poetry2nix should try to attempt to make things "just work" to the
largest extent possible.
This only increases the build closures slightly while making
poetry2nix much easier to use.
setuptools_scm itself does not have any dependencies so will not cause
compatibility issues.
- Extract utility functions to ./lib.nix
- Extract buildPythonPackage to ./mk-poetry-dep.nix
- Replace some functions with existing builtin functions
- Use lib.partition for python package splitting
- Drop package filtering on the top-level and leave it to pep425.nix