Package Python 3 RPMs
You can install Python packages on your system by using the DNF package manager. DNF uses the RPM package format, which offers more downstream control over the software.
Packaging a Python project into an RPM package provides the following advantages compared to native Python packages:
- Dependencies on Python and non-Python packages are possible and strictly enforced by the DNF package manager.
- You can cryptographically sign the packages. With cryptographic signing, you can verify, integrate, and test contents of RPM packages with the rest of the operating system.
- You can run tests during the build process.
The packaging format of native Python packages follows the specifications published by the Python Packaging Authority (PyPA). Historically, most Python projects used the distutils or setuptools utilities for packaging and defined package information in the setup.py file. However, options for creating native Python packages have evolved over time:
To package Python software, whether the project uses setup.py or pyproject.toml, use pyproject RPM macros from the pyproject-rpm-macros package.