diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-01-25 12:01:34 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-25 12:01:34 +0000 |
commit | 20df8d00cc2e95ebfc7503f6cfc11ff05d0db403 (patch) | |
tree | 96a67882d22cd900e2a44e527d29538ac21b5dca /pkgs/development/python-modules/promise/default.nix | |
parent | a2f216a00334b1350df235e7c6613c6f3e9022af (diff) | |
parent | 55e19102526fba191a5aa4b8dc4529bd3af298e2 (diff) |
Merge master into staging-next
Diffstat (limited to 'pkgs/development/python-modules/promise/default.nix')
-rw-r--r-- | pkgs/development/python-modules/promise/default.nix | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/pkgs/development/python-modules/promise/default.nix b/pkgs/development/python-modules/promise/default.nix index a4797ff6d6ccd..a9c4c416b7fcd 100644 --- a/pkgs/development/python-modules/promise/default.nix +++ b/pkgs/development/python-modules/promise/default.nix @@ -1,23 +1,37 @@ -{ buildPythonPackage +{ lib +, buildPythonPackage , fetchFromGitHub -, lib -, six -, pytestCheckHook +, fetchpatch , mock , pytest-asyncio +, pytestCheckHook +, pythonOlder +, six }: buildPythonPackage rec { pname = "promise"; version = "2.3.0"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "syrusakbary"; repo = "promise"; - rev = "v${version}"; - sha256 = "17mq1bm78xfl0x1g50ng502m5ldq6421rzz35hlqafsj0cq8dkp6"; + rev = "refs/tags/v${version}"; + hash = "sha256-5s6GMANSO4UpLOP/HAQxuNFSBSjPgvJCB9R1dOoKuJ4="; }; + patches = [ + # Convert @asyncio.coroutine to async def, https://github.com/syrusakbary/promise/pull/99 + (fetchpatch { + name = "use-async-def.patch"; + url = "https://github.com/syrusakbary/promise/commit/3cde549d30b38dcff81b308e18c7f61783003791.patch"; + hash = "sha256-XCbTo6RCv75nNrpbK3TFdV0h7tBJ0QK+WOAR8S8w9as="; + }) + ]; + postPatch = '' substituteInPlace tests/test_extra.py \ --replace "assert_exc.traceback[-1].path.strpath" "str(assert_exc.traceback[-1].path)" @@ -28,21 +42,24 @@ buildPythonPackage rec { ]; nativeCheckInputs = [ - pytestCheckHook mock pytest-asyncio + pytestCheckHook ]; disabledTestPaths = [ "tests/test_benchmark.py" ]; + pythonImportsCheck = [ + "promise" + ]; + meta = with lib; { description = "Ultra-performant Promise implementation in Python"; homepage = "https://github.com/syrusakbary/promise"; + changelog = "https://github.com/syrusakbary/promise/releases/tag/v${version}"; license = licenses.mit; - maintainers = with maintainers; [ - kamadorueda - ]; + maintainers = with maintainers; [ kamadorueda ]; }; } |