3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/peewee/default.nix
Symphorien Gibol ee52567e4c python3Packages.peewee: 3.11.2 -> 3.13.3
tests don't pass without psycopg2 support:
Exception: Your version of psycopg2 does not support JSON.
2020-06-20 12:53:14 -07:00

49 lines
972 B
Nix

{ stdenv, lib, buildPythonPackage, fetchFromGitHub
, sqlite
, cython
, apsw
, flask
, withPostgres ? false, psycopg2
, withMysql ? false, mysql-connector
}:
buildPythonPackage rec {
pname = "peewee";
version = "3.13.3";
# pypi release does not provide tests
src = fetchFromGitHub {
owner = "coleifer";
repo = pname;
rev = version;
sha256 = "1r67hxb9m6v0xbnbqfnsw6dahmdr94pf81b4x51jfw6x9sa4izi4";
};
checkInputs = [ flask ];
checkPhase = ''
rm -r playhouse # avoid using the folder in the cwd
python runtests.py
'';
buildInputs = [
sqlite
cython # compile speedups
];
propagatedBuildInputs = [
apsw # sqlite performance improvement
] ++ (lib.optional withPostgres psycopg2)
++ (lib.optional withMysql mysql-connector);
doCheck = withPostgres;
meta = with stdenv.lib;{
description = "a small, expressive orm";
homepage = "http://peewee-orm.com";
license = licenses.mit;
};
}