[For those who don't read epel-devel, this is a duplicate of a message
also posted there.]
The initial set of stub python2-* packages I created have now made their
way to EPEL6 and EPEL7 stable, so packages can now depend on
python2-setuptools, python2-six, python2-pytest and python2-sphinx
in all releases without having to add conditionals for EPEL.
Feel free to suggest additional packages; I will be happy to create
See https://fedoraproject.org/wiki/User:Tibbs/EPELPythonStubPackages for
Did you know that if you put a .py file outside /usr/lib/pythonX.Y/,
rpmbuild will automatically byte-compile .pyc/.pyo for it?
Using Python 2 by default?
I find this (and especially the details of how it's done) too
surprising, too limited and too hard to configure properly.
Miro and I are drafting a Fedora change to eventually switch to doing
the byte-compilation explicitly instead. Files in /usr/lib/pythonX.Y/
still get compiled automatically, of course.
You can read the draft here:
The first beta for Python 3.7 is out. It will hopefully get into Fedora
soon as python37.
After it comes out of beta, we'll upgrade python3 to it.
The What's New list is at: https://docs.python.org/3.7/whatsnew/3.7.html
One thing that's interesting for packagers is PEP 552: Deterministic
Let me summarize in my own words.
A new opt-in mode for byte-compilation makes .pyc (bytecode cache) files
depend only on the contents of the corresponding source file.
If we use this, it will slow down imports, because the whole source file
would need to be read and hashed in order to verify if a .pyc file is
valid. (Currently, metadata like the modification time and file size is
To speed things up, there's an option, UNCHECKED_HASH, which skips cache
validation entirely. Using this would mean that if you modify a .py
source file installed by RPM, the changes wouldn't take effect (the .py
contents would only be shown in tracebacks).
Modifying installed files in production is extremely bad practice, of
course, but it's quite useful for debugging on throw-away systems. If we
adopt UNCHECKED_HASH, anyone doing it will have to remember to remove
the corresponding .pyc file.
Honestly, I'm not sure we want to use this in Fedora. Is anyone here
into reproducible builds, to make a better argument for this?