Re: Fedora 33 Self-Contained Change proposal: No more automagic Python bytecompilation phase 3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

The change has been accepted and implemented in: https://bodhi.fedoraproject.org/updates/FEDORA-2020-922b21ffde

This means that the affected packages will FTBFS with the following error:

%_python_bytecompile_extra is discontinued, use %py_byte_compile instead.
See: https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_3
error: Bad exit status from /var/tmp/rpm-tmp.T6T9xw (%install)

How to fix it?

  1. Check a previous build of a package and answer the question: "Do you really need to ship byte-compiled Python modules outside the standard location?"
    1. If the answer is no, simply remove the "_python_bytecompile_extra" from a specfile.
    2. If the answer is yes, use %py_byte_compile macro to compile them manually. Docs: https://docs.fedoraproject.org/en-US/packaging-guidelines/Python_Appendix/#manual-bytecompilation

Feel free to ask for any assistance.

Lumír

Affected packages:

bugzilla
calamares
ceph
chromium
cinnamon-screensaver
edk2
eog-plugins
fish
fleet-commander-admin
fleet-commander-client
freecad
gaupol
gdb
gedit
gedit-latex
gedit-plugins
git-cola
glusterfs
gnome-code-assistance
gnome-devel-docs
grass
gtk-doc
gtranslator
ibus-anthy
ibus
ibus-hangul
ibus-libpinyin
ibus-libzhuyin
ibus-pinyin
ibus-table
ibus-typing-booster
ibus-uniemoji
kajongg
kdevelop-python
klatexformula
libpeas
libreoffice
libsmbios
libunity
lirc
lyx
mate-menu
mingw-glib2
mirrormanager2
odcs
onboard
otf2
paraview
pcs
php-opencloud-openstack
pygobject2
pygtk2
python-cherrypy
python-flask-silk
python-genshi
python-pycurl
python-reportlab
qpid-dispatch
rhythmbox
sems
sigul
soundconverter
sugar-maze
sugar-measure
sugar
sugar-abacus
sugar-browse
sugar-calculator
sugar-memorize
sugar-castle
sugar-moon
sugar-chat
sugar-nutrition
sugar-paint
sugar-clock
sugar-colordeducto
sugar-physics
sugar-pippy
sugar-playgo
sugar-countries
sugar-portfolio
sugar-read
sugar-deducto
sugar-distance
sugar-recall
sugar-finance
sugar-record
sugar-flip
sugar-ruler
sugar-speak
sugar-srilanka
sugar-flipsticks
sugar-fototoon
sugar-fractionbounce
sugar-getiabooks
sugar-imageviewer
sugar-implode
sugar-infoslicer
sugar-starchart
sugar-stopwatch
sugar-jukebox
sugar-kuku
sugar-labyrinth
sugar-locosugar
sugar-story
sugar-terminal
sugar-log
sugar-turtleart
sugar-words
sugar-write
sugar-pukllanapac
sugar-typing-turtle
sugar-view-slides
sugar-visualmatch
sugar-xoeditor
sugar-xoirc
sugar-yupana
synfigstudio
system-config-repo
system-switch-java
system-switch-mail
texlive
totem
transmageddon
ufw-kde
variety
virt-manager
vtk
xed

On 5/28/20 9:49 PM, Ben Cotton wrote:
https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_3

== Summary ==
See [[Changes/No_more_automagic_Python_bytecompilation]] and
[[Changes/No_more_automagic_Python_bytecompilation_phase_2]]. Now,
<code>%global _python_bytecompile_extra 1</code> won't be allowed
anymore and raises an error with a link to this change.

== Owner ==
* Name: [[User:lbalhar| Lumír Balhar]]
* Email: lbalhar@xxxxxxxxxx


== Detailed Description ==

See the [[Changes/No_more_automagic_Python_bytecompilation#Detailed_Description|Detailed
Description of the previous Change Proposal]] and the
[[Changes/No_more_automagic_Python_bytecompilation#Detailed_Description|Detailed
Description of its phase 2]].

Currently, Fedora rawhide contains ~130 packages with `%global
_python_bytecompile_extra 1` in their specfiles but surprisingly only
42 of them actually ship any .pyc files outside the standard location
<code>/usr/lib(64)?/python[0-9]\.[0-9]+</code>. That might be caused
by either of the following:

* there is nothing to byte-compile — the statement is a leftover to be removed

* The automagic bytecompilation uses <code>/usr/bin/python</code> by
default (for historical reasons) but <code>/usr/bin/python</code> is
not present in the buildroot by default.

Our plan is to finish the announced removal of this automagic Python
bytecompilation, remove it from packages where it's not necessary and
fix it with <code>%py_byte_compile</code> for packages where it's
needed.

The [https://docs.fedoraproject.org/en-US/packaging-guidelines/Python_Appendix/#manual-bytecompilation
documentation] already contains the following paragraph:

 If you have *.py files outside of the /usr/lib(64)?/pythonX.Y/
directories and you require those files to be byte compiled (e.g. it’s
an importable Python module) you MUST compile them explicitly using
the %py_byte_compile macro. Note that not all Python files are
importable Python modules; when in doubt, grep the sources for the
appropriate import statement.

so no changes have to be made there.

=== Affected packages ===

>From 2020-05-20.

 bugzilla
 calamares
 ceph
 chromium
 cinnamon-screensaver
 edk2
 eog-plugins
 fish
 fleet-commander-admin
 fleet-commander-client
 freecad
 gaupol
 gazebo
 gdb
 gedit
 gedit-latex
 gedit-plugins
 git-cola
 glusterfs
 gnome-code-assistance
 gnome-devel-docs
 grass
 gtk-doc
 gtranslator
 ibus
 ibus-anthy
 ibus-hangul
 ibus-libpinyin
 ibus-libzhuyin
 ibus-pinyin
 ibus-table
 ibus-typing-booster
 ibus-uniemoji
 insight
 kajongg
 kdevelop-python
 klatexformula
 libpeas
 libreoffice
 libsmbios
 libunity
 lirc
 lyx
 mate-menu
 mingw-glib2
 mirrormanager2
 odcs
 onboard
 otf2
 paraview
 pcs
 php-opencloud-openstack
 pygobject2
 pygtk2
 python-cherrypy
 python-flask-silk
 python-genshi
 python-pycurl
 python-reportlab
 qpid-dispatch
 rhythmbox
 sems
 sigul
 soundconverter
 sugar
 sugar-abacus
 sugar-browse
 sugar-calculator
 sugar-castle
 sugar-chat
 sugar-clock
 sugar-colordeducto
 sugar-countries
 sugar-deducto
 sugar-distance
 sugar-finance
 sugar-flip
 sugar-flipsticks
 sugar-fototoon
 sugar-fractionbounce
 sugar-getiabooks
 sugar-imageviewer
 sugar-implode
 sugar-infoslicer
 sugar-jukebox
 sugar-kuku
 sugar-labyrinth
 sugar-locosugar
 sugar-log
 sugar-maze
 sugar-measure
 sugar-memorize
 sugar-moon
 sugar-nutrition
 sugar-paint
 sugar-physics
 sugar-pippy
 sugar-playgo
 sugar-portfolio
 sugar-pukllanapac
 sugar-read
 sugar-recall
 sugar-record
 sugar-ruler
 sugar-speak
 sugar-srilanka
 sugar-starchart
 sugar-stopwatch
 sugar-story
 sugar-terminal
 sugar-turtleart
 sugar-typing-turtle
 sugar-view-slides
 sugar-visualmatch
 sugar-words
 sugar-write
 sugar-xoeditor
 sugar-xoirc
 sugar-yupana
 synfigstudio
 system-config-repo
 system-switch-java
 system-switch-mail
 texlive
 totem
 transmageddon
 ufw-kde
 variety
 virt-manager
 vtk
 xed

== Benefit to Fedora ==

More explicit specfiles when it comes to Python byte compilation. This
change also supports the dropping of unversioned
<code>%{__python}</code> macro.

== Scope ==
* Proposal owners: Change the brp-python-bytecompile script and macros
in redhat-rpm-config package, help with transforming the packages. See
https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/87
* Other developers: Maintainers of the mentioned python packages will
have to change their packages to use explicit
<code>%py_byte_compile</code>
* Release engineering: No Release engineering work is needed for this change
* Policies and guidelines: nothing to be changed
* Trademark approval: not needed

== Upgrade/compatibility impact ==
None expected.

== How To Test ==
Build a package with <code>%global _python_bytecompile_extra 1</code>.
The build should fail with an actionable error message.

== User Experience ==
The users of this change are packagers. The new behavior should make
byte-compilation more obvious, explicit, and discoverable.
Users of Fedora should not feel this (except if this change uncovers a
packaging bug).

== Contingency Plan ==

* Contingency mechanism: revert the changes in redhat-rpm-config
* Contingency deadline: none (not a System Wide Change)
* Blocks release? no (not a System Wide Change)
* Blocks product? no

== Documentation ==
The guidelines already contain up-to-date documentation.

== Release Notes ==
This change does not deserve Release Notes, it is not user-facing.


_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux