py-tensorflow-estimator: update for 2.4.0 (#21546)
* py-tensorflow-estimator: update for 2.4.0 * build/run deptypes, switch to common tmpfile logic
This commit is contained in:
parent
7fd8b775ad
commit
dc1a05d273
@ -4,6 +4,7 @@
|
|||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
from spack import *
|
from spack import *
|
||||||
|
import tempfile
|
||||||
|
|
||||||
|
|
||||||
class PyTensorflowEstimator(Package):
|
class PyTensorflowEstimator(Package):
|
||||||
@ -15,6 +16,7 @@ class PyTensorflowEstimator(Package):
|
|||||||
|
|
||||||
maintainers = ['aweits']
|
maintainers = ['aweits']
|
||||||
|
|
||||||
|
version('2.4.0', sha256='e6ea12014c3d8c89a81ace95f8f8b7c39ffcd3e4e4626709e4aee0010eefd962')
|
||||||
version('2.3.0', sha256='75403e7de7e8ec30ec0781ede56ed84cbe5e90daad64a9c242cd489c8fe63a17')
|
version('2.3.0', sha256='75403e7de7e8ec30ec0781ede56ed84cbe5e90daad64a9c242cd489c8fe63a17')
|
||||||
version('2.2.0', sha256='2d68cb6e6442e7dcbfa2e092aa25bdcb0eda420536a829b85d732854a4c85d46')
|
version('2.2.0', sha256='2d68cb6e6442e7dcbfa2e092aa25bdcb0eda420536a829b85d732854a4c85d46')
|
||||||
version('2.1', sha256='1d74c8181b981748976fa33ad97d3434c3cf2b7e29a0b00861365fe8329dbc4e')
|
version('2.1', sha256='1d74c8181b981748976fa33ad97d3434c3cf2b7e29a0b00861365fe8329dbc4e')
|
||||||
@ -23,34 +25,27 @@ class PyTensorflowEstimator(Package):
|
|||||||
|
|
||||||
extends('python')
|
extends('python')
|
||||||
|
|
||||||
depends_on('py-tensorflow@2.3.0:', when='@2.3.0')
|
depends_on('py-tensorflow@2.4.0:2.4.999', type=('build', 'run'), when='@2.4.0')
|
||||||
depends_on('py-tensorflow@2.2.0', when='@2.2.0')
|
depends_on('py-tensorflow@2.3.0:2.3.999', type=('build', 'run'), when='@2.3.0')
|
||||||
depends_on('py-tensorflow@2.1.0:2.1.999', when='@2.1')
|
depends_on('py-tensorflow@2.2.0:2.2.999', type=('build', 'run'), when='@2.2.0')
|
||||||
depends_on('py-tensorflow@2.0.0:2.0.999', when='@2.0.0')
|
depends_on('py-tensorflow@2.1.0:2.1.999', type=('build', 'run'), when='@2.1')
|
||||||
depends_on('py-tensorflow@1.13.1', when='@1.13.0')
|
depends_on('py-tensorflow@2.0.0:2.0.999', type=('build', 'run'), when='@2.0.0')
|
||||||
|
depends_on('py-tensorflow@1.13.1', type=('build', 'run'), when='@1.13.0')
|
||||||
depends_on('py-absl-py@0.7.0:', type=('build', 'run'), when='@1.12.1,1.14:')
|
|
||||||
depends_on('py-numpy@1.16.0:1.18', type=('build', 'run'), when='@1.13.2,1.15:')
|
|
||||||
depends_on('py-six@1.12.0:', type=('build', 'run'), when='@2.1:')
|
|
||||||
depends_on('py-keras-preprocessing@1.1.1:1.999', type=('build', 'run'), when='@2.3:')
|
|
||||||
|
|
||||||
depends_on('bazel@0.19.0:', type='build')
|
depends_on('bazel@0.19.0:', type='build')
|
||||||
depends_on('py-funcsigs@1.0.2:', type=('build', 'run'))
|
depends_on('py-funcsigs@1.0.2:', type=('build', 'run'))
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
tmp_path = join_path(env.get('SPACK_TMPDIR', '/tmp/spack'),
|
self.tmp_path = tempfile.mkdtemp(dir='/tmp', prefix='spack')
|
||||||
'tf-estimator',
|
env['TEST_TMPDIR'] = self.tmp_path
|
||||||
self.module.site_packages_dir[1:])
|
env['HOME'] = self.tmp_path
|
||||||
mkdirp(tmp_path)
|
|
||||||
env['TEST_TMPDIR'] = tmp_path
|
|
||||||
env['HOME'] = tmp_path
|
|
||||||
|
|
||||||
args = [
|
args = [
|
||||||
# Don't allow user or system .bazelrc to override build settings
|
# Don't allow user or system .bazelrc to override build settings
|
||||||
'--nohome_rc',
|
'--nohome_rc',
|
||||||
'--nosystem_rc',
|
'--nosystem_rc',
|
||||||
# Bazel does not work properly on NFS, switch to /tmp
|
# Bazel does not work properly on NFS, switch to /tmp
|
||||||
'--output_user_root=' + tmp_path,
|
'--output_user_root=' + self.tmp_path,
|
||||||
'build',
|
'build',
|
||||||
# Spack logs don't handle colored output well
|
# Spack logs don't handle colored output well
|
||||||
'--color=no',
|
'--color=no',
|
||||||
@ -59,6 +54,7 @@ def install(self, spec, prefix):
|
|||||||
'--verbose_failures',
|
'--verbose_failures',
|
||||||
# Show (formatted) subcommands being executed
|
# Show (formatted) subcommands being executed
|
||||||
'--subcommands=pretty_print',
|
'--subcommands=pretty_print',
|
||||||
|
'--spawn_strategy=local',
|
||||||
# Ask bazel to explain what it's up to
|
# Ask bazel to explain what it's up to
|
||||||
# Needs a filename as argument
|
# Needs a filename as argument
|
||||||
'--explain=explainlogfile.txt',
|
'--explain=explainlogfile.txt',
|
||||||
@ -79,3 +75,4 @@ def install(self, spec, prefix):
|
|||||||
with working_dir(buildpath):
|
with working_dir(buildpath):
|
||||||
setup_py('install', '--prefix={0}'.format(prefix),
|
setup_py('install', '--prefix={0}'.format(prefix),
|
||||||
'--single-version-externally-managed', '--root=/')
|
'--single-version-externally-managed', '--root=/')
|
||||||
|
remove_linked_tree(self.tmp_path)
|
||||||
|
Loading…
Reference in New Issue
Block a user