Hi all,
Per https://fedoraproject.org/wiki/Packaging:Python#Files_to_include the __pycache__ directory needs shipped in python3-* packages. The default Python template generated by rpmdev-newspec includes %{python3_sitelib}/* which would include __pycache__, no problem. (same applies for python3_sitearch)
However, if the package installs *.py files under %{python3_sitearch} directly (not under a module), the __pycache__ directory ends up being owned by both that package and python3-libs.
e.g. on my current system:
$ rpm -qf /usr/lib/python3.4/site-packages/__pycache__
python3-six-1.9.0-1.fc22.noarch
python3-setuptools-17.1.1-3.fc22.noarch
python3-libs-3.4.2-6.fc22.x86_64
Per
Fixing this would involve, taking python3-six for example:
before:
%{python3_sitelib}/*
after:
%{python3_sitelib}/*.*
%{python3_sitelib}/__pycache__/*
Putting this in a template might cause problems though, as if the Python package ships modules, each of the module would have to be listed separately.
Should we err on the side of simplicity (and end up with potentially multiple owners of site{lib,arch}/__pycache__ ? I am reviewing two packages where this takes place:
python-line_profiler
python-scandir
Thanks,
--
Michel Alexandre Salim
-- packaging mailing list packaging@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/packaging