summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMatthew Scott Krafczyk <krafczyk.matthew@gmail.com>2017-11-07 17:59:15 -0600
committerTodd Gamblin <tgamblin@llnl.gov>2017-11-07 15:59:15 -0800
commit00d48e60bf46545f5cb02c2d0a95cba9bb2bd486 (patch)
tree0eefdf0f003f5022c59c66134d91bd091ab6b62f /var
parent841d42b30816a3b1035f84101777008ab5f7ecc2 (diff)
downloadspack-00d48e60bf46545f5cb02c2d0a95cba9bb2bd486.tar.gz
spack-00d48e60bf46545f5cb02c2d0a95cba9bb2bd486.tar.bz2
spack-00d48e60bf46545f5cb02c2d0a95cba9bb2bd486.tar.xz
spack-00d48e60bf46545f5cb02c2d0a95cba9bb2bd486.zip
Fix for nghttp2 installation (#5904)
nghttp2 depends on python, and requires the install directory to exist, and contain the python module directory which it will eventually install the python modules into.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/nghttp2/package.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/nghttp2/package.py b/var/spack/repos/builtin/packages/nghttp2/package.py
index b1c48d1bdf..62b936e054 100644
--- a/var/spack/repos/builtin/packages/nghttp2/package.py
+++ b/var/spack/repos/builtin/packages/nghttp2/package.py
@@ -33,3 +33,22 @@ class Nghttp2(AutotoolsPackage):
url = "https://github.com/nghttp2/nghttp2/releases/download/v1.26.0/nghttp2-1.26.0.tar.gz"
version('1.26.0', '83fa813b22bacbc6ea80dfb24847569f')
+
+ depends_on('python@2.7:', type=('build', 'run'))
+ depends_on('py-cython@0.19:', type=('build', 'run'))
+ depends_on('py-setuptools', type=('build'))
+
+ def setup_environment(self, spack_env, run_env):
+ site_packages_dir = '/'.join(
+ [self.spec.prefix.lib,
+ ('python' + str(self.spec['python'].version.up_to(2))),
+ 'site-packages'])
+ spack_env.prepend_path('PYTHONPATH', site_packages_dir)
+
+ @run_before('install')
+ def ensure_install_dir_exists(self):
+ site_packages_dir = '/'.join(
+ [self.spec.prefix.lib,
+ ('python' + str(self.spec['python'].version.up_to(2))),
+ 'site-packages'])
+ mkdirp(site_packages_dir)