Merge pull request #93595 from costrouc/python-pq-init

python3Packages.pq: init at 1.8.1
This commit is contained in:
worldofpeace 2020-07-21 17:24:55 -04:00 committed by GitHub
commit 156ce0c302
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,41 @@
{ lib
, buildPythonPackage
, fetchPypi
, psycopg2
, isPy27
}:
buildPythonPackage rec {
pname = "pq";
version = "1.8.1";
disabled = isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "9e2c0195488263902ebc9da8df6c82bebe4ee32c79d9ecd0cdc2945afbf7ad32";
};
# psycopg2cffi is compatible with psycopg2 and author states that
# module is compatible with psycopg2
postConfigure = ''
substituteInPlace setup.py \
--replace "psycopg2cffi" "psycopg2"
substituteInPlace pq/tests.py \
--replace "psycopg2cffi" "psycopg2"
'';
checkInputs = [
psycopg2
];
# tests require running postgresql cluster
doCheck = false;
meta = with lib; {
description = "PQ is a transactional queue for PostgreSQL";
homepage = https://github.com/malthe/pq/;
license = licenses.bsd3;
maintainers = [ maintainers.costrouc ];
};
}

View File

@ -5292,6 +5292,8 @@ in {
pproxy = callPackage ../development/python-modules/pproxy { };
pq = callPackage ../development/python-modules/pq { };
praw = if isPy3k then callPackage ../development/python-modules/praw { }
else callPackage ../development/python-modules/praw/6.3.nix { };