* [gentoo-dev] [PATCH] distutils-r1.eclass: Do not apply patches if DISTUTILS_OPTIONAL is used
@ 2016-05-15 9:30 Michał Górny
2016-05-15 18:35 ` [gentoo-dev] " Mike Gilbert
2016-05-21 19:39 ` [gentoo-dev] " Michał Górny
0 siblings, 2 replies; 3+ messages in thread
From: Michał Górny @ 2016-05-15 9:30 UTC (permalink / raw
To: gentoo-dev; +Cc: python, Michał Górny
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.
---
eclass/distutils-r1.eclass | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index e8de5ad..afd29ed 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
--
2.8.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-dev] Re: [PATCH] distutils-r1.eclass: Do not apply patches if DISTUTILS_OPTIONAL is used
2016-05-15 9:30 [gentoo-dev] [PATCH] distutils-r1.eclass: Do not apply patches if DISTUTILS_OPTIONAL is used Michał Górny
@ 2016-05-15 18:35 ` Mike Gilbert
2016-05-21 19:39 ` [gentoo-dev] " Michał Górny
1 sibling, 0 replies; 3+ messages in thread
From: Mike Gilbert @ 2016-05-15 18:35 UTC (permalink / raw
To: Gentoo Dev; +Cc: Gentoo Python Project, Michał Górny
On Sun, May 15, 2016 at 5:30 AM, Michał Górny <mgorny@gentoo.org> wrote:
> 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.
Sounds ok.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-dev] [PATCH] distutils-r1.eclass: Do not apply patches if DISTUTILS_OPTIONAL is used
2016-05-15 9:30 [gentoo-dev] [PATCH] distutils-r1.eclass: Do not apply patches if DISTUTILS_OPTIONAL is used Michał Górny
2016-05-15 18:35 ` [gentoo-dev] " Mike Gilbert
@ 2016-05-21 19:39 ` Michał Górny
1 sibling, 0 replies; 3+ messages in thread
From: Michał Górny @ 2016-05-21 19:39 UTC (permalink / raw
To: gentoo-dev; +Cc: python
[-- Attachment #1: Type: text/plain, Size: 1477 bytes --]
On Sun, 15 May 2016 11:30:00 +0200
Michał Górny <mgorny@gentoo.org> wrote:
> 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.
> ---
> eclass/distutils-r1.eclass | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
> index e8de5ad..afd29ed 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
Merged.
--
Best regards,
Michał Górny
<http://dev.gentoo.org/~mgorny/>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 949 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-05-21 19:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-15 9:30 [gentoo-dev] [PATCH] distutils-r1.eclass: Do not apply patches if DISTUTILS_OPTIONAL is used Michał Górny
2016-05-15 18:35 ` [gentoo-dev] " Mike Gilbert
2016-05-21 19:39 ` [gentoo-dev] " Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox