Skip to content

Commit 5828df4

Browse files
authored
python3Packages.python-izone: replace async-timeout with asyncio.timeout (#461131)
2 parents 4488d82 + 3755e70 commit 5828df4

1 file changed

Lines changed: 19 additions & 6 deletions

File tree

  • pkgs/development/python-modules/python-izone

pkgs/development/python-modules/python-izone/default.nix

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
lib,
33
buildPythonPackage,
4-
pythonOlder,
54
fetchFromGitHub,
5+
fetchpatch,
66
aiohttp,
77
netifaces,
88
pytest-aio,
@@ -14,9 +14,7 @@
1414
buildPythonPackage rec {
1515
pname = "python-izone";
1616
version = "1.2.9";
17-
format = "setuptools";
18-
19-
disabled = pythonOlder "3.8";
17+
pyproject = true;
2018

2119
src = fetchFromGitHub {
2220
owner = "Swamp-Ig";
@@ -25,9 +23,24 @@ buildPythonPackage rec {
2523
hash = "sha256-0rj+tKn2pbFe+nczTMGLwIwmc4jCznGGF4/IMjlEvQg=";
2624
};
2725

28-
nativeBuildInputs = [ setuptools-scm ];
26+
patches = [
27+
# https://github.com/Swamp-Ig/pizone/pull/26
28+
(fetchpatch {
29+
name = "replace-async-timeout-with-asyncio.timeout.patch";
30+
url = "https://github.com/Swamp-Ig/pizone/commit/776a7c5682ecd1b75a0b36dea71c914c25476a77.patch";
31+
hash = "sha256-Cl71BErInSPtFNbPaV7E/LEDZPMuFNGKA8i5e+C3BMA=";
32+
})
33+
];
34+
35+
postPatch = ''
36+
substituteInPlace pyproject.toml \
37+
--replace-fail "setuptools_scm[toml] >= 4, <6" "setuptools-scm[toml]" \
38+
--replace-fail '"setuptools_scm_git_archive",' ""
39+
'';
40+
41+
build-system = [ setuptools-scm ];
2942

30-
propagatedBuildInputs = [
43+
dependencies = [
3144
aiohttp
3245
netifaces
3346
];

0 commit comments

Comments
 (0)