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