Skip to content

Commit

Permalink
distutils-r1.eclass: Remove obsolete conditions
Browse files Browse the repository at this point in the history
Now that Python < 3.7 is not supported, apply --jobs unconditionally.

Signed-off-by: Michał Górny <[email protected]>
  • Loading branch information
mgorny committed Feb 4, 2021
1 parent 9309ffe commit aa7b59d
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions eclass/distutils-r1.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -780,23 +780,14 @@ distutils-r1_python_compile() {

_distutils-r1_copy_egg_info

local build_args=()
# distutils is parallel-capable since py3.5
# to avoid breaking stable ebuilds, enable it only if either:
# a. we're dealing with EAPI 7
# b. we're dealing with Python 3.7 or PyPy3
if python_is_python3 && [[ ${EPYTHON} != python3.4 ]]; then
if [[ ${EAPI} != [56] || ${EPYTHON} != python3.[56] ]]; then
local jobs=$(makeopts_jobs "${MAKEOPTS}" INF)
if [[ ${jobs} == INF ]]; then
local nproc=$(get_nproc)
jobs=$(( nproc + 1 ))
fi
build_args+=( -j "${jobs}" )
fi
local jobs=$(makeopts_jobs "${MAKEOPTS}" INF)
if [[ ${jobs} == INF ]]; then
local nproc=$(get_nproc)
jobs=$(( nproc + 1 ))
fi

esetup.py build "${build_args[@]}" "${@}"
esetup.py build -j "${jobs}" "${@}"
}

# @FUNCTION: _distutils-r1_wrap_scripts
Expand Down

0 comments on commit aa7b59d

Please sign in to comment.