python-utils-r1.eclass: Make python_wrapper_setup private
authorMichał Górny <mgorny@gentoo.org>
Thu, 19 Mar 2020 21:24:38 +0000 (22:24 +0100)
committerMichał Górny <mgorny@gentoo.org>
Sun, 22 Mar 2020 05:36:55 +0000 (06:36 +0100)
This function was never meant to be a part of the public API.  Correct
the mistake by renaming it to _python_wrapper_setup(), and adding a QA
warning under the old name.

Signed-off-by: Michał Górny <mgorny@gentoo.org>
eclass/python-any-r1.eclass
eclass/python-r1.eclass
eclass/python-single-r1.eclass
eclass/python-utils-r1.eclass

index 66c6965c04eadbc40948b278dfdbf30b7efeb455..d16677debd2a683029b497afe528008a4c1cdb0d 100644 (file)
@@ -300,7 +300,7 @@ python_setup() {
                ewarn "Dependencies won't be satisfied, and EPYTHON/eselect-python will be ignored."
 
                python_export "${impls[0]}" EPYTHON PYTHON
-               python_wrapper_setup
+               _python_wrapper_setup
                einfo "Using ${EPYTHON} to build"
                return
        fi
@@ -309,7 +309,7 @@ python_setup() {
        if [[ ${EPYTHON} ]]; then
                if _python_EPYTHON_supported "${EPYTHON}"; then
                        python_export EPYTHON PYTHON
-                       python_wrapper_setup
+                       _python_wrapper_setup
                        einfo "Using ${EPYTHON} to build"
                        return
                fi
@@ -325,7 +325,7 @@ python_setup() {
                        break
                elif _python_EPYTHON_supported "${i}"; then
                        python_export "${i}" EPYTHON PYTHON
-                       python_wrapper_setup
+                       _python_wrapper_setup
                        einfo "Using ${EPYTHON} to build"
                        return
                fi
@@ -336,7 +336,7 @@ python_setup() {
        for (( i = ${#_PYTHON_SUPPORTED_IMPLS[@]} - 1; i >= 0; i-- )); do
                python_export "${_PYTHON_SUPPORTED_IMPLS[i]}" EPYTHON PYTHON
                if _python_EPYTHON_supported "${EPYTHON}"; then
-                       python_wrapper_setup
+                       _python_wrapper_setup
                        einfo "Using ${EPYTHON} to build"
                        return
                fi
index 960fed8c451a84b01f0447774edb1507d6faddcd..3ac35e401217c4ba893b6b1740e06f076b4911ef 100644 (file)
@@ -638,7 +638,7 @@ _python_multibuild_wrapper() {
        local -x EPYTHON PYTHON
        local -x PATH=${PATH} PKG_CONFIG_PATH=${PKG_CONFIG_PATH}
        python_export "${MULTIBUILD_VARIANT}" EPYTHON PYTHON
-       python_wrapper_setup
+       _python_wrapper_setup
 
        "${@}"
 }
@@ -784,7 +784,7 @@ python_setup() {
                die "${FUNCNAME}: no enabled implementation satisfy requirements"
        fi
 
-       python_wrapper_setup
+       _python_wrapper_setup
        einfo "Using ${EPYTHON} in global scope"
 }
 
index f9e26e7c334fdf2791d4e67dd793d2e474b7d473..888db3631d9cb3da64aa35260eafe20fc83156ba 100644 (file)
@@ -466,7 +466,7 @@ python_setup() {
                ewarn "Dependencies won't be satisfied, and PYTHON_SINGLE_TARGET flags will be ignored."
 
                python_export "${impls[0]}" EPYTHON PYTHON
-               python_wrapper_setup
+               _python_wrapper_setup
                einfo "Using ${EPYTHON} to build"
                return
        fi
@@ -484,7 +484,7 @@ python_setup() {
                        fi
 
                        python_export "${impl}" EPYTHON PYTHON
-                       python_wrapper_setup
+                       _python_wrapper_setup
                        einfo "Using ${EPYTHON} to build"
                fi
        done
index f144cbbb1279401eaf45b873b1c9d066bca5b023..e6c6ac1155f27c21acd8eb66d9f39d47505f3f15 100644 (file)
@@ -950,6 +950,21 @@ python_doheader() {
 # @FUNCTION: python_wrapper_setup
 # @USAGE: [<path> [<impl>]]
 # @DESCRIPTION:
+# Backwards compatibility function.  The relevant API is now considered
+# private, please use python_setup instead.
+python_wrapper_setup() {
+       debug-print-function ${FUNCNAME} "${@}"
+
+       eqawarn "python_wrapper_setup() is part of private eclass API."
+       eqawarn "Please call python_setup() instead."
+
+       _python_wrapper_setup "${@}"
+}
+
+# @FUNCTION: _python_wrapper_setup
+# @USAGE: [<path> [<impl>]]
+# @INTERNAL
+# @DESCRIPTION:
 # Create proper 'python' executable and pkg-config wrappers
 # (if available) in the directory named by <path>. Set up PATH
 # and PKG_CONFIG_PATH appropriately. <path> defaults to ${T}/${EPYTHON}.
@@ -961,7 +976,7 @@ python_doheader() {
 # be assumed to contain proper wrappers already and only environment
 # setup will be done. If wrapper update is requested, the directory
 # shall be removed first.
-python_wrapper_setup() {
+_python_wrapper_setup() {
        debug-print-function ${FUNCNAME} "${@}"
 
        local workdir=${1:-${T}/${EPYTHON}}