2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2022-09-09 14:08:57 +00:00
|
|
|
, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
, python
|
2022-04-03 18:54:34 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
2022-04-03 18:54:34 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "plac";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.4.3";
|
2022-04-03 18:54:34 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ialbert";
|
|
|
|
repo = pname;
|
2023-10-09 19:29:22 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-EWwDtS2cRLBe4aZuH72hgg2BQnVJQ39GmPx05NxTNjE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
# tests are broken, see https://github.com/ialbert/plac/issues/74
|
|
|
|
doCheck = false;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
checkPhase = ''
|
2022-09-09 14:08:57 +00:00
|
|
|
runHook preCheck
|
|
|
|
|
|
|
|
${python.interpreter} doc/test_plac.py
|
|
|
|
|
|
|
|
runHook postCheck
|
2021-09-22 15:38:15 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-03 18:54:34 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"plac"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Parsing the Command Line the Easy Way";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "plac_runner.py";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/micheles/plac";
|
|
|
|
license = licenses.bsdOriginal;
|
2021-09-22 15:38:15 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|