Files
nixpkgs/pkgs/development/python-modules/django/3.nix
Martin Weinelt ae4a1a485a treewide: add explicit format attribute for Python packages
If a Python package does not come with either `format` or `pyproject` we
consider it a setuptools build, that calls `setup.py` directly, which is
deprecated.

This change, as a first step, migrates a large chunk of these packages to
set setuptools as their explicit format

This is so we can unify the problem space for the next step of the
migration.
2025-07-02 05:56:47 +02:00

65 lines
1.3 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
fetchPypi,
replaceVars,
geos_3_9,
gdal,
asgiref,
pytz,
sqlparse,
tzdata,
pythonOlder,
withGdal ? false,
}:
buildPythonPackage rec {
pname = "django";
version = "3.2.25";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
pname = "Django";
inherit version;
hash = "sha256-fKOKeGVK7nI3hZTWPlFjbAS44oV09VBd/2MIlbVHJ3c=";
};
patches =
[
(replaceVars ./django_3_set_zoneinfo_dir.patch {
zoneinfo = tzdata + "/share/zoneinfo";
})
]
++ lib.optional withGdal (
replaceVars ./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."
];
};
}