FreeBSD Bugzilla – Attachment 171563 Details for
Bug 209204
Changing default Python version unduly difficult
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
propose patch
file_209204.txt (text/plain), 1.68 KB, created by
Iblis Lin
on 2016-06-19 07:28:28 UTC
(
hide
)
Description:
propose patch
Filename:
MIME Type:
Creator:
Iblis Lin
Created:
2016-06-19 07:28:28 UTC
Size:
1.68 KB
patch
obsolete
>diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk >index ceb6e8d..9630931 100644 >--- a/Mk/Uses/python.mk >+++ b/Mk/Uses/python.mk >@@ -273,7 +273,7 @@ WARNING+= "PYTHON2_DEFAULT_VERSION is defined, consider using DEFAULT_VERSIONS=p > WARNING+= "PYTHON3_DEFAULT_VERSION is defined, consider using DEFAULT_VERSIONS=python3=${PYTHON3_DEFAULT_VERSION:S/^python//} instead" > .endif > >-.if exists(${LOCALBASE}/bin/python) >+.if exists(${_PYTHON_BASECMD}) && !defined(_PYTHON_DEFAULT_SET) > .if !defined(_PYTHON_DEFAULT_VERSION) > _PYTHON_DEFAULT_VERSION!= (${LOCALBASE}/bin/python -c \ > 'import sys; print("%d.%d" % sys.version_info[:2])' 2> /dev/null \ >@@ -286,7 +286,7 @@ WARNING+= "Your requested default python version ${PYTHON_DEFAULT} is different > PYTHON_DEFAULT_VERSION= python${_PYTHON_DEFAULT_VERSION} > .else > PYTHON_DEFAULT_VERSION= python${PYTHON_DEFAULT} >-.endif # exists(${LOCALBASE}/bin/python) >+.endif # exists(${_PYTHON_BASECMD}) && !defined(_PYTHON_DEFAULT_SET) > > # Is only a meta-port version defined? > .if ${PYTHON_DEFAULT_VERSION} == "python2" >diff --git a/Mk/bsd.default-versions.mk b/Mk/bsd.default-versions.mk >index 4e286f8..02f484f 100644 >--- a/Mk/bsd.default-versions.mk >+++ b/Mk/bsd.default-versions.mk >@@ -54,7 +54,11 @@ PGSQL_DEFAULT?= 9.3 > # Possible values: 5.5, 5.6, 7.0 > PHP_DEFAULT?= 5.6 > # Possible values: 2.7, 3.3, 3.4, 3.5 >-PYTHON_DEFAULT?= 2.7 >+.if !defined(PYTHON_DEFAULT) >+PYTHON_DEFAULT= 2.7 >+.else >+_PYTHON_DEFAULT_SET= yes >+.endif # !defining(PYTHON_DEFAULT) > # Possible values: 2.7 > PYTHON2_DEFAULT?= 2.7 > # Possible values: 3.3, 3.4, 3.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 209204
:
171555
| 171563