Fedora 23 cloud image (and, for that matter, minimal anything) bloat

Ville Skyttä ville.skytta at iki.fi
Tue Sep 22 11:36:09 UTC 2015


On Tue, Sep 22, 2015 at 2:25 PM, Neal Gompa <ngompa13 at gmail.com> wrote:
> On Tue, Sep 22, 2015 at 5:36 AM, Matej Stuchlik <mstuchli at redhat.com> wrote:
>>
>> Also note that it's possibly not just 9MB. For instance python3-boto, also
>> on this list, would
>> save 4.7MB, python3-pip 2.9MB. In general most python packages could go
>> down in size by ~20-30%.
>
> However, this approach would break with Python 3.5 (where pyo data is merged
> into *.pyc data)

To be more precise, AFAIU there's no "merging", *.pyo goes away but in
exchange there are actually two new optimized bytecode files,
*.opt-1.pyc and *.opt-2.pyc: https://www.python.org/dev/peps/pep-0488/
If you want to exclude them from packages, they should be there listed
as %ghost so they're removed in case they get generated by something
run with -O or -OO. Ditto *.pyo if you intend to exclude them from
python < 3.5 packages.

Also, be careful with measuring space savings when working with *.pyo.
It is a common case that *.pyc and *.pyo are identical, and when they
are rpmbuild already hardlinks them.


More information about the devel mailing list