addressed PR#946 comments from @adamjstewart
This commit is contained in:
@@ -154,7 +154,7 @@ def symlink_license(pkg):
|
||||
target = pkg.global_license_file
|
||||
for filename in pkg.license_files:
|
||||
link_name = join_path(pkg.prefix, filename)
|
||||
license_dir = os.path.split(link_name)[0]
|
||||
license_dir = os.path.dirname(link_name)
|
||||
if not os.path.exists(license_dir):
|
||||
mkdirp(license_dir)
|
||||
if os.path.exists(target):
|
||||
|
@@ -399,13 +399,15 @@ def __init__(self, spec):
|
||||
|
||||
@property
|
||||
def global_license_dir(self):
|
||||
"""Returns the path where a global license file should be stored."""
|
||||
"""Returns the directory where global license files for all
|
||||
packages are stored."""
|
||||
spack_root = ancestor(__file__, 4)
|
||||
return join_path(spack_root, 'etc', 'spack', 'licenses')
|
||||
|
||||
@property
|
||||
def global_license_file(self):
|
||||
"""Returns the path where a global license file should be stored."""
|
||||
"""Returns the path where a global license file for this
|
||||
particular package should be stored."""
|
||||
if not self.license_files:
|
||||
return
|
||||
return join_path(self.global_license_dir, self.name,
|
||||
|
Reference in New Issue
Block a user