1{ buildPythonPackage
2, numba
3, ndtypes
4, xnd
5, libndtypes
6, libxnd
7, libgumath
8, isPy27
9, isPy38
10}:
11
12buildPythonPackage {
13 pname = "gumath";
14 disabled = isPy27;
15 inherit (libgumath) src version;
16
17 checkInputs = [ numba ];
18 propagatedBuildInputs = [ ndtypes xnd ];
19
20 postPatch = ''
21 substituteInPlace setup.py \
22 --replace 'add_include_dirs = [".", "libgumath", "ndtypes/python/ndtypes", "xnd/python/xnd"] + INCLUDES' \
23 'add_include_dirs = [".", "${libndtypes}/include", "${libxnd}/include", "${libgumath}/include"]' \
24 --replace 'add_library_dirs = ["libgumath", "ndtypes/libndtypes", "xnd/libxnd"] + LIBS' \
25 'add_library_dirs = ["${libndtypes}/lib", "${libxnd}/lib", "${libgumath}/lib"]' \
26 --replace 'add_runtime_library_dirs = ["$ORIGIN"]' \
27 'add_runtime_library_dirs = ["${libndtypes}/lib", "${libxnd}/lib", "${libgumath}/lib"]'
28 '';
29
30 meta = libgumath.meta // {
31 broken = isPy38;
32 };
33}