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
|
2023-05-24 13:37:59 +00:00
|
|
|
, setuptools
|
|
|
|
, setuptools-scm
|
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";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "3.0.2";
|
2023-05-24 13:37:59 +00:00
|
|
|
format = "pyproject";
|
2022-01-13 20:06:32 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
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";
|
2023-05-24 13:37:59 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-772PSUq1dqtn9aOol+Bo0S0OItBmoiCNP8q/YCBvKU4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-03-20 04:20:00 +00:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
|
|
|
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/";
|
2023-05-24 13:37:59 +00:00
|
|
|
changelog = "https://github.com/python-semver/python-semver/releases/tag/3.0.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ np ];
|
|
|
|
};
|
|
|
|
}
|