summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorBrice Videau <bvideau@anl.gov>2022-06-06 20:36:24 -0500
committerGitHub <noreply@github.com>2022-06-07 01:36:24 +0000
commit0a8083c6040b4c342355c0afb685a18569f611ee (patch)
tree19fa16012853036012a98b392c93396c2b3e62b5 /var
parent5b45df526965335e0e93c845ca5d0ac99da64280 (diff)
downloadspack-0a8083c6040b4c342355c0afb685a18569f611ee.tar.gz
spack-0a8083c6040b4c342355c0afb685a18569f611ee.tar.bz2
spack-0a8083c6040b4c342355c0afb685a18569f611ee.tar.xz
spack-0a8083c6040b4c342355c0afb685a18569f611ee.zip
Fix py-ray dependencies and build system (#31016)
* Fix py-ray dependencies and build system * Update var/spack/repos/builtin/packages/py-ray/package.py Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * Added documentation for unusual dependencies. * Fixed npm preinstall script per @adamjstewart suggestion. Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/py-ray/package.py21
1 files changed, 20 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/py-ray/package.py b/var/spack/repos/builtin/packages/py-ray/package.py
index 8158d6fdda..33810602f1 100644
--- a/var/spack/repos/builtin/packages/py-ray/package.py
+++ b/var/spack/repos/builtin/packages/py-ray/package.py
@@ -18,11 +18,12 @@ class PyRay(PythonPackage):
build_directory = 'python'
- depends_on('python@3.6:', type=('build', 'run'))
+ depends_on('python@3.6:3.8', type=('build', 'run'))
depends_on('bazel@3.2.0', type='build')
depends_on('py-setuptools', type='build')
depends_on('py-cython@0.29.14:', type='build')
depends_on('py-wheel', type='build')
+ depends_on('npm', type='build')
depends_on('py-aiohttp', type=('build', 'run'))
depends_on('py-aioredis', type=('build', 'run'))
depends_on('py-click@7.0:', type=('build', 'run'))
@@ -42,3 +43,21 @@ class PyRay(PythonPackage):
depends_on('py-redis@3.3.2:3.4', type=('build', 'run'))
depends_on('py-opencensus', type=('build', 'run'))
depends_on('py-prometheus-client@0.7.1:', type=('build', 'run'))
+ # If not guarded by SKIP_THIRDPARTY_INSTALL, those dependencies
+ # would be automatically installed via pip by the setup.py script.
+ depends_on('py-setproctitle', type=('build', 'run'))
+ depends_on('py-psutil', type=('build', 'run'))
+ # If not detected during install, the following dependency would
+ # be automatically downloaded and installed by the setup.py script.
+ depends_on('py-pickle5', when='^python@:3.8.1', type=('build', 'run'))
+
+ def setup_build_environment(self, env):
+ env.set('SKIP_THIRDPARTY_INSTALL', '1')
+
+ # Compile the dashboard npm modules included in the project
+ @run_before('install')
+ def build_dashboard(self):
+ with working_dir(join_path('python', 'ray', 'dashboard', 'client')):
+ npm = which('npm')
+ npm('ci')
+ npm('run', 'build')