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
mkDerivation should be minimal, but currently it always pulls in modules like `lock` and `paths` etc. despite those not being needed for many instances, like when mkDerivation is imported by a dependency.
Modules like pip which do need some of these core modules, now need to directly depend on them.
This will remove a bunch of unneeded options which currently pollute the manual.
The remaining core dependencies of mkDerivation are now: deps, env, ui
The most important feature of the groups module was the overriding which is a separate module now. Therefore removing the fact that groups are used from the docs to decrease the API surface to maintain.
Instead render the override and overrideAll options in the manual of pdm correctly by setting `overrideType`.