Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pythonPackages.psycopg2cffi: init at 2.8.1 #84466

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1067,6 +1067,12 @@
githubId = 3465841;
name = "Boris Sukholitko";
};
bqv = {
email = "[email protected]";
github = "bqv";
githubId = 822863;
name = "Tony Olagbaiye";
};
bradediger = {
email = "[email protected]";
github = "bradediger";
Expand Down
23 changes: 23 additions & 0 deletions pkgs/development/python-modules/psycopg2cffi/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{ stdenv, lib, buildPythonPackage, fetchPypi, cffi, postgresql, openssl, six }:

buildPythonPackage rec {
pname = "psycopg2cffi";
version = "2.8.1";

src = fetchPypi {
inherit pname version;
sha256 = "0yc0cxxkfr35kd959wsagxfhy6ikbix71rp9x0rmn858fxa4vapw";
};

buildInputs = [ six ] ++ lib.optional stdenv.isDarwin openssl;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are six and cffi only needed during build-time, not run-time?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same with openssl. With cffi one opens a library, so its important the Python library knows where to find it. Often it needs to be hardcoded.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely sure, since for my use case this doesn't currently work. What would I have to change if it were?

nativeBuildInputs = [ cffi postgresql ];

doCheck = false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are the tests disabled? Please include a comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same reason they're disabled here (with no comment) https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-modules/psycopg2/default.nix#L17 since this is a fork - you'd presumably know the reason better than me...


meta = with lib; {
description = "PostgreSQL database adapter for the Python programming language";
license = with licenses; [ lgpl3 ];
bqv marked this conversation as resolved.
Show resolved Hide resolved
homepage = "http://github.com/chtd/psycopg2cffi/";
maintainers = with maintainers; [ bqv ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4986,6 +4986,8 @@ in {

psycopg2 = callPackage ../development/python-modules/psycopg2 {};

psycopg2cffi = callPackage ../development/python-modules/psycopg2cffi {};

ptpython = callPackage ../development/python-modules/ptpython {
prompt_toolkit = self.prompt_toolkit;
};
Expand Down