-
Notifications
You must be signed in to change notification settings - Fork 46
Building RPMs
Georgy Moiseev edited this page Nov 2, 2022
·
4 revisions
Unfortunately, RPM infrastructure is not well-developed for Python packages due to pip
presence.
RPM packages that are required for tarantool
Python module as dependencies are not always present in target system.
So we build them by ourselves.
Modern Fedora systems has all required RPMs except for python3-dataclasses
: backport package for dataclasses in Python 3.6.
Fedora releases comes with in-built Python 3.10, so it is ok to ignore the support of Python 3.6 version of our package:
python3-dataclasses
is compatible only with system Python 3.6 and breaks everything otherwise.
docker run -it -v `pwd`:/output centos:7
yum install -y wget
yum install -y python3 python3-libs python3-pip python3-devel git
yum install -y gcc rpm-build rpm-devel rpmlint make bash coreutils diffutils patch rpmdevtools python-rpm-macros
yum install -y epel-release
yum install -y epel-rpm-macros
wget https://download-ib01.fedoraproject.org/pub/epel/8/Everything/SRPMS/Packages/p/python-dataclasses-0.8-3.el8.src.rpm
rpmbuild --rebuild python-dataclasses-0.8-3.el8.src.rpm
# Failed, remove python3dist(setuptools) build dependency:
# setuptools are already installed, but it requires some
# setuptools EPEL8 RPM for unknown reasons.
vi ~/rpmbuild/SPECS/python-dataclasses.spec
rpmbuild --ba ~/rpmbuild/SPECS/python-dataclasses.spec
cp ~/rpmbuild/SRPMS/python-dataclasses-0.8-3.el7.src.rpm /output
cp ~/rpmbuild/RPMS/noarch/python3-dataclasses-0.8-3.el7.noarch.rpm /output