On 13.9.2018 05:27, Scott Talbert wrote:
On Wed, 12 Sep 2018, Miro Hrončok wrote:Hello. In line withhttps://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2I plan to mass push the following 3 lines on the top of your package spec:I updated my packages to set _python_bytecompile_extra to 0, but for some reason, python-pyqtgraph is still byte-compiling files under /usr/share/doc/python-pyqtgraph-doc/ with Python 3. Is this expected?
I've checked that brp-byte-compile script does recognize your _python_bytecompile_extra value and does not attempt to compile anything outside /usr/lib/python3.7/. It's something different that creates those bytecodes.
During the tests, the __pycache__ directory is created in ./examples/.This is due to examples/test_examples.py being discovered and run by pytest (that's most likely useful).
The examples folder is later copied into /usr/share/doc/python-pyqtgraph-doc/ via %doc as a whole, including all the bytecode. Your package does not only ship regular bytecode, but also pytest bycode:
/usr/share/doc/python-pyqtgraph-doc/examples/__pycache__/test_examples.cpython-37-PYTEST.pycI suggest you do not block the bytecode creation here, but simply remove examples/__pycache__/ (and examples/*/__pycache__/) after pytest invocation in %check.
diff --git a/python-pyqtgraph.spec b/python-pyqtgraph.spec index 4b86cdf..4c195ec 100644 --- a/python-pyqtgraph.spec +++ b/python-pyqtgraph.spec @@ -60,6 +60,9 @@ rm -f doc/build/html/objects.inv %checkxvfb-run -a py.test-%{python3_version} -k "not (test_ImageItem or test_ImageItem_axisorder or test_PlotCurveItem or test_getArrayRegion or test_getArrayRegion_axisorder or test_PolyLineROI)"
+# examples/test_examples.py created bytecode we don't want to ship
+find examples -name __pycache__ -exec rm -r {} +
+
%files -n python3-%{srcname}
%license LICENSE.txt
%doc CHANGELOG README.md
--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
_______________________________________________
python-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/[email protected]
