diff --git a/pkgs/development/python-modules/sorl_thumbnail/default.nix b/pkgs/development/python-modules/sorl-thumbnail/default.nix similarity index 50% rename from pkgs/development/python-modules/sorl_thumbnail/default.nix rename to pkgs/development/python-modules/sorl-thumbnail/default.nix index dedd7864f24e..2337d6b940c2 100644 --- a/pkgs/development/python-modules/sorl_thumbnail/default.nix +++ b/pkgs/development/python-modules/sorl-thumbnail/default.nix @@ -1,28 +1,46 @@ { lib , buildPythonPackage , fetchPypi -, isPy27 +, pythonOlder +, setuptools , setuptools-scm +, django }: buildPythonPackage rec { pname = "sorl-thumbnail"; - version = "12.9.0"; - disabled = isPy27; + version = "12.10.0"; + pyproject = true; + + disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-DLwvUhUufyJm48LLSuXYOv0ulv1eHELlZnNiuqo9LbM="; + hash = "sha256-3pWkkhf9/s7SIvo86qAdMS7i+KrVa6NNbHDy3umoSTg="; }; - nativeBuildInputs = [ setuptools-scm ]; + nativeBuildInputs = [ + setuptools + setuptools-scm + ]; + + buildInputs = [ + django + ]; + + env.DJANGO_SETTINGS_MODULE = "sorl.thumbnail.conf.defaults"; + # Disabled due to an improper configuration error when tested against django. This looks like something broken in the test cases for sorl. doCheck = false; + pythonImportsCheck = [ + "sorl.thumbnail" + ]; + meta = with lib; { homepage = "https://sorl-thumbnail.readthedocs.org/en/latest/"; description = "Thumbnails for Django"; + changelog = "https://github.com/jazzband/sorl-thumbnail/blob/${version}/CHANGES.rst"; license = licenses.bsd3; }; - } diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 30a0d6472232..b2e04a44b428 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -402,6 +402,7 @@ mapAliases ({ smart_open = smart-open; # added 2021-03-14 smmap2 = throw "smmap2 has been deprecated, use smmap instead."; # added 2020-03-14 somecomfort = throw "somecomfort was removed because Home Assistant switched to aiosomecomfort"; # added 2023-02-01 + sorl_thumbnail = sorl-thumbnail; # added 2023-11-12 SPARQLWrapper = sparqlwrapper; sphinx-jquery = sphinxcontrib-jquery; # added 2023-02-24 sphinx_pypi_upload = throw "sphinx_pypi_upload has been removed since it is abandoned."; # added 2023-10-11 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 41cf6b5344fc..0b5471339e0c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13094,7 +13094,7 @@ self: super: with self; { sopel = callPackage ../development/python-modules/sopel { }; - sorl_thumbnail = callPackage ../development/python-modules/sorl_thumbnail { }; + sorl-thumbnail = callPackage ../development/python-modules/sorl-thumbnail { }; sortedcollections = callPackage ../development/python-modules/sortedcollections { };