1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 19:51:17 +00:00

Merge pull request #282799 from dotlambda/dparse-fix

python312Packages.dparse: fix build
This commit is contained in:
Robert Schütz 2024-01-23 20:40:17 -08:00 committed by GitHub
commit a8dadf55c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,17 +1,19 @@
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, toml
, pyyaml
, fetchPypi
, fetchpatch2
, setuptools
, packaging
, tomli
, pyyaml
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "dparse";
version = "0.6.3";
format = "setuptools";
pyproject = true;
disabled = pythonOlder "3.6";
@ -20,15 +22,32 @@ buildPythonPackage rec {
hash = "sha256-J7uLS8rv7DmXaXuj9uBrJEcgC6JzwLCFw9ASoEVxtSg=";
};
propagatedBuildInputs = [
toml
pyyaml
packaging
patches = [
(fetchpatch2 {
name = "fix-configparser-deprecation-warning.patch";
url = "https://github.com/pyupio/dparse/pull/69.patch";
hash = "sha256-RolD6xDJpI8/UHgAdcsXoyxOGLok7AogLMOTl1ZPKvw=";
})
];
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
packaging
] ++ lib.optionals (pythonOlder "3.11") [
tomli
];
passthru.optional-dependencies = {
# FIXME pipenv = [ pipenv ];
conda = [ pyyaml ];
};
nativeCheckInputs = [
pytestCheckHook
];
] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);
pythonImportsCheck = [
"dparse"