Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pytestCheckHook, 6 pythonOlder, 7 setuptools, 8 setuptools-scm, 9}: 10 11buildPythonPackage rec { 12 pname = "semver"; 13 version = "3.0.2"; 14 pyproject = true; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchFromGitHub { 19 owner = "python-semver"; 20 repo = "python-semver"; 21 rev = "refs/tags/${version}"; 22 hash = "sha256-772PSUq1dqtn9aOol+Bo0S0OItBmoiCNP8q/YCBvKU4="; 23 }; 24 25 postPatch = '' 26 sed -i "/--cov/d" setup.cfg 27 sed -i "/--no-cov-on-fail/d" setup.cfg 28 ''; 29 30 build-system = [ 31 setuptools 32 setuptools-scm 33 ]; 34 35 nativeCheckInputs = [ pytestCheckHook ]; 36 37 disabledTestPaths = [ 38 # Don't test the documentation 39 "docs/*.rst" 40 ]; 41 42 pythonImportsCheck = [ "semver" ]; 43 44 meta = with lib; { 45 description = "Python package to work with Semantic Versioning (http://semver.org/)"; 46 homepage = "https://python-semver.readthedocs.io/"; 47 changelog = "https://github.com/python-semver/python-semver/releases/tag/3.0.0"; 48 license = licenses.bsd3; 49 maintainers = with maintainers; [ np ]; 50 mainProgram = "pysemver"; 51 }; 52}