python3Packages.mayim: init at 1.1.0

This commit is contained in:
Ngô Ngọc Đức Huy 2023-12-13 17:08:58 +07:00
parent c4e2e52a21
commit 245ec77ccf
No known key found for this signature in database
GPG key ID: 904AF1C7CDF695C3
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

@ -6800,6 +6800,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 { };