Bug 1977895 - RFE: In brp-python-bytecompile and %py_byte_compile, use compileall with --hardlink-dupes
Summary: RFE: In brp-python-bytecompile and %py_byte_compile, use compileall with --ha...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-rpm-macros
Version: rawhide
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
Assignee: Petr Viktorin (pviktori)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-30 16:34 UTC by Miro Hrončok
Modified: 2021-09-17 11:39 UTC (History)
6 users (show)

Fixed In Version: python-rpm-macros-3.10-8.fc36
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-09-17 11:39:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2021-06-30 16:34:29 UTC
The compileall module (since Python 3.9) and the comileall2 module allows to save some disk space by hardlinking identical bytecode files from different optimization levels when the --hardlink-dupes flag is used.

Context: https://discuss.python.org/t/compileall-option-to-hardlink-duplicate-optimization-levels-bytecode-cache-files/3014

We should actually use that flag, since we created it :)

There is also brp-python-hardlink which achieves the same thing but it needlessly makes all builds a bit slower. Once we start using --hardlink-dupes in brp-python-bytecompile and %py_byte_compile, we might consider dropping brp-python-hardlink (or at least disabling it by default and only calling it on demand for our older Python interpreter packages).

Comment 1 Petr Viktorin (pviktori) 2021-09-09 15:36:50 UTC
PR: https://src.fedoraproject.org/rpms/python-rpm-macros/pull-request/111

Comment 2 Fedora Update System 2021-09-17 11:37:16 UTC
FEDORA-2021-999f9780bd has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2021-999f9780bd

Comment 3 Fedora Update System 2021-09-17 11:39:58 UTC
FEDORA-2021-999f9780bd has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.