git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #171225 from fabaff/pyeapi-py

python310Packages.pyeapi: fix Python 3.10 support

commitcf98cc1f85628a864d223ad0ea532574c19b88b6 authorSandro <sandro.jaeckel@gmail.com> dateWed 4 May 2022, 14:27 (5 years ago) parent6b1a68cebaa527
1 file changed+36−8
pkgs/development/python-modules/pyeapi/default.nix+36−8
pkgs/development/python-modules/pyeapi/default.nix+36−8
@@ -1,10 +1,11 @@
11{ lib
22, buildPythonPackage
3−, pythonAtLeast
43, fetchFromGitHub
4+, fetchpatch
5+, mock
56, netaddr
67, pytestCheckHook
7−, mock
8+, pythonOlder
89}:
910
1011buildPythonPackage rec {
@@ -12,8 +13,7 @@ buildPythonPackage rec {
1213 version = "0.8.4";
1314 format = "pyproject";
1415
15− # https://github.com/arista-eosplus/pyeapi/issues/189
16− disabled = pythonAtLeast "3.10";
16+ disabled = pythonOlder "3.7";
1717
1818 src = fetchFromGitHub {
1919 owner = "arista-eosplus";
@@ -22,21 +22,49 @@ buildPythonPackage rec {
2222 sha256 = "13chya6wix5jb82k67gr44bjx35gcdwz80nsvpv0gvzs6shn4d7b";
2323 };
2424
25− propagatedBuildInputs = [ netaddr ];
25+ propagatedBuildInputs = [
26+ netaddr
27+ ];
2628
2729 checkInputs = [
2830 mock
2931 pytestCheckHook
3032 ];
3133
32− pytestFlagsArray = [ "test/unit" ];
34+ patches = [
35+ # Fix usage of collection, https://github.com/arista-eosplus/pyeapi/pull/223
36+ (fetchpatch {
37+ name = "fix-collection-usage.patch";
38+ url = "https://github.com/arista-eosplus/pyeapi/commit/81754f57eb095703cc474f527a0915360af76f68.patch";
39+ sha256 = "sha256-ZNBTPRNmXCFVJeRAJxzIHmCOXZiGwU6t4ekSupU3BX8=";
40+ })
41+ (fetchpatch {
42+ name = "fix-collection-usage-2.patch";
43+ url = "https://github.com/arista-eosplus/pyeapi/commit/cc9c584e4a3167e3c1624cccb6bc0d9c9bcdbc1c.patch";
44+ sha256 = "sha256-EY0i1Skm1llEQAAzvrb2yelhhLBkqKAFJB5ObAIxAYo=";
45+ excludes = [
46+ ".github/workflows/ci.yml"
47+ ];
48+ })
49+ (fetchpatch {
50+ name = "fix-collection-usage-3.patch";
51+ url = "https://github.com/arista-eosplus/pyeapi/commit/dc35ab076687ea71665ae9524480b05a4e893909.patch";
52+ sha256 = "sha256-xPaYULCPTxiQGB9Im/qLet+XebW9wq+TAfrxcgQxcoE=";
53+ })
54+ ];
3355
34− pythonImportsCheck = [ "pyeapi" ];
56+ pytestFlagsArray = [
57+ "test/unit"
58+ ];
59+
60+ pythonImportsCheck = [
61+ "pyeapi"
62+ ];
3563
3664 meta = with lib; {
3765 description = "Client for Arista eAPI";
3866 homepage = "https://github.com/arista-eosplus/pyeapi";
3967 license = licenses.bsd3;
40− maintainers = [ maintainers.astro ];
68+ maintainers = with maintainers; [ astro ];
4169 };
4270}