2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
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";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
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
|
|
|
};
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i "/--cov/d" setup.cfg
|
|
|
|
sed -i "/--no-cov-on-fail/d" setup.cfg
|
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [
|
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Don't test the documentation
|
|
|
|
"docs/*.rst"
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
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 ];
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "pysemver";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|