I'm building python3.11-setuptools_scm-epel in epel8-next. It requires mercurial for the tests which requires:
/usr/bin/python2 libpython2.7.so.1.0()(64bit) python(abi) = 2.7 python2
On my CS8 system this is satisfied by python2-2.7.18-12.module_el8+299+aa6e9afa.x86_64 from the python27 module.
In the epel8-next build I end up with:
python2 x86_64 2.7.17-1.el8 python2-for-tests x86_64 2.7.17-1.el8 python2-libs x86_64 2.7.17-1.el8
despite this message:
DEBUG util.py:445: Enabling module streams: DEBUG util.py:445: mercurial 4.8
DEBUG util.py:445: python27 2.7
Which then emits a complaint when run:
ERROR: Python 2 is disabled in RHEL8. - For guidance on porting to Python 3, see the Conservative Python3 Porting Guide: http://portingguide.readthedocs.io/ - If you need Python 2 at runtime: - Use the python27 module - If you do not have access to BZ#1533919: - Use the python27 module - If you need to use Python 2 only at RPM build time: - File a bug blocking BZ#1533919: https://bugzilla.redhat.com/show_bug.cgi?id=1533919 - Set the environment variable RHEL_ALLOW_PYTHON2_FOR_BUILD=1 (Note that if you do not file the bug as above, this workaround will break without warning in the future.) - If you need to use Python 2 only for tests: - File a bug blocking BZ#1533919: https://bugzilla.redhat.com/show_bug.cgi?id=1533919 (If your test tool does not have a Bugzilla component, feel free to use `python2`.) - Use /usr/bin/python2-for-tests instead of python2 to run your tests. (Note that if you do not file the bug as above, this workaround will break without warning in the future.) For details, see https://hurl.corp.redhat.com/rhel8-py2 Fatal Python error: Python 2 is disabled
I can work around it by defining RHEL_ALLOW_PYTHON2_FOR_BUILD=1, but it seems like we really should be pulling in python2 from the module?