2022-05-18 14:49:53 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, packaging
|
2023-03-15 16:39:30 +00:00
|
|
|
, pyparsing
|
2022-05-18 14:49:53 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, setuptools-scm
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pip-requirements-parser";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "32.0.1";
|
2022-05-18 14:49:53 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nexB";
|
|
|
|
repo = pname;
|
2023-03-15 16:39:30 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-UMrwDXxk+sD3P2jk7s95y4OX6DRBjWWZZ8IhkR6tnZ4=";
|
2022-05-18 14:49:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
packaging
|
2023-03-15 16:39:30 +00:00
|
|
|
pyparsing
|
2022-05-18 14:49:53 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-05-18 14:49:53 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"pip_requirements_parser"
|
|
|
|
];
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
disabledTests = [
|
|
|
|
"test_RequirementsFile_to_dict"
|
|
|
|
"test_RequirementsFile_dumps_unparse"
|
|
|
|
"test_legacy_version_is_deprecated"
|
|
|
|
];
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Module to parse pip requirements";
|
|
|
|
homepage = "https://github.com/nexB/pip-requirements-parser";
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/nexB/pip-requirements-parser/blob/v${version}/CHANGELOG.rst";
|
2022-05-18 14:49:53 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|