Merge pull request #145179 from fabaff/bump-peewee
This commit is contained in:
commit
9dbbb7d5c3
@ -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; [ ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user