summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/py-onnx-runtime/package.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/py-onnx-runtime/package.py b/var/spack/repos/builtin/packages/py-onnx-runtime/package.py
index fa956086b8..14ce52b9bc 100644
--- a/var/spack/repos/builtin/packages/py-onnx-runtime/package.py
+++ b/var/spack/repos/builtin/packages/py-onnx-runtime/package.py
@@ -27,6 +27,7 @@ class PyOnnxRuntime(CMakePackage, PythonExtension):
depends_on("cmake@3.1:", type="build")
depends_on("ninja", type="build")
depends_on("python", type=("build", "run"))
+ depends_on("py-pip", type="build")
depends_on("protobuf")
# https://github.com/microsoft/onnxruntime/pull/11639
depends_on("protobuf@:3.19", when="@:1.11")
@@ -54,8 +55,9 @@ class PyOnnxRuntime(CMakePackage, PythonExtension):
# https://github.com/cms-externals/onnxruntime/compare/0d9030e...7a6355a
patch("cms_1_10.patch", whe="@1.10")
# https://github.com/microsoft/onnxruntime/issues/4234#issuecomment-698077636
- patch("libiconv.patch", level=0, when="@1.7.2")
- patch("libiconv-1.10.patch", level=0, when="@1.10.0")
+ # only needed when iconv is provided by libiconv
+ patch("libiconv.patch", level=0, when="@1.7.2 ^libiconv")
+ patch("libiconv-1.10.patch", level=0, when="@1.10.0 ^libiconv")
# https://github.com/microsoft/onnxruntime/commit/de4089f8cbe0baffe56a363cc3a41595cc8f0809.patch
patch("gcc11.patch", level=1, when="@1.7.2")
@@ -126,4 +128,7 @@ class PyOnnxRuntime(CMakePackage, PythonExtension):
@run_after("install")
def install_python(self):
- PythonPackage.install(self, self.spec, self.prefix)
+ """Install everything from build directory."""
+ args = std_pip_args + ["--prefix=" + prefix, "."]
+ with working_dir(self.build_directory):
+ pip(*args)