Merge pull request #145179 from fabaff/bump-peewee

This commit is contained in:
Sandro 2021-11-10 13:37:48 +01:00 committed by GitHub
commit 9dbbb7d5c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,50 +1,58 @@
{ lib { lib
, buildPythonPackage
, fetchFromGitHub
, sqlite
, cython
, apsw , apsw
, buildPythonPackage
, cython
, fetchFromGitHub
, flask , flask
, withPostgres ? false, psycopg2 , python
, withMysql ? false, mysql-connector , sqlite
, withMysql ? false
, mysql-connector
, withPostgres ? false
, psycopg2
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "peewee"; pname = "peewee";
version = "3.14.4"; version = "3.14.8";
format = "setuptools";
# pypi release does not provide tests
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "coleifer"; owner = "coleifer";
repo = pname; repo = pname;
rev = version; rev = version;
sha256 = "0x85swpaffysc05kka0mab87cnilzw1lpacfhcx5ayabh0i2qsh6"; sha256 = "sha256-BJSM+7+VdW6SxN4/AXsX8NhQPdIFoYrVRVwR9OsJ3QE=";
}; };
checkInputs = [ flask ];
checkPhase = ''
rm -r playhouse # avoid using the folder in the cwd
python runtests.py
'';
buildInputs = [ buildInputs = [
sqlite sqlite
cython # compile speedups cython
]; ];
propagatedBuildInputs = [ propagatedBuildInputs = [
apsw # sqlite performance improvement apsw
] ++ (lib.optional withPostgres psycopg2) ] ++ lib.optional withPostgres psycopg2
++ (lib.optional withMysql mysql-connector); ++ lib.optional withMysql mysql-connector;
checkInputs = [
flask
];
doCheck = withPostgres; doCheck = withPostgres;
checkPhase = ''
rm -r playhouse # avoid using the folder in the cwd
${python.interpreter} runtests.py
'';
pythonImportsCheck = [
"peewee"
];
meta = with lib; { meta = with lib; {
description = "a small, expressive orm"; description = "Python ORM with support for various database implementation";
homepage = "http://peewee-orm.com"; homepage = "http://peewee-orm.com";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ ];
}; };
} }