Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.03 1.8 kB view raw
1{ lib 2, stdenv 3, buildPythonPackage 4, fetchPypi 5, python 6, glibcLocales 7, pkgconfig 8, gdb 9, numpy 10, ncurses 11, fetchpatch 12}: 13 14let 15 excludedTests = [] 16 ++ [ "reimport_from_subinterpreter" ] 17 # cython's testsuite is not working very well with libc++ 18 # We are however optimistic about things outside of testsuite still working 19 ++ stdenv.lib.optionals (stdenv.cc.isClang or false) [ "cpdef_extern_func" "libcpp_algo" ] 20 # Some tests in the test suite isn't working on aarch64. Disable them for 21 # now until upstream finds a workaround. 22 # Upstream issue here: https://github.com/cython/cython/issues/2308 23 ++ stdenv.lib.optionals stdenv.isAarch64 [ "numpy_memoryview" ] 24 ++ stdenv.lib.optionals stdenv.isi686 [ "future_division" "overflow_check_longlong" ] 25 ; 26 27in buildPythonPackage rec { 28 pname = "Cython"; 29 version = "0.29.5"; 30 31 src = fetchPypi { 32 inherit pname version; 33 sha256 = "9d5290d749099a8e446422adfb0aa2142c711284800fb1eb70f595101e32cbf1"; 34 }; 35 36 nativeBuildInputs = [ 37 pkgconfig 38 ]; 39 checkInputs = [ 40 numpy ncurses 41 ]; 42 buildInputs = [ glibcLocales gdb ]; 43 LC_ALL = "en_US.UTF-8"; 44 45 checkPhase = '' 46 export HOME="$NIX_BUILD_TOP" 47 ${python.interpreter} runtests.py -j$NIX_BUILD_CORES \ 48 --no-code-style \ 49 ${stdenv.lib.optionalString (builtins.length excludedTests != 0) 50 ''--exclude="(${builtins.concatStringsSep "|" excludedTests})"''} 51 ''; 52 53 # https://github.com/cython/cython/issues/2785 54 # Temporary solution 55 doCheck = false; 56 57# doCheck = !stdenv.isDarwin; 58 59 60 meta = { 61 description = "An optimising static compiler for both the Python programming language and the extended Cython programming language"; 62 homepage = http://cython.org; 63 license = lib.licenses.asl20; 64 maintainers = with lib.maintainers; [ fridh ]; 65 }; 66}