Hello all,

I've recently noticed that in some of the python packages I maintain, there are now additionally byte-compiled files that appear to be from pytest:

[swt2c@rawhide-test ~][PROD]$ rpm -ql python3-pytest-xdist | grep PYTEST
/usr/lib/python3.6/site-packages/xdist/__pycache__/_version.cpython-36-PYTEST.pyc
/usr/lib/python3.6/site-packages/xdist/__pycache__/dsession.cpython-36-PYTEST.pyc
/usr/lib/python3.6/site-packages/xdist/__pycache__/looponfail.cpython-36-PYTEST.pyc
/usr/lib/python3.6/site-packages/xdist/__pycache__/newhooks.cpython-36-PYTEST.pyc
/usr/lib/python3.6/site-packages/xdist/__pycache__/plugin.cpython-36-PYTEST.pyc
/usr/lib/python3.6/site-packages/xdist/__pycache__/remote.cpython-36-PYTEST.pyc
/usr/lib/python3.6/site-packages/xdist/__pycache__/report.cpython-36-PYTEST.pyc
/usr/lib/python3.6/site-packages/xdist/__pycache__/slavemanage.cpython-36-PYTEST.pyc
/usr/lib/python3.6/site-packages/xdist/scheduler/__pycache__/each.cpython-36-PYTEST.pyc
/usr/lib/python3.6/site-packages/xdist/scheduler/__pycache__/load.cpython-36-PYTEST.pyc
/usr/lib/python3.6/site-packages/xdist/scheduler/__pycache__/loadscope.cpython-36-PYTEST.pyc

It seems that these files must be generated when running the tests for the package. I have a hunch they might be problematic, though, because they contain the buildroot's path in them:

[swt2c@rawhide-test ~][PROD]$ strings /usr/lib/python3.6/site-packages/xdist/__pycache__/_version.cpython-36-PYTEST.pyc | grep builddir
t/builddir/build/BUILDROOT/python-pytest-xdist-1.20.1-1.fc28.noarch/usr/lib/python3.6/site-packages/xdist/_version.py

What are these special PYTEST byte compiled files? Should they be packaged in the first place? And if so, how can I avoid having the build root path hard-coded in them?

Thanks,
Scott
_______________________________________________
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org

Reply via email to