Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Dec 2017 13:48:58 +0000 (UTC)
From:      Mathieu Arnold <mat@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r456293 - head/Mk/Uses
Message-ID:  <201712141348.vBEDmwG9090700@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712141348.vBEDmwG9090700>