From 39cb2d6e3f7935cc8fe4b2115a8a0439e71771b0 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 26 Apr 2022 23:39:11 +0200 Subject: [PATCH] python39Packages.aiomysql: 0.0.21 -> 0.1.0 --- .../python-modules/aiomysql/default.nix | 44 +++++++------------ 1 file changed, 17 insertions(+), 27 deletions(-) diff --git a/pkgs/development/python-modules/aiomysql/default.nix b/pkgs/development/python-modules/aiomysql/default.nix index 3432931f935..b52760d2069 100644 --- a/pkgs/development/python-modules/aiomysql/default.nix +++ b/pkgs/development/python-modules/aiomysql/default.nix @@ -2,55 +2,45 @@ , buildPythonPackage , fetchFromGitHub , pymysql -, pytest -, isPy27 -, fetchpatch +, pythonOlder +, setuptools-scm +, setuptools-scm-git-archive }: buildPythonPackage rec { pname = "aiomysql"; - version = "0.0.21"; - disabled = isPy27; + version = "0.1.0"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "aio-libs"; repo = pname; rev = "v${version}"; - sha256 = "1qvy3phbsxp55161dnppjfx2m1kn82v0irc3xzqw0adfd81vaiad"; + hash = "sha256-TNaQ4EKiHwSmPpUco0pA5SBP3fljWQ/Kd5RLs649fu0="; }; - patches = [ - (fetchpatch { - # vendor functions previously provided by pymysql.util - url = "https://github.com/aio-libs/aiomysql/pull/554/commits/919b997a9de7f53d721af76762fba425e306531e.patch"; - sha256 = "V1VYyqr6RwTXoVoGVyMuJst6uqTuuHbpMOpLoVZO1XA="; - }) + nativeBuildInputs = [ + setuptools-scm + setuptools-scm-git-archive ]; propagatedBuildInputs = [ pymysql ]; - checkInputs = [ - pytest - ]; - - postPatch = '' - substituteInPlace setup.py \ - --replace "PyMySQL>=0.9,<=0.9.3" "PyMySQL" - ''; - - checkPhase = '' - pytest - ''; - - # tests require mysql database + # Tests require MySQL database doCheck = false; + pythonImportsCheck = [ + "aiomysql" + ]; + meta = with lib; { description = "MySQL driver for asyncio"; homepage = "https://github.com/aio-libs/aiomysql"; license = licenses.mit; - maintainers = [ maintainers.costrouc ]; + maintainers = with maintainers; [ costrouc ]; }; }