From 0a41e93ce4e5458c900701e3e8fdbbfca526cc17 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 11 Oct 2021 23:59:52 +0200 Subject: [PATCH] python3Packages.django-taggit: rename from django_taggit and refactor --- .../default.nix | 27 ++++++++++++------- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 +- 3 files changed, 20 insertions(+), 10 deletions(-) rename pkgs/development/python-modules/{django_taggit => django-taggit}/default.nix (70%) diff --git a/pkgs/development/python-modules/django_taggit/default.nix b/pkgs/development/python-modules/django-taggit/default.nix similarity index 70% rename from pkgs/development/python-modules/django_taggit/default.nix rename to pkgs/development/python-modules/django-taggit/default.nix index 5dcdb67ebae1..e410b72437c0 100644 --- a/pkgs/development/python-modules/django_taggit/default.nix +++ b/pkgs/development/python-modules/django-taggit/default.nix @@ -1,28 +1,37 @@ { lib , buildPythonPackage -, python -, fetchPypi , pythonOlder +, fetchPypi , django , djangorestframework , mock , isort -, isPy3k +, python }: buildPythonPackage rec { pname = "django-taggit"; version = "1.5.1"; - disabled = !isPy3k; + format = "setuptools"; + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; sha256 = "e5bb62891f458d55332e36a32e19c08d20142c43f74bc5656c803f8af25c084a"; }; - propagatedBuildInputs = [ isort django djangorestframework ]; + propagatedBuildInputs = [ + django + ]; + + pythonImportsCheck = [ + "taggit" + ]; + + checkInputs = [ + djangorestframework + ]; - checkInputs = [ mock ]; checkPhase = '' # prove we're running tests against installed package, not build dir rm -r taggit @@ -33,9 +42,9 @@ buildPythonPackage rec { ''; meta = with lib; { - description = "django-taggit is a reusable Django application for simple tagging"; - homepage = "https://github.com/alex/django-taggit/tree/master/"; - license = licenses.bsd2; + description = "Simple tagging for django"; + homepage = "https://github.com/jazzband/django-taggit"; + license = licenses.bsd3; maintainers = with maintainers; [ desiderius ]; }; diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 5bfce49a82be..a6b9ac968431 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -45,6 +45,7 @@ mapAliases ({ discogs_client = discogs-client; # added 2021-07-02 djangorestframework-jwt = drf-jwt; # added 2021-07-20 django_redis = django-redis; # added 2021-10-11 + django_taggit = django-taggit; # added 2021-10-11 dns = dnspython; # added 2017-12-10 dogpile_cache = dogpile-cache; # added 2021-10-28 faulthandler = throw "faulthandler is built into ${python.executable}"; # added 2021-07-12 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c0fcfd7447d8..83ac6eee3169 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2211,7 +2211,7 @@ in { django_tagging = callPackage ../development/python-modules/django_tagging { }; - django_taggit = callPackage ../development/python-modules/django_taggit { }; + django-taggit = callPackage ../development/python-modules/django-taggit { }; django_treebeard = callPackage ../development/python-modules/django_treebeard { };