pythonPackages.asyncpg: fix build on older Python, bump minimum Python version (#294645)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
{ lib
|
||||
, fetchPypi
|
||||
, buildPythonPackage
|
||||
, async-timeout
|
||||
, uvloop
|
||||
, postgresql
|
||||
, pythonOlder
|
||||
@@ -13,7 +14,7 @@ buildPythonPackage rec {
|
||||
version = "0.29.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
@@ -23,6 +24,12 @@ buildPythonPackage rec {
|
||||
# sandboxing issues on aarch64-darwin, see https://github.com/NixOS/nixpkgs/issues/198495
|
||||
doCheck = postgresql.doCheck;
|
||||
|
||||
# required for compatibility with Python versions older than 3.11
|
||||
# see https://github.com/MagicStack/asyncpg/blob/v0.29.0/asyncpg/_asyncio_compat.py#L13
|
||||
propagatedBuildInputs = lib.optionals (pythonOlder "3.11") [
|
||||
async-timeout
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
uvloop
|
||||
postgresql
|
||||
|
||||
Reference in New Issue
Block a user