diff --git a/pkgs/development/python-modules/setuptools_scm/2.nix b/pkgs/development/python-modules/setuptools_scm/2.nix new file mode 100644 index 000000000000..4cf6f16fedfb --- /dev/null +++ b/pkgs/development/python-modules/setuptools_scm/2.nix @@ -0,0 +1,24 @@ +{ lib, buildPythonPackage, fetchPypi, toml }: + +buildPythonPackage rec { + pname = "setuptools_scm"; + version = "5.0.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-g6DO3TRJ45RjB4EaTHudicS1/UZKL7XuzNCluxWK5cg="; + }; + + propagatedBuildInputs = [ toml ]; + + # Requires pytest, circular dependency + doCheck = false; + pythonImportsCheck = [ "setuptools_scm" ]; + + meta = with lib; { + homepage = "https://github.com/pypa/setuptools_scm/"; + description = "Handles managing your python package versions in scm metadata"; + license = licenses.mit; + maintainers = with maintainers; [ SuperSandro2000 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c4797e299bfd..9e76151e7b6e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7617,7 +7617,10 @@ in { setuptools-rust = callPackage ../development/python-modules/setuptools-rust { }; setuptools-scm = self.setuptools_scm; # added 2021-01-04 - setuptools_scm = callPackage ../development/python-modules/setuptools_scm { }; + setuptools_scm = if isPy3k then + callPackage ../development/python-modules/setuptools_scm { } + else + callPackage ../development/python-modules/setuptools_scm/2.nix { }; setuptools-scm-git-archive = callPackage ../development/python-modules/setuptools-scm-git-archive { };