svn commit: r456293 - head/Mk/Uses

Mathieu Arnold mat at FreeBSD.org
Thu Dec 14 13:49:00 UTC 2017


Author: mat
Date: Thu Dec 14 13:48:58 2017
New Revision: 456293
URL: https://svnweb.freebsd.org/changeset/ports/456293

Log:
  Rework PY_FLAVOR to always work.
  
  Before this, it could have been set to the current flavor of the port
  that may not have been related to Python at all.
  
  This of course never came up during development because at that time,
  the only flavors were the Python flavors.
  
  Reported by:	dbn
  Sponsored by:	Absolight

Modified:
  head/Mk/Uses/python.mk

Modified: head/Mk/Uses/python.mk
==============================================================================
--- head/Mk/Uses/python.mk	Thu Dec 14 13:41:10 2017	(r456292)
+++ head/Mk/Uses/python.mk	Thu Dec 14 13:48:58 2017	(r456293)
@@ -463,11 +463,12 @@ PKGNAMESUFFIX=	${PYTHON_PKGNAMESUFFIX}
 .endif
 
 # To avoid having dependencies with @ and empty flavor:
-.if empty(FLAVOR)
-PY_FLAVOR=	${PYTHON_VERSION:S/^python/py/:S/.//}
-.else
-PY_FLAVOR=	${FLAVOR}
-.endif
+# _PYTHON_VERSION is either set by (first that matches):
+# - If using Python flavors, from the current Python flavor
+# - If using a version restriction (USES=python:3.4+), from the first
+#   acceptable default Python version.
+# - From PYTHON_DEFAULT
+PY_FLAVOR=	py${_PYTHON_VERSION:S/.//}
 
 # Pass PYTHON_VERSION down the dependency chain. This ensures that
 # port A -> B -> C all will use the same python version and do not


More information about the svn-ports-head mailing list