nixpkgs/pkgs/development/python-modules/cffi/default.nix
Frederik Rietdijk 94c4a6c0b1 Revert "Merge pull request #30913 from LnL7/darwin-cffi"
This reverts commit f20a36fcd8, reversing
changes made to 15350df8d9.

I accidentally pressed the Merge button.
2017-10-29 10:12:24 +01:00

31 lines
894 B
Nix

{ stdenv, buildPythonPackage, isPyPy, fetchPypi, libffi, pycparser, pytest }:
if isPyPy then null else buildPythonPackage rec {
pname = "cffi";
version = "1.11.2";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "ab87dd91c0c4073758d07334c1e5f712ce8fe48f007b86f8238773963ee700a6";
};
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";
checkPhase = ''
py.test
'';
meta = with stdenv.lib; {
maintainers = with maintainers; [ domenkozar ];
homepage = https://cffi.readthedocs.org/;
license = with licenses; [ mit ];
description = "Foreign Function Interface for Python calling C code";
};
}