diff options
author | Daiderd Jordan <daiderd@gmail.com> | 2017-09-16 16:27:33 +0200 |
---|---|---|
committer | Daiderd Jordan <daiderd@gmail.com> | 2017-09-16 16:32:40 +0200 |
commit | 35649750c3dd233430acbcb51225aae4c843debd (patch) | |
tree | b085576afb1ddc209ec6474a8533c80aa5e6cc3c /pkgs/development/python-modules/cffi/default.nix | |
parent | 1adaad1371658a91257be287aa0fbeebf7f6020a (diff) | |
download | nixlib-35649750c3dd233430acbcb51225aae4c843debd.tar nixlib-35649750c3dd233430acbcb51225aae4c843debd.tar.gz nixlib-35649750c3dd233430acbcb51225aae4c843debd.tar.bz2 nixlib-35649750c3dd233430acbcb51225aae4c843debd.tar.lz nixlib-35649750c3dd233430acbcb51225aae4c843debd.tar.xz nixlib-35649750c3dd233430acbcb51225aae4c843debd.tar.zst nixlib-35649750c3dd233430acbcb51225aae4c843debd.zip |
python-cffi: fix test failures when using clang
Diffstat (limited to 'pkgs/development/python-modules/cffi/default.nix')
-rw-r--r-- | pkgs/development/python-modules/cffi/default.nix | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/cffi/default.nix b/pkgs/development/python-modules/cffi/default.nix index 55bd8deef9ac..5b0265601a3e 100644 --- a/pkgs/development/python-modules/cffi/default.nix +++ b/pkgs/development/python-modules/cffi/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, isPyPy, fetchPypi, libffi, pycparser, pytest }: +{ stdenv, buildPythonPackage, isPyPy, fetchPypi, libffi, pycparser, pytest }: if isPyPy then null else buildPythonPackage rec { pname = "cffi"; @@ -13,15 +13,14 @@ if isPyPy then null else buildPythonPackage rec { propagatedBuildInputs = [ libffi pycparser ]; buildInputs = [ pytest ]; - patchPhase = '' - substituteInPlace testing/cffi0/test_ownlib.py --replace "gcc" "cc" - ''; + # The tests use -Werror but with python3.6 clang detects some unreachable code. + NIX_CFLAGS_COMPILE = stdenv.lib.optional stdenv.cc.isClang "-Wno-unreachable-code"; checkPhase = '' py.test ''; - meta = with lib; { + meta = with stdenv.lib; { maintainers = with maintainers; [ domenkozar ]; homepage = https://cffi.readthedocs.org/; license = with licenses; [ mit ]; |