FreeBSD Bugzilla – Attachment 122961 Details for
Bug 166226
[patch] [exp-run] Mk/bsd.python.mk: Fix python -c commands for python 3+
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
fix-python-3.x.patch
fix-python-3.x.patch (text/plain), 2.13 KB, created by
Rachel Flynn
on 2012-03-18 16:10:11 UTC
(
hide
)
Description:
fix-python-3.x.patch
Filename:
MIME Type:
Creator:
Rachel Flynn
Created:
2012-03-18 16:10:11 UTC
Size:
2.13 KB
patch
obsolete
>Index: Mk/bsd.python.mk >=================================================================== >RCS file: /home/ncvs/ports/Mk/bsd.python.mk,v >retrieving revision 1.142 >diff -u -r1.142 bsd.python.mk >--- Mk/bsd.python.mk 7 Nov 2011 12:40:53 -0000 1.142 >+++ Mk/bsd.python.mk 18 Mar 2012 14:39:38 -0000 >@@ -264,7 +268,7 @@ > .if !defined(PYTHON_DEFAULT_VERSION) > . if exists(${LOCALBASE}/bin/python) > _PYTHON_DEFAULT_VERSION!= (${LOCALBASE}/bin/python -c \ >- 'import sys; print sys.version[:3]' 2> /dev/null \ >+ 'import sys; print(sys.version[:3])' 2> /dev/null \ > || ${ECHO_CMD} ${_PYTHON_PORTBRANCH}) | ${TAIL} -1 > . else > _PYTHON_DEFAULT_VERSION= ${_PYTHON_PORTBRANCH} >@@ -336,7 +340,7 @@ > PYTHON_VERSION?= python${_PYTHON_VERSION} > PYTHON_CMD?= ${_PYTHON_CMD} > .if !defined(PYTHONBASE) >-PYTHONBASE!= (${PYTHON_CMD} -c 'import sys; print sys.prefix' \ >+PYTHONBASE!= (${PYTHON_CMD} -c 'import sys; print(sys.prefix)' \ > 2> /dev/null || ${ECHO_CMD} ${LOCALBASE}) | ${TAIL} -1 > .endif > DEPENDS_ARGS+= PYTHON_VERSION=${PYTHON_VERSION} >@@ -345,8 +349,8 @@ > # should point to some other version we have installed, according to the port USE_PYTHON > # specification > .if !defined(PYTHON_DEFAULT_PORTVERSION) || (${PYTHON_VERSION} != ${PYTHON_DEFAULT_VERSION}) >-_PYTHON_PORTVERSION!= (${PYTHON_CMD} -c 'import string, sys; \ >- print string.split(sys.version)[0].replace("b",".b")' 2> /dev/null) | ${TAIL} -1 >+_PYTHON_PORTVERSION!= (${PYTHON_CMD} -c 'import sys; \ >+ print(sys.version.split()[0].replace("b",".b"))' 2> /dev/null) | ${TAIL} -1 > .if !defined(PYTHON_NO_DEPENDS) && !empty(_PYTHON_PORTVERSION) > PYTHON_PORTVERSION= ${_PYTHON_PORTVERSION} > .endif >@@ -413,10 +417,10 @@ > PYTHON_PORTSDIR= # empty > PYTHON_NO_DEPENDS= YES > PYTHON_REL!= ${PYTHON_CMD} -c 'import sys; h = "%x" % sys.hexversion; \ >- print h[0]+h[2]+h[4]' >+ print(h[0]+h[2]+h[4])' > PYTHON_SUFFIX!= ${PYTHON_CMD} -c 'import sys; h = "%x" % sys.hexversion; \ >- print h[0]+h[2]' >-PYTHON_VER!= ${PYTHON_CMD} -c 'import sys; print sys.version[:3]' >+ print(h[0]+h[2])' >+PYTHON_VER!= ${PYTHON_CMD} -c 'import sys; print(sys.version[:3])' > > .else > check-makevars::
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 166226
: 122961