-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
python.pkgs.django cleanup #26397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python.pkgs.django cleanup #26397
Conversation
Old version, so removing. NixOS#25375 (comment)
Old version, so removing. NixOS#25375 (comment)
instead, override the package set and set `django = super.django_1_8`.
cc @lsix |
Hi @FRidh I am currently running |
@lsix ideally those derivations that rely on Django should specify which Django version they need, either as a comment or in code. We could introduce a |
Introducing works: diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index d2fa2c38ca3..4aa1988e3a9 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -29,6 +29,9 @@ let
isPyPy = python.executable == "pypy";
isPy3k = strings.substring 0 1 python.pythonVersion == "3";
+ djangoOlder = versionOlder self.django.version;
+ djangoAtLeast = versionAtLeast self.django.version;
+
callPackage = pkgs.newScope self;
bootstrapped-pip = callPackage ../development/python-modules/bootstrapped-pip { };
@@ -68,7 +71,7 @@ let
in {
- inherit python bootstrapped-pip pythonAtLeast pythonOlder isPy26 isPy27 isPy33 isPy34 isPy35 isPy36 isPyPy isPy3k mkPythonDerivation buildPythonPackage buildPythonApplication;
+ inherit python bootstrapped-pip pythonAtLeast pythonOlder isPy26 isPy27 isPy33 isPy34 isPy35 isPy36 isPyPy isPy3k mkPythonDerivation buildPythonPackage buildPythonApplication djangoOlder djangoAtLeast;
inherit fetchPypi callPackage;
inherit sharedLibraryExtension;
but I am not sure this should make up to the entire Having {buildPythonPackage,
…
, django, versionAtLeast
…
}:
buildPythonPackage rec {
…
# disable for django-1.10 and later
disabled = versionAtLeast django.version "1.10";
…
} could be just fine and readable (the error message presented to the interpreter should show it, the |
@FRidh lsix@f662478 properly marks the broken derivations. If you are ok with it, you could cherry-pick it. With it, I can run |
Instead of a |
Here is an updated version: lsix@1f520bc |
Motivation for this change
Cleaning up old versions. Part of #25375.
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)