linuxPackages_latest.broadcom_sta: add patch to compile on Kernel 6.12 (#359484)
[NixPkgs.git] / pkgs / development / python-modules / django-taggit / default.nix
blob20f65e36f465772e7505a06ff644dbd06c816508
2   lib,
3   buildPythonPackage,
4   pythonOlder,
5   fetchPypi,
6   django,
7   djangorestframework,
8   python,
9 }:
11 buildPythonPackage rec {
12   pname = "django-taggit";
13   version = "5.0.1";
14   format = "setuptools";
16   disabled = pythonOlder "3.7";
18   src = fetchPypi {
19     inherit pname version;
20     hash = "sha256-7c19seDzXDBOCCovYx3awuFu9SlgKVJOt5KvdDDKtMw=";
21   };
23   propagatedBuildInputs = [ django ];
25   pythonImportsCheck = [ "taggit" ];
27   nativeCheckInputs = [ djangorestframework ];
29   checkPhase = ''
30     # prove we're running tests against installed package, not build dir
31     rm -r taggit
32     # Replace directory of locale
33     substituteInPlace ./tests/test_utils.py \
34       --replace 'os.path.dirname(__file__), ".."' "\"$out/lib/python${lib.versions.majorMinor python.version}/site-packages/\""
35     ${python.interpreter} -m django test --settings=tests.settings
36   '';
38   meta = with lib; {
39     description = "Simple tagging for django";
40     homepage = "https://github.com/jazzband/django-taggit";
41     changelog = "https://github.com/jazzband/django-taggit/blob/${version}/CHANGELOG.rst";
42     license = licenses.bsd3;
43     maintainers = with maintainers; [ desiderius ];
44   };