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
pythonPackages.django-raster: Improve django version support #47484
Conversation
@GrahamcOfBorg build django-raster |
No attempt on x86_64-darwin (full log) The following builds were skipped because they don't evaluate on x86_64-darwin: django-raster Partial log (click to expand)
|
No attempt on x86_64-linux (full log) The following builds were skipped because they don't evaluate on x86_64-linux: django-raster Partial log (click to expand)
|
oops 😄 |
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: django-raster Partial log (click to expand)
|
No attempt on x86_64-darwin (full log) The following builds were skipped because they don't evaluate on x86_64-darwin: python36Packages.django-raster Partial log (click to expand)
|
No attempt on x86_64-linux (full log) The following builds were skipped because they don't evaluate on x86_64-linux: python36Packages.django-raster Partial log (click to expand)
|
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: python36Packages.django-raster Partial log (click to expand)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assertion fails by default because default django is 1.11.
I suggest you override django = django_2_1
in python-packages.nix
.
Sorry for the delay… I do not think this is a good idea to have that in The preferred approach, I think, would be to override let python3 = pkgs.python3.override {
packageOverrides = sef: super: {
django = super.django_2_1;
};
};
in python3.pkgs.buildPythonPackage {
…
} With such approach, only one version of django it used, but yes, the price is that |
I understand. The assertion failing with default settings may confuse people - it confused me for sure.
Maybe you can add a comment explaining how this is supposed to be used?
|
I’ll add a comment shortly. My other option was to throw an exception with a message somewhere if stdenv.lib.versionOlder django.version "2.0"
then throw "django-raster only supports Django >= 2.0. Consider overriding the pythonPackage set to use django_2_1"
else
buildPythonPackage {
…
} |
That sounds good as well.
|
b014657
to
5bbaa6e
Compare
@xeji I have updated to throw an exception with a proper error message if django is too old. |
Thanks, so let's see it throw 😄 |
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: python36Packages.django-raster Partial log (click to expand)
|
No attempt on x86_64-darwin (full log) The following builds were skipped because they don't evaluate on x86_64-darwin: python36Packages.django-raster Partial log (click to expand)
|
No attempt on x86_64-linux (full log) The following builds were skipped because they don't evaluate on x86_64-linux: python36Packages.django-raster Partial log (click to expand)
|
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)