2021-08-27 01:25:52 +01:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, toml, tomli }:
|
2019-09-05 21:10:58 +01:00
|
|
|
|
2017-07-20 13:57:57 +01:00
|
|
|
buildPythonPackage rec {
|
2021-08-26 20:32:44 +01: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-03-24 09:28:28 +00:00
|
|
|
version = "6.0.1";
|
2017-07-20 13:57:57 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2021-08-26 20:32:44 +01:00
|
|
|
pname = "setuptools_scm";
|
|
|
|
inherit version;
|
|
|
|
sha256 = "sha256-0ZJaacsH6bKUFqJ1ufrbAJojwUis6QWy+yIGSabBjpI=";
|
2017-07-20 13:57:57 +01:00
|
|
|
};
|
|
|
|
|
2021-08-27 01:32:58 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "tomli~=1.0.0" "tomli>=1.0.0"
|
|
|
|
'';
|
|
|
|
|
2021-08-27 01:25:52 +01:00
|
|
|
# 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-03-07 16:34:39 +00:00
|
|
|
|
2020-02-06 15:01:08 +00:00
|
|
|
# Requires pytest, circular dependency
|
|
|
|
doCheck = false;
|
2021-03-07 16:34:39 +00:00
|
|
|
pythonImportsCheck = [ "setuptools_scm" ];
|
2020-02-06 15:01:08 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2021-03-07 16:34:39 +00:00
|
|
|
homepage = "https://github.com/pypa/setuptools_scm/";
|
2017-07-20 13:57:57 +01:00
|
|
|
description = "Handles managing your python package versions in scm metadata";
|
|
|
|
license = licenses.mit;
|
2021-03-07 16:34:39 +00:00
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
2017-07-20 13:57:57 +01:00
|
|
|
};
|
|
|
|
}
|