summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2016-05-14 08:42:59 +0200
committerMichał Górny <mgorny@gentoo.org>2016-05-14 09:19:57 +0200
commit533225b57458ecdcfa075d761ffdf24f5a46e177 (patch)
tree58b19113504f9b298daa06f58cea05e8bc4b96e7 /eclass
parentpython-utils-r1.eclass: stop respecting DESTTREE in python_do*/new* (diff)
downloadgentoo-533225b57458ecdcfa075d761ffdf24f5a46e177.tar.gz
gentoo-533225b57458ecdcfa075d761ffdf24f5a46e177.tar.bz2
gentoo-533225b57458ecdcfa075d761ffdf24f5a46e177.zip
python-utils-r1.eclass: Make python_{script,module}root vars private
Remove python_scriptroot & python_moduleroot from the public eclass API, in favor of calls to python_scriptinto and python_moduleinto. This feature was seldom used, not listed in the official API guide, and the *into functions is more in line with the PMS.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/python-utils-r1.eclass60
1 files changed, 24 insertions, 36 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 3f9563a88578..468eff126ef3 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -651,32 +651,23 @@ python_optimize() {
done
}
-# @ECLASS-VARIABLE: python_scriptroot
-# @DEFAULT_UNSET
+# @FUNCTION: python_scriptinto
+# @USAGE: <new-path>
# @DESCRIPTION:
-# The current script destination for python_doscript(). The path
-# is relative to the installation root (${ED}).
+# Set the directory to which files passed to python_doexe(),
+# python_doscript(), python_newexe() and python_newscript()
+# are going to be installed. The new value needs to be relative
+# to the installation root (${ED}).
#
-# When unset, /usr/bin will be used.
-#
-# Can be set indirectly through the python_scriptinto() function.
+# If not set explicitly, the directory defaults to /usr/bin.
#
# Example:
# @CODE
# src_install() {
-# local python_scriptroot=${GAMES_BINDIR}
+# python_scriptinto /usr/sbin
# python_foreach_impl python_doscript foo
# }
# @CODE
-
-# @FUNCTION: python_scriptinto
-# @USAGE: <new-path>
-# @DESCRIPTION:
-# Set the current scriptroot. The new value will be stored
-# in the 'python_scriptroot' environment variable. The new value need
-# be relative to the installation root (${ED}).
-#
-# Alternatively, you can set the variable directly.
python_scriptinto() {
debug-print-function ${FUNCNAME} "${@}"
@@ -686,7 +677,7 @@ python_scriptinto() {
# @FUNCTION: python_doexe
# @USAGE: <files>...
# @DESCRIPTION:
-# Install the given executables into current python_scriptroot,
+# Install the given executables into the executable install directory,
# for the current Python implementation (${EPYTHON}).
#
# The executable will be wrapped properly for the Python implementation,
@@ -703,7 +694,7 @@ python_doexe() {
# @FUNCTION: python_newexe
# @USAGE: <path> <new-name>
# @DESCRIPTION:
-# Install the given executable into current python_scriptroot,
+# Install the given executable into the executable install directory,
# for the current Python implementation (${EPYTHON}).
#
# The executable will be wrapped properly for the Python implementation,
@@ -746,7 +737,7 @@ python_newexe() {
# @FUNCTION: python_doscript
# @USAGE: <files>...
# @DESCRIPTION:
-# Install the given scripts into current python_scriptroot,
+# Install the given scripts into the executable install directory,
# for the current Python implementation (${EPYTHON}).
#
# All specified files must start with a 'python' shebang. The shebang
@@ -769,7 +760,7 @@ python_doscript() {
# @FUNCTION: python_newscript
# @USAGE: <path> <new-name>
# @DESCRIPTION:
-# Install the given script into current python_scriptroot
+# Install the given script into the executable install directory
# for the current Python implementation (${EPYTHON}), and name it
# <new-name>.
#
@@ -790,30 +781,27 @@ python_newscript() {
python_newexe "${@}"
}
-# @ECLASS-VARIABLE: python_moduleroot
-# @DEFAULT_UNSET
+# @FUNCTION: python_moduleinto
+# @USAGE: <new-path>
# @DESCRIPTION:
-# The current module root for python_domodule(). The path can be either
-# an absolute system path (it must start with a slash, and ${ED} will be
-# prepended to it) or relative to the implementation's site-packages directory
-# (then it must start with a non-slash character).
+# Set the Python module install directory for python_domodule().
+# The <new-path> can either be an absolute target system path (in which
+# case it needs to start with a slash, and ${ED} will be prepended to
+# it) or relative to the implementation's site-packages directory
+# (then it must not start with a slash).
#
-# When unset, the modules will be installed in the site-packages root.
-#
-# Can be set indirectly through the python_moduleinto() function.
+# When not set explicitly, the modules are installed to the top
+# site-packages directory.
#
# Example:
# @CODE
# src_install() {
-# local python_moduleroot=bar
+# python_moduleinto bar
# # installs ${PYTHON_SITEDIR}/bar/baz.py
# python_foreach_impl python_domodule baz.py
# }
# @CODE
-# @FUNCTION: python_moduleinto
-# @USAGE: <new-path>
-# @DESCRIPTION:
# Set the current module root. The new value will be stored
# in the 'python_moduleroot' environment variable. The new value need
# be relative to the site-packages root.
@@ -828,8 +816,8 @@ python_moduleinto() {
# @FUNCTION: python_domodule
# @USAGE: <files>...
# @DESCRIPTION:
-# Install the given modules (or packages) into the current
-# python_moduleroot. The list can mention both modules (files)
+# Install the given modules (or packages) into the current Python module
+# installation directory. The list can mention both modules (files)
# and packages (directories). All listed files will be installed
# for all enabled implementations, and compiled afterwards.
#