From f1a3393769d18b277d31cb673fe4975410d9b23f Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Sun, 29 Dec 2019 13:07:02 -0500 Subject: [PATCH] python3Packages.aiomysql: init at 0.0.20 --- .../python-modules/aiomysql/default.nix | 47 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 49 insertions(+) create mode 100644 pkgs/development/python-modules/aiomysql/default.nix diff --git a/pkgs/development/python-modules/aiomysql/default.nix b/pkgs/development/python-modules/aiomysql/default.nix new file mode 100644 index 000000000000..891e9f216ce8 --- /dev/null +++ b/pkgs/development/python-modules/aiomysql/default.nix @@ -0,0 +1,47 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pymysql +, pytest +, isPy27 +}: + +buildPythonPackage rec { + pname = "aiomysql"; + version = "0.0.20"; + disabled = isPy27; + + src = fetchFromGitHub { + owner = "aio-libs"; + repo = pname; + rev = "v${version}"; + sha256 = "1mxih81zc2k64briirpp5wz4f72l8v05avfyfibaq9fr6lcbih9b"; + }; + + propagatedBuildInputs = [ + pymysql + ]; + + checkInputs = [ + pytest + ]; + + postPatch = '' + substituteInPlace setup.py \ + --replace "PyMySQL>=0.9,<=0.9.2" "PyMySQL" + ''; + + checkPhase = '' + pytest + ''; + + # tests require mysql database + doCheck = false; + + meta = with lib; { + description = "MySQL driver for asyncio"; + homepage = https://github.com/aio-libs/aiomysql; + license = licenses.mit; + maintainers = [ maintainers.costrouc ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 69ed76696a92..8e7c9cb4bc8c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1456,6 +1456,8 @@ in { aiohttp-swagger = callPackage ../development/python-modules/aiohttp-swagger { }; + aiomysql = callPackage ../development/python-modules/aiomysql { }; + aioprocessing = callPackage ../development/python-modules/aioprocessing { }; aioresponses = callPackage ../development/python-modules/aioresponses { };