base library for fedpkg provides common functionality for dist-git setups
  • Python 98.6%
  • Shell 1.2%
  • Dockerfile 0.2%
Find a file
Ondřej Nosek 9812e51b2b Links to a new documentation at Readthedocs.io
Signed-off-by: Ondřej Nosek <onosek@redhat.com>
2026-06-22 22:38:36 +02:00
bin Fix remaining Python3 SafeConfigParser warnings 2021-07-06 17:31:58 +02:00
doc Links to a new documentation at Readthedocs.io 2026-06-22 22:38:36 +02:00
etc Added 'remote' to rpkg from rhpkg 2021-07-23 18:26:17 +02:00
pyrpkg Fix SRPM import for files with a backslash in the name 2026-05-28 15:43:34 +02:00
requirements type: fix typo in requirements README. 2025-07-18 21:22:23 +02:00
tests Remove deprecated 'clean --dry-run' argument 2026-04-29 05:47:57 +02:00
.gitignore Added 'x-pkg verrel' for containers 2021-08-09 18:13:42 +00:00
.readthedocs.yaml Web documentation at Readthedocs.io 2026-06-22 05:15:37 +02:00
CHANGELOG.rst Links to a new documentation at Readthedocs.io 2026-06-22 22:38:36 +02:00
CONTRIBUTING.md Post-migration steps 2026-06-10 02:35:42 +02:00
COPYING License replaced with official GPL 2.0 license from gnu.org 2014-08-15 10:23:19 +02:00
COPYING-koji Fix up things found during package review 2011-06-16 03:55:27 -07:00
git-changelog git-changelog: Fix running on Python 3 2019-07-12 13:05:47 +02:00
jenkins_test.dockerfile Use ruff code checker instead of bandit 2025-11-26 00:14:33 +01:00
jenkins_test_py2.dockerfile Jenkins unittests run in docker container 2021-04-20 21:48:27 +02:00
Jenkinsfile Post-migration steps 2026-06-10 02:35:42 +02:00
LGPL Fix up things found during package review 2011-06-16 03:55:27 -07:00
Makefile Enable flatpak tests that require libmodulemd 2021-04-28 08:46:04 +00:00
MANIFEST.in Pytest update and MANIFEST.in prune 2020-09-03 02:48:09 +02:00
pyproject.toml Post-migration steps 2026-06-10 02:35:42 +02:00
README.rst Links to a new documentation at Readthedocs.io 2026-06-22 22:38:36 +02:00
setup.cfg Switch to %pyproject_* macros 2025-06-25 05:01:24 +02:00
setup.py Post-migration steps 2026-06-10 02:35:42 +02:00
tox.ini Use ruff code checker instead of bandit 2025-11-26 00:14:33 +01:00

Introduction
============

This is the rpkg project, which mostly is a python library for dealing with
rpm packaging in a git source control.  pyrpkg is the base library that sites
can subclass to create useful tools.

rpkg works with Python 2.7, 3.6, 3.9, 3.12 and 3.13.

License
=======

Unless otherwise specified, all files are licensed under GPLv2+.

Installation
============

Install from distribution packages
----------------------------------

rpkg is available in Fedora and EPEL repositories. It can be installed with
package manager command. There is Python 3 package for Fedora and EPEL8;
and Python 2 package in EPEL7.

Install in a Fedora system::

    sudo dnf install python3-rpkg

Install in EPEL7::

    sudo yum install python2-rpkg

Install in EPEL8::

    sudo dnf install python3-rpkg

Install in a Python virtual environment
---------------------------------------

Both Python 2 and 3 packages are published in PyPI. Install rpkg in a Python 3
virtual environment in these steps::

    python3 -m venv .env
    source .env/bin/activate
    pip install rpkg rpm-py-installer

You are free to create a virtual environment with option ``--system-site-packages``.

Please note that, rpkg depends on some other utilities to build packages. These
packages are required to be installed as well.

* ``mock``: for local mockbuild.
* ``rpm-build``:  for local RPM build, which provides the command line ``rpm``.
* ``rpmlint``: check SPEC.
* ``copr-cli``: for building package in `Fedora Copr`_.
* ``module-build-service``: for building modules.

.. _`Fedora Copr`: https://copr.fedorainfracloud.org/

Contribution
============

You are welcome to write patches to fix or improve rpkg. All code should work
with Python 2.7, and 3. Before you create a PR to propose your changes,
make sure

Sign-off commit
---------------

Make sure to sign-off your commits by ``git commit -s``. This serves as a
confirmation that you have the right to submit your changes. See `Developer
Certificate of Origin`_ for details.

.. _Developer Certificate of Origin: https://developercertificate.org/

Run Tests
---------

Before make a pull request, ensure local changes pass all test cases.

Before run tests, install these packages::

    sudo dnf install python27 python36 python39 git make gcc rpm-build \
    rpm-devel libcurl-devel krb5-devel openssl-devel python3-devel

To run tests simply, ``make test``.

By default, target ``test`` runs tests with all supported Python versions.
However, if you look into ``Makefile``, there is still a target ``tox`` that
allows developer to run tests with test environments one by one.

Links
=====

* Documentation: https://rpkg.readthedocs.io/
* Upstream GIT: https://forge.fedoraproject.org/packaging/rpkg
* Issue tracker: https://forge.fedoraproject.org/packaging/rpkg/issues