I am against this. The *.py files should go to -src subpackage and
should not be installed on my computer, because if I am not mistaken,
they are useless when the *.pyc files are installed.
Dne 12. 12. 19 v 15:36 Miro Hrončok napsal(a):
we are considering to add a %pycached macro to be used in the %files
We'd like to receive feedback. We plan to add it to rawhide and
backport it to all Fedoras + EPEL7+.
This will list:
Assuming the Python 3 version is 3.8.
The bytecode files are globbed, their presence is not checked.
This will fail:
error: %pycached can only be used with paths explicitly ending with .py
And so will any of this:
But this will work:
And it will generate the following globs:
When used with paths that include Python 3 version, it globs with the
While paths without version have less strict globs:
This will generate a warning in RPM build:
warning: File listed twice: /custom/__pycache__/foo.cpython-38.opt-1.pyc
However it ensures the optimized bytecode is there.