Merge pull request #274138 from Huy-Ngo/mayim

python3Packages.mayim: init at 1.1.0
This commit is contained in:
OTABI Tomoya 2023-12-18 00:05:27 +09:00 committed by GitHub
commit c306fb7c22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 68 additions and 0 deletions

View file

@ -0,0 +1,66 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, wheel
, psycopg
, aiosqlite
, asyncmy
# test
, pytest-asyncio
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "mayim";
version = "1.1.0";
pyproject = true;
src = fetchFromGitHub {
owner = "ahopkins";
repo = "mayim";
rev = "refs/tags/v${version}";
hash = "sha256-nb0E9kMEJUihaCp8RnqGh0nSyDQo50eL1C4K5lBPlPQ=";
};
nativeBuildInputs = [
setuptools
wheel
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace "--cov=src --cov-append --cov-report term-missing" ""
'';
passthru.optional-dependencies = {
postgres = [
psycopg
] ++ psycopg.optional-dependencies.pool;
mysql = [
asyncmy
];
sqlite = [
aiosqlite
];
};
nativeCheckInputs = [
pytestCheckHook
pytest-asyncio
] ++ (with passthru.optional-dependencies; [postgres mysql sqlite]);
pythonImportsCheck = [
"mayim"
];
meta = with lib; {
description = "Asynchronous SQL hydrator";
homepage = "https://github.com/ahopkins/mayim";
license = licenses.mit;
maintainers = with maintainers; [ huyngo ];
};
}

View file

@ -6810,6 +6810,8 @@ self: super: with self; {
inherit (self) buildPythonPackage pythonOlder pythonAtLeast pyface pygments numpy packaging vtk traitsui envisage apptools pyqt5;
};
mayim = callPackage ../development/python-modules/mayim { };
mbddns = callPackage ../development/python-modules/mbddns { };
mbstrdecoder = callPackage ../development/python-modules/mbstrdecoder { };