summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/py-tensorflow-probability/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/py-tensorflow-probability/package.py')
-rw-r--r--var/spack/repos/builtin/packages/py-tensorflow-probability/package.py86
1 files changed, 44 insertions, 42 deletions
diff --git a/var/spack/repos/builtin/packages/py-tensorflow-probability/package.py b/var/spack/repos/builtin/packages/py-tensorflow-probability/package.py
index f793b26d42..8c825a86f1 100644
--- a/var/spack/repos/builtin/packages/py-tensorflow-probability/package.py
+++ b/var/spack/repos/builtin/packages/py-tensorflow-probability/package.py
@@ -17,72 +17,74 @@ class PyTensorflowProbability(Package):
predictions."""
homepage = "https://www.tensorflow.org/probability"
- url = "https://github.com/tensorflow/probability/archive/v0.12.1.tar.gz"
+ url = "https://github.com/tensorflow/probability/archive/v0.12.1.tar.gz"
- maintainers = ['aweits']
+ maintainers = ["aweits"]
- version('0.12.1', sha256='1fe89e85fd053bf36e8645a5a1a53b729bc254cf1516bc224fcbd1e4ff50083a')
- version('0.8.0', sha256='f6049549f6d6b82962523a6bf61c40c1d0c7ac685f209c0084a6da81dd78181d',
- url='https://github.com/tensorflow/probability/archive/0.8.0.tar.gz')
+ version("0.12.1", sha256="1fe89e85fd053bf36e8645a5a1a53b729bc254cf1516bc224fcbd1e4ff50083a")
+ version(
+ "0.8.0",
+ sha256="f6049549f6d6b82962523a6bf61c40c1d0c7ac685f209c0084a6da81dd78181d",
+ url="https://github.com/tensorflow/probability/archive/0.8.0.tar.gz",
+ )
- extends('python')
- depends_on('py-pip', type='build')
- depends_on('py-wheel', type='build')
- depends_on('py-setuptools', type='build')
+ extends("python")
+ depends_on("py-pip", type="build")
+ depends_on("py-wheel", type="build")
+ depends_on("py-setuptools", type="build")
- depends_on('py-six@1.10.0:', type=('build', 'run'))
- depends_on('py-numpy@1.13.3:', type=('build', 'run'))
- depends_on('py-decorator', type=('build', 'run'))
+ depends_on("py-six@1.10.0:", type=("build", "run"))
+ depends_on("py-numpy@1.13.3:", type=("build", "run"))
+ depends_on("py-decorator", type=("build", "run"))
- depends_on('py-tensorflow@1.14:', type=('build', 'run'), when='@0.8.0')
- depends_on('py-gast@0.2.0:0.2', type=('build', 'run'), when='@0.8.0')
- depends_on('py-cloudpickle@1.1.1', type=('build', 'run'), when='@0.8.0')
+ depends_on("py-tensorflow@1.14:", type=("build", "run"), when="@0.8.0")
+ depends_on("py-gast@0.2.0:0.2", type=("build", "run"), when="@0.8.0")
+ depends_on("py-cloudpickle@1.1.1", type=("build", "run"), when="@0.8.0")
- depends_on('py-tensorflow@2.4:', type=('build', 'run'), when='@0.12.0:')
- depends_on('py-cloudpickle@1.3:', type=('build', 'run'), when='@0.12.0:')
- depends_on('py-gast@0.3.2:', type=('build', 'run'), when='@0.12.0:')
- depends_on('py-dm-tree', type=('build', 'run'), when='@0.12.0:')
+ depends_on("py-tensorflow@2.4:", type=("build", "run"), when="@0.12.0:")
+ depends_on("py-cloudpickle@1.3:", type=("build", "run"), when="@0.12.0:")
+ depends_on("py-gast@0.3.2:", type=("build", "run"), when="@0.12.0:")
+ depends_on("py-dm-tree", type=("build", "run"), when="@0.12.0:")
- depends_on('bazel@3.2.0:', type='build')
+ depends_on("bazel@3.2.0:", type="build")
def install(self, spec, prefix):
- self.tmp_path = tempfile.mkdtemp(prefix='spack')
- env['TEST_TMPDIR'] = self.tmp_path
- env['HOME'] = self.tmp_path
+ self.tmp_path = tempfile.mkdtemp(prefix="spack")
+ env["TEST_TMPDIR"] = self.tmp_path
+ env["HOME"] = self.tmp_path
args = [
# Don't allow user or system .bazelrc to override build settings
- '--nohome_rc',
- '--nosystem_rc',
+ "--nohome_rc",
+ "--nosystem_rc",
# Bazel does not work properly on NFS, switch to /tmp
- '--output_user_root=' + self.tmp_path,
- 'build',
+ "--output_user_root=" + self.tmp_path,
+ "build",
# Spack logs don't handle colored output well
- '--color=no',
- '--jobs={0}'.format(make_jobs),
+ "--color=no",
+ "--jobs={0}".format(make_jobs),
# Enable verbose output for failures
- '--verbose_failures',
+ "--verbose_failures",
# Show (formatted) subcommands being executed
- '--subcommands=pretty_print',
- '--spawn_strategy=local',
+ "--subcommands=pretty_print",
+ "--spawn_strategy=local",
# Ask bazel to explain what it's up to
# Needs a filename as argument
- '--explain=explainlogfile.txt',
+ "--explain=explainlogfile.txt",
# Increase verbosity of explanation,
- '--verbose_explanations',
+ "--verbose_explanations",
# bazel uses system PYTHONPATH instead of spack paths
- '--action_env', 'PYTHONPATH={0}'.format(env['PYTHONPATH']),
- '--copt=-O3',
- '--copt=-march=native',
- ':pip_pkg',
+ "--action_env",
+ "PYTHONPATH={0}".format(env["PYTHONPATH"]),
+ "--copt=-O3",
+ "--copt=-march=native",
+ ":pip_pkg",
]
bazel(*args)
- with working_dir(join_path('bazel-bin',
- 'pip_pkg.runfiles',
- 'tensorflow_probability')):
- args = std_pip_args + ['--prefix=' + prefix, '.']
+ with working_dir(join_path("bazel-bin", "pip_pkg.runfiles", "tensorflow_probability")):
+ args = std_pip_args + ["--prefix=" + prefix, "."]
pip(*args)
remove_linked_tree(self.tmp_path)