Loading pkgs/development/python-modules/xnd/default.nix +29 −15 Original line number Diff line number Diff line Loading @@ -2,31 +2,41 @@ lib, stdenv, buildPythonPackage, python, libxnd, setuptools, ndtypes, libndtypes, libxnd, isPy27, pythonAtLeast, python, }: buildPythonPackage { pname = "xnd"; format = "setuptools"; disabled = isPy27; inherit (libxnd) version src meta; pyproject = true; build-system = [ setuptools ]; propagatedBuildInputs = [ ndtypes ]; dependencies = [ ndtypes ]; buildInputs = [ libndtypes ]; postPatch = '' postPatch = '' substituteInPlace setup.py \ --replace 'include_dirs = ["libxnd", "ndtypes/python/ndtypes"] + INCLUDES' \ --replace-fail \ 'include_dirs = ["libxnd", "ndtypes/python/ndtypes"] + INCLUDES' \ 'include_dirs = ["${libndtypes}/include", "${ndtypes}/include", "${libxnd}/include"]' \ --replace 'library_dirs = ["libxnd", "ndtypes/libndtypes"] + LIBS' \ --replace-fail \ 'library_dirs = ["libxnd", "ndtypes/libndtypes"] + LIBS' \ 'library_dirs = ["${libndtypes}/lib", "${libxnd}/lib"]' \ --replace 'runtime_library_dirs = ["$ORIGIN"]' \ 'runtime_library_dirs = ["${libndtypes}/lib", "${libxnd}/lib"]' \ --replace-fail \ 'runtime_library_dirs = ["$ORIGIN"]' \ 'runtime_library_dirs = ["${libndtypes}/lib", "${libxnd}/lib"]' '' + lib.optionalString (pythonAtLeast "3.12") '' substituteInPlace python/xnd/util.h \ --replace-fail '->ob_digit[i]' '->long_value.ob_digit[i]' ''; postInstall = Loading @@ -39,9 +49,13 @@ buildPythonPackage { ''; checkPhase = '' runHook preCheck pushd python mv xnd _xnd python test_xnd.py popd runHook postCheck ''; } Loading
pkgs/development/python-modules/xnd/default.nix +29 −15 Original line number Diff line number Diff line Loading @@ -2,31 +2,41 @@ lib, stdenv, buildPythonPackage, python, libxnd, setuptools, ndtypes, libndtypes, libxnd, isPy27, pythonAtLeast, python, }: buildPythonPackage { pname = "xnd"; format = "setuptools"; disabled = isPy27; inherit (libxnd) version src meta; pyproject = true; build-system = [ setuptools ]; propagatedBuildInputs = [ ndtypes ]; dependencies = [ ndtypes ]; buildInputs = [ libndtypes ]; postPatch = '' postPatch = '' substituteInPlace setup.py \ --replace 'include_dirs = ["libxnd", "ndtypes/python/ndtypes"] + INCLUDES' \ --replace-fail \ 'include_dirs = ["libxnd", "ndtypes/python/ndtypes"] + INCLUDES' \ 'include_dirs = ["${libndtypes}/include", "${ndtypes}/include", "${libxnd}/include"]' \ --replace 'library_dirs = ["libxnd", "ndtypes/libndtypes"] + LIBS' \ --replace-fail \ 'library_dirs = ["libxnd", "ndtypes/libndtypes"] + LIBS' \ 'library_dirs = ["${libndtypes}/lib", "${libxnd}/lib"]' \ --replace 'runtime_library_dirs = ["$ORIGIN"]' \ 'runtime_library_dirs = ["${libndtypes}/lib", "${libxnd}/lib"]' \ --replace-fail \ 'runtime_library_dirs = ["$ORIGIN"]' \ 'runtime_library_dirs = ["${libndtypes}/lib", "${libxnd}/lib"]' '' + lib.optionalString (pythonAtLeast "3.12") '' substituteInPlace python/xnd/util.h \ --replace-fail '->ob_digit[i]' '->long_value.ob_digit[i]' ''; postInstall = Loading @@ -39,9 +49,13 @@ buildPythonPackage { ''; checkPhase = '' runHook preCheck pushd python mv xnd _xnd python test_xnd.py popd runHook postCheck ''; }