Skip to content
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_3: init at 3 #96604

Closed
wants to merge 2 commits into from
Closed

pythonPackages.django_3: init at 3 #96604

wants to merge 2 commits into from

Conversation

FRidh
Copy link
Member

@FRidh FRidh commented Aug 29, 2020

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@FRidh FRidh requested a review from lsix August 29, 2020 12:58
@FRidh FRidh requested a review from jonringer as a code owner August 29, 2020 12:58
@FRidh FRidh added this to the 20.09 milestone Aug 29, 2020
@jonringer
Copy link
Contributor

there's a lot of packages with similar breakages:

  ERROR: Could not find a version that satisfies the requirement Django<3.1,>=1.11 (from django-mailman3==1.3.4) (from versions: none)
  ERROR: No matching distribution found for Django<3.1,>=1.11 (from django-mailman3==1.3.4)

@FRidh FRidh changed the title pythonPackages.django: 2.2 -> 3.1 pythonPackages.django_3_1: init at latest Aug 31, 2020
@FRidh FRidh changed the title pythonPackages.django_3_1: init at latest pythonPackages.django_3_1: init at 3.1 Aug 31, 2020
Every major version will have only a single LTS release, which is the
one we typically keep in Nixpkgs.

https://www.djangoproject.com/download/
@FRidh FRidh changed the title pythonPackages.django_3_1: init at 3.1 pythonPackages.django_3: init at 3 Aug 31, 2020
Copy link
Member

@lsix lsix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

Sorry for the delay for this review (I am currently in holiday, mostly AFK).

Overall, I am OK with the PR. Just the GIS support is not valid as is, the patch used to indicate where to find libgdal / libgeos is not valid anymore for django-3 branch.

I gave you a patch that can be used instead.

Also there seems to be merge conflicts in pkgs/top-level/python-packages.nix. This PR should probably be rebased to master.


patches = stdenv.lib.optional withGdal
(substituteAll {
src = ./1.10-gis-libs.template.patch;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch is not valid for django-3.

You can re-use the one I prepared when I did a django-3.0 PR (#92848)

diff -Nur a/django/contrib/gis/gdal/libgdal.py b/django/contrib/gis/gdal/libgdal.py
--- a/django/contrib/gis/gdal/libgdal.py	2020-07-09 22:34:05.330568948 +0100
+++ b/django/contrib/gis/gdal/libgdal.py	2020-07-09 22:35:08.679095615 +0100
@@ -14,7 +14,7 @@
     from django.conf import settings
     lib_path = settings.GDAL_LIBRARY_PATH
 except (AttributeError, ImportError, ImproperlyConfigured, OSError):
-    lib_path = None
+    lib_path = "@gdal@/lib/libgdal@extension@"

 if lib_path:
     lib_names = None
diff -Nur a/django/contrib/gis/geos/libgeos.py b/django/contrib/gis/geos/libgeos.py
--- a/django/contrib/gis/geos/libgeos.py	2020-07-09 22:34:05.331568941 +0100
+++ b/django/contrib/gis/geos/libgeos.py	2020-07-09 22:36:24.863526276 +0100
@@ -24,7 +24,7 @@
         from django.conf import settings
         lib_path = settings.GEOS_LIBRARY_PATH
     except (AttributeError, ImportError, ImproperlyConfigured, OSError):
-        lib_path = None
+        lib_path = "@geos@/lib/libgeos_c@extension@"

     # Setting the appropriate names for the GEOS-C library.
     if lib_path:

@jonringer
Copy link
Contributor

please rebase on the latest master. I sorted python-packages.nix

@lsix
Copy link
Member

lsix commented Sep 21, 2020

@FRidh I am back from my break. Have you had time to rework this PR, or do you want me to take over it?

@FRidh
Copy link
Member Author

FRidh commented Sep 21, 2020

@lsix feel free to take it over!

@lsix lsix mentioned this pull request Sep 22, 2020
10 tasks
@lsix
Copy link
Member

lsix commented Sep 22, 2020

I have updated the work done here in #98463

I close this PR in favor of the new one.

@lsix lsix closed this Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants