diff options
author | iarspider <iarspider@gmail.com> | 2022-03-24 20:23:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-24 14:23:52 -0500 |
commit | f8201f4acc53bbb7efcde77a369546181b802d19 (patch) | |
tree | 51d3346d3965454693a5a75ec73edf98343991c0 | |
parent | 27e57c444e4af0cea240675272def0e4a867fd01 (diff) | |
download | spack-f8201f4acc53bbb7efcde77a369546181b802d19.tar.gz spack-f8201f4acc53bbb7efcde77a369546181b802d19.tar.bz2 spack-f8201f4acc53bbb7efcde77a369546181b802d19.tar.xz spack-f8201f4acc53bbb7efcde77a369546181b802d19.zip |
Fix py-onnx-runtime recipe (#29646)
* Fix py-onnx-runtime recipe
* Add missing dependencies
* Update var/spack/repos/builtin/packages/py-cerberus/package.py
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* Update package.py
* Better fix for py-onnx-runtime
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
-rw-r--r-- | var/spack/repos/builtin/packages/py-cerberus/package.py | 19 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/py-onnx-runtime/package.py | 16 |
2 files changed, 24 insertions, 11 deletions
diff --git a/var/spack/repos/builtin/packages/py-cerberus/package.py b/var/spack/repos/builtin/packages/py-cerberus/package.py new file mode 100644 index 0000000000..3ac18eb435 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-cerberus/package.py @@ -0,0 +1,19 @@ +# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyCerberus(PythonPackage): + """Lightweight, extensible schema and data validation + tool for Python dictionaries""" + + homepage = "http://docs.python-cerberus.org/" + pypi = "Cerberus/Cerberus-1.3.4.tar.gz" + + version('1.3.4', sha256='d1b21b3954b2498d9a79edf16b3170a3ac1021df88d197dc2ce5928ba519237c') + + depends_on('python@2.7:', type=('build', 'run')) + depends_on('py-setuptools', type='build') 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 b79c919700..d2eef4d69c 100644 --- a/var/spack/repos/builtin/packages/py-onnx-runtime/package.py +++ b/var/spack/repos/builtin/packages/py-onnx-runtime/package.py @@ -30,6 +30,9 @@ class PyOnnxRuntime(CMakePackage, PythonPackage): depends_on('py-protobuf', type=('build', 'run')) depends_on('py-setuptools', type='build') depends_on('py-numpy@1.16.6:', type=('build', 'run')) + depends_on('py-sympy@1.1:', type=('build', 'run')) + depends_on('py-packaging', type=('build', 'run')) + depends_on('py-cerberus', type=('build', 'run')) depends_on('py-wheel', type='build') depends_on('py-onnx', type=('build', 'run')) depends_on('zlib') @@ -57,6 +60,7 @@ class PyOnnxRuntime(CMakePackage, PythonPackage): generator = 'Ninja' root_cmakelists_dir = 'cmake' + build_directory = '.' def setup_build_environment(self, env): value = self.spec.variants['dynamic_cpu_arch'].value @@ -106,16 +110,6 @@ class PyOnnxRuntime(CMakePackage, PythonPackage): return args - def setup_file(self): - return join_path(self.stage.source_path, 'setup.py') - - @run_after('build') - def build_python(self): - """Build everything needed to install.""" - with working_dir(self.stage.source_path): - PythonPackage.build(self, self.spec, self.prefix) - @run_after('install') def install_python(self): - with working_dir(self.stage.source_path): - PythonPackage.install(self, self.spec, self.prefix) + PythonPackage.install(self, self.spec, self.prefix) |