at 23.11-beta 1.6 kB view raw
1{ lib 2, buildPythonPackage 3, cython 4, numpy 5, libdynd 6, fetchpatch 7, cmake 8, fetchFromGitHub 9}: 10 11buildPythonPackage rec { 12 version = "0.7.2"; 13 pname = "dynd"; 14 15 src = fetchFromGitHub { 16 owner = "libdynd"; 17 repo = "dynd-python"; 18 rev = "v${version}"; 19 sha256 = "19igd6ibf9araqhq9bxmzbzdz05vp089zxvddkiik3b5gb7l17nh"; 20 }; 21 22 patches = [ 23 # Fix numpy compatibility 24 # https://github.com/libdynd/dynd-python/issues/746 25 (fetchpatch { 26 url = "https://aur.archlinux.org/cgit/aur.git/plain/numpy-compatibility.patch?h=python-dynd&id=e626acabd041069861311f314ac3dbe9e6fd24b7"; 27 sha256 = "sha256-oA/3G8CGeDhiYXbNX+G6o3QSb7rkKItuCDCbnK3Rt10="; 28 name = "numpy-compatibility.patch"; 29 }) 30 ]; 31 32 # setup.py invokes git on build but we're fetching a tarball, so 33 # can't retrieve git version. We hardcode: 34 preConfigure = '' 35 substituteInPlace setup.py --replace "ver = check_output(['git', 'describe', '--dirty'," "ver = '${version}'" 36 substituteInPlace setup.py --replace "'--always', '--match', 'v*']).decode('ascii').strip('\n')" "" 37 ''; 38 39 dontUseCmakeConfigure = true; 40 41 nativeBuildInputs = [ cmake ]; 42 43 buildInputs = [ 44 cython 45 libdynd.dev 46 ]; 47 48 propagatedBuildInputs = [ 49 libdynd 50 numpy 51 ]; 52 53 # ModuleNotFoundError: No module named 'dynd.config' 54 doCheck = false; 55 56 pythonImportsCheck = [ "dynd" ]; 57 58 meta = with lib; { 59 homepage = "http://libdynd.org"; 60 license = licenses.bsd2; 61 description = "Python exposure of dynd"; 62 maintainers = with maintainers; [ teh ]; 63 }; 64 65}