Merge pull request #29471 from LnL7/cffi-clang
python-cffi: fix test failures when using clang
This commit is contained in:
commit
8c4f230122
@ -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 {
|
if isPyPy then null else buildPythonPackage rec {
|
||||||
pname = "cffi";
|
pname = "cffi";
|
||||||
@ -13,15 +13,14 @@ if isPyPy then null else buildPythonPackage rec {
|
|||||||
propagatedBuildInputs = [ libffi pycparser ];
|
propagatedBuildInputs = [ libffi pycparser ];
|
||||||
buildInputs = [ pytest ];
|
buildInputs = [ pytest ];
|
||||||
|
|
||||||
patchPhase = ''
|
# The tests use -Werror but with python3.6 clang detects some unreachable code.
|
||||||
substituteInPlace testing/cffi0/test_ownlib.py --replace "gcc" "cc"
|
NIX_CFLAGS_COMPILE = stdenv.lib.optional stdenv.cc.isClang "-Wno-unreachable-code";
|
||||||
'';
|
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
py.test
|
py.test
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with stdenv.lib; {
|
||||||
maintainers = with maintainers; [ domenkozar ];
|
maintainers = with maintainers; [ domenkozar ];
|
||||||
homepage = https://cffi.readthedocs.org/;
|
homepage = https://cffi.readthedocs.org/;
|
||||||
license = with licenses; [ mit ];
|
license = with licenses; [ mit ];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user