Index: Uses/gnome.mk =================================================================== --- Uses/gnome.mk +++ Uses/gnome.mk @@ -81,7 +81,7 @@ libgnomecanvas libgnomekbd \ libgnomeui libgsf libgtkhtml libidl librsvg2 libwnck \ libxml2 libxslt \ - orbit2 pango pangox-compat pygobject pygtk2 \ + orbit2 pango pangox-compat pygobject \ vte # GNOME 3 components @@ -303,10 +303,6 @@ pygobject3_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}gobject3>=0:devel/py-gobject3@${PY_FLAVOR} pygobject3_USE_GNOME_IMPL= glib20 -pygtk2_BUILD_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/pygtk-2.0.pc:x11-toolkits/py-gtk2 -pygtk2_RUN_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/pygtk-2.0.pc:x11-toolkits/py-gtk2 -pygtk2_USE_GNOME_IMPL= libglade2 pygobject - intltool_BUILD_DEPENDS= ${LOCALBASE}/bin/intltool-extract:textproc/intltool intlhack_PRE_PATCH= ${FIND} ${WRKSRC} -name "intltool-merge.in" | ${XARGS} ${FRAMEWORK_REINPLACE_CMD} \ Index: Uses/python.mk =================================================================== --- Uses/python.mk +++ Uses/python.mk @@ -18,10 +18,9 @@ # # Examples: # -# USES=python:2.7 # Supports Python 2.7 Only -# USES=python:3.5+ # Supports Python 3.5 or later -# USES=python:3.5-3.8 # Supports Python 3.5 to 3.8 -# USES=python:-3.6 # Supports Python up to 3.6 +# USES=python:3.6+ # Supports Python 3.6 or later +# USES=python:3.6-3.8 # Supports Python 3.6 to 3.8 +# USES=python:-3.7 # Supports Python up to 3.7 # USES=python # Supports any/all Python versions # # NOTE: should be as specific as possible, matching the versions @@ -31,7 +30,7 @@ # # Not specifying a should only be used when a more specific # cannot be specified due to syntax limitations, for -# example: 2.7,3.4-3.6, but even in this case, X.Y+ (2.7+), or -X.Y (-3.6) +# example: 3.4-3.6, but even in this case, X.Y+ (3.4+), or -X.Y (-3.6) # is preferred and likely more correct. # # patch Python is needed at patch time. Adds dependency to PATCH_DEPENDS. @@ -52,7 +51,7 @@ # Exported variables: # # PYTHON_VERSION - The chosen Python interpreter including the version, -# e.g. python2.7, python3.5, etc. +# e.g. python3.6, python3.7, etc. # # Variables, which can be set by the port: # @@ -82,7 +81,7 @@ # # are linked from the prefixed version to the # prefix-less original name, e.g. -# bin/foo-2.7 --> bin/foo. +# bin/foo-3.6 --> bin/foo. # # cython - Depend on lang/cython at build-time. # @@ -176,17 +175,17 @@ # PYTHON_PORTSDIR - The port directory of the chosen Python interpreter # # PYTHON_REL - The release number of the chosen Python interpreter -# without dots, e.g. 2706, 3401, ... +# without dots, e.g. 3401, 3709, ... # # PYTHON_SUFFIX - The major-minor release number of the chosen Python -# interpreter without dots, e.g. 27, 36, ... +# interpreter without dots, e.g. 36, 37, ... # Used for prefixes and suffixes. # # PYTHON_MAJOR_VER - The major release version of the chosen Python -# interpreter, e.g. 2, 3, ... +# interpreter, e.g. 3, ... # # PYTHON_VER - The major-minor release version of the chosen Python -# interpreter, e.g. 2.7, 3.6, ... +# interpreter, e.g. 3.6, 3.7, ... # # PYTHON_ABIVER - Additional ABI flags set by the chosen Python # interpreter, e.g. md @@ -234,11 +233,6 @@ # PYTHON_VER=${PYTHON_VER} # PYTHON_VERSION=${PYTHON_VERSION} # -# and PYTHON2 and PYTHON3 will be set according to the Python version: -# -# PYTHON2="" PYTHON3="@comment " for Python 2.x -# PYTHON2="@comment " PYTHON3="" for Python 3.x -# # PYDISTUTILS_INSTALLNOSINGLE # - Deprecated without replacement # @@ -250,8 +244,8 @@ # What Python version and what Python interpreters are currently supported? # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. -_PYTHON_VERSIONS= 2.7 3.7 3.8 3.6 # preferred first -_PYTHON_PORTBRANCH= 2.7 # ${_PYTHON_VERSIONS:[1]} +_PYTHON_VERSIONS= 3.7 3.8 3.6 # preferred first +_PYTHON_PORTBRANCH= 3.7 # ${_PYTHON_VERSIONS:[1]} _PYTHON_BASECMD= ${LOCALBASE}/bin/python _PYTHON_RELPORTDIR= lang/python @@ -320,17 +314,13 @@ _PYTHON_TEST_DEP= yes .endif -.if ${PYTHON2_DEFAULT} != ${PYTHON_DEFAULT} && ${PYTHON3_DEFAULT} != ${PYTHON_DEFAULT} -WARNING+= "PYTHON_DEFAULT must be a version present in PYTHON2_DEFAULT or PYTHON3_DEFAULT, if you want more Python flavors, set BUILD_ALL_PYTHON_FLAVORS in your make.conf" +.if ${PYTHON3_DEFAULT} != ${PYTHON_DEFAULT} +WARNING+= "PYTHON_DEFAULT must be a version present in PYTHON3_DEFAULT, if you want more Python flavors, set BUILD_ALL_PYTHON_FLAVORS in your make.conf" .endif -.if ${_PYTHON_ARGS} == 2.7 -DEV_WARNING+= "lang/python27 reached End of Life and will be removed on 2020-12-31, consider converting to a modern version of python" -.elif ${_PYTHON_ARGS} == 2 -DEV_ERROR+= "USES=python:2 is no longer supported, use USES=python:2.7" -.elif ${_PYTHON_ARGS} == 3 +.if ${_PYTHON_ARGS} == 3 DEV_ERROR+= "USES=python:3 is no longer supported, use USES=python:3.6+ or an appropriate version range" -.endif # ${_PYTHON_ARGS} == 2.7 +.endif _PYTHON_VERSION:= ${PYTHON_DEFAULT} @@ -358,7 +348,7 @@ # If we have an unsupported version of Python, try another. .if defined(_PYTHON_VERSION_NONSUPPORTED) .undef _PYTHON_VERSION -.for ver in ${PYTHON2_DEFAULT} ${PYTHON3_DEFAULT} ${_PYTHON_VERSIONS} +.for ver in ${PYTHON3_DEFAULT} ${_PYTHON_VERSIONS} __VER= ${ver} .if !defined(_PYTHON_VERSION) && \ !(!empty(_PYTHON_VERSION_MINIMUM) && ( \ @@ -370,13 +360,15 @@ .endfor .if !defined(_PYTHON_VERSION) IGNORE= needs an unsupported version of Python +# Set this to not bail out too early +_PYTHON_VERSION= ${PYTHON_DEFAULT} .endif .endif # defined(_PYTHON_VERSION_NONSUPPORTED) # Automatically generates FLAVORS if empty .if empty(FLAVORS) && defined(_PYTHON_FEATURE_FLAVORS) . undef _VALID_PYTHON_VERSIONS -. for ver in ${PYTHON_DEFAULT} ${PYTHON2_DEFAULT} ${PYTHON3_DEFAULT} ${_PYTHON_VERSIONS} +. for ver in ${PYTHON_DEFAULT} ${PYTHON3_DEFAULT} ${_PYTHON_VERSIONS} __VER= ${ver} . if !(!empty(_PYTHON_VERSION_MINIMUM) && ( \ ${__VER} < ${_PYTHON_VERSION_MINIMUM})) && \ @@ -398,7 +390,7 @@ . if defined(BUILD_ALL_PYTHON_FLAVORS) || defined(_PYTHON_FEATURE_ALLFLAVORS) FLAVORS= ${_ALL_PYTHON_FLAVORS} . else -. for _v in ${PYTHON_DEFAULT} ${PYTHON2_DEFAULT} ${PYTHON3_DEFAULT} +. for _v in ${PYTHON_DEFAULT} ${PYTHON3_DEFAULT} _f= py${_v:S/.//} . if ${_ALL_PYTHON_FLAVORS:M${_f}} && !${FLAVORS:M${_f}} .if !empty(FLAVORS) @@ -414,7 +406,7 @@ . endif .endif -.if ${FLAVOR:Mpy[23][0-9]} +.if ${FLAVOR:Mpy[3][0-9]} _PYTHON_VERSION= ${FLAVOR:S/py//:C/(.)/\1./} .endif @@ -454,19 +446,12 @@ # Might be overridden by calling ports PYTHON_CMD?= ${_PYTHON_BASECMD}${_PYTHON_VERSION} -.if ${PYTHON_VER} != 2.7 .if exists(${PYTHON_CMD}-config) PYTHON_ABIVER!= ${PYTHON_CMD}-config --abiflags .elif ${PYTHON_REL} < 3800 # Default ABI flags for lang/python3[67] ports PYTHON_ABIVER= m .endif -.endif - -.if ${PYTHON_MAJOR_VER} == 2 -DEPRECATED?= Uses Python 2.7 which is EOLed upstream -EXPIRATION_DATE?= 2020-12-31 -.endif .if !defined(PYTHONBASE) PYTHONBASE!= (${PYTHON_CMD} -c 'import sys; print(sys.prefix)' \ @@ -489,11 +474,7 @@ _PYTHONPKGLIST= ${WRKDIR}/.PLIST.pymodtmp # PEP 0488 (https://www.python.org/dev/peps/pep-0488/) -.if ${PYTHON_REL} < 3500 -PYTHON_PYOEXTENSION= pyo -.else PYTHON_PYOEXTENSION= opt-1.pyc -.endif # Ports bound to a certain python version SHOULD # - use the PYTHON_PKGNAMEPREFIX @@ -636,37 +617,16 @@ PYNUMPY= ${PYTHON_PKGNAMEPREFIX}numpy>=1.16,1<1.20,1:math/py-numpy@${PY_FLAVOR} # Common Python modules that can be needed but only for some versions of Python. -.if ${PYTHON_REL} < 3500 -PY_PILLOW= ${PYTHON_PKGNAMEPREFIX}pillow6>=6.0.0:graphics/py-pillow6@${PY_FLAVOR} -PY_PYGMENTS= ${PYTHON_PKGNAMEPREFIX}pygments-25>=2.5.1:textproc/py-pygments-25@${PY_FLAVOR} -PY_SPHINX= ${PYTHON_PKGNAMEPREFIX}sphinx18>=0:textproc/py-sphinx18@${PY_FLAVOR} -PY_TYPING= ${PYTHON_PKGNAMEPREFIX}typing>=3.7.4.1:devel/py-typing@${PY_FLAVOR} -.else PY_PILLOW= ${PYTHON_PKGNAMEPREFIX}pillow>=7.0.0:graphics/py-pillow@${PY_FLAVOR} PY_PYGMENTS= ${PYTHON_PKGNAMEPREFIX}pygments>=2.5.1:textproc/py-pygments@${PY_FLAVOR} PY_SPHINX= ${PYTHON_PKGNAMEPREFIX}sphinx>=0:textproc/py-sphinx@${PY_FLAVOR} -PY_TYPING= -.endif -.if ${PYTHON_REL} < 3400 -PY_ENUM34= ${PYTHON_PKGNAMEPREFIX}enum34>=1.1<2.0:devel/py-enum34@${PY_FLAVOR} -PY_PATHLIB= ${PYTHON_PKGNAMEPREFIX}pathlib>0:devel/py-pathlib@${PY_FLAVOR} -.else +# old compat stuff, remove from ports +PY_TYPING= PY_ENUM34= PY_PATHLIB= -.endif - -.if ${PYTHON_REL} < 3300 -PY_IPADDRESS= ${PYTHON_PKGNAMEPREFIX}ipaddress>=1.0.23:net/py-ipaddress@${PY_FLAVOR} -.else PY_IPADDRESS= -.endif - -.if ${PYTHON_REL} < 3200 -PY_FUTURES= ${PYTHON_PKGNAMEPREFIX}futures>=3.2:devel/py-futures@${PY_FLAVOR} -.else PY_FUTURES= -.endif .if ${PYTHON_VER} != ${PYTHON_DEFAULT} PY_MERCURIAL= ${PYTHON_PKGNAMEPREFIX}mercurial>=5.5:devel/mercurial@${PY_FLAVOR} @@ -700,11 +660,7 @@ PYTHON_SUFFIX=${PYTHON_SUFFIX} \ PYTHON_VER=${PYTHON_VER} \ PYTHON_VERSION=${PYTHON_VERSION} -.if ${PYTHON_REL} < 3000 -PLIST_SUB+= PYTHON2="" PYTHON3="@comment " -.else PLIST_SUB+= PYTHON2="@comment " PYTHON3="" -.endif _USES_POST+= python .endif # _INCLUDE_USES_PYTHON_MK Index: Uses/scons.mk =================================================================== --- Uses/scons.mk +++ Uses/scons.mk @@ -4,9 +4,8 @@ # # Feature: scons # Usage: USES=scons[:ARGS] -# Valid ARGS: python2 python3 +# Valid ARGS: python3 # -# python2: Use default python 2.x to run scons # python3: Use default python 3.x to run scons (default) # # MAINTAINER: python@FreeBSD.org @@ -20,10 +19,6 @@ .if ${scons_ARGS} == python3 _SCONS_PYTHON_VER= ${PYTHON3_DEFAULT} -.elif ${scons_ARGS} == python2 -_SCONS_PYTHON_VER= ${PYTHON2_DEFAULT} -DEPRECATED?= Uses Python 2.7 version of scons, and Python 2.7 which is EOLed upstream -EXPIRATION_DATE?= 2020-12-31 .else IGNORE= Incorrect 'USES+= scons:${scons_ARGS}' usage .endif Index: bsd.default-versions.mk =================================================================== --- bsd.default-versions.mk +++ bsd.default-versions.mk @@ -20,7 +20,7 @@ LOCALBASE?= /usr/local .for lang in APACHE BDB COROSYNC EMACS FIREBIRD FORTRAN FPC GCC GHOSTSCRIPT \ - JAVA JULIA LAZARUS LINUX LLVM LUA MYSQL PERL5 PGSQL PHP PYTHON PYTHON2 \ + JAVA JULIA LAZARUS LINUX LLVM LUA MYSQL PERL5 PGSQL PHP PYTHON \ PYTHON3 RUBY RUST SAMBA SSL TCLTK VARNISH .if defined(${lang}_DEFAULT) ERROR+= "The variable ${lang}_DEFAULT is set and it should only be defined through DEFAULT_VERSIONS+=${lang:tl}=${${lang}_DEFAULT} in /etc/make.conf" @@ -90,10 +90,8 @@ PGSQL_DEFAULT?= 12 # Possible values: 7.2, 7.3, 7.4 PHP_DEFAULT?= 7.4 -# Possible values: 2.7, 3.6, 3.7, 3.8 +# Possible values: 3.6, 3.7, 3.8 PYTHON_DEFAULT?= 3.7 -# Possible values: 2.7 -PYTHON2_DEFAULT?= 2.7 # Possible values: 3.6, 3.7, 3.8 PYTHON3_DEFAULT?= 3.7 # Possible values: 2.5, 2.6, 2.7