summaryrefslogtreecommitdiff
path: root/eclass/distutils-r1.eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2016-05-15 11:25:51 +0200
committerMichał Górny <mgorny@gentoo.org>2016-05-21 21:38:36 +0200
commit9f10af2ddb28388fb8150ae545f1f028ad998dce (patch)
tree87fa4ed6635413ebfedf311cf4224b5cfb6976c2 /eclass/distutils-r1.eclass
parent3b2941f2173ac2cdfd69bbcf076e6e60526542ed (diff)
downloadgentoo-9f10af2ddb28388fb8150ae545f1f028ad998dce.tar.gz
gentoo-9f10af2ddb28388fb8150ae545f1f028ad998dce.tar.xz
distutils-r1.eclass: Do not apply patches if DISTUTILS_OPTIONAL is used
Do not apply PATCHES and user patches (either via the EAPI 6 default or pre-EAPI 5 code) when DISTUTILS_OPTIONAL is being used. In this case, distutils functions are usually called conditionally, in a subdirectory, while both PATCHES and user patches are usually intended to be applied top-level. There is no ebuild relying on distutils-r1_src_prepare applying patches with DISTUTILS_OPTIONAL. In fact, there are ebuilds which work around this behavior.
Diffstat (limited to 'eclass/distutils-r1.eclass')
-rw-r--r--eclass/distutils-r1.eclass12
1 files changed, 7 insertions, 5 deletions
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index e8de5ad6c4e..afd29ed272f 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -315,11 +315,13 @@ _distutils-r1_disable_ez_setup() {
distutils-r1_python_prepare_all() {
debug-print-function ${FUNCNAME} "${@}"
- if [[ ${EAPI} != [45] ]]; then
- default
- else
- [[ ${PATCHES} ]] && epatch "${PATCHES[@]}"
- epatch_user
+ if [[ ! ${DISTUTILS_OPTIONAL} ]]; then
+ if [[ ${EAPI} != [45] ]]; then
+ default
+ else
+ [[ ${PATCHES} ]] && epatch "${PATCHES[@]}"
+ epatch_user
+ fi
fi
# by default, use in-source build if python_prepare() is used