1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 pytest-cov-stub,
7 pythonOlder,
8 setuptools,
9 setuptools-scm,
10}:
11
12buildPythonPackage rec {
13 pname = "semver";
14 version = "3.0.4";
15 pyproject = true;
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "python-semver";
21 repo = "python-semver";
22 tag = version;
23 hash = "sha256-ry6r2cY/DRTiPxT+ZiumgFbQyHNzL8i1QcQbLWjnDVE=";
24 };
25
26 postPatch = ''
27 sed -i "/--cov/d" setup.cfg
28 sed -i "/--no-cov-on-fail/d" setup.cfg
29 '';
30
31 build-system = [
32 setuptools
33 setuptools-scm
34 ];
35
36 nativeCheckInputs = [
37 pytestCheckHook
38 pytest-cov-stub
39 ];
40
41 pythonImportsCheck = [ "semver" ];
42
43 meta = with lib; {
44 description = "Python package to work with Semantic Versioning (http://semver.org/)";
45 homepage = "https://python-semver.readthedocs.io/";
46 changelog = "https://github.com/python-semver/python-semver/releases/tag/3.0.0";
47 license = licenses.bsd3;
48 maintainers = with maintainers; [ np ];
49 mainProgram = "pysemver";
50 };
51}