diff options
author | Gregory L. Lee <lee218@llnl.gov> | 2016-05-13 15:16:07 -0700 |
---|---|---|
committer | Gregory L. Lee <lee218@llnl.gov> | 2016-05-13 15:16:07 -0700 |
commit | e9b71872a8d590d342e4cfcc78ff9855cff7fc24 (patch) | |
tree | 35a3450db7327ed57a97e998d4116af11cb18952 /lib | |
parent | b8a91db08948440100a2d4d6a0cad01f1eb9b33a (diff) | |
download | spack-e9b71872a8d590d342e4cfcc78ff9855cff7fc24.tar.gz spack-e9b71872a8d590d342e4cfcc78ff9855cff7fc24.tar.bz2 spack-e9b71872a8d590d342e4cfcc78ff9855cff7fc24.tar.xz spack-e9b71872a8d590d342e4cfcc78ff9855cff7fc24.zip |
addressed PR#946 comments from @adamjstewart
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/hooks/licensing.py | 2 | ||||
-rw-r--r-- | lib/spack/spack/package.py | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/spack/spack/hooks/licensing.py b/lib/spack/spack/hooks/licensing.py index f5d3ebd98c..9010b84154 100644 --- a/lib/spack/spack/hooks/licensing.py +++ b/lib/spack/spack/hooks/licensing.py @@ -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): diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index cda6a4be18..fa3ece47f7 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -399,13 +399,15 @@ class Package(object): @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, |