nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 51 lines 983 B view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pytestCheckHook 5, pythonOlder 6}: 7 8buildPythonPackage rec { 9 pname = "semver"; 10 version = "2.13.0"; 11 format = "setuptools"; 12 13 disabled = pythonOlder "3.6"; 14 15 src = fetchFromGitHub { 16 owner = "python-semver"; 17 repo = "python-semver"; 18 rev = version; 19 hash = "sha256-IWTo/P9JRxBQlhtcH3JMJZZrwAA8EALF4dtHajWUc4w="; 20 }; 21 22 checkInputs = [ 23 pytestCheckHook 24 ]; 25 26 postPatch = '' 27 sed -i "/--cov/d" setup.cfg 28 sed -i "/--no-cov-on-fail/d" setup.cfg 29 ''; 30 31 preCheck = '' 32 # Confuses source vs dist imports in pytest 33 rm -r dist 34 ''; 35 36 disabledTestPaths = [ 37 # Don't test the documentation 38 "docs/*.rst" 39 ]; 40 41 pythonImportsCheck = [ 42 "semver" 43 ]; 44 45 meta = with lib; { 46 description = "Python package to work with Semantic Versioning (http://semver.org/)"; 47 homepage = "https://python-semver.readthedocs.io/"; 48 license = licenses.bsd3; 49 maintainers = with maintainers; [ np ]; 50 }; 51}