When I was reviewing packages for https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2 I've realized that copr-frontend has the following line in spec: %py_byte_compile %{__python3} %{buildroot}%{_datadir}/copr/coprs_frontend/coprs Yet it ships various other bytecode in: /usr/share/copr/coprs_frontend/__pycache__ /usr/share/copr/coprs_frontend/alembic/fedora/__pycache__ /usr/share/copr/coprs_frontend/alembic/fedora/versions/__pycache__ /usr/share/copr/coprs_frontend/alembic/schema/__pycache__ /usr/share/copr/coprs_frontend/alembic/schema/versions/__pycache__ /usr/share/copr/coprs_frontend/run/__pycache__ /usr/share/copr/coprs_frontend/tests/__pycache__ /usr/share/copr/coprs_frontend/tests/test_api/__pycache__ /usr/share/copr/coprs_frontend/tests/test_logic/__pycache__ /usr/share/copr/coprs_frontend/tests/test_views/test_admin/__pycache__ /usr/share/copr/coprs_frontend/tests/test_views/test_api_ns/__pycache__ /usr/share/copr/coprs_frontend/tests/test_views/test_backend_ns/__pycache__ /usr/share/copr/coprs_frontend/tests/test_views/test_coprs_ns/__pycache__ /usr/share/copr/coprs_frontend/tests/test_views/test_groups_ns/__pycache__ If shipping in there is desired, please call: %py_byte_compile %{__python3} %{buildroot}%{_datadir}/copr/coprs_frontend I **will not** add explicit `%global _python_bytecompile_extra 1` to copr-frontend.spec, consider this the head up of that. If that's fine, close this as NOTABUG.
(In reply to Miro Hrončok from comment #0) > copr-frontend has the following line in spec: > %py_byte_compile %{__python3} > %{buildroot}%{_datadir}/copr/coprs_frontend/coprs That's correct. > Yet it ships various other bytecode in: > > /usr/share/copr/coprs_frontend/__pycache__ > /usr/share/copr/coprs_frontend/alembic/fedora/__pycache__ > /usr/share/copr/coprs_frontend/alembic/fedora/versions/__pycache__ > /usr/share/copr/coprs_frontend/alembic/schema/__pycache__ > /usr/share/copr/coprs_frontend/alembic/schema/versions/__pycache__ Alembic should be byte compiled. > /usr/share/copr/coprs_frontend/run/__pycache__ NOTABUG, though I'm not sure why the __init__.py is there. > /usr/share/copr/coprs_frontend/tests/__pycache__ > /usr/share/copr/coprs_frontend/tests/test_api/__pycache__ > /usr/share/copr/coprs_frontend/tests/test_logic/__pycache__ > /usr/share/copr/coprs_frontend/tests/test_views/test_admin/__pycache__ > /usr/share/copr/coprs_frontend/tests/test_views/test_api_ns/__pycache__ > /usr/share/copr/coprs_frontend/tests/test_views/test_backend_ns/__pycache__ > /usr/share/copr/coprs_frontend/tests/test_views/test_coprs_ns/__pycache__ > /usr/share/copr/coprs_frontend/tests/test_views/test_groups_ns/__pycache__ This IMO should be byte compiled, but I filled additional bug for this: https://pagure.io/copr/copr/issue/388 Btw., ./run_tests* use `python -B` (I don't really understand why), but users could happen to run the testsuite without `-B` which means that we should treat test cases as any other python importable files. > If shipping in there is desired, please call: > > %py_byte_compile %{__python3} %{buildroot}%{_datadir}/copr/coprs_frontend This seems to be wise, but we are not able to blacklist the 'run' subdirectory. Could we please add blacklisting support into %py_byte_compile? > I **will not** add explicit `%global _python_bytecompile_extra 1` to > copr-frontend.spec, consider this the head up of that. If that's fine, close > this as NOTABUG. Thanks for the headsup.
https://pagure.io/copr/copr/pull-request/389
Blacklisting support would make the macro very complex. Repeat the call for various dirs for now please.
I believe all issues have been addressed. Thanks for the report!