mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
python311Packages.nest-asyncio: refactor
This commit is contained in:
parent
cb7307a8ac
commit
0b5ab1be1e
1 changed files with 27 additions and 11 deletions
|
@ -1,27 +1,43 @@
|
||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchFromGitHub
|
||||||
, pythonAtLeast
|
, pytestCheckHook
|
||||||
|
, pythonOlder
|
||||||
|
, setuptools
|
||||||
|
, setuptools-scm
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
|
pname = "nest-asyncio";
|
||||||
version = "1.5.6";
|
version = "1.5.6";
|
||||||
pname = "nest_asyncio";
|
pyproject = true;
|
||||||
disabled = !(pythonAtLeast "3.5");
|
|
||||||
|
|
||||||
src = fetchPypi {
|
disabled = pythonOlder "3.8";
|
||||||
inherit pname version;
|
|
||||||
hash = "sha256-0mfMH/eUQD999pKWTR0qP6lBj/6io/aFmkOf9IL+8pA=";
|
src = fetchFromGitHub {
|
||||||
|
owner = "erdewit";
|
||||||
|
repo = "nest_asyncio";
|
||||||
|
rev = "refs/tags/v${version}";
|
||||||
|
hash = "sha256-DxIHDU/3OP3AF/abQs3Y6Im6VUiHYgMmVVh4fDeT8gk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# tests not packaged with source dist as of 1.3.2/1.3.2, and
|
nativeBuildInputs = [
|
||||||
# can't check tests out of GitHub easily without specific commit IDs (no tagged releases)
|
setuptools
|
||||||
doCheck = false;
|
setuptools-scm
|
||||||
pythonImportsCheck = [ "nest_asyncio" ];
|
];
|
||||||
|
|
||||||
|
nativeCheckInputs = [
|
||||||
|
pytestCheckHook
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [
|
||||||
|
"nest_asyncio"
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Patch asyncio to allow nested event loops";
|
description = "Patch asyncio to allow nested event loops";
|
||||||
homepage = "https://github.com/erdewit/nest_asyncio";
|
homepage = "https://github.com/erdewit/nest_asyncio";
|
||||||
|
changelog = "https://github.com/erdewit/nest_asyncio/releases/tag/v${version}";
|
||||||
license = licenses.bsdOriginal;
|
license = licenses.bsdOriginal;
|
||||||
maintainers = with maintainers; [ ];
|
maintainers = with maintainers; [ ];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue