2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-07-18 16:06:22 +00:00
|
|
|
, buildPythonPackage
|
2021-03-20 04:20:00 +00:00
|
|
|
, fetchFromGitHub
|
2020-07-18 16:06:22 +00:00
|
|
|
, pytestCheckHook
|
2022-01-13 20:06:32 +00:00
|
|
|
, pythonOlder
|
2020-07-18 16:06:22 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
buildPythonPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "semver";
|
2021-03-20 04:20:00 +00:00
|
|
|
version = "2.13.0";
|
2022-01-13 20:06:32 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-07-18 16:06:22 +00:00
|
|
|
owner = "python-semver";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = "python-semver";
|
2020-07-18 16:06:22 +00:00
|
|
|
rev = version;
|
2022-01-13 20:06:32 +00:00
|
|
|
hash = "sha256-IWTo/P9JRxBQlhtcH3JMJZZrwAA8EALF4dtHajWUc4w=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i "/--cov/d" setup.cfg
|
|
|
|
sed -i "/--no-cov-on-fail/d" setup.cfg
|
|
|
|
'';
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
# Confuses source vs dist imports in pytest
|
|
|
|
rm -r dist
|
|
|
|
'';
|
2021-03-20 04:20:00 +00:00
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Don't test the documentation
|
|
|
|
"docs/*.rst"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"semver"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python package to work with Semantic Versioning (http://semver.org/)";
|
2021-03-20 04:20:00 +00:00
|
|
|
homepage = "https://python-semver.readthedocs.io/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ np ];
|
|
|
|
};
|
|
|
|
}
|