diff options
author | José Romildo Malaquias <malaquias@gmail.com> | 2017-11-02 00:29:12 -0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-02 00:29:12 -0200 |
commit | c07835a11bedd070aef2d2e86e7d03d579b560f3 (patch) | |
tree | 8b7f11859dd719c4d6dd7cfd83da5c541d5a6454 /pkgs/development/python-modules/cffi | |
parent | d3763a7164e7c8b1b269add0d0ed1e8f316bbdc9 (diff) | |
parent | bb6257bd3a22f79b00350966e9de0786cae26f5b (diff) | |
download | nixlib-c07835a11bedd070aef2d2e86e7d03d579b560f3.tar nixlib-c07835a11bedd070aef2d2e86e7d03d579b560f3.tar.gz nixlib-c07835a11bedd070aef2d2e86e7d03d579b560f3.tar.bz2 nixlib-c07835a11bedd070aef2d2e86e7d03d579b560f3.tar.lz nixlib-c07835a11bedd070aef2d2e86e7d03d579b560f3.tar.xz nixlib-c07835a11bedd070aef2d2e86e7d03d579b560f3.tar.zst nixlib-c07835a11bedd070aef2d2e86e7d03d579b560f3.zip |
Merge branch 'master' into upd.lxqt
Diffstat (limited to 'pkgs/development/python-modules/cffi')
-rw-r--r-- | pkgs/development/python-modules/cffi/clang.patch | 13 | ||||
-rw-r--r-- | pkgs/development/python-modules/cffi/default.nix | 6 |
2 files changed, 17 insertions, 2 deletions
diff --git a/pkgs/development/python-modules/cffi/clang.patch b/pkgs/development/python-modules/cffi/clang.patch new file mode 100644 index 000000000000..27674edb58b4 --- /dev/null +++ b/pkgs/development/python-modules/cffi/clang.patch @@ -0,0 +1,13 @@ +diff --git a/testing/cffi1/test_recompiler.py b/testing/cffi1/test_recompiler.py +index a3277b0..0d6e2c3 100644 +--- a/testing/cffi1/test_recompiler.py ++++ b/testing/cffi1/test_recompiler.py +@@ -2270,7 +2270,7 @@ def test_char16_char32_type(no_cpp=False): + char32_t foo_4bytes(char32_t); + """) + lib = verify(ffi, "test_char16_char32_type" + no_cpp * "_nocpp", """ +- #if !defined(__cplusplus) || __cplusplus < 201103L ++ #if !defined(__cplusplus) + typedef uint_least16_t char16_t; + typedef uint_least32_t char32_t; + #endif diff --git a/pkgs/development/python-modules/cffi/default.nix b/pkgs/development/python-modules/cffi/default.nix index 5c99e77af56b..b0524b4121ad 100644 --- a/pkgs/development/python-modules/cffi/default.nix +++ b/pkgs/development/python-modules/cffi/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, isPyPy, fetchPypi, libffi, pycparser, pytest }: +{ stdenv, buildPythonPackage, isPy27, isPyPy, fetchPypi, libffi, pycparser, pytest }: if isPyPy then null else buildPythonPackage rec { pname = "cffi"; @@ -10,13 +10,15 @@ if isPyPy then null else buildPythonPackage rec { sha256 = "ab87dd91c0c4073758d07334c1e5f712ce8fe48f007b86f8238773963ee700a6"; }; + patches = stdenv.lib.optional (isPy27 && stdenv.cc.isClang) ./clang.patch; + outputs = [ "out" "dev" ]; propagatedBuildInputs = [ libffi pycparser ]; buildInputs = [ pytest ]; # 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"; + NIX_CFLAGS_COMPILE = stdenv.lib.optionals stdenv.cc.isClang [ "-Wno-unused-command-line-argument" "-Wno-unreachable-code" ]; checkPhase = '' py.test |