diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2017-07-29 12:14:17 +0200 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2017-07-29 13:04:07 +0200 |
commit | 4f296cbaeb91370a4ff226485e5d47f5ff082201 (patch) | |
tree | ac5be21d1b4887af754caee6902c9dab0fa26d3f /pkgs/development/python-modules/Cython | |
parent | 25fa9f2f14ca36159cb25f0405558351e87b5292 (diff) | |
download | nixpkgs-4f296cbaeb91370a4ff226485e5d47f5ff082201.tar nixpkgs-4f296cbaeb91370a4ff226485e5d47f5ff082201.tar.gz nixpkgs-4f296cbaeb91370a4ff226485e5d47f5ff082201.tar.bz2 nixpkgs-4f296cbaeb91370a4ff226485e5d47f5ff082201.tar.lz nixpkgs-4f296cbaeb91370a4ff226485e5d47f5ff082201.tar.xz nixpkgs-4f296cbaeb91370a4ff226485e5d47f5ff082201.tar.zst nixpkgs-4f296cbaeb91370a4ff226485e5d47f5ff082201.zip |
python.pkgs.cython: move expression
Diffstat (limited to 'pkgs/development/python-modules/Cython')
-rw-r--r-- | pkgs/development/python-modules/Cython/default.nix | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/Cython/default.nix b/pkgs/development/python-modules/Cython/default.nix new file mode 100644 index 00000000000..9d09b93ed20 --- /dev/null +++ b/pkgs/development/python-modules/Cython/default.nix @@ -0,0 +1,57 @@ +{ lib +, stdenv +, buildPythonPackage +, fetchPypi +, isPy3k +, python +, glibcLocales +, pkgconfig +, gdb +, numpy +, ncurses +}: + +buildPythonPackage rec { + pname = "Cython"; + name = "${pname}-${version}"; + version = "0.25.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "01h3lrf6d98j07iakifi81qjszh6faa37ibx7ylva1vsqbwx2hgi"; + }; + + # With Python 2.x on i686-linux or 32-bit ARM this test fails because the + # result is "3L" instead of "3", so let's fix it in-place. + # + # Upstream issue: https://github.com/cython/cython/issues/1548 + postPatch = lib.optionalString ((stdenv.isi686 || stdenv.isArm) && !isPy3k) '' + sed -i -e 's/\(>>> *\)\(verify_resolution_GH1533()\)/\1int(\2)/' \ + tests/run/cpdef_enums.pyx + ''; + + buildInputs = [ glibcLocales pkgconfig gdb ]; + # For testing + nativeBuildInputs = [ numpy ncurses ]; + + LC_ALL = "en_US.UTF-8"; + + # cython's testsuite is not working very well with libc++ + # We are however optimistic about things outside of testsuite still working + checkPhase = '' + export HOME="$NIX_BUILD_TOP" + ${python.interpreter} runtests.py \ + ${if stdenv.cc.isClang or false then ''--exclude="(cpdef_extern_func|libcpp_algo)"'' else ""} + ''; + + # Disable tests temporarily + # https://github.com/cython/cython/issues/1676 + doCheck = false; + + meta = { + description = "An optimising static compiler for both the Python programming language and the extended Cython programming language"; + homepage = http://cython.org; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ fridh ]; + }; +} \ No newline at end of file |