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
python3Packages.gpgme: enable python3 support #46304
Conversation
@FRidh should I put this into staging ? |
LGTM! I actually did largely the same thing to get gpgme working w/py3 for use with recent (commit not intended for upstream inclusion as-is, but even so it's what I've been using and works for me--yours looks the same but better ;)) |
@GrahamcOfBorg build python3Packages.gpgme |
Failure on aarch64-linux (full log) Attempted: python3Packages.gpgme Partial log (click to expand)
|
Failure on x86_64-linux (full log) Attempted: python3Packages.gpgme Partial log (click to expand)
|
@GrahamcOfBorg build python3Packages.gpgme |
Success on aarch64-linux (full log) Attempted: python3Packages.gpgme Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: python3Packages.gpgme Partial log (click to expand)
|
@primeos true my comment was a bit cryptic. I just looked for the gpgme maintainers to see if I could do anything to merge this. GrahamcOfBorg didn't trigger on my force push but it now compiles (and works with the mail client |
, autoreconfHook | ||
, git | ||
, texinfo | ||
, qtbase ? null | ||
, withPython ? false, swig2 ? null, python ? null | ||
, pythonSupport ? false, swig2 ? null, python ? null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about this change. It obviously makes sense to stick to conventions but I'm also against backward incompatible changes that could break setups (I don't know how many users override withPython
). I also wonder if this convention is documented somewhere (didn't find anything inside the manuals).
But pythonSupport
is definitely used more often:
$ git grep withPython | wc -l
31
$ git grep pythonSupport | wc -l
89
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember a PR to improve python docs where I suggested to add it but can't find it again. Another suggestion is 39e9de1#r29184438 .
I am for changing the parameter name as my main grip with nixpkgs is its lack of consistency (across languages mainly).
People needing the python support must have been using pythonPackages.gpgme so it should impact 0 or few people.
I am not sure quite why we need ncurses except for this command line done by gpgme.
configure:20006: checking consistency of all components of python development environment
configure:20032: gcc -o conftest -g -O2 -I/nix/store/hy65mn4wjswqih75gfr6g4q3xgqdm325-python3-3.6.6/include/python3.6m conftest.c -L/nix/store/hy65mn4wjswqih75gfr6g4q3xgqdm325-python3-3.6.6/lib -lpython3.6m -Xlinker -export-dynamic -lpthread -ldl -lcrypt -lncurses -lutil -lm >&5
/nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/ld: cannot find -lncurses
anyway I request ncurses only when python is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, thanks for elaborating. You're right, due to pythonPackages.gpgme
this shouldn't cause much problems :)
@@ -28,8 +28,8 @@ stdenv.mkDerivation rec { | |||
[ libgpgerror glib libassuan pth ] | |||
++ lib.optional (qtbase != null) qtbase; | |||
|
|||
nativeBuildInputs = [ file pkgconfig gnupg autoreconfHook git texinfo ] | |||
++ lib.optionals withPython [ python swig2 which ]; | |||
nativeBuildInputs = [ file pkgconfig gnupg autoreconfHook git texinfo ncurses ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move ncurses
to the next line (only add it for Python support) or is there a reason to always add it (I couldn't find a dependency on ncurses
in the source code)?
when calling python3Packages.gpgme, it was still picking python2. Changed withPython into pythonSupport since it's the convention. I had to enable ncurses too because of this error when configuring: configure:19978: checking python extra libraries configure:19985: result: -lpthread -ldl -lcrypt -lncurses -lutil -lm configure:19992: checking python extra linking flags configure:19999: result: -Xlinker -export-dynamic configure:20006: checking consistency of all components of python development environment configure:20032: gcc -o conftest -g -O2 -I/nix/store/hy65mn4wjswqih75gfr6g4q3xgqdm325-python3-3.6.6/include/python3.6m conftest.c -L/nix/store/hy65mn4wjswqih75gfr6g4q3xgqdm325-python3-3.6.6/lib -lpython3.6m -Xlinker -export-dynamic -lpthread -ldl -lcrypt -lncurses -lutil -lm >&5 /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/ld: cannot find -lncurses collect2: error: ld returned 1 exit status configure:20032: $? = 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, all rebuilds still succeed :)
when calling python3Packages.gpgme, it was still picking python2.
Changed withPython into pythonSupport since it's the convention.
I had to enable ncurses too because of this error when configuring:
Motivation for this change
Need python3 bindings for my mail agent "alot"
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)