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>
This commit is contained in:
parent
27e57c444e
commit
f8201f4acc
19
var/spack/repos/builtin/packages/py-cerberus/package.py
Normal file
19
var/spack/repos/builtin/packages/py-cerberus/package.py
Normal file
@ -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')
|
@ -30,6 +30,9 @@ class PyOnnxRuntime(CMakePackage, PythonPackage):
|
|||||||
depends_on('py-protobuf', type=('build', 'run'))
|
depends_on('py-protobuf', type=('build', 'run'))
|
||||||
depends_on('py-setuptools', type='build')
|
depends_on('py-setuptools', type='build')
|
||||||
depends_on('py-numpy@1.16.6:', type=('build', 'run'))
|
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-wheel', type='build')
|
||||||
depends_on('py-onnx', type=('build', 'run'))
|
depends_on('py-onnx', type=('build', 'run'))
|
||||||
depends_on('zlib')
|
depends_on('zlib')
|
||||||
@ -57,6 +60,7 @@ class PyOnnxRuntime(CMakePackage, PythonPackage):
|
|||||||
|
|
||||||
generator = 'Ninja'
|
generator = 'Ninja'
|
||||||
root_cmakelists_dir = 'cmake'
|
root_cmakelists_dir = 'cmake'
|
||||||
|
build_directory = '.'
|
||||||
|
|
||||||
def setup_build_environment(self, env):
|
def setup_build_environment(self, env):
|
||||||
value = self.spec.variants['dynamic_cpu_arch'].value
|
value = self.spec.variants['dynamic_cpu_arch'].value
|
||||||
@ -106,16 +110,6 @@ def cmake_args(self):
|
|||||||
|
|
||||||
return args
|
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')
|
@run_after('install')
|
||||||
def install_python(self):
|
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)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user