make symlinking python3->python optional (#7960)
* Make symlinking python3->python optional * Added reference to PEP 394
This commit is contained in:
parent
7909e15d83
commit
cbd77e3a8d
1 changed files with 5 additions and 1 deletions
|
@ -93,6 +93,10 @@ class Python(AutotoolsPackage):
|
||||||
default=False,
|
default=False,
|
||||||
description='Enable expensive build-time optimizations, if available'
|
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("openssl")
|
||||||
depends_on("bzip2")
|
depends_on("bzip2")
|
||||||
|
@ -231,7 +235,7 @@ def post_install(self):
|
||||||
os.symlink(os.path.join(src, f),
|
os.symlink(os.path.join(src, f),
|
||||||
os.path.join(dst, 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.symlink(os.path.join(prefix.bin, 'python3'),
|
||||||
os.path.join(prefix.bin, 'python'))
|
os.path.join(prefix.bin, 'python'))
|
||||||
os.symlink(os.path.join(prefix.bin, 'python3-config'),
|
os.symlink(os.path.join(prefix.bin, 'python3-config'),
|
||||||
|
|
Loading…
Reference in a new issue