Dnia 2014-11-22, o godz. 23:06:29 Michał Górny <mgo...@gentoo.org> napisał(a):
> I'd like to discuss the topic of parallel runs again. While it sounded > like a good idea at first, I have my doubts now. I'll try to shortly > describe the implementation, then recollect the advantages > and disadvantages of it. I'm attaching a patch updating the eclasses. Please review and include that in the considerations :). I've removed the TMPDIR & HOME re-assignments too since they were added mostly because of parallel run conflicts. -- Best regards, Michał Górny
Index: distutils-r1.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v retrieving revision 1.102 diff -u -B -r1.102 distutils-r1.eclass --- distutils-r1.eclass 24 Aug 2014 13:23:48 -0000 1.102 +++ distutils-r1.eclass 23 Nov 2014 21:56:22 -0000 @@ -181,20 +181,6 @@ # 'build --build-base ${BUILD_DIR}' to enforce keeping & using built # files in the specific root. -# @ECLASS-VARIABLE: DISTUTILS_NO_PARALLEL_BUILD -# @DEFAULT_UNSET -# @DESCRIPTION: -# If set to a non-null value, the parallel build feature will -# be disabled. -# -# When parallel builds are used, the implementation-specific sub-phases -# for selected Python implementation will be run in parallel. This will -# increase build efficiency with distutils which does not do parallel -# builds. -# -# This variable can be used to disable the afore-mentioned feature -# in case it causes issues with the package. - # @ECLASS-VARIABLE: mydistutilsargs # @DEFAULT_UNSET # @DESCRIPTION: @@ -607,13 +593,6 @@ fi local -x PYTHONPATH="${BUILD_DIR}/lib:${PYTHONPATH}" - if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then - local -x TMPDIR=${T}/${EPYTHON} - local -x HOME=${TMPDIR}/home - - mkdir -p "${TMPDIR}" "${HOME}" || die - fi - # Set up build environment, bug #513664. local -x AR=${AR} CC=${CC} CPP=${CPP} CXX=${CXX} tc-export AR CC CPP CXX @@ -672,12 +651,7 @@ set -- distutils-r1_run_phase "${@}" if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then - if [[ ${DISTUTILS_NO_PARALLEL_BUILD} || ${DISTUTILS_SINGLE_IMPL} ]] - then - python_foreach_impl "${@}" - else - python_parallel_foreach_impl "${@}" - fi + python_foreach_impl "${@}" else if [[ ! ${EPYTHON} ]]; then die "EPYTHON unset, python-single-r1_pkg_setup not called?!" Index: python-r1.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v retrieving revision 1.79 diff -u -B -r1.79 python-r1.eclass --- python-r1.eclass 22 Nov 2014 02:38:21 -0000 1.79 +++ python-r1.eclass 23 Nov 2014 21:56:22 -0000 @@ -217,14 +217,6 @@ } _python_set_globals -# @ECLASS-VARIABLE: DISTUTILS_JOBS -# @DEFAULT_UNSET -# @DESCRIPTION: -# The number of parallel jobs to run for distutils-r1 parallel builds. -# If unset, the job-count in ${MAKEOPTS} will be used. -# -# This variable is intended to be set in make.conf. - # @FUNCTION: _python_validate_useflags # @INTERNAL # @DESCRIPTION: @@ -725,15 +717,16 @@ # For each command being run, EPYTHON, PYTHON and BUILD_DIR are set # locally, and the former two are exported to the command environment. # -# Multiple invocations of the command will be run in parallel, up to -# DISTUTILS_JOBS (defaulting to '-j' option argument from MAKEOPTS). +# This command used to be the parallel variant of python_foreach_impl. +# However, the parallel run support has been removed to simplify +# the eclasses and make them more predictable and therefore it is now +# only a deprecated alias to python_foreach_impl. python_parallel_foreach_impl() { debug-print-function ${FUNCNAME} "${@}" - local MULTIBUILD_JOBS=${MULTIBUILD_JOBS:-${DISTUTILS_JOBS}} local MULTIBUILD_VARIANTS _python_obtain_impls - multibuild_parallel_foreach_variant _python_multibuild_wrapper "${@}" + multibuild_foreach_variant _python_multibuild_wrapper "${@}" } # @FUNCTION: python_setup
signature.asc
Description: PGP signature