diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2017-03-28 09:32:50 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-28 09:32:50 -0700 |
commit | dead67ae56587914f35ae3343b7240bed561c45d (patch) | |
tree | 2aa29c2571a6b1311a49cde6a9f631f46da7c02a | |
parent | 782f29bc4b15829adeab2a0432ab2e50a1f1da32 (diff) | |
download | spack-dead67ae56587914f35ae3343b7240bed561c45d.tar.gz spack-dead67ae56587914f35ae3343b7240bed561c45d.tar.bz2 spack-dead67ae56587914f35ae3343b7240bed561c45d.tar.xz spack-dead67ae56587914f35ae3343b7240bed561c45d.zip |
Restore newlines to easy-install.pth files. (#3583)
Previous syntax fix in 8a873bb was not quite right.
-rw-r--r-- | var/spack/repos/builtin/packages/python/package.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index 15bdbbc4d1..d4d6f713ba 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -470,10 +470,14 @@ class Python(Package): else: with closing(open(main_pth, 'w')) as f: - f.write("import sys; sys.__plen = len(sys.path)") + f.write("import sys; sys.__plen = len(sys.path)\n") for path in paths: f.write("{0}\n".format(path)) - f.write("import sys; new = sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p = getattr(sys, '__egginsert', 0); sys.path[p:p] = new; sys.__egginsert = p + len(new)") # noqa: E501 + f.write("import sys; new=sys.path[sys.__plen:]; " + "del sys.path[sys.__plen:]; " + "p=getattr(sys,'__egginsert',0); " + "sys.path[p:p]=new; " + "sys.__egginsert = p+len(new)\n") def activate(self, ext_pkg, **args): ignore = self.python_ignore(ext_pkg, args) |