From 533225b57458ecdcfa075d761ffdf24f5a46e177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 14 May 2016 08:42:59 +0200 Subject: 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. --- eclass/python-utils-r1.eclass | 60 +++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 36 deletions(-) (limited to 'eclass') diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 3f9563a8857..468eff126ef 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: # @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: -# @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: ... # @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: # @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: ... # @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: # @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 # . # @@ -790,30 +781,27 @@ python_newscript() { python_newexe "${@}" } -# @ECLASS-VARIABLE: python_moduleroot -# @DEFAULT_UNSET +# @FUNCTION: python_moduleinto +# @USAGE: # @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 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: -# @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: ... # @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. # -- cgit v1.2.1