2019-12-29 19:07:02 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pymysql
|
|
|
|
, pytest
|
|
|
|
, isPy27
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aiomysql";
|
2020-11-29 15:04:22 +01:00
|
|
|
version = "0.0.21";
|
2019-12-29 19:07:02 +01:00
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "aio-libs";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-11-29 15:04:22 +01:00
|
|
|
sha256 = "1qvy3phbsxp55161dnppjfx2m1kn82v0irc3xzqw0adfd81vaiad";
|
2019-12-29 19:07:02 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pymysql
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
2020-12-26 20:25:46 +01:00
|
|
|
--replace "PyMySQL>=0.9,<=0.9.3" "PyMySQL"
|
2019-12-29 19:07:02 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
pytest
|
|
|
|
'';
|
|
|
|
|
|
|
|
# tests require mysql database
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "MySQL driver for asyncio";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/aio-libs/aiomysql";
|
2019-12-29 19:07:02 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|