2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2020-07-02 03:51:41 +01:00
|
|
|
, buildPythonPackage
|
2021-03-22 16:16:29 +00:00
|
|
|
, fetchFromGitHub
|
2020-07-02 03:51:41 +01:00
|
|
|
, pytestCheckHook
|
2022-01-12 11:01:19 +00:00
|
|
|
, pythonOlder
|
2020-07-02 03:51:41 +01:00
|
|
|
}:
|
2017-05-31 21:57:42 +01:00
|
|
|
|
2020-07-02 03:51:41 +01:00
|
|
|
buildPythonPackage rec {
|
2017-05-31 21:57:42 +01:00
|
|
|
pname = "semver";
|
2021-03-22 16:16:29 +00:00
|
|
|
version = "2.13.0";
|
2022-01-12 11:01:19 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2017-05-31 21:57:42 +01:00
|
|
|
|
2017-12-25 19:23:10 +00:00
|
|
|
src = fetchFromGitHub {
|
2020-07-02 03:51:41 +01:00
|
|
|
owner = "python-semver";
|
2017-12-25 19:23:10 +00:00
|
|
|
repo = "python-semver";
|
2020-07-02 03:51:41 +01:00
|
|
|
rev = version;
|
2022-01-12 11:01:19 +00:00
|
|
|
hash = "sha256-IWTo/P9JRxBQlhtcH3JMJZZrwAA8EALF4dtHajWUc4w=";
|
2017-05-31 21:57:42 +01:00
|
|
|
};
|
|
|
|
|
2021-03-22 16:16:29 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-01-12 11:01:19 +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-22 16:16:29 +00:00
|
|
|
|
2022-01-12 11:01:19 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Don't test the documentation
|
|
|
|
"docs/*.rst"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"semver"
|
|
|
|
];
|
2017-08-25 09:57:54 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-05-31 21:57:42 +01:00
|
|
|
description = "Python package to work with Semantic Versioning (http://semver.org/)";
|
2021-03-22 16:16:29 +00:00
|
|
|
homepage = "https://python-semver.readthedocs.io/";
|
2017-05-31 21:57:42 +01:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ np ];
|
|
|
|
};
|
|
|
|
}
|