2020-07-18 16:06:22 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, nose
|
2021-12-19 01:06:50 +00:00
|
|
|
, pythonOlder
|
|
|
|
, semver
|
2020-07-18 16:06:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pkutils";
|
2021-12-19 01:06:50 +00:00
|
|
|
version = "2.0.0";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "reubano";
|
|
|
|
repo = "pkutils";
|
|
|
|
rev = "v${version}";
|
2021-12-19 01:06:50 +00:00
|
|
|
sha256 = "sha256-jvRUjuxlcfmJOX50bnZR/pP2Axe1KDy9/KGXTL4yPxA=";
|
2020-07-18 16:06:22 +00:00
|
|
|
};
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
semver
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
nose
|
|
|
|
];
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
2021-12-19 01:06:50 +00:00
|
|
|
# Remove when https://github.com/reubano/pkutils/pull/4 merged
|
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace "semver>=2.2.1,<2.7.3" "semver"
|
2020-07-18 16:06:22 +00:00
|
|
|
'';
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
nosetests
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
2020-07-18 16:06:22 +00:00
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pkutils"
|
|
|
|
];
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A Python packaging utility library";
|
|
|
|
homepage = "https://github.com/reubano/pkutils/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ drewrisinger ];
|
|
|
|
};
|
|
|
|
}
|