depot/third_party/nixpkgs/pkgs/development/python-modules/pip-requirements-parser/default.nix
Default email 83405b6dd2 Project import generated by Copybara.
GitOrigin-RevId: ac718d02867a84b42522a0ece52d841188208f2c
2023-03-15 17:39:30 +01:00

59 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, packaging
, pyparsing
, pytestCheckHook
, pythonOlder
, setuptools-scm
}:
buildPythonPackage rec {
pname = "pip-requirements-parser";
version = "32.0.1";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "nexB";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-UMrwDXxk+sD3P2jk7s95y4OX6DRBjWWZZ8IhkR6tnZ4=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;
dontConfigure = true;
nativeBuildInputs = [
setuptools-scm
];
propagatedBuildInputs = [
packaging
pyparsing
];
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"pip_requirements_parser"
];
disabledTests = [
"test_RequirementsFile_to_dict"
"test_RequirementsFile_dumps_unparse"
"test_legacy_version_is_deprecated"
];
meta = with lib; {
description = "Module to parse pip requirements";
homepage = "https://github.com/nexB/pip-requirements-parser";
changelog = "https://github.com/nexB/pip-requirements-parser/blob/v${version}/CHANGELOG.rst";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}