Description of problem: As seen in bug 1654126, if an application uses setuptools entrypoints and properly declares a dependency on dbus-python, then it fails to run when dbus-python is installed via RPM. The dbus-python package isn't picked up due to missing the egg metadata.
How reproducible: 100%
Steps to Reproduce: See bug 1654126
Actual results: setuptools entrypoints cannot locate dbus-python when installed via RPM.
Expected results: setuptools entrypoints can locate dbus-python when installed via RPM.
Additional info: We will workaround for now in subscription-manager by removing dbus-python from requires.txt manually, but it seems prudent to fix this anyways.
The bug is also present in RHEL 7.
This was fixed in Fedora Rawhide 3 months ago: https://src.fedoraproject.org/rpms/dbus-python/c/7505b46ea4a52d8ac5cdee35c4725cc5bd808aba?branch=f30
This packaging bug is making it hard for users to install packages from PyPi that require dbus-python because pip3 does cannot recognize that the python3-dbus package provides dbus-python. Therefore it tries to compile it from source making things unnecessary complicated:
pip3 install nmstate
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Using cached https://files.pythonhosted.org/packages/7d/ce/a2d877e16ec7b1cc299f38a03e8546f6b5a521e18bbcc7b86ad31820375b/nmstate-0.0.6.tar.gz
Collecting dbus-python (from nmstate)
Using cached https://files.pythonhosted.org/packages/3f/e7/4edb582d1ffd5ac3c84188deea32e960b5c8c0fe1da56ce70224f85ce542/dbus-python-1.2.8.tar.gz
Requirement already satisfied: jsonschema in /usr/lib/python3.6/site-packages (from nmstate)
Requirement already satisfied: PyGObject in /usr/lib64/python3.6/site-packages (from nmstate)
Requirement already satisfied: PyYAML in /usr/lib64/python3.6/site-packages (from nmstate)
Requirement already satisfied: setuptools in /usr/lib/python3.6/site-packages (from nmstate)
Requirement already satisfied: six in /usr/lib/python3.6/site-packages (from nmstate)
Installing collected packages: dbus-python, nmstate
Running setup.py install for dbus-python ... error
Complete output from command /usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-dg0heacj/dbus-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-7wrw0qrs-record/install-record.txt --single-version-externally-managed --compile:
checking whether make supports nested variables... no
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/tmp/pip-build-dg0heacj/dbus-python/build/temp.linux-x86_64-3.6':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
Traceback (most recent call last):
File "<string>", line 1, in <module>
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/tmp/pip-build-dg0heacj/dbus-python/configure', '--disable-maintainer-mode', 'PYTHON=/usr/bin/python3.6', '--prefix=/tmp/pip-build-dg0heacj/dbus-python/build/temp.linux-x86_64-3.6/prefix']' returned non-zero exit status 1.
*** Bug 1717400 has been marked as a duplicate of this bug. ***
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.