Can we make it so that the python2 dependency is optional?
Let me comment with my Red Hat python-maint hat on: We should solve this in the next ~half year. AFAIK, pyp2rpm works and many people use it, but those who know the implementation have mostly moved to other projects. Until someone wants to pick it up, we should do minimal maintenance to make sure it continues to work. Removing python2 dependencies is part of that, but it's not a pressing priority for us.
Workaround proposal: we switch to Recommends and block the packages removal in portingdb. That way, powerusers (read: me) can have pyp2rpm RPM installed without python2 cruft, yet nothing changes for average users.
Sounds like it'll be a temporary workaround. But +1 nevertheless.
And we'll see how pyp2rpm behaves exactly without those.
In fact we need to keep it BR'ed for tests so no manual keeps in check-drops will be needed. This is without python2: <mock-chroot> sh-4.4# pyp2rpm -v 1.11.0 six -s -b2 INFO Pyp2rpm initialized. INFO Using /builddir/build/SOURCES as directory to save source. INFO Downloaded package from PyPI: /builddir/build/SOURCES/six-1.11.0.tar.gz. INFO Getting metadata from setup.py using SetupPyMetadataExtractor. INFO Running extract_dist command with: /usr/bin/python2 ERROR Subprocess failed, stdout: , stderr: /bin/sh: /usr/bin/python2: No such file or directory ERROR Could not extract metadata with: /usr/bin/python2 INFO Running extract_dist command with: /usr/bin/python3 ERROR Failed to create virtualenv, skipping virtualenv metadata extraction. /usr/bin/rpmdev-packager: line 109: git: command not found INFO Using name: python-six.spec for specfile. INFO Specfile saved at: /builddir/build/SPECS/python-six.spec. INFO That's all folks! This is with python2 without python2dist(virtualenv-api): <mock-chroot> sh-4.4# pyp2rpm -v 1.11.0 six -s -b2 INFO Pyp2rpm initialized. INFO Using /builddir/build/SOURCES as directory to save source. INFO Downloaded package from PyPI: /builddir/build/SOURCES/six-1.11.0.tar.gz. INFO Getting metadata from setup.py using SetupPyMetadataExtractor. INFO Running extract_dist command with: /usr/bin/python2 /usr/bin/rpmdev-packager: line 109: git: command not found INFO Using name: python-six.spec for specfile. INFO Specfile saved at: /builddir/build/SPECS/python-six.spec. INFO That's all folks! Change: https://src.fedoraproject.org/rpms/pyp2rpm/pull-request/1
Looking at the code, I think pyp2rpm doesn't even need python2-virtualenv-api, it uses python3-virtualenv-api to run python 2 virtual environments. it just needs python2 with setuptools. Running the tests now.
pyp2rpm still drags python2 on build time, but I can live with that for the moment. When it's time to remove python2 we won't keep it around just for pyp2rpm.
pyp2rpm-3.3.2-7.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-c63c09b647
pyp2rpm-3.3.2-7.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-c63c09b647
pyp2rpm-3.3.2-7.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.