Mass conversion of setup_(dependent_)?environment (#13924)

* Mass conversion of setup_(dependent_)?environment

* prefix -> self.prefix
This commit is contained in:
Adam J. Stewart
2019-11-29 15:00:44 -06:00
committed by GitHub
parent 92ca639905
commit ab98ef1765
188 changed files with 814 additions and 826 deletions

View File

@@ -5,6 +5,8 @@
from spack import *
import os
class Nghttp2(AutotoolsPackage):
"""nghttp2 is an implementation of HTTP/2 and its header compression
@@ -19,17 +21,17 @@ class Nghttp2(AutotoolsPackage):
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)
def setup_build_environment(self, env):
site_packages_dir = os.path.join(
self.spec.prefix.lib,
'python' + str(self.spec['python'].version.up_to(2)),
'site-packages')
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'])
site_packages_dir = os.path.join(
self.spec.prefix.lib,
'python' + str(self.spec['python'].version.up_to(2)),
'site-packages')
mkdirp(site_packages_dir)