From 5b8f20d115b064285e85bc0d602b61fede27aba1 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 19 Feb 2023 17:55:25 +0000 Subject: [PATCH] python310Packages.pystemmer: Normalize attribute & pname Clean up derivation by removing redundant fetcher and commented out preBuild hook. --- pkgs/development/python-modules/pystemmer/default.nix | 11 +---------- .../python-modules/snowballstemmer/default.nix | 4 ++-- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 +- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/pystemmer/default.nix b/pkgs/development/python-modules/pystemmer/default.nix index dd258c380c6f..77c3fa2b2efd 100644 --- a/pkgs/development/python-modules/pystemmer/default.nix +++ b/pkgs/development/python-modules/pystemmer/default.nix @@ -9,15 +9,10 @@ }: buildPythonPackage rec { - pname = "PyStemmer"; + pname = "pystemmer"; version = "2.2.0"; format = "setuptools"; - src' = fetchPypi { - inherit pname version; - sha256 = "sha256-4hcbkbhrscap3d8J6Mhn5Ij4vWm94H0EEKNc3O4NhXw="; - }; - src = fetchFromGitHub { owner = "snowballstem"; repo = "pystemmer"; @@ -52,10 +47,6 @@ buildPythonPackage rec { "-L${libstemmer}/lib" ]; - #preBuild = '' - # cython src/Stemmer.pyx - #''; - pythonImportsCheck = [ "Stemmer" ]; diff --git a/pkgs/development/python-modules/snowballstemmer/default.nix b/pkgs/development/python-modules/snowballstemmer/default.nix index a1813fac54e2..60ba22e90390 100644 --- a/pkgs/development/python-modules/snowballstemmer/default.nix +++ b/pkgs/development/python-modules/snowballstemmer/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, PyStemmer, fetchPypi }: +{ lib, buildPythonPackage, pystemmer, fetchPypi }: buildPythonPackage rec { pname = "snowballstemmer"; @@ -12,7 +12,7 @@ buildPythonPackage rec { # No tests included doCheck = false; - propagatedBuildInputs = [ PyStemmer ]; + propagatedBuildInputs = [ pystemmer ]; meta = with lib; { description = "16 stemmer algorithms (15 + Poerter English stemmer) generated from Snowball algorithms"; diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 49c55322b1d1..73fd51cf83c4 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -199,6 +199,7 @@ mapAliases ({ PyRSS2Gen = pyrss2gen; # added 2023-02-19 pysmart-smartx = pysmart; # added 2021-10-22 pyspotify = throw "pyspotify has been removed because Spotify stopped supporting libspotify"; # added 2022-05-29 + PyStemmer = pystemmer; # added 2023-02-19 pytest_6 = pytest; # added 2022-02-10 pytestcov = pytest-cov; # added 2021-01-04 pytest-pep8 = pytestpep8; # added 2021-01-04 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 110005f63938..f64b8e4b39be 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8949,7 +8949,7 @@ self: super: with self; { inherit (pkgs) systemd; }; - PyStemmer = callPackage ../development/python-modules/pystemmer { }; + pystemmer = callPackage ../development/python-modules/pystemmer { }; pystray = callPackage ../development/python-modules/pystray { };