quick & easy way to reduce ci run-time and overhead from
platform-specific lock files in the repo while letting
us catch errors on two OSes as well as architectures.
pdm supports extra indexes in tool.pdm.source blocks and we can also
pass a list of urls to fetchFromLegacy, so this aggregates URLs from
the source blocks and passes them.
I think this will unblock simple cases like getting a package that is
not on pypi.org from some other index, but I imagine that there are
more complex cases that will require refining this support.
* drop mitm-proxy & pypi snapshot date
* add warning if pypiSnapshotDate is used
* tree-wide: remove pypiSnapshotDate
* pip/tests/packages: support all platforms
* re-lock examples
* apache-airflow: fix override after re-lock
* pip/tests: remove other platforms again
...don't want to maintain 4 lock files per test
It's important to get the default in our PDM module fixed,
because upstream documentation recommends using pyproject = true;
and ships an assertion assertion '((pyproject != null) -> (format ==
null))' that fails with the current default in pdm.
* fetchPipMetadata: set meta.mainProgram
* fetchPipMetadata: deduplicate test fixtures
* fetchPipMetadata: add is_direct to lock file
* devShell: proof of concept
* python-local-development: add editables example
* devshell: simplify editables interface
* buildPythonPackage: remove editable option again
* devshell: use findRoot for editables
* devshell: add support for .whl sources
* devshell: avoid polluting the shells environment
* devshell: make editable.nix flatter
because there's only 1 attr left now
* devshell: fix pyEnv by filtering editables
from the environment.
* devshell: skip existing editables
* devshell: remove patched pyEnv, rewrite sys.path
* devshell: add special case for root package
* python-local-development: improve editable example
* python-local-development: filter source
* devshell: reset site_dir on each load
* pip: don't ignoreCollisions in pyEnv
* pip: default to no sitecustomize.py...
and teach the devshell how to load it
* pip: rewrite editable in python
* editable: use shutil.copytree
* editable: refactor into functions
* editables: add suport for console_scripts
* improve pip editables interface
- change editables interface to use bool or path
- expose public.shellHook for composition
- use shellHook by default in public.devShell
- extend example to include a script
* improve edtiable support:
- remove dependency on root package build
- always set root package as editable by default
- compute dit-info dir by calling a packages build backend or extracting directly from the wheel
- only pass required sources to editables shell hook
- add build inputs of all editables to teh dev shell
- move editables state to .dream2nix/python to remove likelyhood of collision with other ecosystems state
- delete editables state if editables configuration changed
* refine python editable support:
- never copy dependency sources
- force user to specify a local path
---------
Co-authored-by: DavHau <hsngrmpf+github@gmail.com>
https://github.com/NixOS/nixpkgs/pull/271597 implemented a new format for python packages that is starting to get traction in nixpkgs/unstable (soon to become NixOS 24.05).
That is a progress towards https://github.com/NixOS/nixpkgs/issues/272178, which would be a massive improvement for dream2nix once completed.
This first step just makes sure that `buildPythonPackage` supports the new arguments properly. Without this change, many dream2nix python derivations fail to build on nixos-unstable right now.
Probably other python auto-builders should leverage these new options when available for the d2n user. That can be added later.
@moduon MT-1075