2021-09-18 10:52:07 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, toml, tomli }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-09-18 10:52:07 +00:00
|
|
|
pname = "setuptools-scm";
|
|
|
|
# don't update to 6.1.0 or 6.2.0, releases were pulled because of regression
|
|
|
|
# https://github.com/pypa/setuptools_scm/issues/615
|
2021-04-26 19:14:03 +00:00
|
|
|
version = "6.0.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2021-09-18 10:52:07 +00:00
|
|
|
pname = "setuptools_scm";
|
|
|
|
inherit version;
|
|
|
|
sha256 = "sha256-0ZJaacsH6bKUFqJ1ufrbAJojwUis6QWy+yIGSabBjpI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "tomli~=1.0.0" "tomli>=1.0.0"
|
|
|
|
'';
|
|
|
|
|
|
|
|
# TODO: figure out why both toml and tomli are needed when only tomli is listed in setuptools-scm
|
|
|
|
# if not both are listed some packages like zipp silently fallback to a 0.0.0 version number and break version pins in other packages
|
|
|
|
propagatedBuildInputs = [ toml tomli ];
|
2021-04-05 15:23:46 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# Requires pytest, circular dependency
|
|
|
|
doCheck = false;
|
2021-04-05 15:23:46 +00:00
|
|
|
pythonImportsCheck = [ "setuptools_scm" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-04-05 15:23:46 +00:00
|
|
|
homepage = "https://github.com/pypa/setuptools_scm/";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Handles managing your python package versions in scm metadata";
|
|
|
|
license = licenses.mit;
|
2021-04-05 15:23:46 +00:00
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|