2021-04-25 03:57:28 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-09-22 12:36:57 +00:00
|
|
|
, pythonOlder
|
2024-01-25 14:12:00 +00:00
|
|
|
, fetchPypi
|
|
|
|
, fetchpatch2
|
|
|
|
, setuptools
|
2021-04-25 03:57:28 +00:00
|
|
|
, packaging
|
2024-01-25 14:12:00 +00:00
|
|
|
, tomli
|
|
|
|
, pyyaml
|
2021-04-25 03:57:28 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
2020-05-15 21:57:56 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dparse";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "0.6.3";
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
2022-09-22 12:36:57 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-05-15 21:57:56 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-J7uLS8rv7DmXaXuj9uBrJEcgC6JzwLCFw9ASoEVxtSg=";
|
2020-05-15 21:57:56 +00:00
|
|
|
};
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch2 {
|
|
|
|
name = "fix-configparser-deprecation-warning.patch";
|
|
|
|
url = "https://github.com/pyupio/dparse/pull/69.patch";
|
|
|
|
hash = "sha256-RolD6xDJpI8/UHgAdcsXoyxOGLok7AogLMOTl1ZPKvw=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
packaging
|
2024-01-25 14:12:00 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
|
|
|
tomli
|
2021-04-25 03:57:28 +00:00
|
|
|
];
|
2020-05-15 21:57:56 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
# FIXME pipenv = [ pipenv ];
|
|
|
|
conda = [ pyyaml ];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-04-25 03:57:28 +00:00
|
|
|
pytestCheckHook
|
2024-01-25 14:12:00 +00:00
|
|
|
] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);
|
2021-04-25 03:57:28 +00:00
|
|
|
|
2022-09-22 12:36:57 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"dparse"
|
|
|
|
];
|
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
disabledTests = [
|
|
|
|
# requires unpackaged dependency pipenv
|
|
|
|
"test_update_pipfile"
|
|
|
|
];
|
2020-05-15 21:57:56 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A parser for Python dependency files";
|
2021-04-25 03:57:28 +00:00
|
|
|
homepage = "https://github.com/pyupio/dparse";
|
2023-07-15 17:15:38 +00:00
|
|
|
changelog = "https://github.com/pyupio/dparse/blob/${version}/HISTORY.rst";
|
2020-05-15 21:57:56 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ thomasdesr ];
|
|
|
|
};
|
|
|
|
}
|