python3.pkgs.autarco: remove setuptools dependency

This commit is contained in:
Theodore Ni 2023-08-22 22:59:52 -07:00
parent dfe898c801
commit d318144b57
No known key found for this signature in database
GPG Key ID: 48B67583BDDD4474

View File

@ -3,6 +3,7 @@
, aresponses
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, poetry-core
, pytest-asyncio
, pytestCheckHook
@ -24,6 +25,22 @@ buildPythonPackage rec {
hash = "sha256-3f6N4b6WZPAUUQTuGeb20q0f7ZqDR+O24QRze5RpRlw=";
};
patches = [
# https://github.com/klaasnicolaas/python-autarco/pull/265
(fetchpatch {
name = "remove-setuptools-dependency.patch";
url = "https://github.com/klaasnicolaas/python-autarco/commit/bf40e8a4f64cd9c9cf72930260895537ea5b2adc.patch";
hash = "sha256-Fgijy7sd67LUIqh3qjQjyothnjdW7Zcil/bQSuVsBR8=";
})
];
postPatch = ''
# Upstream doesn't set a version for the pyproject.toml
substituteInPlace pyproject.toml \
--replace "0.0.0" "${version}" \
--replace "--cov" ""
'';
nativeBuildInputs = [
poetry-core
];
@ -33,19 +50,14 @@ buildPythonPackage rec {
yarl
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
aresponses
pytest-asyncio
pytestCheckHook
];
postPatch = ''
# Upstream doesn't set a version for the pyproject.toml
substituteInPlace pyproject.toml \
--replace "0.0.0" "${version}" \
--replace "--cov" ""
'';
pythonImportsCheck = [
"autarco"
];