Merge pull request #154745 from fabaff/fix-semver
python3Packages.semver: exclude documentation from tests
This commit is contained in:
commit
3120d901d3
1 changed files with 22 additions and 6 deletions
|
@ -1,30 +1,46 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pytest-cov
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "semver";
|
||||
version = "2.13.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "python-semver";
|
||||
repo = "python-semver";
|
||||
rev = version;
|
||||
sha256 = "sha256-IWTo/P9JRxBQlhtcH3JMJZZrwAA8EALF4dtHajWUc4w=";
|
||||
hash = "sha256-IWTo/P9JRxBQlhtcH3JMJZZrwAA8EALF4dtHajWUc4w=";
|
||||
};
|
||||
|
||||
checkInputs = [
|
||||
pytest-cov
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
# Confuses source vs dist imports in pytest
|
||||
preCheck = "rm -r dist";
|
||||
postPatch = ''
|
||||
sed -i "/--cov/d" setup.cfg
|
||||
sed -i "/--no-cov-on-fail/d" setup.cfg
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "semver" ];
|
||||
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/)";
|
||||
|
|
Loading…
Reference in a new issue