Contents
Summary
Finalize our Python policy, provide byte compile files
Owner
- Name: Philippe Makowski
- Email: philippem@mageia.org
Resources
All people packaging software that use Python
Current status
- Targeted release: Mageia 4
- Last updated: 2025/05/05
- Percentage of completion: 100%
Detailed Description
today we have PYTHONDONTWRITEBYTECODE set. But if you look at various Python packages, a lot of them by pass it and include byte compiled files.
You can see part f the discussion in bug #3348 [1] , but in fact it is an old discussion that started with Mandriva [2] ....
OpenSuse [3], Fedora [4] policies about byte compiling are that these files are to be included, in fact for what I know all others distro (except Mandriva) provides byte compiled files.
I am clearly in favor to follow the same policy than Fedora and OpenSuse. To avoid bigger packages, we can do as OpenSuse and save space by running fdupes.
We can do this in Cauldron, but for that we have to review and rebuild all Python packages.
Why it would be good for Mageia to include it
- Avoid a lot of problems occuring when byte-compiling is disabled, see bug #3348.
- Having packages that all follow the same rules
- Having more Python developers using Mageia
- Will be a good opportunity to review all Python packages and clean them
Test case
Software / Packages Dependencies
List of packages to be implied see User_talk:Philippem
What could disrupt development of this new feature
Planning
- Change Python2 and Python3 packages, fixing bugs 10842 [5] and 10843 [6] - DONE
- Notify maintainers of packages depending on Python, work with them to make the move - DONE
- add to rpm macro %{__os_install_post} /usr/lib/rpm/brp-python-bytecompile and /usr/lib/rpm/brp-python-hardlink - DONE
Contingency
Release Notes
Documentation
- [1] https://bugs.mageia.org/show_bug.cgi?id=3348
- [2] https://qa.mandriva.com/show_bug.cgi?id=50484
- [3] http://en.opensuse.org/openSUSE:Packaging_Python#Byte_Compiled_Files
- [4] https://fedoraproject.org/wiki/Packaging:Python?rd=Packaging/Python#Byte_compiling
- [5] https://bugs.mageia.org/show_bug.cgi?id=10842
- [6] https://bugs.mageia.org/show_bug.cgi?id=10843