* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2012-10-14 10:51 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2012-10-14 10:51 UTC (permalink / raw
To: gentoo-commits
mgorny 12/10/14 10:51:28
Modified: ChangeLog
Added: python-r1.eclass
Log:
Introduce python-r1, a new (and simpler) eclass for Python-related packages.
Revision Changes Path
1.442 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.442&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.442&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.441&r2=1.442
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.441
retrieving revision 1.442
diff -u -r1.441 -r1.442
--- ChangeLog 13 Oct 2012 22:54:37 -0000 1.441
+++ ChangeLog 14 Oct 2012 10:51:28 -0000 1.442
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.441 2012/10/13 22:54:37 johu Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.442 2012/10/14 10:51:28 mgorny Exp $
+
+ 14 Oct 2012; Michał Górny <mgorny@gentoo.org> +python-r1.eclass:
+ Introduce python-r1, a new (and simpler) eclass for Python-related packages.
13 Oct 2012; Johannes Huber <johu@gentoo.org> kde4-meta-pkg.eclass:
Change LICENSE to 'metapackage' for kde meta packages, bug #438278.
1.1 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.1&content-type=text/plain
Index: python-r1.eclass
===================================================================
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.1 2012/10/14 10:51:28 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
# Michał Górny <mgorny@gentoo.org>
# Python herd <python@gentoo.org>
# @AUTHOR:
# Author: Michał Górny <mgorny@gentoo.org>
# Based on work of: Krzysztof Pawlik <nelchael@gentoo.org>
# @BLURB: A common, simple eclass for Python packages.
# @DESCRIPTION:
# A common eclass providing helper functions to build and install
# packages supporting being installed for multiple Python
# implementations.
#
# This eclass sets correct IUSE and REQUIRED_USE. It exports PYTHON_DEPS
# and PYTHON_USEDEP so you can create correct dependencies for your
# package easily. It also provides methods to easily run a command for
# each enabled Python implementation and duplicate the sources for them.
case "${EAPI}" in
0|1|2|3)
die "Unsupported EAPI=${EAPI} (too old) for ${ECLASS}"
;;
4)
# EAPI=4 needed for REQUIRED_USE
;;
*)
die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
;;
esac
# @ECLASS-VARIABLE: _PYTHON_ALL_IMPLS
# @INTERNAL
# @DESCRIPTION:
# All supported Python implementations, most preferred last.
_PYTHON_ALL_IMPLS=(
jython2_5
pypy1_8 pypy1_9
python3_1 python3_2
python2_5 python2_6 python2_7
)
# @ECLASS-VARIABLE: PYTHON_COMPAT
# @DESCRIPTION:
# This variable contains a list of Python implementations the package
# supports. It must be set before the `inherit' call. The default is to
# enable all implementations. It has to be an array.
if ! declare -p PYTHON_COMPAT &>/dev/null; then
PYTHON_COMPAT=( "${_PYTHON_ALL_IMPLS[@]}" )
fi
# @ECLASS-VARIABLE: PYTHON_REQ_USE
# @DEFAULT_UNSET
# @DESCRIPTION:
# The list of USEflags required to be enabled on the chosen Python
# implementations, formed as a USE-dependency string. It should be valid
# for all implementations in PYTHON_COMPAT, so it may be necessary to
# use USE defaults.
#
# Example:
# @CODE
# PYTHON_REQ_USE="gdbm,ncurses(-)?"
# @CODE
#
# Will cause the Python dependencies to look like:
# @CODE
# python_targets_pythonX_Y? (
# dev-lang/python:X_Y[gdbm,ncurses(-)?] )
# @CODE
# @ECLASS-VARIABLE: PYTHON_DEPS
# @DESCRIPTION:
# This is an eclass-generated Python dependency string for all
# implementations listed in PYTHON_COMPAT. It should be used
# in RDEPEND and/or DEPEND like:
#
# @CODE
# RDEPEND="${PYTHON_DEPS}
# dev-foo/mydep"
# DEPEND="${RDEPEND}"
# @CODE
# @ECLASS-VARIABLE: PYTHON_USEDEP
# @DESCRIPTION:
# This is an eclass-generated USE-dependency string which can be used to
# depend on another Python package being built for the same Python
# implementations. It should be used like:
#
# @CODE
# RDEPEND="dev-python/foo[${PYTHON_USEDEP}]"
# @CODE
_python_set_globals() {
local flags=( "${PYTHON_COMPAT[@]/#/python_targets_}" )
local optflags=${flags[@]/%/?}
IUSE=${flags[*]}
REQUIRED_USE="|| ( ${flags[*]} )"
PYTHON_USEDEP=${optflags// /,}
PYTHON_DEPS=
local i
for i in "${PYTHON_COMPAT[@]}"; do
local d
case ${i} in
python*)
d='dev-lang/python';;
jython*)
d='dev-java/jython';;
pypy*)
d='dev-python/pypy';;
*)
die "Invalid implementation: ${i}"
esac
local v=${i##*[a-z]}
local usestr
[[ ${PYTHON_REQ_USE} ]] && usestr="[${PYTHON_REQ_USE}]"
PYTHON_DEPS+=" python_targets_${i}? (
${d}:${v/_/.}${usestr} )"
done
}
_python_set_globals
# @FUNCTION: _python_set_PYTHON
# @USAGE: <impl>
# @INTERNAL
# @DESCRIPTION:
# Get the Python executable name for the given implementation and set it
# as ${PYTHON} & ${EPYTHON}. Please note that EPYTHON will contain
# the 'basename' while PYTHON will contain the full path.
_python_set_PYTHON() {
debug-print-function ${FUNCNAME} "${@}"
local impl=${1/_/.}
case "${impl}" in
python*|jython*)
EPYTHON=${impl}
;;
pypy*)
EPYTHON=pypy-c${impl#pypy}
;;
*)
die "Invalid argument to _python_set_PYTHON: ${1}"
;;
esac
PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
debug-print "${FUNCNAME}: ${impl} -> ${PYTHON}"
}
# @FUNCTION: python_copy_sources
# @DESCRIPTION:
# Create a single copy of the package sources (${S}) for each enabled
# Python implementation.
python_copy_sources() {
debug-print-function ${FUNCNAME} "${@}"
local impl
local bdir=${BUILD_DIR:-${S}}
debug-print "${FUNCNAME}: bdir = ${bdir}"
einfo "Will copy sources from ${S}"
# the order is irrelevant here
for impl in "${PYTHON_COMPAT[@]}"; do
if use "python_targets_${impl}"
then
local BUILD_DIR=${bdir%%/}-${impl}
einfo "${impl}: copying to ${BUILD_DIR}"
debug-print "${FUNCNAME}: [${impl}] cp ${S} => ${BUILD_DIR}"
cp -pr "${S}" "${BUILD_DIR}" || die
fi
done
}
# @FUNCTION: python_foreach_impl
# @USAGE: <command> [<args>...]
# @DESCRIPTION:
# Run the given command for each of the enabled Python implementations.
# If additional parameters are passed, they will be passed through
# to the command. If the command fails, python_foreach_impl dies.
# If necessary, use ':' to force a successful return.
#
# Before the command is run, EPYTHON is set to the name of the current
# Python implementation, PYTHON is set to the correct Python executable
# name and exported, and BUILD_DIR is set to a 'default' build directory
# for given implementation (e.g. ${BUILD_DIR:-${S}}-python2_7).
#
# The command is run inside the build directory. If it doesn't exist
# yet, it is created (as an empty directory!). If your build system does
# not support out-of-source builds, you will likely want to use
# python_copy_sources first.
python_foreach_impl() {
debug-print-function ${FUNCNAME} "${@}"
local impl
local bdir=${BUILD_DIR:-${S}}
debug-print "${FUNCNAME}: bdir = ${bdir}"
for impl in "${_PYTHON_ALL_IMPLS[@]}"; do
if has "${impl}" "${PYTHON_COMPAT[@]}" && use "python_targets_${impl}"
then
local EPYTHON PYTHON
_python_set_PYTHON "${impl}"
local BUILD_DIR=${bdir%%/}-${impl}
export PYTHON
debug-print "${FUNCNAME}: [${impl}] build_dir = ${BUILD_DIR}"
mkdir -p "${BUILD_DIR}" || die
pushd "${BUILD_DIR}" &>/dev/null || die
einfo "${EPYTHON}: running ${@}"
"${@}" || die "${EPYTHON}: ${1} failed"
popd &>/dev/null || die
fi
done
}
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2012-10-25 16:47 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2012-10-25 16:47 UTC (permalink / raw
To: gentoo-commits
mgorny 12/10/25 16:47:30
Modified: ChangeLog python-r1.eclass
Log:
Add a note about array brace expansion.
Revision Changes Path
1.467 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.467&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.467&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.466&r2=1.467
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.466
retrieving revision 1.467
diff -u -r1.466 -r1.467
--- ChangeLog 25 Oct 2012 16:44:54 -0000 1.466
+++ ChangeLog 25 Oct 2012 16:47:30 -0000 1.467
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.466 2012/10/25 16:44:54 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.467 2012/10/25 16:47:30 mgorny Exp $
+
+ 25 Oct 2012; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Add a note about array brace expansion.
25 Oct 2012; Michał Górny <mgorny@gentoo.org> distutils-r1.eclass,
python-r1.eclass:
1.5 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.5&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.5&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.4&r2=1.5
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- python-r1.eclass 25 Oct 2012 16:44:54 -0000 1.4
+++ python-r1.eclass 25 Oct 2012 16:47:30 -0000 1.5
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.4 2012/10/25 16:44:54 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.5 2012/10/25 16:47:30 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -61,6 +61,11 @@
# @CODE
# PYTHON_COMPAT=( python2_5 python2_6 python2_7 )
# @CODE
+#
+# Please note that you can also use bash brace expansion if you like:
+# @CODE
+# PYTHON_COMPAT=( python{2_5,2_6,2_7} )
+# @CODE
if ! declare -p PYTHON_COMPAT &>/dev/null; then
PYTHON_COMPAT=( "${_PYTHON_ALL_IMPLS[@]}" )
fi
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2012-10-27 1:14 Mike Gilbert (floppym)
0 siblings, 0 replies; 41+ messages in thread
From: Mike Gilbert (floppym) @ 2012-10-27 1:14 UTC (permalink / raw
To: gentoo-commits
floppym 12/10/27 01:14:38
Modified: ChangeLog python-r1.eclass
Log:
Remove duplicate documentation for BUILD_DIR, PYTHON, and EPYTHON. This breaks eclass-manpages.
Revision Changes Path
1.470 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.470&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.470&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.469&r2=1.470
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.469
retrieving revision 1.470
diff -u -r1.469 -r1.470
--- ChangeLog 26 Oct 2012 21:38:47 -0000 1.469
+++ ChangeLog 27 Oct 2012 01:14:38 -0000 1.470
@@ -1,6 +1,10 @@
# ChangeLog for eclass directory
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.469 2012/10/26 21:38:47 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.470 2012/10/27 01:14:38 floppym Exp $
+
+ 27 Oct 2012; Mike Gilbert <floppym@gentoo.org> python-r1.eclass:
+ Remove duplicate documentation for BUILD_DIR, PYTHON, and EPYTHON. This
+ breaks eclass-manpages.
26 Oct 2012; Michał Górny <mgorny@gentoo.org> distutils-r1.eclass,
python-r1.eclass:
1.7 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.7&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.7&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.6&r2=1.7
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- python-r1.eclass 26 Oct 2012 21:38:47 -0000 1.6
+++ python-r1.eclass 27 Oct 2012 01:14:38 -0000 1.7
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.6 2012/10/26 21:38:47 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.7 2012/10/27 01:14:38 floppym Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -253,45 +253,6 @@
done
}
-# @ECLASS-VARIABLE: BUILD_DIR
-# @DESCRIPTION:
-# The current build directory. In global scope, it is supposed to
-# contain an initial build directory; if unset, it defaults to ${S}.
-#
-# In functions run by python_foreach_impl(), the BUILD_DIR is locally
-# set to an implementation-specific build directory. That path is
-# created through appending a hyphen and the implementation name
-# to the final component of the initial BUILD_DIR.
-#
-# Example value:
-# @CODE
-# ${WORKDIR}/foo-1.3-python2_6
-# @CODE
-
-# @ECLASS-VARIABLE: PYTHON
-# @DESCRIPTION:
-# The absolute path to the current Python interpreter.
-#
-# Set and exported only in commands run by python_foreach_impl().
-#
-# Example value:
-# @CODE
-# /usr/bin/python2.6
-# @CODE
-
-# @ECLASS-VARIABLE: EPYTHON
-# @DESCRIPTION:
-# The executable name of the current Python interpreter.
-#
-# This variable is used consistently with python.eclass.
-#
-# Set and exported only in commands run by python_foreach_impl().
-#
-# Example value:
-# @CODE
-# python2.6
-# @CODE
-
# @FUNCTION: python_copy_sources
# @DESCRIPTION:
# Create a single copy of the package sources (${S}) for each enabled
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2012-10-29 9:22 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2012-10-29 9:22 UTC (permalink / raw
To: gentoo-commits
mgorny 12/10/29 09:22:13
Modified: ChangeLog python-r1.eclass
Log:
Add support for obtaining Python site-packages directory.
Revision Changes Path
1.474 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.474&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.474&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.473&r2=1.474
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.473
retrieving revision 1.474
diff -u -r1.473 -r1.474
--- ChangeLog 28 Oct 2012 09:43:49 -0000 1.473
+++ ChangeLog 29 Oct 2012 09:22:13 -0000 1.474
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.473 2012/10/28 09:43:49 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.474 2012/10/29 09:22:13 mgorny Exp $
+
+ 29 Oct 2012; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Add support for obtaining Python site-packages directory.
28 Oct 2012; Pacho Ramos <pacho@gentoo.org> emul-linux-x86.eclass:
Do not hardcode lib32, bug #429726 by SpanKY.
1.8 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.8&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.8&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.7&r2=1.8
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- python-r1.eclass 27 Oct 2012 01:14:38 -0000 1.7
+++ python-r1.eclass 29 Oct 2012 09:22:13 -0000 1.8
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.7 2012/10/27 01:14:38 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.8 2012/10/29 09:22:13 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -36,6 +36,8 @@
;;
esac
+inherit multilib
+
# @ECLASS-VARIABLE: _PYTHON_ALL_IMPLS
# @INTERNAL
# @DESCRIPTION:
@@ -198,6 +200,16 @@
# python2.6
# @CODE
+# @ECLASS-VARIABLE: PYTHON_SITEDIR
+# @DESCRIPTION:
+# The path to Python site-packages directory.
+#
+# Set and exported on request using python_export().
+#
+# Example value:
+# @CODE
+# @CODE
+
# @FUNCTION: python_export
# @USAGE: [<impl>] <variables>...
# @DESCRIPTION:
@@ -209,8 +221,9 @@
# or an EPYTHON one, e.g. python2.7). If no implementation passed,
# the current one will be obtained from ${EPYTHON}.
#
-# The variables which can be exported are: PYTHON, EPYTHON. They are
-# described more completely in the eclass variable documentation.
+# The variables which can be exported are: PYTHON, EPYTHON,
+# PYTHON_SITEDIR. They are described more completely in the eclass
+# variable documentation.
python_export() {
debug-print-function ${FUNCNAME} "${@}"
@@ -247,6 +260,23 @@
export PYTHON=${EPREFIX}/usr/bin/${impl}
debug-print "${FUNCNAME}: PYTHON = ${PYTHON}"
;;
+ PYTHON_SITEDIR)
+ local dir
+ case "${impl}" in
+ python*)
+ dir=/usr/$(get_libdir)/${impl}
+ ;;
+ jython*)
+ dir=/usr/share/${impl}/Lib
+ ;;
+ pypy*)
+ dir=/usr/$(get_libdir)/${impl/-c/}
+ ;;
+ esac
+
+ export PYTHON_SITEDIR=${EPREFIX}${dir}/site-packages
+ debug-print "${FUNCNAME}: PYTHON_SITEDIR = ${PYTHON_SITEDIR}"
+ ;;
*)
die "python_export: unknown variable ${var}"
esac
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2012-10-29 9:25 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2012-10-29 9:25 UTC (permalink / raw
To: gentoo-commits
mgorny 12/10/29 09:25:04
Modified: ChangeLog python-r1.eclass
Log:
Introduce python_export_best() to obtain variables for the most preferred Python implementation enabled.
Revision Changes Path
1.476 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.476&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.476&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.475&r2=1.476
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.475
retrieving revision 1.476
diff -u -r1.475 -r1.476
--- ChangeLog 29 Oct 2012 09:23:58 -0000 1.475
+++ ChangeLog 29 Oct 2012 09:25:04 -0000 1.476
@@ -1,6 +1,10 @@
# ChangeLog for eclass directory
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.475 2012/10/29 09:23:58 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.476 2012/10/29 09:25:04 mgorny Exp $
+
+ 29 Oct 2012; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Introduce python_export_best() to obtain variables for the most preferred
+ Python implementation enabled.
29 Oct 2012; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
Add getters for common Python variables.
1.10 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.10&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.10&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.9&r2=1.10
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- python-r1.eclass 29 Oct 2012 09:23:58 -0000 1.9
+++ python-r1.eclass 29 Oct 2012 09:25:04 -0000 1.10
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.9 2012/10/29 09:23:58 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.10 2012/10/29 09:25:04 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -387,3 +387,28 @@
fi
done
}
+
+# @FUNCTION: python_export_best
+# @USAGE: [<variable>...]
+# @DESCRIPTION:
+# Find the best (most preferred) Python implementation enabled
+# and export given variables for it. If no variables are provided,
+# EPYTHON & PYTHON will be exported.
+python_export_best() {
+ debug-print-function ${FUNCNAME} "${@}"
+
+ [[ ${#} -gt 0 ]] || set -- EPYTHON PYTHON
+
+ local impl best
+ for impl in "${_PYTHON_ALL_IMPLS[@]}"; do
+ if has "${impl}" "${PYTHON_COMPAT[@]}" && use "python_targets_${impl}"
+ then
+ best=${impl}
+ fi
+ done
+
+ [[ ${best+1} ]] || die "python_export_best(): no implementation found!"
+
+ debug-print "${FUNCNAME}: Best implementation is: ${impl}"
+ python_export "${impl}" "${@}"
+}
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2012-10-29 11:27 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2012-10-29 11:27 UTC (permalink / raw
To: gentoo-commits
mgorny 12/10/29 11:27:30
Modified: ChangeLog python-r1.eclass
Log:
Enable python3.3 support.
Revision Changes Path
1.482 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.482&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.482&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.481&r2=1.482
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.481
retrieving revision 1.482
diff -u -r1.481 -r1.482
--- ChangeLog 29 Oct 2012 09:54:50 -0000 1.481
+++ ChangeLog 29 Oct 2012 11:27:30 -0000 1.482
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.481 2012/10/29 09:54:50 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.482 2012/10/29 11:27:30 mgorny Exp $
+
+ 29 Oct 2012; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Enable python3.3 support.
29 Oct 2012; Michał Górny <mgorny@gentoo.org> distutils-r1.eclass:
Remove redundant "cd ${BUILD_DIR}" calls.
1.13 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.13&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.13&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.12&r2=1.13
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- python-r1.eclass 29 Oct 2012 09:51:27 -0000 1.12
+++ python-r1.eclass 29 Oct 2012 11:27:30 -0000 1.13
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.12 2012/10/29 09:51:27 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.13 2012/10/29 11:27:30 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -45,7 +45,7 @@
_PYTHON_ALL_IMPLS=(
jython2_5
pypy1_8 pypy1_9
- python3_1 python3_2
+ python3_1 python3_2 python3_3
python2_5 python2_6 python2_7
)
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2012-11-01 21:43 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2012-11-01 21:43 UTC (permalink / raw
To: gentoo-commits
mgorny 12/11/01 21:43:22
Modified: ChangeLog python-r1.eclass
Log:
Mark _python_ln_rel as @INTERNAL.
Revision Changes Path
1.496 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.496&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.496&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.495&r2=1.496
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.495
retrieving revision 1.496
diff -u -r1.495 -r1.496
--- ChangeLog 1 Nov 2012 20:22:57 -0000 1.495
+++ ChangeLog 1 Nov 2012 21:43:22 -0000 1.496
@@ -1,7 +1,10 @@
# ChangeLog for eclass directory
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.495 2012/11/01 20:22:57 robbat2 Exp $
-
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.496 2012/11/01 21:43:22 mgorny Exp $
+
+ 01 Nov 2012; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Mark _python_ln_rel as @INTERNAL.
+
01 Nov 2012; Robin H. Johnson <robbat2@gentoo.org> mysql.eclass,
mysql-v2.eclass:
Bug #392361: Fix mysql_install_db cases to work between all versions &
1.15 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.15&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.15&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.14&r2=1.15
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- python-r1.eclass 31 Oct 2012 14:18:41 -0000 1.14
+++ python-r1.eclass 1 Nov 2012 21:43:22 -0000 1.15
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.14 2012/10/31 14:18:41 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.15 2012/11/01 21:43:22 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -471,6 +471,7 @@
}
# @FUNCTION: _python_ln_rel
+# @INTERNAL
# @USAGE: <from> <to>
# @DESCRIPTION:
# Create a relative symlink.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2012-11-04 15:16 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2012-11-04 15:16 UTC (permalink / raw
To: gentoo-commits
mgorny 12/11/04 15:16:34
Modified: ChangeLog python-r1.eclass
Log:
Always require PYTHON_COMPAT. Add an exception for python-exec which is a special case.
Revision Changes Path
1.499 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.499&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.499&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.498&r2=1.499
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.498
retrieving revision 1.499
diff -u -r1.498 -r1.499
--- ChangeLog 1 Nov 2012 23:57:50 -0000 1.498
+++ ChangeLog 4 Nov 2012 15:16:34 -0000 1.499
@@ -1,6 +1,10 @@
# ChangeLog for eclass directory
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.498 2012/11/01 23:57:50 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.499 2012/11/04 15:16:34 mgorny Exp $
+
+ 04 Nov 2012; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Always require PYTHON_COMPAT. Add an exception for python-exec which is a
+ special case.
01 Nov 2012; Robin H. Johnson <robbat2@gentoo.org> mysql-autotools.eclass,
mysql-cmake.eclass, mysql-v2.eclass:
1.17 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.17&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.17&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.16&r2=1.17
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- python-r1.eclass 1 Nov 2012 21:49:34 -0000 1.16
+++ python-r1.eclass 4 Nov 2012 15:16:34 -0000 1.17
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.16 2012/11/01 21:49:34 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.17 2012/11/04 15:16:34 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -50,15 +50,12 @@
)
# @ECLASS-VARIABLE: PYTHON_COMPAT
+# @REQUIRED
# @DESCRIPTION:
# This variable contains a list of Python implementations the package
# supports. It must be set before the `inherit' call. It has to be
# an array.
#
-# The default is to enable all supported implementations. However, it is
-# discouraged to use that default unless in very special cases and test
-# the package with each added implementation instead.
-#
# Example:
# @CODE
# PYTHON_COMPAT=( python2_5 python2_6 python2_7 )
@@ -69,7 +66,11 @@
# PYTHON_COMPAT=( python{2_5,2_6,2_7} )
# @CODE
if ! declare -p PYTHON_COMPAT &>/dev/null; then
- PYTHON_COMPAT=( "${_PYTHON_ALL_IMPLS[@]}" )
+ if [[ ${CATEGORY}/${PN} == dev-python/python-exec ]]; then
+ PYTHON_COMPAT=( "${_PYTHON_ALL_IMPLS[@]}" )
+ else
+ die 'PYTHON_COMPAT not declared.'
+ fi
fi
# @ECLASS-VARIABLE: PYTHON_REQ_USE
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2012-11-21 9:01 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2012-11-21 9:01 UTC (permalink / raw
To: gentoo-commits
mgorny 12/11/21 09:01:50
Modified: ChangeLog python-r1.eclass
Log:
Introduce python_doscript() to install Python scripts.
Revision Changes Path
1.514 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.514&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.514&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.513&r2=1.514
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.513
retrieving revision 1.514
diff -u -r1.513 -r1.514
--- ChangeLog 19 Nov 2012 21:38:33 -0000 1.513
+++ ChangeLog 21 Nov 2012 09:01:50 -0000 1.514
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.513 2012/11/19 21:38:33 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.514 2012/11/21 09:01:50 mgorny Exp $
+
+ 21 Nov 2012; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Introduce python_doscript() to install Python scripts.
19 Nov 2012; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
Introduce a check for USE_PYTHON & PYTHON_TARGETS compatibility.
1.19 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.19&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.19&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.18&r2=1.19
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- python-r1.eclass 19 Nov 2012 21:38:33 -0000 1.18
+++ python-r1.eclass 21 Nov 2012 09:01:50 -0000 1.19
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.18 2012/11/19 21:38:33 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.19 2012/11/21 09:01:50 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -743,3 +743,76 @@
_python_ln_rel "${ED}"/usr/bin/python-exec "${f}" || die
done
}
+
+# @ECLASS-VARIABLE: python_scriptroot
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The current script destination for python_doscript(). The path
+# is relative to the installation root (${ED}).
+#
+# When unset, ${DESTTREE}/bin (/usr/bin by default) will be used.
+#
+# Can be set indirectly through the python_scriptinto() function.
+#
+# Example:
+# @CODE
+# src_install() {
+# local python_scriptroot=${GAMES_BINDIR}
+# 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} "${@}"
+
+ python_scriptroot=${1}
+}
+
+# @FUNCTION: python_doscript
+# @USAGE: <files>...
+# @DESCRIPTION:
+# Install the given scripts into current python_scriptroot,
+# for the current Python implementation (${EPYTHON}).
+#
+# All specified files must start with a 'python' shebang. The shebang
+# will be converted, the file will be renamed to be EPYTHON-suffixed
+# and a wrapper will be installed in place of the original name.
+#
+# Example:
+# @CODE
+# src_install() {
+# python_foreach_impl python_doscript ${PN}
+# }
+# @CODE
+python_doscript() {
+ debug-print-function ${FUNCNAME} "${@}"
+
+ [[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
+
+ local d=${python_scriptroot:-${DESTTREE}/bin}
+ local INSDESTTREE INSOPTIONS
+
+ insinto "${d}"
+ insopts -m755
+
+ local f
+ for f; do
+ local oldfn=${f##*/}
+ local newfn=${oldfn}-${EPYTHON}
+
+ debug-print "${FUNCNAME}: ${oldfn} -> ${newfn}"
+ newins "${f}" "${newfn}"
+ _python_rewrite_shebang "${D}/${d}/${newfn}"
+
+ # install the wrapper
+ _python_ln_rel "${ED}"/usr/bin/python-exec "${D}/${d}/${oldfn}" || die
+ done
+}
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2012-11-21 9:04 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2012-11-21 9:04 UTC (permalink / raw
To: gentoo-commits
mgorny 12/11/21 09:04:15
Modified: ChangeLog python-r1.eclass
Log:
Introduce python_domodule() to install Python modules.
Revision Changes Path
1.515 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.515&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.515&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.514&r2=1.515
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.514
retrieving revision 1.515
diff -u -r1.514 -r1.515
--- ChangeLog 21 Nov 2012 09:01:50 -0000 1.514
+++ ChangeLog 21 Nov 2012 09:04:14 -0000 1.515
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.514 2012/11/21 09:01:50 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.515 2012/11/21 09:04:14 mgorny Exp $
+
+ 21 Nov 2012; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Introduce python_domodule() to install Python modules.
21 Nov 2012; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
Introduce python_doscript() to install Python scripts.
1.20 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.20&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.20&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.19&r2=1.20
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- python-r1.eclass 21 Nov 2012 09:01:50 -0000 1.19
+++ python-r1.eclass 21 Nov 2012 09:04:14 -0000 1.20
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.19 2012/11/21 09:01:50 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.20 2012/11/21 09:04:14 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -816,3 +816,87 @@
_python_ln_rel "${ED}"/usr/bin/python-exec "${D}/${d}/${oldfn}" || die
done
}
+
+# @ECLASS-VARIABLE: python_moduleroot
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The current module root for python_domodule(). The path can be either
+# an absolute system path (it must start with a slash, and ${D} will be
+# prepended to it) or relative to the implementation's site-packages directory
+# (then it must start with a non-slash character).
+#
+# When unset, the modules will be installed in the site-packages root.
+#
+# Can be set indirectly through the python_moduleinto() function.
+#
+# Example:
+# @CODE
+# src_install() {
+# local python_moduleroot=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.
+#
+# Alternatively, you can set the variable directly.
+python_moduleinto() {
+ debug-print-function ${FUNCNAME} "${@}"
+
+ python_moduleroot=${1}
+}
+
+# @FUNCTION: python_domodule
+# @USAGE: <files>...
+# @DESCRIPTION:
+# Install the given modules (or packages) into the current
+# python_moduleroot. The list can mention both modules (files)
+# and packages (directories). All listed files will be installed
+# for all enabled implementations, and compiled afterwards.
+#
+# Example:
+# @CODE
+# src_install() {
+# # (${PN} being a directory)
+# python_foreach_impl python_domodule ${PN}
+# }
+# @CODE
+python_domodule() {
+ debug-print-function ${FUNCNAME} "${@}"
+
+ [[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
+
+ local d
+ if [[ ${python_moduleroot} == /* ]]; then
+ # absolute path
+ d=${python_moduleroot}
+ else
+ # relative to site-packages
+ local PYTHON_SITEDIR=${PYTHON_SITEDIR}
+ [[ ${PYTHON_SITEDIR} ]] || python_export PYTHON_SITEDIR
+
+ d=${PYTHON_SITEDIR}/${python_moduleroot}
+ fi
+
+ local INSDESTTREE
+
+ insinto "${d}"
+ doins -r "${@}"
+
+ # erm, python2.6 can't handle passing files to compileall...
+ case "${EPYTHON}" in
+ python*)
+ "${PYTHON}" -m compileall -q "${D}/${d}"
+ "${PYTHON}" -OO -m compileall -q -f "${D}/${d}"
+ ;;
+ *)
+ "${PYTHON}" -m compileall -q "${D}/${d}"
+ ;;
+ esac
+}
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2012-12-14 8:41 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2012-12-14 8:41 UTC (permalink / raw
To: gentoo-commits
mgorny 12/12/14 08:41:59
Modified: ChangeLog python-r1.eclass
Log:
Prevent python-r1 packages from depending on python-single-r1 packages.
Revision Changes Path
1.560 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.560&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.560&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.559&r2=1.560
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.559
retrieving revision 1.560
diff -u -r1.559 -r1.560
--- ChangeLog 14 Dec 2012 08:40:18 -0000 1.559
+++ ChangeLog 14 Dec 2012 08:41:59 -0000 1.560
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.559 2012/12/14 08:40:18 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.560 2012/12/14 08:41:59 mgorny Exp $
+
+ 14 Dec 2012; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Prevent python-r1 packages from depending on python-single-r1 packages.
14 Dec 2012; Michał Górny <mgorny@gentoo.org> autotools-utils.eclass:
Support directories in DOCS, in EAPI 4+.
1.26 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.26&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.26&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.25&r2=1.26
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- python-r1.eclass 1 Dec 2012 09:29:24 -0000 1.25
+++ python-r1.eclass 14 Dec 2012 08:41:59 -0000 1.26
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.25 2012/12/01 09:29:24 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.26 2012/12/14 08:41:59 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -133,7 +133,9 @@
_python_set_globals() {
local flags=( "${PYTHON_COMPAT[@]/#/python_targets_}" )
+ local flags_st=( "${PYTHON_COMPAT[@]/#/-python_single_target_}" )
local optflags=${flags[@]/%/?}
+ optflags+=,${flags_st[@]/%/(-)}
IUSE=${flags[*]}
REQUIRED_USE="|| ( ${flags[*]} )"
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2012-12-19 9:22 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2012-12-19 9:22 UTC (permalink / raw
To: gentoo-commits
mgorny 12/12/19 09:22:17
Modified: ChangeLog python-r1.eclass
Log:
Re-enable python-r1 -> python-single-r1 dep prevention.
Revision Changes Path
1.566 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.566&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.566&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.565&r2=1.566
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.565
retrieving revision 1.566
diff -u -r1.565 -r1.566
--- ChangeLog 17 Dec 2012 20:09:28 -0000 1.565
+++ ChangeLog 19 Dec 2012 09:22:17 -0000 1.566
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.565 2012/12/17 20:09:28 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.566 2012/12/19 09:22:17 mgorny Exp $
+
+ 19 Dec 2012; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Re-enable python-r1 -> python-single-r1 dep prevention.
17 Dec 2012; Michał Górny <mgorny@gentoo.org> python-r1.eclass,
python-single-r1.eclass:
1.30 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.30&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.30&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.29&r2=1.30
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- python-r1.eclass 17 Dec 2012 20:09:28 -0000 1.29
+++ python-r1.eclass 19 Dec 2012 09:22:17 -0000 1.30
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.29 2012/12/17 20:09:28 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.30 2012/12/19 09:22:17 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -134,12 +134,16 @@
_python_set_globals() {
local flags=( "${PYTHON_COMPAT[@]/#/python_targets_}" )
- #local flags_st=( "${PYTHON_COMPAT[@]/#/-python_single_target_}" )
local optflags=${flags[@]/%/?}
- #optflags+=,${flags_st[@]/%/(-)}
- # PYTHON_SINGLE_TARGET safety check temporarily disabled
- # because of issues with paludis, bug #447524.
+ # A nice QA trick here. Since a python-single-r1 package has to have
+ # at least one PYTHON_SINGLE_TARGET enabled (REQUIRED_USE),
+ # the following check will always fail on those packages. Therefore,
+ # it should prevent developers from mistakenly depending on packages
+ # not supporting multiple Python implementations.
+
+ local flags_st=( "${PYTHON_COMPAT[@]/#/-python_single_target_}" )
+ optflags+=,${flags_st[@]/%/(-)}
IUSE=${flags[*]}
REQUIRED_USE="|| ( ${flags[*]} )"
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2012-12-27 22:56 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2012-12-27 22:56 UTC (permalink / raw
To: gentoo-commits
mgorny 12/12/27 22:56:21
Modified: ChangeLog python-r1.eclass
Log:
Introduce python_gen_usedep() and python_gen_flags() to make writing complex dependencies easier.
Revision Changes Path
1.577 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.577&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.577&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.576&r2=1.577
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.576
retrieving revision 1.577
diff -u -r1.576 -r1.577
--- ChangeLog 26 Dec 2012 23:08:53 -0000 1.576
+++ ChangeLog 27 Dec 2012 22:56:21 -0000 1.577
@@ -1,6 +1,10 @@
# ChangeLog for eclass directory
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.576 2012/12/26 23:08:53 ottxor Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.577 2012/12/27 22:56:21 mgorny Exp $
+
+ 27 Dec 2012; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Introduce python_gen_usedep() and python_gen_flags() to make writing complex
+ dependencies easier.
26 Dec 2012; Christoph Junghans <ottxor@gentoo.org> mercurial.eclass:
added EHG_BOOTSTRAP (bug #340153), EHG_REVISION defaults to 'defaults (bug
1.32 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.32&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.32&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.31&r2=1.32
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- python-r1.eclass 20 Dec 2012 23:35:17 -0000 1.31
+++ python-r1.eclass 27 Dec 2012 22:56:21 -0000 1.32
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.31 2012/12/20 23:35:17 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.32 2012/12/27 22:56:21 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -162,6 +162,84 @@
}
_python_set_globals
+# @FUNCTION: python_gen_usedep
+# @USAGE: pattern [...]
+# @DESCRIPTION:
+# Output a USE dependency string for Python implementations which
+# are both in PYTHON_COMPAT and match any of the patterns passed
+# as parameters to the function.
+#
+# When all implementations are requested, please use ${PYTHON_USEDEP}
+# instead. Please also remember to set an appropriate REQUIRED_USE
+# to avoid ineffective USE flags.
+#
+# Example:
+# @CODE
+# PYTHON_COMPAT=( python{2_7,3_2} )
+# DEPEND="doc? ( dev-python/epydoc[$(python_gen_usedep python2*)] )"
+# @CODE
+#
+# It will cause the dependency to look like:
+# @CODE
+# DEPEND="doc? ( dev-python/epydoc[python_targets_python2_7?] )"
+# @CODE
+python_gen_usedep() {
+ debug-print-function ${FUNCNAME} "${@}"
+
+ local impl pattern
+ local matches=()
+
+ for impl in "${PYTHON_COMPAT[@]}"; do
+ for pattern; do
+ if [[ ${impl} == ${pattern} ]]; then
+ matches+=(
+ "python_targets_${impl}?"
+ "-python_single_target_${impl}(-)"
+ )
+ break
+ fi
+ done
+ done
+
+ local out=${matches[@]}
+ echo ${out// /,}
+}
+
+# @FUNCTION: python_gen_useflags
+# @USAGE: pattern [...]
+# @DESCRIPTION:
+# Output a list of USE flags for Python implementations which
+# are both in PYTHON_COMPAT and match any of the patterns passed
+# as parameters to the function.
+#
+# Example:
+# @CODE
+# PYTHON_COMPAT=( python{2_7,3_2} )
+# REQUIRED_USE="doc? ( || ( $(python_gen_useflags python2*) ) )"
+# @CODE
+#
+# It will cause the variable to look like:
+# @CODE
+# REQUIRED_USE="doc? ( || ( python_targets_python2_7 ) )"
+# @CODE
+python_gen_useflags() {
+ debug-print-function ${FUNCNAME} "${@}"
+
+ local impl pattern
+ local matches=()
+
+ for impl in "${PYTHON_COMPAT[@]}"; do
+ for pattern; do
+ if [[ ${impl} == ${pattern} ]]; then
+ matches+=( "python_targets_${impl}" )
+ break
+ fi
+ done
+ done
+
+ echo ${matches[@]}
+}
+
# @ECLASS-VARIABLE: BUILD_DIR
# @DESCRIPTION:
# The current build directory. In global scope, it is supposed to
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2012-12-31 13:10 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2012-12-31 13:10 UTC (permalink / raw
To: gentoo-commits
mgorny 12/12/31 13:10:42
Modified: ChangeLog python-r1.eclass
Log:
Add a function to generate dep-strings conditional to Python implementations.
Revision Changes Path
1.586 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.586&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.586&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.585&r2=1.586
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.585
retrieving revision 1.586
diff -u -r1.585 -r1.586
--- ChangeLog 31 Dec 2012 13:09:09 -0000 1.585
+++ ChangeLog 31 Dec 2012 13:10:42 -0000 1.586
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.585 2012/12/31 13:09:09 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.586 2012/12/31 13:10:42 mgorny Exp $
+
+ 31 Dec 2012; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Add a function to generate dep-strings conditional to Python implementations.
31 Dec 2012; Michał Górny <mgorny@gentoo.org> systemd.eclass:
Add function to get user unit directory, as requested in bug #449304.
1.33 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.33&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.33&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.32&r2=1.33
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- python-r1.eclass 27 Dec 2012 22:56:21 -0000 1.32
+++ python-r1.eclass 31 Dec 2012 13:10:42 -0000 1.33
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.32 2012/12/27 22:56:21 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.33 2012/12/31 13:10:42 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -163,7 +163,7 @@
_python_set_globals
# @FUNCTION: python_gen_usedep
-# @USAGE: pattern [...]
+# @USAGE: <pattern> [...]
# @DESCRIPTION:
# Output a USE dependency string for Python implementations which
# are both in PYTHON_COMPAT and match any of the patterns passed
@@ -206,7 +206,7 @@
}
# @FUNCTION: python_gen_useflags
-# @USAGE: pattern [...]
+# @USAGE: <pattern> [...]
# @DESCRIPTION:
# Output a list of USE flags for Python implementations which
# are both in PYTHON_COMPAT and match any of the patterns passed
@@ -240,6 +240,49 @@
echo ${matches[@]}
}
+# @FUNCTION: python_gen_cond_dep
+# @USAGE: <dependency> <pattern> [...]
+# @DESCRIPTION:
+# Output a list of <dependency>-ies made conditional to USE flags
+# of Python implementations which are both in PYTHON_COMPAT and match
+# any of the patterns passed as the remaining parameters.
+#
+# Please note that USE constraints on the package need to be enforced
+# separately. Therefore, the dependency usually needs to use
+# python_gen_usedep as well.
+#
+# Example:
+# @CODE
+# PYTHON_COMPAT=( python{2_5,2_6,2_7} )
+# RDEPEND="$(python_gen_cond_dep dev-python/unittest2 python{2_5,2_6})"
+# @CODE
+#
+# It will cause the variable to look like:
+# @CODE
+# RDEPEND="python_targets_python2_5? ( dev-python/unittest2 )
+# python_targets_python2_6? ( dev-python/unittest2 )"
+# @CODE
+python_gen_cond_dep() {
+ debug-print-function ${FUNCNAME} "${@}"
+
+ local impl pattern
+ local matches=()
+
+ local dep=${1}
+ shift
+
+ for impl in "${PYTHON_COMPAT[@]}"; do
+ for pattern; do
+ if [[ ${impl} == ${pattern} ]]; then
+ matches+=( "python_targets_${impl}? ( ${dep} )" )
+ break
+ fi
+ done
+ done
+
+ echo ${matches[@]}
+}
+
# @ECLASS-VARIABLE: BUILD_DIR
# @DESCRIPTION:
# The current build directory. In global scope, it is supposed to
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2013-01-04 1:26 Mike Gilbert (floppym)
0 siblings, 0 replies; 41+ messages in thread
From: Mike Gilbert (floppym) @ 2013-01-04 1:26 UTC (permalink / raw
To: gentoo-commits
floppym 13/01/04 01:26:22
Modified: ChangeLog python-r1.eclass
Log:
Don't tell the user to set USE_PYTHON when a package does not support python2.7 or python3.2.
Revision Changes Path
1.594 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.594&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.594&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.593&r2=1.594
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.593
retrieving revision 1.594
diff -u -r1.593 -r1.594
--- ChangeLog 3 Jan 2013 20:30:47 -0000 1.593
+++ ChangeLog 4 Jan 2013 01:26:22 -0000 1.594
@@ -1,6 +1,10 @@
# ChangeLog for eclass directory
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.593 2013/01/03 20:30:47 hd_brummy Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.594 2013/01/04 01:26:22 floppym Exp $
+
+ 04 Jan 2013; Mike Gilbert <floppym@gentoo.org> python-r1.eclass:
+ Don't tell the user to set USE_PYTHON when a package does not support
+ python2.7 or python3.2.
03 Jan 2013; Joerg Bornkessel <hd_brummy@gentoo.org> vdr-plugin-2.eclass:
fixed mistake for emake:-all emake:-install between old and new plugin
1.35 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.35&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.35&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.34&r2=1.35
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- python-r1.eclass 2 Jan 2013 21:12:44 -0000 1.34
+++ python-r1.eclass 4 Jan 2013 01:26:22 -0000 1.35
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.34 2013/01/02 21:12:44 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.35 2013/01/04 01:26:22 floppym Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -382,6 +382,10 @@
# is installed.
if [[ ! ${py2+1} && ${dis_py2} ]]; then
debug-print "${FUNCNAME}: -> all py2 versions disabled"
+ if ! has python2_7 "${PYTHON_COMPAT[@]}"; then
+ debug-print "${FUNCNAME}: ---> package does not support 2.7"
+ return 0
+ fi
if has_version '=dev-lang/python-2*'; then
debug-print "${FUNCNAME}: ---> but =python-2* installed!"
return 1
@@ -389,6 +393,10 @@
fi
if [[ ! ${py3+1} && ${dis_py3} ]]; then
debug-print "${FUNCNAME}: -> all py3 versions disabled"
+ if ! has python3_2 "${PYTHON_COMPAT[@]}"; then
+ debug-print "${FUNCNAME}: ---> package does not support 3.2"
+ return 0
+ fi
if has_version '=dev-lang/python-3*'; then
debug-print "${FUNCNAME}: ---> but =python-3* installed!"
return 1
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2013-01-27 16:36 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2013-01-27 16:36 UTC (permalink / raw
To: gentoo-commits
mgorny 13/01/27 16:36:21
Modified: ChangeLog python-r1.eclass
Log:
Introduce run_in_build_dir() function as used by GNOME ebuilds.
Revision Changes Path
1.648 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.648&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.648&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.647&r2=1.648
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.647
retrieving revision 1.648
diff -u -r1.647 -r1.648
--- ChangeLog 27 Jan 2013 16:35:33 -0000 1.647
+++ ChangeLog 27 Jan 2013 16:36:21 -0000 1.648
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.647 2013/01/27 16:35:33 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.648 2013/01/27 16:36:21 mgorny Exp $
+
+ 27 Jan 2013; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Introduce run_in_build_dir() function as used by GNOME ebuilds.
27 Jan 2013; Michał Górny <mgorny@gentoo.org> python-utils-r1.eclass:
Introduce python_doheader(), to install headers specific to a Python
1.38 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.38&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.38&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.37&r2=1.38
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- python-r1.eclass 21 Jan 2013 19:28:16 -0000 1.37
+++ python-r1.eclass 27 Jan 2013 16:36:21 -0000 1.38
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.37 2013/01/21 19:28:16 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.38 2013/01/27 16:36:21 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -681,5 +681,24 @@
done
}
+# @FUNCTION: run_in_build_dir
+# @USAGE: <argv>...
+# @DESCRIPTION:
+# Run the given command in the directory pointed by BUILD_DIR.
+run_in_build_dir() {
+ debug-print-function ${FUNCNAME} "${@}"
+ local ret
+
+ [[ ${#} -ne 0 ]] || die "${FUNCNAME}: no command specified."
+ [[ ${BUILD_DIR} ]] || die "${FUNCNAME}: BUILD_DIR not set."
+
+ pushd "${BUILD_DIR}" &>/dev/null || die
+ "${@}"
+ ret=${?}
+ popd &>/dev/null || die
+
+ return ${ret}
+}
+
_PYTHON_R1=1
fi
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2013-01-27 16:40 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2013-01-27 16:40 UTC (permalink / raw
To: gentoo-commits
mgorny 13/01/27 16:40:15
Modified: ChangeLog python-r1.eclass
Log:
Fix output redirections in run_in_build_dir().
Revision Changes Path
1.651 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.651&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.651&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.650&r2=1.651
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.650
retrieving revision 1.651
diff -u -r1.650 -r1.651
--- ChangeLog 27 Jan 2013 16:39:23 -0000 1.650
+++ ChangeLog 27 Jan 2013 16:40:14 -0000 1.651
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.650 2013/01/27 16:39:23 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.651 2013/01/27 16:40:14 mgorny Exp $
+
+ 27 Jan 2013; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Fix output redirections in run_in_build_dir().
27 Jan 2013; Michał Górny <mgorny@gentoo.org> distutils-r1.eclass:
Support using distutils-r1 along with python-single-r1.
1.39 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.39&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.39&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.38&r2=1.39
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- python-r1.eclass 27 Jan 2013 16:36:21 -0000 1.38
+++ python-r1.eclass 27 Jan 2013 16:40:15 -0000 1.39
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.38 2013/01/27 16:36:21 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.39 2013/01/27 16:40:15 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -692,10 +692,10 @@
[[ ${#} -ne 0 ]] || die "${FUNCNAME}: no command specified."
[[ ${BUILD_DIR} ]] || die "${FUNCNAME}: BUILD_DIR not set."
- pushd "${BUILD_DIR}" &>/dev/null || die
+ pushd "${BUILD_DIR}" >/dev/null || die
"${@}"
ret=${?}
- popd &>/dev/null || die
+ popd >/dev/null || die
return ${ret}
}
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2013-02-26 14:32 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2013-02-26 14:32 UTC (permalink / raw
To: gentoo-commits
mgorny 13/02/26 14:32:49
Modified: ChangeLog python-r1.eclass
Log:
Make python_foreach_impl() non-fatal, expect explicit die inside or outside.
Revision Changes Path
1.685 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.685&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.685&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.684&r2=1.685
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.684
retrieving revision 1.685
diff -u -r1.684 -r1.685
--- ChangeLog 25 Feb 2013 20:27:27 -0000 1.684
+++ ChangeLog 26 Feb 2013 14:32:49 -0000 1.685
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.684 2013/02/25 20:27:27 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.685 2013/02/26 14:32:49 mgorny Exp $
+
+ 26 Feb 2013; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Make python_foreach_impl() non-fatal, expect explicit die inside or outside.
25 Feb 2013; Michał Górny <mgorny@gentoo.org> xorg-2.eclass:
Bump the emul-linux-x86 blocker to match the new release.
1.41 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.41&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.41&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.40&r2=1.41
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- python-r1.eclass 30 Jan 2013 10:42:25 -0000 1.40
+++ python-r1.eclass 26 Feb 2013 14:32:49 -0000 1.41
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.40 2013/01/30 10:42:25 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.41 2013/02/26 14:32:49 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -583,8 +583,11 @@
# @DESCRIPTION:
# Run the given command for each of the enabled Python implementations.
# If additional parameters are passed, they will be passed through
-# to the command. If the command fails, python_foreach_impl dies.
-# If necessary, use ':' to force a successful return.
+# to the command.
+#
+# The function will return 0 status if all invocations succeed.
+# Otherwise, the return code from first failing invocation will
+# be returned.
#
# For each command being run, EPYTHON, PYTHON and BUILD_DIR are set
# locally, and the former two are exported to the command environment.
@@ -596,6 +599,7 @@
local impl
local bdir=${BUILD_DIR:-${S}}
+ local ret=0 lret=0
debug-print "${FUNCNAME}: bdir = ${bdir}"
for impl in "${_PYTHON_ALL_IMPLS[@]}"; do
@@ -609,9 +613,14 @@
export EPYTHON PYTHON
einfo "${EPYTHON}: running ${@}"
- "${@}" || die "${EPYTHON}: ${1} failed"
+ "${@}"
+ lret=${?}
+
+ [[ ${ret} -eq 0 && ${lret} -ne 0 ]] && ret=${lret}
fi
done
+
+ return ${ret}
}
# @FUNCTION: python_export_best
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2013-02-26 14:35 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2013-02-26 14:35 UTC (permalink / raw
To: gentoo-commits
mgorny 13/02/26 14:35:13
Modified: ChangeLog python-r1.eclass
Log:
Re-enable split logs, now directly handled by python*_foreach_impl().
Revision Changes Path
1.688 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.688&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.688&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.687&r2=1.688
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.687
retrieving revision 1.688
diff -u -r1.687 -r1.688
--- ChangeLog 26 Feb 2013 14:34:32 -0000 1.687
+++ ChangeLog 26 Feb 2013 14:35:13 -0000 1.688
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.687 2013/02/26 14:34:32 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.688 2013/02/26 14:35:13 mgorny Exp $
+
+ 26 Feb 2013; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Re-enable split logs, now directly handled by python*_foreach_impl().
26 Feb 2013; Michał Górny <mgorny@gentoo.org> distutils-r1.eclass:
Re-use python_parallel_foreach_impl() in distutils-r1.
1.43 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.43&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.43&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.42&r2=1.43
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- python-r1.eclass 26 Feb 2013 14:33:45 -0000 1.42
+++ python-r1.eclass 26 Feb 2013 14:35:13 -0000 1.43
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.42 2013/02/26 14:33:45 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.43 2013/02/26 14:35:13 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -620,8 +620,17 @@
local BUILD_DIR=${bdir%%/}-${impl}
export EPYTHON PYTHON
- einfo "${EPYTHON}: running ${@}"
- "${@}"
+ einfo "${EPYTHON}: running ${@}" \
+ | tee -a "${T}/build-${EPYTHON}.log"
+
+ # _python_parallel() does redirection internally.
+ # note: this is a hidden API to avoid writing python_foreach_impl
+ # twice. do *not* even think of using it anywhere else.
+ if [[ ${1} == _python_parallel ]]; then
+ "${@}"
+ else
+ "${@}" 2>&1 | tee -a "${T}/build-${EPYTHON}.log"
+ fi
lret=${?}
[[ ${ret} -eq 0 && ${lret} -ne 0 ]] && ret=${lret}
@@ -655,7 +664,8 @@
_python_parallel() {
(
multijob_child_init
- "${@}"
+ "${@}" 2>&1 | tee -a "${T}/build-${EPYTHON}.log"
+ exit ${PIPESTATUS[0]}
) &
multijob_post_fork
}
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2013-03-04 19:27 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2013-03-04 19:27 UTC (permalink / raw
To: gentoo-commits
mgorny 13/03/04 19:27:58
Modified: ChangeLog python-r1.eclass
Log:
Use multibuild.eclass in python-r1.
Revision Changes Path
1.709 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.709&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.709&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.708&r2=1.709
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.708
retrieving revision 1.709
diff -u -r1.708 -r1.709
--- ChangeLog 4 Mar 2013 19:27:24 -0000 1.708
+++ ChangeLog 4 Mar 2013 19:27:58 -0000 1.709
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.708 2013/03/04 19:27:24 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.709 2013/03/04 19:27:58 mgorny Exp $
+
+ 04 Mar 2013; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Use multibuild.eclass in python-r1.
04 Mar 2013; Michał Górny <mgorny@gentoo.org> multibuild.eclass:
Add multibuild_for_best_variant.
1.46 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.46&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.46&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.45&r2=1.46
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- python-r1.eclass 4 Mar 2013 19:22:13 -0000 1.45
+++ python-r1.eclass 4 Mar 2013 19:27:58 -0000 1.46
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.45 2013/03/04 19:22:13 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.46 2013/03/04 19:27:58 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -578,6 +578,37 @@
fi
}
+# @FUNCTION: _python_obtain_impls
+# @INTERNAL
+# @DESCRIPTION:
+# Set up the enabled implementation list.
+_python_obtain_impls() {
+ MULTIBUILD_VARIANTS=()
+
+ for impl in "${_PYTHON_ALL_IMPLS[@]}"; do
+ if has "${impl}" "${PYTHON_COMPAT[@]}" \
+ && use "python_targets_${impl}"
+ then
+ MULTIBUILD_VARIANTS+=( "${impl}" )
+ fi
+ done
+}
+
+# @FUNCTION: _python_multibuild_wrapper
+# @USAGE: <command> [<args>...]
+# @INTERNAL
+# @DESCRIPTION:
+# Initialize the environment for Python implementation selected
+# for multibuild.
+_python_multibuild_wrapper() {
+ debug-print-function ${FUNCNAME} "${@}"
+
+ local -x EPYTHON PYTHON
+ python_export "${MULTIBUILD_VARIANT}" EPYTHON PYTHON
+
+ "${@}"
+}
+
# @FUNCTION: python_foreach_impl
# @USAGE: <command> [<args>...]
# @DESCRIPTION:
@@ -597,30 +628,10 @@
_python_validate_useflags
_python_check_USE_PYTHON
- local impl
- local bdir=${BUILD_DIR:-${S}}
- local ret=0 lret=0
-
- debug-print "${FUNCNAME}: bdir = ${bdir}"
- for impl in "${_PYTHON_ALL_IMPLS[@]}"; do
- if has "${impl}" "${PYTHON_COMPAT[@]}" \
- && _python_impl_supported "${impl}" \
- && use "python_targets_${impl}"
- then
- local EPYTHON PYTHON
- python_export "${impl}" EPYTHON PYTHON
- local BUILD_DIR=${bdir%%/}-${impl}
- export EPYTHON PYTHON
-
- einfo "${EPYTHON}: running ${@}"
- "${@}"
- lret=${?}
-
- [[ ${ret} -eq 0 && ${lret} -ne 0 ]] && ret=${lret}
- fi
- done
+ local MULTIBUILD_VARIANTS
+ _python_obtain_impls
- return ${ret}
+ multibuild_foreach_variant _python_multibuild_wrapper "${@}"
}
# @FUNCTION: python_export_best
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2013-03-09 13:51 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2013-03-09 13:51 UTC (permalink / raw
To: gentoo-commits
mgorny 13/03/09 13:51:39
Modified: ChangeLog python-r1.eclass
Log:
Use multibuild_copy_sources for python_copy_sources.
Revision Changes Path
1.723 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.723&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.723&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.722&r2=1.723
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.722
retrieving revision 1.723
diff -u -r1.722 -r1.723
--- ChangeLog 9 Mar 2013 13:51:02 -0000 1.722
+++ ChangeLog 9 Mar 2013 13:51:39 -0000 1.723
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.722 2013/03/09 13:51:02 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.723 2013/03/09 13:51:39 mgorny Exp $
+
+ 09 Mar 2013; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Use multibuild_copy_sources for python_copy_sources.
09 Mar 2013; Michał Górny <mgorny@gentoo.org> multibuild.eclass:
Introduce multibuild_copy_sources as a generic source duplicating function.
1.48 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.48&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.48&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.47&r2=1.48
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- python-r1.eclass 4 Mar 2013 19:28:47 -0000 1.47
+++ python-r1.eclass 9 Mar 2013 13:51:39 -0000 1.48
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.47 2013/03/04 19:28:47 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.48 2013/03/09 13:51:39 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -348,34 +348,22 @@
# @FUNCTION: python_copy_sources
# @DESCRIPTION:
-# Create a single copy of the package sources (${S}) for each enabled
-# Python implementation.
+# Create a single copy of the package sources for each enabled Python
+# implementation.
#
-# The sources are always copied from S to implementation-specific build
-# directories respecting BUILD_DIR.
+# The sources are always copied from initial BUILD_DIR (or S if unset)
+# to implementation-specific build directory matching BUILD_DIR used by
+# python_foreach_abi().
python_copy_sources() {
debug-print-function ${FUNCNAME} "${@}"
_python_validate_useflags
+ _python_check_USE_PYTHON
- local impl
- local bdir=${BUILD_DIR:-${S}}
-
- debug-print "${FUNCNAME}: bdir = ${bdir}"
- einfo "Will copy sources from ${S}"
- # the order is irrelevant here
- for impl in "${PYTHON_COMPAT[@]}"; do
- _python_impl_supported "${impl}" || continue
-
- if use "python_targets_${impl}"
- then
- local BUILD_DIR=${bdir%%/}-${impl}
+ local MULTIBUILD_VARIANTS
+ _python_obtain_impls
- einfo "${impl}: copying to ${BUILD_DIR}"
- debug-print "${FUNCNAME}: [${impl}] cp ${S} => ${BUILD_DIR}"
- cp -pr "${S}" "${BUILD_DIR}" || die
- fi
- done
+ multibuild_copy_sources
}
# @FUNCTION: _python_check_USE_PYTHON
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2013-03-09 13:52 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2013-03-09 13:52 UTC (permalink / raw
To: gentoo-commits
mgorny 13/03/09 13:52:55
Modified: ChangeLog python-r1.eclass
Log:
Clean up redundant USE flag check calls, replace them with a single call in _python_obtain_impls().
Revision Changes Path
1.725 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.725&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.725&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.724&r2=1.725
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.724
retrieving revision 1.725
diff -u -r1.724 -r1.725
--- ChangeLog 9 Mar 2013 13:52:05 -0000 1.724
+++ ChangeLog 9 Mar 2013 13:52:55 -0000 1.725
@@ -1,6 +1,10 @@
# ChangeLog for eclass directory
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.724 2013/03/09 13:52:05 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.725 2013/03/09 13:52:55 mgorny Exp $
+
+ 09 Mar 2013; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Clean up redundant USE flag check calls, replace them with a single call in
+ _python_obtain_impls().
09 Mar 2013; Michał Górny <mgorny@gentoo.org> multilib-build.eclass:
Introduce multilib_copy_sources.
1.49 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.49&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.49&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.48&r2=1.49
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- python-r1.eclass 9 Mar 2013 13:51:39 -0000 1.48
+++ python-r1.eclass 9 Mar 2013 13:52:55 -0000 1.49
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.48 2013/03/09 13:51:39 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.49 2013/03/09 13:52:55 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -357,9 +357,6 @@
python_copy_sources() {
debug-print-function ${FUNCNAME} "${@}"
- _python_validate_useflags
- _python_check_USE_PYTHON
-
local MULTIBUILD_VARIANTS
_python_obtain_impls
@@ -579,6 +576,9 @@
# @DESCRIPTION:
# Set up the enabled implementation list.
_python_obtain_impls() {
+ _python_validate_useflags
+ _python_check_USE_PYTHON
+
MULTIBUILD_VARIANTS=()
for impl in "${_PYTHON_ALL_IMPLS[@]}"; do
@@ -621,9 +621,6 @@
python_foreach_impl() {
debug-print-function ${FUNCNAME} "${@}"
- _python_validate_useflags
- _python_check_USE_PYTHON
-
local MULTIBUILD_VARIANTS
_python_obtain_impls
@@ -695,8 +692,6 @@
python_replicate_script() {
debug-print-function ${FUNCNAME} "${@}"
- _python_validate_useflags
-
local suffixes=()
_add_suffix() {
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2013-03-20 19:00 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2013-03-20 19:00 UTC (permalink / raw
To: gentoo-commits
mgorny 13/03/20 19:00:55
Modified: ChangeLog python-r1.eclass
Log:
Reuse multibuild.eclass in python_export_best.
Revision Changes Path
1.747 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.747&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.747&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.746&r2=1.747
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.746
retrieving revision 1.747
diff -u -r1.746 -r1.747
--- ChangeLog 20 Mar 2013 16:45:56 -0000 1.746
+++ ChangeLog 20 Mar 2013 19:00:54 -0000 1.747
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.746 2013/03/20 16:45:56 tomwij Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.747 2013/03/20 19:00:54 mgorny Exp $
+
+ 20 Mar 2013; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Reuse multibuild.eclass in python_export_best.
20 Mar 2013; Tom Wijsman <TomWij@gentoo.org> kernel-2.eclass:
Use UID 0 instead of 'root' to assign permissions to super user, bug #315807.
1.50 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.50&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.50&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.49&r2=1.50
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- python-r1.eclass 9 Mar 2013 13:52:55 -0000 1.49
+++ python-r1.eclass 20 Mar 2013 19:00:55 -0000 1.50
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.49 2013/03/09 13:52:55 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.50 2013/03/20 19:00:55 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -661,24 +661,18 @@
python_export_best() {
debug-print-function ${FUNCNAME} "${@}"
- _python_validate_useflags
-
[[ ${#} -gt 0 ]] || set -- EPYTHON PYTHON
- local impl best
- for impl in "${_PYTHON_ALL_IMPLS[@]}"; do
- if has "${impl}" "${PYTHON_COMPAT[@]}" \
- && _python_impl_supported "${impl}" \
- && use "python_targets_${impl}"
- then
- best=${impl}
- fi
- done
+ local best MULTIBUILD_VARIANTS
+ _python_obtain_impls
- [[ ${best+1} ]] || die "python_export_best(): no implementation found!"
+ _python_set_best() {
+ best=${MULTIBUILD_VARIANT}
+ }
+ multibuild_for_best_variant _python_set_best
- debug-print "${FUNCNAME}: Best implementation is: ${impl}"
- python_export "${impl}" "${@}"
+ debug-print "${FUNCNAME}: Best implementation is: ${best}"
+ python_export "${best}" "${@}"
}
# @FUNCTION: python_replicate_script
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2013-03-20 19:01 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2013-03-20 19:01 UTC (permalink / raw
To: gentoo-commits
mgorny 13/03/20 19:01:54
Modified: ChangeLog python-r1.eclass
Log:
Introduce an ability to override PYTHON_COMPAT for testing.
Revision Changes Path
1.748 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.748&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.748&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.747&r2=1.748
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.747
retrieving revision 1.748
diff -u -r1.747 -r1.748
--- ChangeLog 20 Mar 2013 19:00:54 -0000 1.747
+++ ChangeLog 20 Mar 2013 19:01:54 -0000 1.748
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.747 2013/03/20 19:00:54 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.748 2013/03/20 19:01:54 mgorny Exp $
+
+ 20 Mar 2013; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Introduce an ability to override PYTHON_COMPAT for testing.
20 Mar 2013; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
Reuse multibuild.eclass in python_export_best.
1.51 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.51&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.51&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.50&r2=1.51
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- python-r1.eclass 20 Mar 2013 19:00:55 -0000 1.50
+++ python-r1.eclass 20 Mar 2013 19:01:54 -0000 1.51
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.50 2013/03/20 19:00:55 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.51 2013/03/20 19:01:54 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -74,6 +74,25 @@
fi
fi
+# @ECLASS-VARIABLE: PYTHON_COMPAT_OVERRIDE
+# @INTERNAL
+# @DESCRIPTION:
+# This variable can be used when working with ebuilds to override
+# the in-ebuild PYTHON_COMPAT. It is a string listing all
+# the implementations which package will be built for. It need be
+# specified in the calling environment, and not in ebuilds.
+#
+# It should be noted that in order to preserve metadata immutability,
+# PYTHON_COMPAT_OVERRIDE does not affect IUSE nor dependencies.
+# The state of PYTHON_TARGETS is ignored, and all the implementations
+# in PYTHON_COMPAT_OVERRIDE are built. Dependencies need to be satisfied
+# manually.
+#
+# Example:
+# @CODE
+# PYTHON_COMPAT_OVERRIDE='pypy2_0 python3_3' emerge -1v dev-python/foo
+# @CODE
+
# @ECLASS-VARIABLE: PYTHON_REQ_USE
# @DEFAULT_UNSET
# @DESCRIPTION:
@@ -576,6 +595,21 @@
# @DESCRIPTION:
# Set up the enabled implementation list.
_python_obtain_impls() {
+ if [[ ${PYTHON_COMPAT_OVERRIDE} ]]; then
+ if [[ ! ${_PYTHON_COMPAT_OVERRIDE_WARNED} ]]; then
+ ewarn "WARNING: PYTHON_COMPAT_OVERRIDE in effect. The following Python"
+ ewarn "implementations will be enabled:"
+ ewarn
+ ewarn " ${PYTHON_COMPAT_OVERRIDE}"
+ ewarn
+ ewarn "Dependencies won't be satisfied, and PYTHON_TARGETS will be ignored."
+ _PYTHON_COMPAT_OVERRIDE_WARNED=1
+ fi
+
+ MULTIBUILD_VARIANTS=( ${PYTHON_COMPAT_OVERRIDE} )
+ return
+ fi
+
_python_validate_useflags
_python_check_USE_PYTHON
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2013-03-30 12:56 Mike Gilbert (floppym)
0 siblings, 0 replies; 41+ messages in thread
From: Mike Gilbert (floppym) @ 2013-03-30 12:56 UTC (permalink / raw
To: gentoo-commits
floppym 13/03/30 12:56:25
Modified: ChangeLog python-r1.eclass
Log:
Add note about quoting patterns for python_gen_usedep.
Revision Changes Path
1.759 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.759&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.759&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.758&r2=1.759
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.758
retrieving revision 1.759
diff -u -r1.758 -r1.759
--- ChangeLog 29 Mar 2013 12:27:04 -0000 1.758
+++ ChangeLog 30 Mar 2013 12:56:24 -0000 1.759
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.758 2013/03/29 12:27:04 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.759 2013/03/30 12:56:24 floppym Exp $
+
+ 30 Mar 2013; Mike Gilbert <floppym@gentoo.org> python-r1.eclass:
+ Add note about quoting patterns for python_gen_usedep.
29 Mar 2013; Pacho Ramos <pacho@gentoo.org> vala.eclass:
Update VALA_MAX_API_VERSION
1.52 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.52&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.52&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.51&r2=1.52
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- python-r1.eclass 20 Mar 2013 19:01:54 -0000 1.51
+++ python-r1.eclass 30 Mar 2013 12:56:24 -0000 1.52
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.51 2013/03/20 19:01:54 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.52 2013/03/30 12:56:24 floppym Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -230,6 +230,9 @@
# are both in PYTHON_COMPAT and match any of the patterns passed
# as parameters to the function.
#
+# Remember to escape or quote the patterns to premature evaluation as a file
+# name glob.
+#
# When all implementations are requested, please use ${PYTHON_USEDEP}
# instead. Please also remember to set an appropriate REQUIRED_USE
# to avoid ineffective USE flags.
@@ -237,7 +240,7 @@
# Example:
# @CODE
# PYTHON_COMPAT=( python{2_7,3_2} )
-# DEPEND="doc? ( dev-python/epydoc[$(python_gen_usedep python2*)] )"
+# DEPEND="doc? ( dev-python/epydoc[$(python_gen_usedep 'python2*')] )"
# @CODE
#
# It will cause the dependency to look like:
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2013-08-04 8:24 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2013-08-04 8:24 UTC (permalink / raw
To: gentoo-commits
mgorny 13/08/04 08:24:29
Modified: ChangeLog python-r1.eclass
Log:
Drop the old PYTHON_COMPAT hack for python-exec.
Revision Changes Path
1.915 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.915&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.915&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.914&r2=1.915
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.914
retrieving revision 1.915
diff -u -r1.914 -r1.915
--- ChangeLog 3 Aug 2013 13:28:22 -0000 1.914
+++ ChangeLog 4 Aug 2013 08:24:28 -0000 1.915
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.914 2013/08/03 13:28:22 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.915 2013/08/04 08:24:28 mgorny Exp $
+
+ 04 Aug 2013; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Drop the old PYTHON_COMPAT hack for python-exec.
03 Aug 2013; Patrick Lauer <patrick@gentoo.org> distutils.eclass:
Migrate twisted deps in distutils eclass
1.56 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.56&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.56&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.55&r2=1.56
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- python-r1.eclass 21 May 2013 01:31:02 -0000 1.55
+++ python-r1.eclass 4 Aug 2013 08:24:28 -0000 1.56
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.55 2013/05/21 01:31:02 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.56 2013/08/04 08:24:28 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -67,11 +67,7 @@
# PYTHON_COMPAT=( python{2_5,2_6,2_7} )
# @CODE
if ! declare -p PYTHON_COMPAT &>/dev/null; then
- if [[ ${CATEGORY}/${PN} == dev-python/python-exec ]]; then
- PYTHON_COMPAT=( "${_PYTHON_ALL_IMPLS[@]}" )
- else
- die 'PYTHON_COMPAT not declared.'
- fi
+ die 'PYTHON_COMPAT not declared.'
fi
# @ECLASS-VARIABLE: PYTHON_COMPAT_OVERRIDE
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2013-08-27 18:47 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2013-08-27 18:47 UTC (permalink / raw
To: gentoo-commits
mgorny 13/08/27 18:47:33
Modified: ChangeLog python-r1.eclass
Log:
Enable EAPI=4 on python-r1.
Revision Changes Path
1.939 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.939&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.939&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.938&r2=1.939
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.938
retrieving revision 1.939
diff -u -r1.938 -r1.939
--- ChangeLog 27 Aug 2013 05:32:28 -0000 1.938
+++ ChangeLog 27 Aug 2013 18:47:33 -0000 1.939
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.938 2013/08/27 05:32:28 radhermit Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.939 2013/08/27 18:47:33 mgorny Exp $
+
+ 27 Aug 2013; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Enable EAPI=4 on python-r1.
27 Aug 2013; Tim Harder <radhermit@gentoo.org> java-utils-2.eclass:
Don't add subslots to JAVA_PKG_NAME (bug #482270 by chutzpah).
1.58 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.58&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.58&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.57&r2=1.58
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- python-r1.eclass 7 Aug 2013 16:37:32 -0000 1.57
+++ python-r1.eclass 27 Aug 2013 18:47:33 -0000 1.58
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.57 2013/08/07 16:37:32 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.58 2013/08/27 18:47:33 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -28,12 +28,11 @@
# http://www.gentoo.org/proj/en/Python/python-r1/dev-guide.xml
case "${EAPI:-0}" in
- 0|1|2|3|4)
+ 0|1|2|3)
die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
;;
- 5)
- # EAPI=5 is required for meaningful USE default deps
- # on USE_EXPAND flags
+ 4|5)
+ # EAPI=4 is required for USE default deps on USE_EXPAND flags
;;
*)
die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2013-12-29 18:19 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2013-12-29 18:19 UTC (permalink / raw
To: gentoo-commits
mgorny 13/12/29 18:19:48
Modified: ChangeLog python-r1.eclass
Log:
Update doc link to point to the docs on Wiki.
Revision Changes Path
1.1100 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1100&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1100&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1099&r2=1.1100
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1099
retrieving revision 1.1100
diff -u -r1.1099 -r1.1100
--- ChangeLog 28 Dec 2013 17:19:10 -0000 1.1099
+++ ChangeLog 29 Dec 2013 18:19:48 -0000 1.1100
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1099 2013/12/28 17:19:10 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1100 2013/12/29 18:19:48 mgorny Exp $
+
+ 29 Dec 2013; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Update doc link to point to the docs on Wiki.
28 Dec 2013; Michał Górny <mgorny@gentoo.org> eutils.eclass:
Fix eclassdoc for einstalldocs.
1.66 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.66&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.66&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.65&r2=1.66
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- python-r1.eclass 30 Nov 2013 17:57:11 -0000 1.65
+++ python-r1.eclass 29 Dec 2013 18:19:48 -0000 1.66
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.65 2013/11/30 17:57:11 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.66 2013/12/29 18:19:48 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -523,10 +523,10 @@
ewarn "Please note that after switching the active Python interpreter,"
ewarn "you may need to run 'python-updater' to rebuild affected packages."
ewarn
- ewarn "For more information on python.eclass compatibility, please see"
- ewarn "the appropriate python-r1 User's Guide chapter [1]."
+ ewarn "For more information on PYTHON_TARGETS and python.eclass"
+ ewarn "compatibility, please see the relevant Wiki article [1]."
ewarn
- ewarn "[1] http://www.gentoo.org/proj/en/Python/python-r1/user-guide.xml#doc_chap2"
+ ewarn "[1] https://wiki.gentoo.org/wiki/Project:Python/PYTHON_TARGETS"
fi
}
@@ -608,10 +608,10 @@
ewarn "Please note that after changing the USE_PYTHON variable, you may need"
ewarn "to run 'python-updater' to rebuild affected packages."
ewarn
- ewarn "For more information on python.eclass compatibility, please see"
- ewarn "the appropriate python-r1 User's Guide chapter [1]."
+ ewarn "For more information on PYTHON_TARGETS and python.eclass"
+ ewarn "compatibility, please see the relevant Wiki article [1]."
ewarn
- ewarn "[1] http://www.gentoo.org/proj/en/Python/python-r1/user-guide.xml#doc_chap2"
+ ewarn "[1] https://wiki.gentoo.org/wiki/Project:Python/PYTHON_TARGETS"
fi
fi
}
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2014-04-05 20:56 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2014-04-05 20:56 UTC (permalink / raw
To: gentoo-commits
mgorny 14/04/05 20:56:03
Modified: ChangeLog python-r1.eclass
Log:
Fix improper suggestions to put unsupported implmentations in USE_PYTHON, bug #506814.
Revision Changes Path
1.1197 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1197&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1197&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1196&r2=1.1197
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1196
retrieving revision 1.1197
diff -u -r1.1196 -r1.1197
--- ChangeLog 5 Apr 2014 09:19:19 -0000 1.1196
+++ ChangeLog 5 Apr 2014 20:56:03 -0000 1.1197
@@ -1,6 +1,10 @@
# ChangeLog for eclass directory
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1196 2014/04/05 09:19:19 tetromino Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1197 2014/04/05 20:56:03 mgorny Exp $
+
+ 05 Apr 2014; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Fix improper suggestions to put unsupported implmentations in USE_PYTHON, bug
+ #506814.
05 Apr 2014; Alexandre Rostovtsev <tetromino@gentoo.org>
gst-plugins10.eclass:
1.67 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.67&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.67&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.66&r2=1.67
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -r1.66 -r1.67
--- python-r1.eclass 29 Dec 2013 18:19:48 -0000 1.66
+++ python-r1.eclass 5 Apr 2014 20:56:03 -0000 1.67
@@ -1,6 +1,6 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.66 2013/12/29 18:19:48 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.67 2014/04/05 20:56:03 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -440,6 +440,10 @@
fi
py2=${impl/_/.}
;;
+ python3_4)
+ debug-print "${FUNCNAME}: python3.4 found, not using eselect"
+ return 1
+ ;;
python3_*)
if [[ ${py3+1} ]]; then
debug-print "${FUNCNAME}: -> more than one py3: ${py3} ${impl}"
@@ -504,6 +508,7 @@
fi
fi
+
if [[ ${py3+1} ]]; then
local sel_py3=$(eselect python show --python3)
@@ -546,6 +551,10 @@
local abi
case "${impl}" in
+ pypy|python3_4)
+ # unsupported in python.eclass
+ continue
+ ;;
python*)
abi=${impl#python}
;;
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2014-04-09 21:15 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2014-04-09 21:15 UTC (permalink / raw
To: gentoo-commits
mgorny 14/04/09 21:15:38
Modified: ChangeLog python-r1.eclass
Log:
Throw explicit error if python_gen_usedep does not match any implementation rather than outputting an empty (invalid) USE-dep.
Revision Changes Path
1.1199 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1199&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1199&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1198&r2=1.1199
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1198
retrieving revision 1.1199
diff -u -r1.1198 -r1.1199
--- ChangeLog 8 Apr 2014 16:05:30 -0000 1.1198
+++ ChangeLog 9 Apr 2014 21:15:38 -0000 1.1199
@@ -1,6 +1,10 @@
# ChangeLog for eclass directory
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1198 2014/04/08 16:05:30 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1199 2014/04/09 21:15:38 mgorny Exp $
+
+ 09 Apr 2014; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Throw explicit error if python_gen_usedep does not match any implementation
+ rather than outputting an empty (invalid) USE-dep.
08 Apr 2014; Michał Górny <mgorny@gentoo.org> python-any-r1.eclass,
python-r1.eclass, python-utils-r1.eclass, tests/python-utils-r1.sh:
1.69 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.69&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.69&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.68&r2=1.69
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -r1.68 -r1.69
--- python-r1.eclass 8 Apr 2014 16:05:30 -0000 1.68
+++ python-r1.eclass 9 Apr 2014 21:15:38 -0000 1.69
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.68 2014/04/08 16:05:30 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.69 2014/04/09 21:15:38 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -290,6 +290,8 @@
done
done
+ [[ ${matches[@]} ]] || die "No supported implementations match python_gen_usedep patterns: ${@}"
+
local out=${matches[@]}
echo ${out// /,}
}
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2014-04-09 21:20 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2014-04-09 21:20 UTC (permalink / raw
To: gentoo-commits
mgorny 14/04/09 21:20:47
Modified: ChangeLog python-r1.eclass
Log:
Comment out the python_gen_usedep empty argument check until all python_gen_cond_dep uses are fixed.
Revision Changes Path
1.1200 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1200&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1200&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1199&r2=1.1200
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1199
retrieving revision 1.1200
diff -u -r1.1199 -r1.1200
--- ChangeLog 9 Apr 2014 21:15:38 -0000 1.1199
+++ ChangeLog 9 Apr 2014 21:20:47 -0000 1.1200
@@ -1,6 +1,10 @@
# ChangeLog for eclass directory
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1199 2014/04/09 21:15:38 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1200 2014/04/09 21:20:47 mgorny Exp $
+
+ 09 Apr 2014; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Comment out the python_gen_usedep empty argument check until all
+ python_gen_cond_dep uses are fixed.
09 Apr 2014; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
Throw explicit error if python_gen_usedep does not match any implementation
1.70 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.70&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.70&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.69&r2=1.70
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- python-r1.eclass 9 Apr 2014 21:15:38 -0000 1.69
+++ python-r1.eclass 9 Apr 2014 21:20:47 -0000 1.70
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.69 2014/04/09 21:15:38 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.70 2014/04/09 21:20:47 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -290,7 +290,7 @@
done
done
- [[ ${matches[@]} ]] || die "No supported implementations match python_gen_usedep patterns: ${@}"
+# [[ ${matches[@]} ]] || die "No supported implementations match python_gen_usedep patterns: ${@}"
local out=${matches[@]}
echo ${out// /,}
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2014-04-09 21:34 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2014-04-09 21:34 UTC (permalink / raw
To: gentoo-commits
mgorny 14/04/09 21:34:10
Modified: ChangeLog python-r1.eclass
Log:
Re-enable the python_gen_usedep empty argument check.
Revision Changes Path
1.1201 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1201&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1201&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1200&r2=1.1201
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1200
retrieving revision 1.1201
diff -u -r1.1200 -r1.1201
--- ChangeLog 9 Apr 2014 21:20:47 -0000 1.1200
+++ ChangeLog 9 Apr 2014 21:34:10 -0000 1.1201
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1200 2014/04/09 21:20:47 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1201 2014/04/09 21:34:10 mgorny Exp $
+
+ 09 Apr 2014; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Re-enable the python_gen_usedep empty argument check.
09 Apr 2014; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
Comment out the python_gen_usedep empty argument check until all
1.71 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.71&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.71&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.70&r2=1.71
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- python-r1.eclass 9 Apr 2014 21:20:47 -0000 1.70
+++ python-r1.eclass 9 Apr 2014 21:34:10 -0000 1.71
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.70 2014/04/09 21:20:47 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.71 2014/04/09 21:34:10 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -290,7 +290,7 @@
done
done
-# [[ ${matches[@]} ]] || die "No supported implementations match python_gen_usedep patterns: ${@}"
+ [[ ${matches[@]} ]] || die "No supported implementations match python_gen_usedep patterns: ${@}"
local out=${matches[@]}
echo ${out// /,}
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2014-04-19 10:29 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2014-04-19 10:29 UTC (permalink / raw
To: gentoo-commits
mgorny 14/04/19 10:29:06
Modified: ChangeLog python-r1.eclass
Log:
Support substituting ${PYTHON_USEDEP} in python_gen_cond_dep().
Revision Changes Path
1.1213 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1213&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1213&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1212&r2=1.1213
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1212
retrieving revision 1.1213
diff -u -r1.1212 -r1.1213
--- ChangeLog 17 Apr 2014 20:28:37 -0000 1.1212
+++ ChangeLog 19 Apr 2014 10:29:06 -0000 1.1213
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1212 2014/04/17 20:28:37 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1213 2014/04/19 10:29:06 mgorny Exp $
+
+ 19 Apr 2014; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Support substituting ${PYTHON_USEDEP} in python_gen_cond_dep().
17 Apr 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
Automatically switch to EGIT_CLONE_TYPE=single+tags for Google Code.
1.72 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.72&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.72&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.71&r2=1.72
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -r1.71 -r1.72
--- python-r1.eclass 9 Apr 2014 21:34:10 -0000 1.71
+++ python-r1.eclass 19 Apr 2014 10:29:06 -0000 1.72
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.71 2014/04/09 21:34:10 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.72 2014/04/19 10:29:06 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -340,20 +340,24 @@
# of Python implementations which are both in PYTHON_COMPAT and match
# any of the patterns passed as the remaining parameters.
#
-# Please note that USE constraints on the package need to be enforced
-# separately. Therefore, the dependency usually needs to use
-# python_gen_usedep as well.
+# In order to enforce USE constraints on the packages, verbatim
+# '${PYTHON_USEDEP}' (quoted!) may be placed in the dependency
+# specification. It will get expanded within the function into a proper
+# USE dependency string.
#
# Example:
# @CODE
# PYTHON_COMPAT=( python{2_5,2_6,2_7} )
-# RDEPEND="$(python_gen_cond_dep dev-python/unittest2 python{2_5,2_6})"
+# RDEPEND="$(python_gen_cond_dep \
+# 'dev-python/unittest2[${PYTHON_USEDEP}]' python{2_5,2_6})"
# @CODE
#
# It will cause the variable to look like:
# @CODE
-# RDEPEND="python_targets_python2_5? ( dev-python/unittest2 )
-# python_targets_python2_6? ( dev-python/unittest2 )"
+# RDEPEND="python_targets_python2_5? (
+# dev-python/unittest2[python_targets_python2_5?] )
+# python_targets_python2_6? (
+# dev-python/unittest2[python_targets_python2_6?] )"
# @CODE
python_gen_cond_dep() {
debug-print-function ${FUNCNAME} "${@}"
@@ -364,6 +368,12 @@
local dep=${1}
shift
+ # substitute ${PYTHON_USEDEP} if used
+ if [[ ${dep} == *'${PYTHON_USEDEP}'* ]]; then
+ local PYTHON_USEDEP=$(python_gen_usedep "${@}")
+ dep=${dep//\$\{PYTHON_USEDEP\}/${PYTHON_USEDEP}}
+ fi
+
for impl in "${PYTHON_COMPAT[@]}"; do
_python_impl_supported "${impl}" || continue
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2014-07-06 14:41 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2014-07-06 14:41 UTC (permalink / raw
To: gentoo-commits
mgorny 14/07/06 14:41:17
Modified: ChangeLog python-r1.eclass
Log:
python_gen_cond_dep: delay PYTHON_USEDEP substitution until one of the implementations is actually enabled. Fixes bug #516520.
Revision Changes Path
1.1312 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1312&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1312&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1311&r2=1.1312
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1311
retrieving revision 1.1312
diff -u -r1.1311 -r1.1312
--- ChangeLog 6 Jul 2014 11:45:20 -0000 1.1311
+++ ChangeLog 6 Jul 2014 14:41:17 -0000 1.1312
@@ -1,6 +1,10 @@
# ChangeLog for eclass directory
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1311 2014/07/06 11:45:20 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1312 2014/07/06 14:41:17 mgorny Exp $
+
+ 06 Jul 2014; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ python_gen_cond_dep: delay PYTHON_USEDEP substitution until one of the
+ implementations is actually enabled. Fixes bug #516520.
06 Jul 2014; Michał Górny <mgorny@gentoo.org> python-utils-r1.eclass:
Disable python2.6 support and clean up the related code.
1.75 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.75&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.75&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.74&r2=1.75
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -r1.74 -r1.75
--- python-r1.eclass 19 Jun 2014 08:08:10 -0000 1.74
+++ python-r1.eclass 6 Jul 2014 14:41:17 -0000 1.75
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.74 2014/06/19 08:08:10 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.75 2014/07/06 14:41:17 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -368,17 +368,19 @@
local dep=${1}
shift
- # substitute ${PYTHON_USEDEP} if used
- if [[ ${dep} == *'${PYTHON_USEDEP}'* ]]; then
- local PYTHON_USEDEP=$(python_gen_usedep "${@}")
- dep=${dep//\$\{PYTHON_USEDEP\}/${PYTHON_USEDEP}}
- fi
-
for impl in "${PYTHON_COMPAT[@]}"; do
_python_impl_supported "${impl}" || continue
for pattern; do
if [[ ${impl} == ${pattern} ]]; then
+ # substitute ${PYTHON_USEDEP} if used
+ # (since python_gen_usedep() will not return ${PYTHON_USEDEP}
+ # the code is run at most once)
+ if [[ ${dep} == *'${PYTHON_USEDEP}'* ]]; then
+ local PYTHON_USEDEP=$(python_gen_usedep "${@}")
+ dep=${dep//\$\{PYTHON_USEDEP\}/${PYTHON_USEDEP}}
+ fi
+
matches+=( "python_targets_${impl}? ( ${dep} )" )
break
fi
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2014-08-18 8:56 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2014-08-18 8:56 UTC (permalink / raw
To: gentoo-commits
mgorny 14/08/18 08:56:06
Modified: ChangeLog python-r1.eclass
Log:
Add extra quoting to prevent accidental globbing.
Revision Changes Path
1.1354 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1354&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1354&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1353&r2=1.1354
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1353
retrieving revision 1.1354
diff -u -r1.1353 -r1.1354
--- ChangeLog 17 Aug 2014 22:50:23 -0000 1.1353
+++ ChangeLog 18 Aug 2014 08:56:06 -0000 1.1354
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1353 2014/08/17 22:50:23 grknight Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1354 2014/08/18 08:56:06 mgorny Exp $
+
+ 18 Aug 2014; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Add extra quoting to prevent accidental globbing.
18 Aug 2014; Brian Evans <grknight@gentoo.org> mysql-multilib.eclass:
Move ENABLE_DTRACE check to the multilib_src_configure wrt bug 520028
1.76 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.76&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.76&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.75&r2=1.76
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -r1.75 -r1.76
--- python-r1.eclass 6 Jul 2014 14:41:17 -0000 1.75
+++ python-r1.eclass 18 Aug 2014 08:56:06 -0000 1.76
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.75 2014/07/06 14:41:17 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.76 2014/08/18 08:56:06 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -293,7 +293,7 @@
[[ ${matches[@]} ]] || die "No supported implementations match python_gen_usedep patterns: ${@}"
local out=${matches[@]}
- echo ${out// /,}
+ echo "${out// /,}"
}
# @FUNCTION: python_gen_useflags
@@ -330,7 +330,7 @@
done
done
- echo ${matches[@]}
+ echo "${matches[@]}"
}
# @FUNCTION: python_gen_cond_dep
@@ -387,7 +387,7 @@
done
done
- echo ${matches[@]}
+ echo "${matches[@]}"
}
# @ECLASS-VARIABLE: BUILD_DIR
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2014-11-22 2:38 Sebastian Pipping (sping)
0 siblings, 0 replies; 41+ messages in thread
From: Sebastian Pipping (sping) @ 2014-11-22 2:38 UTC (permalink / raw
To: gentoo-commits
sping 14/11/22 02:38:22
Modified: ChangeLog python-r1.eclass
Log:
python-r1: Fix docs on REQUIRED_USE (bug #530086)
Revision Changes Path
1.1438 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1438&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1438&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1437&r2=1.1438
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1437
retrieving revision 1.1438
diff -u -r1.1437 -r1.1438
--- ChangeLog 21 Nov 2014 21:47:16 -0000 1.1437
+++ ChangeLog 22 Nov 2014 02:38:21 -0000 1.1438
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1437 2014/11/21 21:47:16 hasufell Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1438 2014/11/22 02:38:21 sping Exp $
+
+ 22 Nov 2014; Sebastian Pipping <sping@gentoo.org> python-r1.eclass:
+ Fix docs about REQUIRED_USE in python-r1 (bug #530086)
21 Nov 2014; Julian Ospald <hasufell@gentoo.org> games.eclass:
add documentation for games.eclass, rm unnecessary exports
1.79 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.79&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.79&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.78&r2=1.79
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -r1.78 -r1.79
--- python-r1.eclass 9 Nov 2014 15:10:32 -0000 1.78
+++ python-r1.eclass 22 Nov 2014 02:38:21 -0000 1.79
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.78 2014/11/09 15:10:32 sping Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.79 2014/11/22 02:38:21 sping Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -14,7 +14,9 @@
# packages supporting being installed for multiple Python
# implementations.
#
-# This eclass sets correct IUSE and REQUIRED_USE. It exports PYTHON_DEPS
+# This eclass sets correct IUSE. Modification of REQUIRED_USE has to
+# be done by the author of the ebuild (but PYTHON_REQUIRED_USE is
+# provided for convenience, see below). python-r1 exports PYTHON_DEPS
# and PYTHON_USEDEP so you can create correct dependencies for your
# package easily. It also provides methods to easily run a command for
# each enabled Python implementation and duplicate the sources for them.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2014-12-28 22:45 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2014-12-28 22:45 UTC (permalink / raw
To: gentoo-commits
mgorny 14/12/28 22:45:47
Modified: ChangeLog python-r1.eclass
Log:
Spelling, pointed out by floppym.
Revision Changes Path
1.1487 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1487&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1487&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1486&r2=1.1487
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1486
retrieving revision 1.1487
diff -u -r1.1486 -r1.1487
--- ChangeLog 28 Dec 2014 18:35:07 -0000 1.1486
+++ ChangeLog 28 Dec 2014 22:45:47 -0000 1.1487
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1486 2014/12/28 18:35:07 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1487 2014/12/28 22:45:47 mgorny Exp $
+
+ 28 Dec 2014; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Spelling, pointed out by floppym.
28 Dec 2014; Michał Górny <mgorny@gentoo.org> python-utils-r1.eclass:
Make the invalid function/variable checks non-fatal for now.
1.82 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.82&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.82&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.81&r2=1.82
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -r1.81 -r1.82
--- python-r1.eclass 28 Dec 2014 10:56:55 -0000 1.81
+++ python-r1.eclass 28 Dec 2014 22:45:47 -0000 1.82
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.81 2014/12/28 10:56:55 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.82 2014/12/28 22:45:47 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -247,8 +247,8 @@
# are both in PYTHON_COMPAT and match any of the patterns passed
# as parameters to the function.
#
-# Remember to escape or quote the patterns to premature evaluation as a file
-# name glob.
+# Remember to escape or quote the patterns to prevent shell filename
+# expansion.
#
# When all implementations are requested, please use ${PYTHON_USEDEP}
# instead. Please also remember to set an appropriate REQUIRED_USE
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2015-01-13 21:34 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2015-01-13 21:34 UTC (permalink / raw
To: gentoo-commits
mgorny 15/01/13 21:34:22
Modified: ChangeLog python-r1.eclass
Log:
Support restricting accepted implementation list for python_setup.
Revision Changes Path
1.1508 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1508&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1508&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1507&r2=1.1508
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1507
retrieving revision 1.1508
diff -u -r1.1507 -r1.1508
--- ChangeLog 12 Jan 2015 23:17:14 -0000 1.1507
+++ ChangeLog 13 Jan 2015 21:34:22 -0000 1.1508
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1507 2015/01/12 23:17:14 polynomial-c Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1508 2015/01/13 21:34:22 mgorny Exp $
+
+ 13 Jan 2015; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Support restricting accepted implementation list for python_setup.
12 Jan 2015; Lars Wendler <polynomial-c@gentoo.org> autotools.eclass:
Attempt to fix bug #536428.
1.83 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.83&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.83&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.82&r2=1.83
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -r1.82 -r1.83
--- python-r1.eclass 28 Dec 2014 22:45:47 -0000 1.82
+++ python-r1.eclass 13 Jan 2015 21:34:22 -0000 1.83
@@ -1,6 +1,6 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.82 2014/12/28 22:45:47 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.83 2015/01/13 21:34:22 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -737,17 +737,56 @@
}
# @FUNCTION: python_setup
+# @USAGE: [<impl-pattern>...]
# @DESCRIPTION:
-# Find the best (most preferred) Python implementation enabled
-# and set the Python build environment up for it.
+# Find the best (most preferred) Python implementation that is enabled
+# and matches at least one of the patterns passed (or '*' if no patterns
+# passed). Set the Python build environment up for that implementation.
#
# This function needs to be used when Python is being called outside
# of python_foreach_impl calls (e.g. for shared processes like doc
# building). python_foreach_impl sets up the build environment itself.
+#
+# If the specific commands support only a subset of Python
+# implementations, patterns need to be passed to restrict the allowed
+# implementations.
+#
+# Example:
+# @CODE
+# DEPEND="doc? ( dev-python/epydoc[$(python_gen_usedep 'python2*')] )"
+#
+# src_compile() {
+# #...
+# if use doc; then
+# python_setup 'python2*'
+# make doc
+# fi
+# }
+# @CODE
python_setup() {
debug-print-function ${FUNCNAME} "${@}"
- python_export_best
+ local best_impl patterns=( "${@-*}" )
+ _python_try_impl() {
+ local pattern
+ for pattern in "${patterns[@]}"; do
+ if [[ ${EPYTHON} == ${pattern} ]]; then
+ best_impl=${EPYTHON}
+ fi
+ done
+ }
+ python_foreach_impl _python_try_impl
+
+ if [[ ! ${best_impl} ]]; then
+ eerror "${FUNCNAME}: none of the enabled implementation matched the patterns."
+ eerror " patterns: ${@-'(*)'}"
+ eerror "Likely a REQUIRED_USE constraint (possibly USE-conditional) is missing."
+ eerror " suggested: || ( \$(python_gen_useflags ${@}) )"
+ eerror "(remember to quote all the patterns with '')"
+ die "${FUNCNAME}: no enabled implementation satisfy requirements"
+ fi
+
+ python_export "${best_impl}" EPYTHON PYTHON
python_wrapper_setup
}
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2015-01-13 21:35 Michal Gorny (mgorny)
0 siblings, 0 replies; 41+ messages in thread
From: Michal Gorny (mgorny) @ 2015-01-13 21:35 UTC (permalink / raw
To: gentoo-commits
mgorny 15/01/13 21:35:29
Modified: ChangeLog python-r1.eclass
Log:
Deprecate python_export_best() verbosely.
Revision Changes Path
1.1510 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1510&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1510&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1509&r2=1.1510
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1509
retrieving revision 1.1510
diff -u -r1.1509 -r1.1510
--- ChangeLog 13 Jan 2015 21:34:55 -0000 1.1509
+++ ChangeLog 13 Jan 2015 21:35:29 -0000 1.1510
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1509 2015/01/13 21:34:55 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1510 2015/01/13 21:35:29 mgorny Exp $
+
+ 13 Jan 2015; Michał Górny <mgorny@gentoo.org> python-r1.eclass:
+ Deprecate python_export_best() verbosely.
13 Jan 2015; Michał Górny <mgorny@gentoo.org> distutils-r1.eclass:
Support restricting implementations for *_all() phases.
1.84 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.84&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.84&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.83&r2=1.84
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -r1.83 -r1.84
--- python-r1.eclass 13 Jan 2015 21:34:22 -0000 1.83
+++ python-r1.eclass 13 Jan 2015 21:35:29 -0000 1.84
@@ -1,6 +1,6 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.83 2015/01/13 21:34:22 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.84 2015/01/13 21:35:29 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -799,6 +799,9 @@
python_export_best() {
debug-print-function ${FUNCNAME} "${@}"
+ eqawarn "python_export_best() is deprecated. Please use python_setup instead,"
+ eqawarn "combined with python_export if necessary."
+
[[ ${#} -gt 0 ]] || set -- EPYTHON PYTHON
local best MULTIBUILD_VARIANTS
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2015-07-04 15:22 Manuel Rueger (mrueg)
0 siblings, 0 replies; 41+ messages in thread
From: Manuel Rueger (mrueg) @ 2015-07-04 15:22 UTC (permalink / raw
To: gentoo-commits
mrueg 15/07/04 15:22:41
Modified: ChangeLog python-r1.eclass
Log:
Update URI.
Revision Changes Path
1.1698 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1698&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1698&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1697&r2=1.1698
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1697
retrieving revision 1.1698
diff -u -r1.1697 -r1.1698
--- ChangeLog 3 Jul 2015 21:45:06 -0000 1.1697
+++ ChangeLog 4 Jul 2015 15:22:41 -0000 1.1698
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1697 2015/07/03 21:45:06 williamh Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1698 2015/07/04 15:22:41 mrueg Exp $
+
+ 04 Jul 2015; Manuel Rüger <mrueg@gentoo.org> python-r1.eclass:
+ Update URI.
03 Jul 2015; William Hubbs <williamh@gentoo.org> golang-build.eclass:
drop the slot dependency; it was pointed out to me that they do not trigger
1.91 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.91&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.91&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.90&r2=1.91
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -r1.90 -r1.91
--- python-r1.eclass 21 Mar 2015 14:55:33 -0000 1.90
+++ python-r1.eclass 4 Jul 2015 15:22:41 -0000 1.91
@@ -1,6 +1,6 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.90 2015/03/21 14:55:33 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.91 2015/07/04 15:22:41 mrueg Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -26,8 +26,8 @@
# in the packages using python-r1, and there is no need ever to inherit
# both.
#
-# For more information, please see the python-r1 Developer's Guide:
-# http://www.gentoo.org/proj/en/Python/python-r1/dev-guide.xml
+# For more information, please see the python-r1 wiki article:
+# https://wiki.gentoo.org/wiki/Project:Python/python-r1
case "${EAPI:-0}" in
0|1|2|3)
^ permalink raw reply [flat|nested] 41+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass
@ 2015-07-27 16:31 Mike Gilbert (floppym)
0 siblings, 0 replies; 41+ messages in thread
From: Mike Gilbert (floppym) @ 2015-07-27 16:31 UTC (permalink / raw
To: gentoo-commits
floppym 15/07/27 16:31:01
Modified: ChangeLog python-r1.eclass
Log:
Drop the USE_PYTHON warning.
Revision Changes Path
1.1728 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1728&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1728&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1727&r2=1.1728
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1727
retrieving revision 1.1728
diff -u -r1.1727 -r1.1728
--- ChangeLog 25 Jul 2015 10:07:36 -0000 1.1727
+++ ChangeLog 27 Jul 2015 16:31:01 -0000 1.1728
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1727 2015/07/25 10:07:36 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1728 2015/07/27 16:31:01 floppym Exp $
+
+ 27 Jul 2015; Mike Gilbert <floppym@gentoo.org> python-r1.eclass:
+ Drop the USE_PYTHON warning.
25 Jul 2015; Michał Górny <mgorny@gentoo.org> python-utils-r1.eclass:
Add missing ||die to "rm -f" calls, i.e. in case we do not have permission to
1.93 eclass/python-r1.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.93&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.93&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.92&r2=1.93
Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -r1.92 -r1.93
--- python-r1.eclass 4 Jul 2015 15:26:17 -0000 1.92
+++ python-r1.eclass 27 Jul 2015 16:31:01 -0000 1.93
@@ -1,6 +1,6 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.92 2015/07/04 15:26:17 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.93 2015/07/27 16:31:01 floppym Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -430,220 +430,6 @@
multibuild_copy_sources
}
-# @FUNCTION: _python_check_USE_PYTHON
-# @INTERNAL
-# @DESCRIPTION:
-# Check whether USE_PYTHON and PYTHON_TARGETS are in sync. Output
-# warnings if they are not.
-_python_check_USE_PYTHON() {
- debug-print-function ${FUNCNAME} "${@}"
-
- if [[ ! ${_PYTHON_USE_PYTHON_CHECKED} ]]; then
- _PYTHON_USE_PYTHON_CHECKED=1
-
- # python-exec has profile-forced flags.
- if [[ ${CATEGORY}/${PN} == dev-lang/python-exec ]]; then
- return
- fi
-
- _try_eselect() {
- # The eselect solution will work only with one py2 & py3.
-
- local impl py2 py3 dis_py2 dis_py3
- for impl in "${PYTHON_COMPAT[@]}"; do
- _python_impl_supported "${impl}" || continue
-
- if use "python_targets_${impl}"; then
- case "${impl}" in
- python2_*)
- if [[ ${py2+1} ]]; then
- debug-print "${FUNCNAME}: -> more than one py2: ${py2} ${impl}"
- return 1
- fi
- py2=${impl/_/.}
- ;;
- python3_4)
- debug-print "${FUNCNAME}: python3.4 found, not using eselect"
- return 1
- ;;
- python3_*)
- if [[ ${py3+1} ]]; then
- debug-print "${FUNCNAME}: -> more than one py3: ${py3} ${impl}"
- return 1
- fi
- py3=${impl/_/.}
- ;;
- *)
- return 1
- ;;
- esac
- else
- case "${impl}" in
- python2_*)
- dis_py2=1
- ;;
- python3_*)
- dis_py3=1
- ;;
- esac
- fi
- done
-
- # The eselect solution won't work if the disabled Python version
- # is installed.
- if [[ ! ${py2+1} && ${dis_py2} ]]; then
- debug-print "${FUNCNAME}: -> all py2 versions disabled"
- if ! has python2_7 "${PYTHON_COMPAT[@]}"; then
- debug-print "${FUNCNAME}: ---> package does not support 2.7"
- return 0
- fi
- if has_version '=dev-lang/python-2*'; then
- debug-print "${FUNCNAME}: ---> but =python-2* installed!"
- return 1
- fi
- fi
- if [[ ! ${py3+1} && ${dis_py3} ]]; then
- debug-print "${FUNCNAME}: -> all py3 versions disabled"
- if ! has python3_2 "${PYTHON_COMPAT[@]}"; then
- debug-print "${FUNCNAME}: ---> package does not support 3.2"
- return 0
- fi
- if has_version '=dev-lang/python-3*'; then
- debug-print "${FUNCNAME}: ---> but =python-3* installed!"
- return 1
- fi
- fi
-
- local warned
-
- # Now check whether the correct implementations are active.
- if [[ ${py2+1} ]]; then
- local sel_py2=$(eselect python show --python2)
-
- debug-print "${FUNCNAME}: -> py2 built: ${py2}, active: ${sel_py2}"
- if [[ ${py2} != ${sel_py2} ]]; then
- ewarn "Building package for ${py2} only while ${sel_py2} is active."
- ewarn "Please consider switching the active Python 2 interpreter:"
- ewarn
- ewarn " eselect python set --python2 ${py2}"
- warned=1
- fi
- fi
-
-
- if [[ ${py3+1} ]]; then
- local sel_py3=$(eselect python show --python3)
-
- debug-print "${FUNCNAME}: -> py3 built: ${py3}, active: ${sel_py3}"
- if [[ ${py3} != ${sel_py3} ]]; then
- [[ ${warned} ]] && ewarn
- ewarn "Building package for ${py3} only while ${sel_py3} is active."
- ewarn "Please consider switching the active Python 3 interpreter:"
- ewarn
- ewarn " eselect python set --python3 ${py3}"
- warned=1
- fi
- fi
-
- if [[ ${warned} ]]; then
- ewarn
- ewarn "Please note that after switching the active Python interpreter,"
- ewarn "you may need to run 'python-updater' to rebuild affected packages."
- ewarn
- ewarn "For more information on PYTHON_TARGETS and python.eclass"
- ewarn "compatibility, please see the relevant Wiki article [1]."
- ewarn
- ewarn "[1] https://wiki.gentoo.org/wiki/Project:Python/PYTHON_TARGETS"
- fi
- }
-
- # If user has no USE_PYTHON, try to avoid it.
- if [[ ! ${USE_PYTHON} ]]; then
- debug-print "${FUNCNAME}: trying eselect solution ..."
- _try_eselect && return
- fi
-
- debug-print "${FUNCNAME}: trying USE_PYTHON solution ..."
- debug-print "${FUNCNAME}: -> USE_PYTHON=${USE_PYTHON}"
-
- local impl old=${USE_PYTHON} new=() removed=()
-
- for impl in "${PYTHON_COMPAT[@]}"; do
- _python_impl_supported "${impl}" || continue
-
- local abi
- case "${impl}" in
- pypy|pypy3|python3_4)
- # unsupported in python.eclass
- continue
- ;;
- python*)
- abi=${impl#python}
- ;;
- jython*)
- abi=${impl#jython}-jython
- ;;
- *)
- die "Unexpected Python implementation: ${impl}"
- ;;
- esac
- abi=${abi/_/.}
-
- has "${abi}" ${USE_PYTHON}
- local has_abi=${?}
- use "python_targets_${impl}"
- local has_impl=${?}
-
- # 0 = has, 1 = does not have
- if [[ ${has_abi} == 0 && ${has_impl} == 1 ]]; then
- debug-print "${FUNCNAME}: ---> remove ${abi}"
- # remove from USE_PYTHON
- old=${old/${abi}/}
- removed+=( ${abi} )
- elif [[ ${has_abi} == 1 && ${has_impl} == 0 ]]; then
- debug-print "${FUNCNAME}: ---> add ${abi}"
- # add to USE_PYTHON
- new+=( ${abi} )
- fi
- done
-
- if [[ ${removed[@]} || ${new[@]} ]]; then
- old=( ${old} )
-
- debug-print "${FUNCNAME}: -> old: ${old[@]}"
- debug-print "${FUNCNAME}: -> new: ${new[@]}"
- debug-print "${FUNCNAME}: -> removed: ${removed[@]}"
-
- if [[ ${USE_PYTHON} ]]; then
- ewarn "It seems that your USE_PYTHON setting lists different Python"
- ewarn "implementations than your PYTHON_TARGETS variable. Please consider"
- ewarn "using the following value instead:"
- ewarn
- ewarn " USE_PYTHON='\033[35m${old[@]}${new[@]+ \033[1m${new[@]}}\033[0m'"
-
- if [[ ${removed[@]} ]]; then
- ewarn
- ewarn "(removed \033[31m${removed[@]}\033[0m)"
- fi
- else
- ewarn "It seems that you need to set USE_PYTHON to make sure that legacy"
- ewarn "packages will be built with respect to PYTHON_TARGETS correctly:"
- ewarn
- ewarn " USE_PYTHON='\033[35;1m${new[@]}\033[0m'"
- fi
-
- ewarn
- ewarn "Please note that after changing the USE_PYTHON variable, you may need"
- ewarn "to run 'python-updater' to rebuild affected packages."
- ewarn
- ewarn "For more information on PYTHON_TARGETS and python.eclass"
- ewarn "compatibility, please see the relevant Wiki article [1]."
- ewarn
- ewarn "[1] https://wiki.gentoo.org/wiki/Project:Python/PYTHON_TARGETS"
- fi
- fi
-}
-
# @FUNCTION: _python_obtain_impls
# @INTERNAL
# @DESCRIPTION:
@@ -665,7 +451,6 @@
fi
_python_validate_useflags
- _python_check_USE_PYTHON
MULTIBUILD_VARIANTS=()
^ permalink raw reply [flat|nested] 41+ messages in thread
end of thread, other threads:[~2015-07-27 16:31 UTC | newest]
Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-27 22:56 [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-r1.eclass Michal Gorny (mgorny)
-- strict thread matches above, loose matches on Subject: below --
2015-07-27 16:31 Mike Gilbert (floppym)
2015-07-04 15:22 Manuel Rueger (mrueg)
2015-01-13 21:35 Michal Gorny (mgorny)
2015-01-13 21:34 Michal Gorny (mgorny)
2014-12-28 22:45 Michal Gorny (mgorny)
2014-11-22 2:38 Sebastian Pipping (sping)
2014-08-18 8:56 Michal Gorny (mgorny)
2014-07-06 14:41 Michal Gorny (mgorny)
2014-04-19 10:29 Michal Gorny (mgorny)
2014-04-09 21:34 Michal Gorny (mgorny)
2014-04-09 21:20 Michal Gorny (mgorny)
2014-04-09 21:15 Michal Gorny (mgorny)
2014-04-05 20:56 Michal Gorny (mgorny)
2013-12-29 18:19 Michal Gorny (mgorny)
2013-08-27 18:47 Michal Gorny (mgorny)
2013-08-04 8:24 Michal Gorny (mgorny)
2013-03-30 12:56 Mike Gilbert (floppym)
2013-03-20 19:01 Michal Gorny (mgorny)
2013-03-20 19:00 Michal Gorny (mgorny)
2013-03-09 13:52 Michal Gorny (mgorny)
2013-03-09 13:51 Michal Gorny (mgorny)
2013-03-04 19:27 Michal Gorny (mgorny)
2013-02-26 14:35 Michal Gorny (mgorny)
2013-02-26 14:32 Michal Gorny (mgorny)
2013-01-27 16:40 Michal Gorny (mgorny)
2013-01-27 16:36 Michal Gorny (mgorny)
2013-01-04 1:26 Mike Gilbert (floppym)
2012-12-31 13:10 Michal Gorny (mgorny)
2012-12-19 9:22 Michal Gorny (mgorny)
2012-12-14 8:41 Michal Gorny (mgorny)
2012-11-21 9:04 Michal Gorny (mgorny)
2012-11-21 9:01 Michal Gorny (mgorny)
2012-11-04 15:16 Michal Gorny (mgorny)
2012-11-01 21:43 Michal Gorny (mgorny)
2012-10-29 11:27 Michal Gorny (mgorny)
2012-10-29 9:25 Michal Gorny (mgorny)
2012-10-29 9:22 Michal Gorny (mgorny)
2012-10-27 1:14 Mike Gilbert (floppym)
2012-10-25 16:47 Michal Gorny (mgorny)
2012-10-14 10:51 Michal Gorny (mgorny)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox