rpmbuild question, python3-graphviz example

Issues related to applications and software problems and general support
Post Reply
mathog
Posts: 258
Joined: 2008/07/09 23:52:06

rpmbuild question, python3-graphviz example

Post by mathog » 2020/04/07 22:58:57

Our CentOS 7 systems have an RPM package graphviz-python-2.30.1-21.el7.x86_64 but there seems to be no CentOS 8 equivalent. Fedora has one with a vaguely similar name but it does not build as is, oddly demanding to also build a python2 version. Using the method shown below I eventually built and installed just the python3 version. Is there a way to do this with just some command line option at the first rpmbuild, something logically equivalent to

rpmbuild --rebuld --python3-only package.src.rpm

?

This was the long way used to build python3-graphviz, which, in the end, seems to be a different package altogether.

Code: Select all

#find src.rpm here:
#  https://rpmfind.net/linux/RPM/fedora/updates/31/x86_64/Packages/p/python3-graphviz-0.13.2-1.fc31.1.noarch.html
wget https://download.fedoraproject.org/pub/fedora/linux/updates/31/Everything/SRPMS/Packages/p/python-graphviz-0.13.2-1.fc31.1.src.rpm
rpmbuild --rebuild python-graphviz-0.13.2-1.fc31.1.src.rpm
Installing python-graphviz-0.13.2-1.fc31.1.src.rpm
warning: python-graphviz-0.13.2-1.fc31.1.src.rpm: Header V3 RSA/SHA256 Signature, key ID 3c3359c4: NOKEY
warning: user mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
error: Failed build dependencies:
	python2-devel is needed by python-graphviz-1:0.13.2-1.el8.1.noarch
	python2dist(mock) >= 2 is needed by python-graphviz-1:0.13.2-1.el8.1.noarch
	python2dist(pytest) >= 3.3 is needed by python-graphviz-1:0.13.2-1.el8.1.noarch
	python2dist(pytest-cov) is needed by python-graphviz-1:0.13.2-1.el8.1.noarch
	python2dist(pytest-mock) is needed by python-graphviz-1:0.13.2-1.el8.1.noarch
	python3dist(mock) >= 2 is needed by python-graphviz-1:0.13.2-1.el8.1.noarch
	python3dist(pytest) >= 3.3 is needed by python-graphviz-1:0.13.2-1.el8.1.noarch
	python3dist(pytest-cov) is needed by python-graphviz-1:0.13.2-1.el8.1.noarch
	python3dist(pytest-mock) is needed by python-graphviz-1:0.13.2-1.el8.1.noarch
	python3dist(sphinx) is needed by python-graphviz-1:0.13.2-1.el8.1.noarch
	python3dist(sphinx-rtd-theme) is needed by python-graphviz-1:0.13.2-1.el8.1.noarch
#eliminate all the python3 warnins with:
dnf install python3-pytest-cov python3-pytest-mock
dnf install python3-sphinx
rpmbuild --rebuild python-graphviz-0.13.2-1.fc31.1.src.rpm
Installing python-graphviz-0.13.2-1.fc31.1.src.rpm
warning: python-graphviz-0.13.2-1.fc31.1.src.rpm: Header V3 RSA/SHA256 Signature, key ID 3c3359c4: NOKEY
warning: user mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
error: Failed build dependencies:
	python2-devel is needed by python-graphviz-1:0.13.2-1.el8.1.noarch
	python2dist(mock) >= 2 is needed by python-graphviz-1:0.13.2-1.el8.1.noarch
	python2dist(pytest) >= 3.3 is needed by python-graphviz-1:0.13.2-1.el8.1.noarch
	python2dist(pytest-cov) is needed by python-graphviz-1:0.13.2-1.el8.1.noarch
	python2dist(pytest-mock) is needed by python-graphviz-1:0.13.2-1.el8.1.noarch
# fix the spec file not to use python2
cd /root/rpmbuild/SPECS
nano python-graphviz.spec
#comment out all the python2 pieces
rpmbuild --bs python-graphviz.spec
mv /root/rpmbuild/SRPMS/python-graphviz-0.13.2-1.el8.1.src.rpm /tmp
cd /tmp
rpmbuild --rebuild python-graphviz-0.13.2-1.el8.1.src.rpm 
#worked
dnf install /root/rpmbuild/RPMS/noarch/python3-graphviz-0.13.2-1.el8.1.noarch.rpm
Also, these do not appear to be the same packages. Their contents are:

Code: Select all

#CentOS 7
rpm -q --filesbypkg graphviz-python
graphviz-python           /usr/lib64/graphviz/python/_gv.so
graphviz-python           /usr/lib64/graphviz/python/gv.py
graphviz-python           /usr/lib64/graphviz/python/gv.pyc
graphviz-python           /usr/lib64/graphviz/python/gv.pyo
graphviz-python           /usr/lib64/graphviz/python/libgv_python.so
graphviz-python           /usr/lib64/python2.7/site-packages
graphviz-python           /usr/lib64/python2.7/site-packages/_gv.so
graphviz-python           /usr/lib64/python2.7/site-packages/gv.py
graphviz-python           /usr/share/man/man3/gv.3python.gz

#CentOS 8
rpm -q --filesbypkg python3-graphviz
python3-graphviz          /usr/lib/python3.6/site-packages/graphviz
python3-graphviz          /usr/lib/python3.6/site-packages/graphviz-0.13.2-py3.6.egg-info
python3-graphviz          /usr/lib/python3.6/site-packages/graphviz-0.13.2-py3.6.egg-info/PKG-INFO
python3-graphviz          /usr/lib/python3.6/site-packages/graphviz-0.13.2-py3.6.egg-info/SOURCES.txt
python3-graphviz          /usr/lib/python3.6/site-packages/graphviz-0.13.2-py3.6.egg-info/dependency_links.txt
python3-graphviz          /usr/lib/python3.6/site-packages/graphviz-0.13.2-py3.6.egg-info/requires.txt
python3-graphviz          /usr/lib/python3.6/site-packages/graphviz-0.13.2-py3.6.egg-info/top_level.txt
python3-graphviz          /usr/lib/python3.6/site-packages/graphviz/__init__.py
python3-graphviz          /usr/lib/python3.6/site-packages/graphviz/__pycache__
python3-graphviz          /usr/lib/python3.6/site-packages/graphviz/__pycache__/__init__.cpython-36.opt-1.pyc
python3-graphviz          /usr/lib/python3.6/site-packages/graphviz/__pycache__/__init__.cpython-36.pyc
python3-graphviz          /usr/lib/python3.6/site-packages/graphviz/__pycache__/_compat.cpython-36.opt-1.pyc
python3-graphviz          /usr/lib/python3.6/site-packages/graphviz/__pycache__/_compat.cpython-36.pyc
python3-graphviz          /usr/lib/python3.6/site-packages/graphviz/__pycache__/backend.cpython-36.opt-1.pyc
python3-graphviz          /usr/lib/python3.6/site-packages/graphviz/__pycache__/backend.cpython-36.pyc
python3-graphviz          /usr/lib/python3.6/site-packages/graphviz/__pycache__/dot.cpython-36.opt-1.pyc
python3-graphviz          /usr/lib/python3.6/site-packages/graphviz/__pycache__/dot.cpython-36.pyc
python3-graphviz          /usr/lib/python3.6/site-packages/graphviz/__pycache__/files.cpython-36.opt-1.pyc
python3-graphviz          /usr/lib/python3.6/site-packages/graphviz/__pycache__/files.cpython-36.pyc
python3-graphviz          /usr/lib/python3.6/site-packages/graphviz/__pycache__/lang.cpython-36.opt-1.pyc
python3-graphviz          /usr/lib/python3.6/site-packages/graphviz/__pycache__/lang.cpython-36.pyc
python3-graphviz          /usr/lib/python3.6/site-packages/graphviz/__pycache__/tools.cpython-36.opt-1.pyc
python3-graphviz          /usr/lib/python3.6/site-packages/graphviz/__pycache__/tools.cpython-36.pyc
python3-graphviz          /usr/lib/python3.6/site-packages/graphviz/_compat.py
python3-graphviz          /usr/lib/python3.6/site-packages/graphviz/backend.py
python3-graphviz          /usr/lib/python3.6/site-packages/graphviz/dot.py
python3-graphviz          /usr/lib/python3.6/site-packages/graphviz/files.py
python3-graphviz          /usr/lib/python3.6/site-packages/graphviz/lang.py
python3-graphviz          /usr/lib/python3.6/site-packages/graphviz/tools.py
python3-graphviz          /usr/share/doc/python3-graphviz
python3-graphviz          /usr/share/doc/python3-graphviz/README.rst
python3-graphviz          /usr/share/licenses/python3-graphviz
python3-graphviz          /usr/share/licenses/python3-graphviz/LICENSE.txt
dnf provides \*gv.pyc
Last metadata expiration check: 0:52:26 ago on Tue 07 Apr 2020 02:46:35 PM PDT.
Error: No Matches found

Post Reply