svn commit: r327339 - in head: Mk lang/python2
Marcus von Appen
mva at FreeBSD.org
Sun Sep 15 12:52:29 UTC 2013
Author: mva
Date: Sun Sep 15 12:52:28 2013
New Revision: 327339
URL: http://svnweb.freebsd.org/changeset/ports/327339
Log:
- Introduce PYTHON2_DEFAULT_VERSION, the version of the default python2
binary in $PATH. It can be set in case the user wants to use a
specific python2 version as a default. Its behaviour is similar
to the existing PYTHON3_DEFAULT_VERSION and fixes a small issue with
package builds for different python versions.
- Outline that PYTHON_DEFAULT_VERSION always takes precedence for a
specific python major version.
- Update lang/python2 to use PYTHON2_DEFAULT_VERSION and bump the
PORTREVISION to let the installed port catch up with the change.
- Allow PYTHON3_DEFAULT_VERSION to overriden by a user choice, if
PYTHON_DEFAULT_VERSION is not set to a python3 port.
Reported by: David Demelier <demelier.david at gmail.com>
Reviewed by: koobs@, sbz@
With hat on: python@
Modified:
head/Mk/bsd.python.mk
head/lang/python2/Makefile
Modified: head/Mk/bsd.python.mk
==============================================================================
--- head/Mk/bsd.python.mk Sun Sep 15 12:27:30 2013 (r327338)
+++ head/Mk/bsd.python.mk Sun Sep 15 12:52:28 2013 (r327339)
@@ -11,11 +11,11 @@ Python_Include_MAINTAINER= python at FreeBS
# This file contains some variable definitions that are supposed to
# make your life easier when dealing with ports related to the Python
-# language. It's automatically included when USE_PYTHON or PYTHON_VERSION
-# is defined in the ports' makefile. Define PYTHON_VERSION to override the
-# defaults that USE_PYTHON would give you. If your port requires only some
-# set of Python versions, you can define USE_PYTHON as [min]-[max] or
-# min+. (eg. 3.1-3.2, 2.7+ or -3.2)
+# language. It's automatically included when USE_PYTHON is defined in
+# the ports' makefile. If your port requires only some set of Python
+# versions, you can define USE_PYTHON as [min]-[max] or min+ or -max
+# or as an explicit version (eg. 3.1-3.2 for [min]-[max],
+# 2.7+ or -3.2 for min+ and -max or 2.6 for an explicit version).
#
# The variables:
#
@@ -87,13 +87,23 @@ Python_Include_MAINTAINER= python at FreeBS
# PYTHON_DEFAULT_VERSION
# - Version of the default python binary in your ${PATH}, in
# the format "python2.7". Set this in your /etc/make.conf
-# in case you want to use an older version as a default.
+# in case you want to use a specific version as a default.
+# default: python2.7
+#
+# PYTHON2_DEFAULT_VERSION
+# - Version of the default python2 binary in your ${PATH}, in
+# the format "python2.7". Set this in your /etc/make.conf
+# in case you want to use a specific version as a default.
+# Note that PYTHON_DEFAULT_VERSION always will have precedence
+# before this value, if it matches "python2*"
# default: python2.7
#
# PYTHON3_DEFAULT_VERSION
-# - Version of the default python binary in your ${PATH}, in
+# - Version of the default python3 binary in your ${PATH}, in
# the format "python3.2". Set this in your /etc/make.conf
-# in case you want to use an older version as a default.
+# in case you want to use a specific version as a default.
+# Note that PYTHON_DEFAULT_VERSION always will have precedence
+# before this value, if it matches "python3*"
# default: python3.3
#
# PYTHON_MAJOR_VER - Python version major number. 2 for python-2.x,
@@ -283,10 +293,16 @@ _PYTHON_DEFAULT_VERSION= ${_PYTHON_PORTB
PYTHON_DEFAULT_VERSION= python${_PYTHON_DEFAULT_VERSION}
.endif
+.if ${PYTHON_DEFAULT_VERSION:R} == "python2"
+PYTHON2_DEFAULT_VERSION= ${PYTHON_DEFAULT_VERSION}
+.else
+PYTHON2_DEFAULT_VERSION?= python2.7
+.endif
+
.if ${PYTHON_DEFAULT_VERSION:R} == "python3"
PYTHON3_DEFAULT_VERSION= ${PYTHON_DEFAULT_VERSION}
.else
-PYTHON3_DEFAULT_VERSION= python3.3
+PYTHON3_DEFAULT_VERSION?= python3.3
.endif
.if defined(PYTHON_VERSION)
Modified: head/lang/python2/Makefile
==============================================================================
--- head/lang/python2/Makefile Sun Sep 15 12:27:30 2013 (r327338)
+++ head/lang/python2/Makefile Sun Sep 15 12:52:28 2013 (r327339)
@@ -2,6 +2,7 @@
PORTNAME= python2
PORTVERSION= ${PYTHON_MAJOR_VER}
+PORTREVISION= 1
CATEGORIES= lang python ipv6
MASTER_SITES= # empty
DISTFILES= # empty
@@ -11,7 +12,7 @@ MAINTAINER= python at FreeBSD.org
COMMENT= The "meta-port" for version 2 of the Python interpreter
USE_PYTHON_RUN= yes
-PYTHON_VERSION= ${PYTHON_DEFAULT_VERSION}
+PYTHON_VERSION= ${PYTHON2_DEFAULT_VERSION}
NO_BUILD= yes
PYTHON_NO_DEPENDS= yes
More information about the svn-ports-head
mailing list