python3Packages.cffi: 1.17.1 -> 2.0.0#445749
Conversation
|
Why was the pypy casing removed? |
|
|
||
| # The tests use -Werror but with python3.6 clang detects some unreachable code. | ||
| env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-unused-command-line-argument -Wno-unreachable-code -Wno-c++11-narrowing"; | ||
| # The tests use -Werror but with python3.6 clang detects some unreachable code. |
There was a problem hiding this comment.
I don't know how to test for clang. I've tried some commands, but none overrode gcc.
There was a problem hiding this comment.
You need to override the attrset passed to buildPythonPackage with "stdenv" set to clangStdenv. A command to do this is nix-build -I nixpkgs=. --expr 'with (import <nixpkgs> { }); python3Packages.cffi.overridePythonAttrs { stdenv = clangStdenv; }'.
NIX_CFLAGS_COMPILE seems to be unnecessary now.
There was a problem hiding this comment.
Yes, with the new default clang 21, it builds fine without any flags.
|
Was there a reason to use the already built cffi from within isPyPy instead of just building it from source? |
Per cffi's setup.py: "On PyPy, cffi is preinstalled and it is not possible, at least for now, to install a different version." |
|
Thank you for the explanation. |
mdaniels5757
left a comment
There was a problem hiding this comment.
Diff LGTM; python3Packages.cffi and its dependent python3Packages.pyvips both build locally on x86_64-linux.
| { | ||
| pyproject = false; | ||
| dontUnpack = true; | ||
| } |
There was a problem hiding this comment.
Make the whole package null for isPyPy in pkgs/top-level/python-packages.nix instead.
There was a problem hiding this comment.
Could you also give a comparison between the two and why this approach is preferred instead?
There was a problem hiding this comment.
With pypy not supporting cffi there shouldn't be a package named cffi in the path.
Your workaround disables pyproject and unpacking but leaves a derivation. Setting cffi to null makes it a no-op for pypy.
mweinelt
left a comment
There was a problem hiding this comment.
Build-tested on x86_64-linux, aarch64-linux and aarch64-darwin.
| # Some dependent packages expect to have pycparser available when using cffi. | ||
| dependencies = [ pycparser ]; |
There was a problem hiding this comment.
Frankly, this is a bug in these packages and shouldn't live rent-free in our cffi packaging.
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.