python311Packages.promise: add patch to remove @asyncio.coroutine
This commit is contained in:
parent
9af21018ce
commit
4ef98ebcc1
1 changed files with 27 additions and 10 deletions
|
@ -1,23 +1,37 @@
|
||||||
{ buildPythonPackage
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, lib
|
, fetchpatch
|
||||||
, six
|
|
||||||
, pytestCheckHook
|
|
||||||
, mock
|
, mock
|
||||||
, pytest-asyncio
|
, pytest-asyncio
|
||||||
|
, pytestCheckHook
|
||||||
|
, pythonOlder
|
||||||
|
, six
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "promise";
|
pname = "promise";
|
||||||
version = "2.3.0";
|
version = "2.3.0";
|
||||||
|
format = "setuptools";
|
||||||
|
|
||||||
|
disabled = pythonOlder "3.7";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "syrusakbary";
|
owner = "syrusakbary";
|
||||||
repo = "promise";
|
repo = "promise";
|
||||||
rev = "v${version}";
|
rev = "refs/tags/v${version}";
|
||||||
sha256 = "17mq1bm78xfl0x1g50ng502m5ldq6421rzz35hlqafsj0cq8dkp6";
|
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 = ''
|
postPatch = ''
|
||||||
substituteInPlace tests/test_extra.py \
|
substituteInPlace tests/test_extra.py \
|
||||||
--replace "assert_exc.traceback[-1].path.strpath" "str(assert_exc.traceback[-1].path)"
|
--replace "assert_exc.traceback[-1].path.strpath" "str(assert_exc.traceback[-1].path)"
|
||||||
|
@ -28,21 +42,24 @@ buildPythonPackage rec {
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [
|
||||||
pytestCheckHook
|
|
||||||
mock
|
mock
|
||||||
pytest-asyncio
|
pytest-asyncio
|
||||||
|
pytestCheckHook
|
||||||
];
|
];
|
||||||
|
|
||||||
disabledTestPaths = [
|
disabledTestPaths = [
|
||||||
"tests/test_benchmark.py"
|
"tests/test_benchmark.py"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [
|
||||||
|
"promise"
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Ultra-performant Promise implementation in Python";
|
description = "Ultra-performant Promise implementation in Python";
|
||||||
homepage = "https://github.com/syrusakbary/promise";
|
homepage = "https://github.com/syrusakbary/promise";
|
||||||
|
changelog = "https://github.com/syrusakbary/promise/releases/tag/v${version}";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with maintainers; [
|
maintainers = with maintainers; [ kamadorueda ];
|
||||||
kamadorueda
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue