diff options
author | Elizabeth Fischer <rpf2116@columbia.edu> | 2018-05-02 15:26:30 -0400 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2018-05-02 12:26:30 -0700 |
commit | cbd77e3a8d22f389041c216ba743eda601fe3754 (patch) | |
tree | d36b88b15a2b4be2ca2c4f13924d66e173f4d731 | |
parent | 7909e15d834c5ff53b10f06ac00f888cbaee6b32 (diff) | |
download | spack-cbd77e3a8d22f389041c216ba743eda601fe3754.tar.gz spack-cbd77e3a8d22f389041c216ba743eda601fe3754.tar.bz2 spack-cbd77e3a8d22f389041c216ba743eda601fe3754.tar.xz spack-cbd77e3a8d22f389041c216ba743eda601fe3754.zip |
make symlinking python3->python optional (#7960)
* Make symlinking python3->python optional
* Added reference to PEP 394
-rw-r--r-- | var/spack/repos/builtin/packages/python/package.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index 8dc46f113d..30774332fd 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -93,6 +93,10 @@ class Python(AutotoolsPackage): default=False, description='Enable expensive build-time optimizations, if available' ) + # See https://legacy.python.org/dev/peps/pep-0394/ + variant('pythoncmd', default=True, + description="Symlink 'python3' executable to 'python' " + "(not PEP 394 compliant)") depends_on("openssl") depends_on("bzip2") @@ -231,7 +235,7 @@ class Python(AutotoolsPackage): os.symlink(os.path.join(src, f), os.path.join(dst, f)) - if spec.satisfies('@3:'): + if spec.satisfies('@3:') and spec.satisfies('+pythoncmd'): os.symlink(os.path.join(prefix.bin, 'python3'), os.path.join(prefix.bin, 'python')) os.symlink(os.path.join(prefix.bin, 'python3-config'), |