nixpkgs/pkgs/development/python-modules/semver/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
983 B
Nix
Raw Normal View History

{ lib
2020-07-02 03:51:41 +01:00
, buildPythonPackage
, fetchFromGitHub
2020-07-02 03:51:41 +01:00
, pytestCheckHook
, pythonOlder
2020-07-02 03:51:41 +01:00
}:
2020-07-02 03:51:41 +01:00
buildPythonPackage rec {
pname = "semver";
version = "2.13.0";
format = "setuptools";
disabled = pythonOlder "3.6";
2017-12-25 19:23:10 +00:00
src = fetchFromGitHub {
2020-07-02 03:51:41 +01:00
owner = "python-semver";
2017-12-25 19:23:10 +00:00
repo = "python-semver";
2020-07-02 03:51:41 +01:00
rev = version;
hash = "sha256-IWTo/P9JRxBQlhtcH3JMJZZrwAA8EALF4dtHajWUc4w=";
};
checkInputs = [
pytestCheckHook
];
postPatch = ''
sed -i "/--cov/d" setup.cfg
sed -i "/--no-cov-on-fail/d" setup.cfg
'';
preCheck = ''
# Confuses source vs dist imports in pytest
rm -r dist
'';
disabledTestPaths = [
# Don't test the documentation
"docs/*.rst"
];
pythonImportsCheck = [
"semver"
];
meta = with lib; {
description = "Python package to work with Semantic Versioning (http://semver.org/)";
homepage = "https://python-semver.readthedocs.io/";
license = licenses.bsd3;
maintainers = with maintainers; [ np ];
};
}