depot/third_party/nixpkgs/pkgs/development/python-modules/django/3.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

63 lines
1.3 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
fetchPypi,
substituteAll,
geos_3_9,
gdal,
asgiref,
pytz,
sqlparse,
tzdata,
pythonOlder,
withGdal ? false,
}:
buildPythonPackage rec {
pname = "django";
version = "3.2.25";
disabled = pythonOlder "3.7";
src = fetchPypi {
pname = "Django";
inherit version;
hash = "sha256-fKOKeGVK7nI3hZTWPlFjbAS44oV09VBd/2MIlbVHJ3c=";
};
patches =
[
(substituteAll {
src = ./django_3_set_zoneinfo_dir.patch;
zoneinfo = tzdata + "/share/zoneinfo";
})
]
++ lib.optional withGdal (substituteAll {
src = ./django_3_set_geos_gdal_lib.patch;
inherit geos_3_9;
inherit gdal;
extension = stdenv.hostPlatform.extensions.sharedLibrary;
});
propagatedBuildInputs = [
asgiref
pytz
sqlparse
];
# too complicated to setup
doCheck = false;
pythonImportsCheck = [ "django" ];
meta = with lib; {
description = "High-level Python Web framework";
homepage = "https://www.djangoproject.com/";
license = licenses.bsd3;
maintainers = with maintainers; [ georgewhewell ];
knownVulnerabilities = [
"Support for Django 3.2 ended on 2024-04-01, see https://www.djangoproject.com/download/#supported-versions."
];
};
}