GNU bug report logs -
#47214
[core-updates] gnu: python: Remove unnecessary files
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 47214 in the body.
You can then email your comments to 47214 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#47214
; Package
guix-patches
.
(Wed, 17 Mar 2021 12:42:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Julien Lepiller <julien <at> lepiller.eu>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Wed, 17 Mar 2021 12:42:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi Guix!
this patch (going to core-updates) removes files from the output of
python2 and python3, in an attempt to save some space. First, I noticed
that python3 shipped windows binaries in its source distribution and
installs them to the output, in lib/python3.8/distutils/command/*.exe,
lib/python3.8/site-packages/*.exe and
lib/python3.8/site-packages/pip/_vendor/distlib/*.exe. I remove them
from the snippet, so they should not be installed anymore.
I also noticed that python installs files that were built during the
test phase, so I remove them, but we need to check they are not
actually needed. Other distros ship them in a separate package, so
maybe we could have a separate test output if this is causing issues?
I haven't yet tested the patch, because it needs to rebuild part of the
bootstrap chain. I'll report progress and update my patch depending
on the results!
[0001-gnu-python-Remove-unnecessary-files.patch (text/x-patch, attachment)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#47214
; Package
guix-patches
.
(Wed, 17 Mar 2021 19:24:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 47214 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Wed, Mar 17, 2021 at 01:41:02PM +0100, Julien Lepiller wrote:
> Hi Guix!
>
> this patch (going to core-updates) removes files from the output of
> python2 and python3, in an attempt to save some space. First, I noticed
> that python3 shipped windows binaries in its source distribution and
> installs them to the output, in lib/python3.8/distutils/command/*.exe,
> lib/python3.8/site-packages/*.exe and
> lib/python3.8/site-packages/pip/_vendor/distlib/*.exe. I remove them
> from the snippet, so they should not be installed anymore.
>
> I also noticed that python installs files that were built during the
> test phase, so I remove them, but we need to check they are not
> actually needed. Other distros ship them in a separate package, so
> maybe we could have a separate test output if this is causing issues?
>
> I haven't yet tested the patch, because it needs to rebuild part of the
> bootstrap chain. I'll report progress and update my patch depending
> on the results!
I got stuck on python-minimal with test-asyncio but then it didn't hang
the second time I ran the build. I don't have a good pure python package
I can think of to test the change.
--
Efraim Flashner <efraim <at> flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#47214
; Package
guix-patches
.
(Thu, 18 Mar 2021 23:09:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 47214 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Le Wed, 17 Mar 2021 13:41:02 +0100,
Julien Lepiller <julien <at> lepiller.eu> a écrit :
> Hi Guix!
>
> this patch (going to core-updates) removes files from the output of
> python2 and python3, in an attempt to save some space. First, I
> noticed that python3 shipped windows binaries in its source
> distribution and installs them to the output, in
> lib/python3.8/distutils/command/*.exe,
> lib/python3.8/site-packages/*.exe and
> lib/python3.8/site-packages/pip/_vendor/distlib/*.exe. I remove them
> from the snippet, so they should not be installed anymore.
>
> I also noticed that python installs files that were built during the
> test phase, so I remove them, but we need to check they are not
> actually needed. Other distros ship them in a separate package, so
> maybe we could have a separate test output if this is causing issues?
>
> I haven't yet tested the patch, because it needs to rebuild part of
> the bootstrap chain. I'll report progress and update my patch
> depending on the results!
I discovered other .exe in python3, so this updated patch deletes them.
Since I modify the python from commencement.scm by changing a phase in
python-2.7, I decided to also change the definition there to remove the
offending files.
I managed to build up to python-3.9 without any issue, but haven't
tested building more than a handful of python packages.
[0001-gnu-python-Remove-unnecessary-files.patch (text/x-patch, attachment)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#47214
; Package
guix-patches
.
(Fri, 19 Mar 2021 12:28:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 47214 <at> debbugs.gnu.org (full text, mbox):
Hi Julien,
Julien Lepiller <julien <at> lepiller.eu> skribis:
> Le Wed, 17 Mar 2021 13:41:02 +0100,
> Julien Lepiller <julien <at> lepiller.eu> a écrit :
>
>> Hi Guix!
>>
>> this patch (going to core-updates) removes files from the output of
>> python2 and python3, in an attempt to save some space. First, I
>> noticed that python3 shipped windows binaries in its source
>> distribution and installs them to the output, in
>> lib/python3.8/distutils/command/*.exe,
>> lib/python3.8/site-packages/*.exe and
>> lib/python3.8/site-packages/pip/_vendor/distlib/*.exe. I remove them
>> from the snippet, so they should not be installed anymore.
>>
>> I also noticed that python installs files that were built during the
>> test phase, so I remove them, but we need to check they are not
>> actually needed. Other distros ship them in a separate package, so
>> maybe we could have a separate test output if this is causing issues?
>>
>> I haven't yet tested the patch, because it needs to rebuild part of
>> the bootstrap chain. I'll report progress and update my patch
>> depending on the results!
>
> I discovered other .exe in python3, so this updated patch deletes them.
> Since I modify the python from commencement.scm by changing a phase in
> python-2.7, I decided to also change the definition there to remove the
> offending files.
Woow, good catch.
> From 0d2d9a32cbbf24eadf74271b2fb1304b7a72d281 Mon Sep 17 00:00:00 2001
> From: Julien Lepiller <julien <at> lepiller.eu>
> Date: Wed, 17 Mar 2021 13:33:22 +0100
> Subject: [PATCH 1/2] gnu: python: Remove unnecessary files.
>
> * gnu/packages/python.scm (python2)[arguments]: Remove files built
> during the test phase.
> (python3)[arguments]: Also remove windows binaries shipped with the
> sources.
Unless it causes bootstrapping issues, I recommend removing those files
from a snippet so that ‘guix build -S python’ returns the cleaned-up
source.
WDYT?
Thanks,
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#47214
; Package
guix-patches
.
(Thu, 03 Jun 2021 01:57:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 47214 <at> debbugs.gnu.org (full text, mbox):
Le Fri, 19 Mar 2021 13:27:06 +0100,
Ludovic Courtès <ludo <at> gnu.org> a écrit :
> > From 0d2d9a32cbbf24eadf74271b2fb1304b7a72d281 Mon Sep 17 00:00:00
> > 2001 From: Julien Lepiller <julien <at> lepiller.eu>
> > Date: Wed, 17 Mar 2021 13:33:22 +0100
> > Subject: [PATCH 1/2] gnu: python: Remove unnecessary files.
> >
> > * gnu/packages/python.scm (python2)[arguments]: Remove files built
> > during the test phase.
> > (python3)[arguments]: Also remove windows binaries shipped with the
> > sources.
>
> Unless it causes bootstrapping issues, I recommend removing those
> files from a snippet so that ‘guix build -S python’ returns the
> cleaned-up source.
>
> WDYT?
>
> Thanks,
> Ludo’.
Hi, sorry for the late reply. I need to use unzip on these files to
remove some of their content, and rezip them later. How can I do that
from a snippet?
Information forwarded
to
guix-patches <at> gnu.org
:
bug#47214
; Package
guix-patches
.
(Thu, 03 Jun 2021 09:47:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 47214 <at> debbugs.gnu.org (full text, mbox):
Hi,
Julien Lepiller <julien <at> lepiller.eu> skribis:
> Le Fri, 19 Mar 2021 13:27:06 +0100,
> Ludovic Courtès <ludo <at> gnu.org> a écrit :
>
>> > From 0d2d9a32cbbf24eadf74271b2fb1304b7a72d281 Mon Sep 17 00:00:00
>> > 2001 From: Julien Lepiller <julien <at> lepiller.eu>
>> > Date: Wed, 17 Mar 2021 13:33:22 +0100
>> > Subject: [PATCH 1/2] gnu: python: Remove unnecessary files.
>> >
>> > * gnu/packages/python.scm (python2)[arguments]: Remove files built
>> > during the test phase.
>> > (python3)[arguments]: Also remove windows binaries shipped with the
>> > sources.
>>
>> Unless it causes bootstrapping issues, I recommend removing those
>> files from a snippet so that ‘guix build -S python’ returns the
>> cleaned-up source.
[...]
> Hi, sorry for the late reply. I need to use unzip on these files to
> remove some of their content, and rezip them later. How can I do that
> from a snippet?
Oh right, the bit that unzips/rezips .whl files cannot easily be done
from a snippet, so better keep it as a phase.
Deleting *.exe can be done from a snippet though.
BTW, the patch reads:
(find-files "Lib/distutils/command" ".*.exe$")
but the regexp should be:
"\\.exe$"
(“.*” is unnecessary, but the dot before “exe” must be protected.)
Likewise for:
(find-files "Lib/ensurepip" ".*.whl$")
Thanks,
Ludo’.
Reply sent
to
Julien Lepiller <julien <at> lepiller.eu>
:
You have taken responsibility.
(Fri, 11 Jun 2021 01:02:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
Julien Lepiller <julien <at> lepiller.eu>
:
bug acknowledged by developer.
(Fri, 11 Jun 2021 01:02:03 GMT)
Full text and
rfc822 format available.
Message #25 received at 47214-done <at> debbugs.gnu.org (full text, mbox):
Le Thu, 03 Jun 2021 11:46:44 +0200,
Ludovic Courtès <ludo <at> gnu.org> a écrit :
> Hi,
>
> Julien Lepiller <julien <at> lepiller.eu> skribis:
>
> > Le Fri, 19 Mar 2021 13:27:06 +0100,
> > Ludovic Courtès <ludo <at> gnu.org> a écrit :
> >
> >> > From 0d2d9a32cbbf24eadf74271b2fb1304b7a72d281 Mon Sep 17 00:00:00
> >> > 2001 From: Julien Lepiller <julien <at> lepiller.eu>
> >> > Date: Wed, 17 Mar 2021 13:33:22 +0100
> >> > Subject: [PATCH 1/2] gnu: python: Remove unnecessary files.
> >> >
> >> > * gnu/packages/python.scm (python2)[arguments]: Remove files
> >> > built during the test phase.
> >> > (python3)[arguments]: Also remove windows binaries shipped with
> >> > the sources.
> >>
> >> Unless it causes bootstrapping issues, I recommend removing those
> >> files from a snippet so that ‘guix build -S python’ returns the
> >> cleaned-up source.
>
> [...]
>
> > Hi, sorry for the late reply. I need to use unzip on these files to
> > remove some of their content, and rezip them later. How can I do
> > that from a snippet?
>
> Oh right, the bit that unzips/rezips .whl files cannot easily be done
> from a snippet, so better keep it as a phase.
>
> Deleting *.exe can be done from a snippet though.
>
> BTW, the patch reads:
>
> (find-files "Lib/distutils/command" ".*.exe$")
>
> but the regexp should be:
>
> "\\.exe$"
>
> (“.*” is unnecessary, but the dot before “exe” must be protected.)
>
> Likewise for:
>
> (find-files "Lib/ensurepip" ".*.whl$")
>
> Thanks,
> Ludo’.
Fixed, and pushed as 20d52562e5c943b30e48e310b58b94054c3a54e5 to
core-updates.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 09 Jul 2021 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 297 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.