public inbox for gentoo-python@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-python] [PATCHES] distutils-r1: some cleanup + egg-info fixes
@ 2013-08-21 10:42 Michał Górny
  2013-08-21 10:43 ` [gentoo-python] [PATCH distutils-r1 1/4] Namespace _disable_ez_setup Michał Górny
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Michał Górny @ 2013-08-21 10:42 UTC (permalink / raw
  To: gentoo-python; +Cc: python

[-- Attachment #1: Type: text/plain, Size: 404 bytes --]

Hello,

Assuming the mess with egg-info files is unfixable, here's a patch for
it plus some cleanup to what floppym added earlier.

The idea is that we copy the bundled egg-info files in python_compile()
to create initial versions of eggs in ${BUILD_DIR}. Then, all
the defaults from them are respected while we override the dir.

Patches sent as replies.

-- 
Best regards,
Michał Górny

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 966 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [gentoo-python] [PATCH distutils-r1 1/4] Namespace _disable_ez_setup.
  2013-08-21 10:42 [gentoo-python] [PATCHES] distutils-r1: some cleanup + egg-info fixes Michał Górny
@ 2013-08-21 10:43 ` Michał Górny
  2013-08-21 18:25   ` Mike Gilbert
  2013-08-21 10:43 ` [gentoo-python] [PATCH distutils-r1 2/4] Add proper error handling to _distutils-r1_disable_ez_setup Michał Górny
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 14+ messages in thread
From: Michał Górny @ 2013-08-21 10:43 UTC (permalink / raw
  To: gentoo-python; +Cc: python, Michał Górny

---
 gx86/eclass/distutils-r1.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass
index 81e5824..97ddbe4 100644
--- a/gx86/eclass/distutils-r1.eclass
+++ b/gx86/eclass/distutils-r1.eclass
@@ -308,7 +308,7 @@ distutils_install_for_testing() {
 	esetup.py "${add_args[@]}"
 }
 
-_disable_ez_setup() {
+_distutils-r1_disable_ez_setup() {
 	local stub="def use_setuptools(*args, **kwargs): pass"
 	[[ -f ez_setup.py ]] && echo "${stub}" > ez_setup.py
 	[[ -f distribute_setup.py ]] && echo "${stub}" > distribute_setup.py
@@ -337,7 +337,7 @@ distutils-r1_python_prepare_all() {
 	fi
 
 	# Prevent packages from downloading their own copy of setuptools
-	_disable_ez_setup
+	_distutils-r1_disable_ez_setup
 
 	if [[ ${DISTUTILS_IN_SOURCE_BUILD} && ! ${DISTUTILS_SINGLE_IMPL} ]]
 	then
-- 
1.8.3.2



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-python] [PATCH distutils-r1 2/4] Add proper error handling to _distutils-r1_disable_ez_setup.
  2013-08-21 10:42 [gentoo-python] [PATCHES] distutils-r1: some cleanup + egg-info fixes Michał Górny
  2013-08-21 10:43 ` [gentoo-python] [PATCH distutils-r1 1/4] Namespace _disable_ez_setup Michał Górny
@ 2013-08-21 10:43 ` Michał Górny
  2013-08-21 18:26   ` Mike Gilbert
  2013-08-21 10:43 ` [gentoo-python] [PATCH distutils-r1 3/4] Describe _distutils-r1_disable_ez_setup() using eclassdoc Michał Górny
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 14+ messages in thread
From: Michał Górny @ 2013-08-21 10:43 UTC (permalink / raw
  To: gentoo-python; +Cc: python, Michał Górny

---
 gx86/eclass/distutils-r1.eclass | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass
index 97ddbe4..fba7634 100644
--- a/gx86/eclass/distutils-r1.eclass
+++ b/gx86/eclass/distutils-r1.eclass
@@ -310,8 +310,12 @@ distutils_install_for_testing() {
 
 _distutils-r1_disable_ez_setup() {
 	local stub="def use_setuptools(*args, **kwargs): pass"
-	[[ -f ez_setup.py ]] && echo "${stub}" > ez_setup.py
-	[[ -f distribute_setup.py ]] && echo "${stub}" > distribute_setup.py
+	if [[ -f ez_setup.py ]]; then
+		echo "${stub}" > ez_setup.py || die
+	fi
+	if [[ -f distribute_setup.py ]]; then
+		echo "${stub}" > distribute_setup.py || die
+	fi
 }
 
 # @FUNCTION: distutils-r1_python_prepare_all
-- 
1.8.3.2



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-python] [PATCH distutils-r1 3/4] Describe _distutils-r1_disable_ez_setup() using eclassdoc.
  2013-08-21 10:42 [gentoo-python] [PATCHES] distutils-r1: some cleanup + egg-info fixes Michał Górny
  2013-08-21 10:43 ` [gentoo-python] [PATCH distutils-r1 1/4] Namespace _disable_ez_setup Michał Górny
  2013-08-21 10:43 ` [gentoo-python] [PATCH distutils-r1 2/4] Add proper error handling to _distutils-r1_disable_ez_setup Michał Górny
@ 2013-08-21 10:43 ` Michał Górny
  2013-08-21 14:13   ` Mike Gilbert
  2013-08-21 10:43 ` [gentoo-python] [PATCH distutils-r1 4/4] Copy egg-info files in python_prepare_all() Michał Górny
  2013-08-25 21:16 ` [gentoo-python] [PATCHES] distutils-r1: some cleanup + egg-info fixes Michał Górny
  4 siblings, 1 reply; 14+ messages in thread
From: Michał Górny @ 2013-08-21 10:43 UTC (permalink / raw
  To: gentoo-python; +Cc: python, Michał Górny

---
 gx86/eclass/distutils-r1.eclass | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass
index fba7634..e95df3e 100644
--- a/gx86/eclass/distutils-r1.eclass
+++ b/gx86/eclass/distutils-r1.eclass
@@ -308,6 +308,10 @@ distutils_install_for_testing() {
 	esetup.py "${add_args[@]}"
 }
 
+# @FUNCTION: _distutils-r1_disable_ez_setup
+# @DESCRIPTION:
+# Stub out ez_setup.py and distribute_setup.py to prevent packages
+# from trying to download a local copy of setuptools.
 _distutils-r1_disable_ez_setup() {
 	local stub="def use_setuptools(*args, **kwargs): pass"
 	if [[ -f ez_setup.py ]]; then
@@ -340,7 +344,6 @@ distutils-r1_python_prepare_all() {
 		fi
 	fi
 
-	# Prevent packages from downloading their own copy of setuptools
 	_distutils-r1_disable_ez_setup
 
 	if [[ ${DISTUTILS_IN_SOURCE_BUILD} && ! ${DISTUTILS_SINGLE_IMPL} ]]
-- 
1.8.3.2



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-python] [PATCH distutils-r1 4/4] Copy egg-info files in python_prepare_all().
  2013-08-21 10:42 [gentoo-python] [PATCHES] distutils-r1: some cleanup + egg-info fixes Michał Górny
                   ` (2 preceding siblings ...)
  2013-08-21 10:43 ` [gentoo-python] [PATCH distutils-r1 3/4] Describe _distutils-r1_disable_ez_setup() using eclassdoc Michał Górny
@ 2013-08-21 10:43 ` Michał Górny
  2013-08-21 18:31   ` [gentoo-python] " Mike Gilbert
  2013-08-25 21:16 ` [gentoo-python] [PATCHES] distutils-r1: some cleanup + egg-info fixes Michał Górny
  4 siblings, 1 reply; 14+ messages in thread
From: Michał Górny @ 2013-08-21 10:43 UTC (permalink / raw
  To: gentoo-python; +Cc: python, Michał Górny

---
 gx86/eclass/distutils-r1.eclass | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass
index e95df3e..39e4434 100644
--- a/gx86/eclass/distutils-r1.eclass
+++ b/gx86/eclass/distutils-r1.eclass
@@ -322,6 +322,17 @@ _distutils-r1_disable_ez_setup() {
 	fi
 }
 
+# @FUNCTION: _distutils-r1_copy_egg_info
+# @DESCRIPTION:
+# Copy egg-info files to the ${BUILD_DIR} (that's going to become
+# egg-base in esetup.py). This way, we respect whatever's in upstream
+# egg-info.
+_distutils-r1_copy_egg_info() {
+	mkdir -p "${BUILD_DIR}" || die
+	# stupid freebsd can't do 'cp -t ${BUILD_DIR} {} +'
+	find -name '*.egg-info' -exec cp -pr {} "${BUILD_DIR}"/ ';' || die
+}
+
 # @FUNCTION: distutils-r1_python_prepare_all
 # @DESCRIPTION:
 # The default python_prepare_all(). It applies the patches from PATCHES
@@ -382,6 +393,8 @@ distutils-r1_python_configure() {
 distutils-r1_python_compile() {
 	debug-print-function ${FUNCNAME} "${@}"
 
+	_distutils-r1_copy_egg_info
+
 	esetup.py "${@}"
 }
 
-- 
1.8.3.2



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [gentoo-python] [PATCH distutils-r1 3/4] Describe _distutils-r1_disable_ez_setup() using eclassdoc.
  2013-08-21 10:43 ` [gentoo-python] [PATCH distutils-r1 3/4] Describe _distutils-r1_disable_ez_setup() using eclassdoc Michał Górny
@ 2013-08-21 14:13   ` Mike Gilbert
  2013-08-21 20:01     ` Michał Górny
  0 siblings, 1 reply; 14+ messages in thread
From: Mike Gilbert @ 2013-08-21 14:13 UTC (permalink / raw
  To: Michał Górny; +Cc: gentoo-python, Gentoo Python Project

On Wed, Aug 21, 2013 at 6:43 AM, Michał Górny <mgorny@gentoo.org> wrote:
> ---
>  gx86/eclass/distutils-r1.eclass | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass
> index fba7634..e95df3e 100644
> --- a/gx86/eclass/distutils-r1.eclass
> +++ b/gx86/eclass/distutils-r1.eclass
> @@ -308,6 +308,10 @@ distutils_install_for_testing() {
>         esetup.py "${add_args[@]}"
>  }
>
> +# @FUNCTION: _distutils-r1_disable_ez_setup
> +# @DESCRIPTION:
> +# Stub out ez_setup.py and distribute_setup.py to prevent packages
> +# from trying to download a local copy of setuptools.
>  _distutils-r1_disable_ez_setup() {
>         local stub="def use_setuptools(*args, **kwargs): pass"
>         if [[ -f ez_setup.py ]]; then
> @@ -340,7 +344,6 @@ distutils-r1_python_prepare_all() {
>                 fi
>         fi
>
> -       # Prevent packages from downloading their own copy of setuptools
>         _distutils-r1_disable_ez_setup
>
>         if [[ ${DISTUTILS_IN_SOURCE_BUILD} && ! ${DISTUTILS_SINGLE_IMPL} ]]
> --
> 1.8.3.2
>
>

Let's add @INTERNAL before @DESCRIPTION.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-python] [PATCH distutils-r1 1/4] Namespace _disable_ez_setup.
  2013-08-21 10:43 ` [gentoo-python] [PATCH distutils-r1 1/4] Namespace _disable_ez_setup Michał Górny
@ 2013-08-21 18:25   ` Mike Gilbert
  0 siblings, 0 replies; 14+ messages in thread
From: Mike Gilbert @ 2013-08-21 18:25 UTC (permalink / raw
  To: Michał Górny; +Cc: gentoo-python, Gentoo Python Project

On Wed, Aug 21, 2013 at 6:43 AM, Michał Górny <mgorny@gentoo.org> wrote:
> ---
>  gx86/eclass/distutils-r1.eclass | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass
> index 81e5824..97ddbe4 100644
> --- a/gx86/eclass/distutils-r1.eclass
> +++ b/gx86/eclass/distutils-r1.eclass
> @@ -308,7 +308,7 @@ distutils_install_for_testing() {
>         esetup.py "${add_args[@]}"
>  }
>
> -_disable_ez_setup() {
> +_distutils-r1_disable_ez_setup() {
>         local stub="def use_setuptools(*args, **kwargs): pass"
>         [[ -f ez_setup.py ]] && echo "${stub}" > ez_setup.py
>         [[ -f distribute_setup.py ]] && echo "${stub}" > distribute_setup.py
> @@ -337,7 +337,7 @@ distutils-r1_python_prepare_all() {
>         fi
>
>         # Prevent packages from downloading their own copy of setuptools
> -       _disable_ez_setup
> +       _distutils-r1_disable_ez_setup
>
>         if [[ ${DISTUTILS_IN_SOURCE_BUILD} && ! ${DISTUTILS_SINGLE_IMPL} ]]
>         then
> --
> 1.8.3.2
>
>

LGTM


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-python] [PATCH distutils-r1 2/4] Add proper error handling to _distutils-r1_disable_ez_setup.
  2013-08-21 10:43 ` [gentoo-python] [PATCH distutils-r1 2/4] Add proper error handling to _distutils-r1_disable_ez_setup Michał Górny
@ 2013-08-21 18:26   ` Mike Gilbert
  0 siblings, 0 replies; 14+ messages in thread
From: Mike Gilbert @ 2013-08-21 18:26 UTC (permalink / raw
  To: Michał Górny; +Cc: gentoo-python, Gentoo Python Project

On Wed, Aug 21, 2013 at 6:43 AM, Michał Górny <mgorny@gentoo.org> wrote:
> ---
>  gx86/eclass/distutils-r1.eclass | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass
> index 97ddbe4..fba7634 100644
> --- a/gx86/eclass/distutils-r1.eclass
> +++ b/gx86/eclass/distutils-r1.eclass
> @@ -310,8 +310,12 @@ distutils_install_for_testing() {
>
>  _distutils-r1_disable_ez_setup() {
>         local stub="def use_setuptools(*args, **kwargs): pass"
> -       [[ -f ez_setup.py ]] && echo "${stub}" > ez_setup.py
> -       [[ -f distribute_setup.py ]] && echo "${stub}" > distribute_setup.py
> +       if [[ -f ez_setup.py ]]; then
> +               echo "${stub}" > ez_setup.py || die
> +       fi
> +       if [[ -f distribute_setup.py ]]; then
> +               echo "${stub}" > distribute_setup.py || die
> +       fi
>  }
>
>  # @FUNCTION: distutils-r1_python_prepare_all
> --
> 1.8.3.2
>
>

LGTM


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [gentoo-python] Re: [PATCH distutils-r1 4/4] Copy egg-info files in python_prepare_all().
  2013-08-21 10:43 ` [gentoo-python] [PATCH distutils-r1 4/4] Copy egg-info files in python_prepare_all() Michał Górny
@ 2013-08-21 18:31   ` Mike Gilbert
  2013-08-21 19:27     ` Michał Górny
  0 siblings, 1 reply; 14+ messages in thread
From: Mike Gilbert @ 2013-08-21 18:31 UTC (permalink / raw
  To: Michał Górny; +Cc: gentoo-python, Gentoo Python Project

On Wed, Aug 21, 2013 at 6:43 AM, Michał Górny <mgorny@gentoo.org> wrote:
> ---
>  gx86/eclass/distutils-r1.eclass | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass
> index e95df3e..39e4434 100644
> --- a/gx86/eclass/distutils-r1.eclass
> +++ b/gx86/eclass/distutils-r1.eclass
> @@ -322,6 +322,17 @@ _distutils-r1_disable_ez_setup() {
>         fi
>  }
>
> +# @FUNCTION: _distutils-r1_copy_egg_info
> +# @DESCRIPTION:
> +# Copy egg-info files to the ${BUILD_DIR} (that's going to become
> +# egg-base in esetup.py). This way, we respect whatever's in upstream
> +# egg-info.
> +_distutils-r1_copy_egg_info() {
> +       mkdir -p "${BUILD_DIR}" || die
> +       # stupid freebsd can't do 'cp -t ${BUILD_DIR} {} +'
> +       find -name '*.egg-info' -exec cp -pr {} "${BUILD_DIR}"/ ';' || die
> +}
> +
>  # @FUNCTION: distutils-r1_python_prepare_all
>  # @DESCRIPTION:
>  # The default python_prepare_all(). It applies the patches from PATCHES
> @@ -382,6 +393,8 @@ distutils-r1_python_configure() {
>  distutils-r1_python_compile() {
>         debug-print-function ${FUNCNAME} "${@}"
>
> +       _distutils-r1_copy_egg_info
> +
>         esetup.py "${@}"
>  }
>
> --
> 1.8.3.2
>

I don't think there is any point in copying egg-info *files* (created
via distutils); we only seem to run into issues with setuptools and
the egg-info directories.

On the other hand, I guess it doesn't hurt either way.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-python] Re: [PATCH distutils-r1 4/4] Copy egg-info files in python_prepare_all().
  2013-08-21 18:31   ` [gentoo-python] " Mike Gilbert
@ 2013-08-21 19:27     ` Michał Górny
  2013-08-21 19:33       ` Mike Gilbert
  0 siblings, 1 reply; 14+ messages in thread
From: Michał Górny @ 2013-08-21 19:27 UTC (permalink / raw
  To: Mike Gilbert; +Cc: gentoo-python, Gentoo Python Project

[-- Attachment #1: Type: text/plain, Size: 1718 bytes --]

Dnia 2013-08-21, o godz. 14:31:01
Mike Gilbert <floppym@gentoo.org> napisał(a):

> On Wed, Aug 21, 2013 at 6:43 AM, Michał Górny <mgorny@gentoo.org> wrote:
> > ---
> >  gx86/eclass/distutils-r1.eclass | 13 +++++++++++++
> >  1 file changed, 13 insertions(+)
> >
> > diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass
> > index e95df3e..39e4434 100644
> > --- a/gx86/eclass/distutils-r1.eclass
> > +++ b/gx86/eclass/distutils-r1.eclass
> > @@ -322,6 +322,17 @@ _distutils-r1_disable_ez_setup() {
> >         fi
> >  }
> >
> > +# @FUNCTION: _distutils-r1_copy_egg_info
> > +# @DESCRIPTION:
> > +# Copy egg-info files to the ${BUILD_DIR} (that's going to become
> > +# egg-base in esetup.py). This way, we respect whatever's in upstream
> > +# egg-info.
> > +_distutils-r1_copy_egg_info() {
> > +       mkdir -p "${BUILD_DIR}" || die
> > +       # stupid freebsd can't do 'cp -t ${BUILD_DIR} {} +'
> > +       find -name '*.egg-info' -exec cp -pr {} "${BUILD_DIR}"/ ';' || die
> > +}
> > +
> >  # @FUNCTION: distutils-r1_python_prepare_all
> >  # @DESCRIPTION:
> >  # The default python_prepare_all(). It applies the patches from PATCHES
> > @@ -382,6 +393,8 @@ distutils-r1_python_configure() {
> >  distutils-r1_python_compile() {
> >         debug-print-function ${FUNCNAME} "${@}"
> >
> > +       _distutils-r1_copy_egg_info
> > +
> >         esetup.py "${@}"
> >  }
> >
> > --
> > 1.8.3.2
> >
> 
> I don't think there is any point in copying egg-info *files* (created
> via distutils); we only seem to run into issues with setuptools and
> the egg-info directories.

You mean to use '-type d' here?

-- 
Best regards,
Michał Górny

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 966 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-python] Re: [PATCH distutils-r1 4/4] Copy egg-info files in python_prepare_all().
  2013-08-21 19:27     ` Michał Górny
@ 2013-08-21 19:33       ` Mike Gilbert
  2013-08-21 20:01         ` Michał Górny
  0 siblings, 1 reply; 14+ messages in thread
From: Mike Gilbert @ 2013-08-21 19:33 UTC (permalink / raw
  To: Michał Górny; +Cc: gentoo-python, Gentoo Python Project

On Wed, Aug 21, 2013 at 3:27 PM, Michał Górny <mgorny@gentoo.org> wrote:
> Dnia 2013-08-21, o godz. 14:31:01
> Mike Gilbert <floppym@gentoo.org> napisał(a):
>
>> On Wed, Aug 21, 2013 at 6:43 AM, Michał Górny <mgorny@gentoo.org> wrote:
>> > ---
>> >  gx86/eclass/distutils-r1.eclass | 13 +++++++++++++
>> >  1 file changed, 13 insertions(+)
>> >
>> > diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass
>> > index e95df3e..39e4434 100644
>> > --- a/gx86/eclass/distutils-r1.eclass
>> > +++ b/gx86/eclass/distutils-r1.eclass
>> > @@ -322,6 +322,17 @@ _distutils-r1_disable_ez_setup() {
>> >         fi
>> >  }
>> >
>> > +# @FUNCTION: _distutils-r1_copy_egg_info
>> > +# @DESCRIPTION:
>> > +# Copy egg-info files to the ${BUILD_DIR} (that's going to become
>> > +# egg-base in esetup.py). This way, we respect whatever's in upstream
>> > +# egg-info.
>> > +_distutils-r1_copy_egg_info() {
>> > +       mkdir -p "${BUILD_DIR}" || die
>> > +       # stupid freebsd can't do 'cp -t ${BUILD_DIR} {} +'
>> > +       find -name '*.egg-info' -exec cp -pr {} "${BUILD_DIR}"/ ';' || die
>> > +}
>> > +
>> >  # @FUNCTION: distutils-r1_python_prepare_all
>> >  # @DESCRIPTION:
>> >  # The default python_prepare_all(). It applies the patches from PATCHES
>> > @@ -382,6 +393,8 @@ distutils-r1_python_configure() {
>> >  distutils-r1_python_compile() {
>> >         debug-print-function ${FUNCNAME} "${@}"
>> >
>> > +       _distutils-r1_copy_egg_info
>> > +
>> >         esetup.py "${@}"
>> >  }
>> >
>> > --
>> > 1.8.3.2
>> >
>>
>> I don't think there is any point in copying egg-info *files* (created
>> via distutils); we only seem to run into issues with setuptools and
>> the egg-info directories.
>
> You mean to use '-type d' here?
>

Yes.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-python] [PATCH distutils-r1 3/4] Describe _distutils-r1_disable_ez_setup() using eclassdoc.
  2013-08-21 14:13   ` Mike Gilbert
@ 2013-08-21 20:01     ` Michał Górny
  0 siblings, 0 replies; 14+ messages in thread
From: Michał Górny @ 2013-08-21 20:01 UTC (permalink / raw
  To: Mike Gilbert; +Cc: gentoo-python, Gentoo Python Project

[-- Attachment #1: Type: text/plain, Size: 1394 bytes --]

Dnia 2013-08-21, o godz. 10:13:21
Mike Gilbert <floppym@gentoo.org> napisał(a):

> On Wed, Aug 21, 2013 at 6:43 AM, Michał Górny <mgorny@gentoo.org> wrote:
> > ---
> >  gx86/eclass/distutils-r1.eclass | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass
> > index fba7634..e95df3e 100644
> > --- a/gx86/eclass/distutils-r1.eclass
> > +++ b/gx86/eclass/distutils-r1.eclass
> > @@ -308,6 +308,10 @@ distutils_install_for_testing() {
> >         esetup.py "${add_args[@]}"
> >  }
> >
> > +# @FUNCTION: _distutils-r1_disable_ez_setup
> > +# @DESCRIPTION:
> > +# Stub out ez_setup.py and distribute_setup.py to prevent packages
> > +# from trying to download a local copy of setuptools.
> >  _distutils-r1_disable_ez_setup() {
> >         local stub="def use_setuptools(*args, **kwargs): pass"
> >         if [[ -f ez_setup.py ]]; then
> > @@ -340,7 +344,6 @@ distutils-r1_python_prepare_all() {
> >                 fi
> >         fi
> >
> > -       # Prevent packages from downloading their own copy of setuptools
> >         _distutils-r1_disable_ez_setup
> >
> >         if [[ ${DISTUTILS_IN_SOURCE_BUILD} && ! ${DISTUTILS_SINGLE_IMPL} ]]
> > --
> > 1.8.3.2
> >
> >
> 
> Let's add @INTERNAL before @DESCRIPTION.

Added.

-- 
Best regards,
Michał Górny

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 966 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-python] Re: [PATCH distutils-r1 4/4] Copy egg-info files in python_prepare_all().
  2013-08-21 19:33       ` Mike Gilbert
@ 2013-08-21 20:01         ` Michał Górny
  0 siblings, 0 replies; 14+ messages in thread
From: Michał Górny @ 2013-08-21 20:01 UTC (permalink / raw
  To: Mike Gilbert; +Cc: gentoo-python, Gentoo Python Project

[-- Attachment #1: Type: text/plain, Size: 2054 bytes --]

Dnia 2013-08-21, o godz. 15:33:12
Mike Gilbert <floppym@gentoo.org> napisał(a):

> On Wed, Aug 21, 2013 at 3:27 PM, Michał Górny <mgorny@gentoo.org> wrote:
> > Dnia 2013-08-21, o godz. 14:31:01
> > Mike Gilbert <floppym@gentoo.org> napisał(a):
> >
> >> On Wed, Aug 21, 2013 at 6:43 AM, Michał Górny <mgorny@gentoo.org> wrote:
> >> > ---
> >> >  gx86/eclass/distutils-r1.eclass | 13 +++++++++++++
> >> >  1 file changed, 13 insertions(+)
> >> >
> >> > diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass
> >> > index e95df3e..39e4434 100644
> >> > --- a/gx86/eclass/distutils-r1.eclass
> >> > +++ b/gx86/eclass/distutils-r1.eclass
> >> > @@ -322,6 +322,17 @@ _distutils-r1_disable_ez_setup() {
> >> >         fi
> >> >  }
> >> >
> >> > +# @FUNCTION: _distutils-r1_copy_egg_info
> >> > +# @DESCRIPTION:
> >> > +# Copy egg-info files to the ${BUILD_DIR} (that's going to become
> >> > +# egg-base in esetup.py). This way, we respect whatever's in upstream
> >> > +# egg-info.
> >> > +_distutils-r1_copy_egg_info() {
> >> > +       mkdir -p "${BUILD_DIR}" || die
> >> > +       # stupid freebsd can't do 'cp -t ${BUILD_DIR} {} +'
> >> > +       find -name '*.egg-info' -exec cp -pr {} "${BUILD_DIR}"/ ';' || die
> >> > +}
> >> > +
> >> >  # @FUNCTION: distutils-r1_python_prepare_all
> >> >  # @DESCRIPTION:
> >> >  # The default python_prepare_all(). It applies the patches from PATCHES
> >> > @@ -382,6 +393,8 @@ distutils-r1_python_configure() {
> >> >  distutils-r1_python_compile() {
> >> >         debug-print-function ${FUNCNAME} "${@}"
> >> >
> >> > +       _distutils-r1_copy_egg_info
> >> > +
> >> >         esetup.py "${@}"
> >> >  }
> >> >
> >> > --
> >> > 1.8.3.2
> >> >
> >>
> >> I don't think there is any point in copying egg-info *files* (created
> >> via distutils); we only seem to run into issues with setuptools and
> >> the egg-info directories.
> >
> > You mean to use '-type d' here?
> >
> 
> Yes.

Added.

-- 
Best regards,
Michał Górny

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 966 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-python] [PATCHES] distutils-r1: some cleanup + egg-info fixes
  2013-08-21 10:42 [gentoo-python] [PATCHES] distutils-r1: some cleanup + egg-info fixes Michał Górny
                   ` (3 preceding siblings ...)
  2013-08-21 10:43 ` [gentoo-python] [PATCH distutils-r1 4/4] Copy egg-info files in python_prepare_all() Michał Górny
@ 2013-08-25 21:16 ` Michał Górny
  4 siblings, 0 replies; 14+ messages in thread
From: Michał Górny @ 2013-08-25 21:16 UTC (permalink / raw
  To: Michał Górny; +Cc: gentoo-python, python

[-- Attachment #1: Type: text/plain, Size: 524 bytes --]

Dnia 2013-08-21, o godz. 12:42:32
Michał Górny <mgorny@gentoo.org> napisał(a):

> Hello,
> 
> Assuming the mess with egg-info files is unfixable, here's a patch for
> it plus some cleanup to what floppym added earlier.
> 
> The idea is that we copy the bundled egg-info files in python_compile()
> to create initial versions of eggs in ${BUILD_DIR}. Then, all
> the defaults from them are respected while we override the dir.
> 
> Patches sent as replies.

Committed.

-- 
Best regards,
Michał Górny

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 966 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-08-25 21:16 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-21 10:42 [gentoo-python] [PATCHES] distutils-r1: some cleanup + egg-info fixes Michał Górny
2013-08-21 10:43 ` [gentoo-python] [PATCH distutils-r1 1/4] Namespace _disable_ez_setup Michał Górny
2013-08-21 18:25   ` Mike Gilbert
2013-08-21 10:43 ` [gentoo-python] [PATCH distutils-r1 2/4] Add proper error handling to _distutils-r1_disable_ez_setup Michał Górny
2013-08-21 18:26   ` Mike Gilbert
2013-08-21 10:43 ` [gentoo-python] [PATCH distutils-r1 3/4] Describe _distutils-r1_disable_ez_setup() using eclassdoc Michał Górny
2013-08-21 14:13   ` Mike Gilbert
2013-08-21 20:01     ` Michał Górny
2013-08-21 10:43 ` [gentoo-python] [PATCH distutils-r1 4/4] Copy egg-info files in python_prepare_all() Michał Górny
2013-08-21 18:31   ` [gentoo-python] " Mike Gilbert
2013-08-21 19:27     ` Michał Górny
2013-08-21 19:33       ` Mike Gilbert
2013-08-21 20:01         ` Michał Górny
2013-08-25 21:16 ` [gentoo-python] [PATCHES] distutils-r1: some cleanup + egg-info fixes 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