Introduction¶
rpkg2 is a project forked from rpkg to introduce various major improvements and refactor in order to:
- Modern modularization.
- A real library for import from other projects to operate package repository or access package metadata.
- Extensible for writing package client tool.
- A framework to write subcommands in a decoupled way to build artifacts, including RPMs, modules, or containers.
- Remove all deprecation and technical debt.
- Python 3 default apparently.
Usage Examples¶
Retrieve package repository information:
from pyrpkg.pkgrepo import PackageRepository
repo = PackageRepository('/path/to/package')
print(repo.branch_merge)
print(repo.branch_remote)
print(repo.push_url)
print(repo.commit_hash)
Retrieve package metadata:
from pyrpkg.pkgrepo import PackageRepository
from pyrpkg.pkginfo import PackageMetadata
repo = PackageRepository('/path/to/package')
pkg = PackageMetadata(repo)
print(pkg.ns)
print(pkg.ns_repo_name)
print(pkg.disttag)
print(pkg.spec)
License¶
Unless otherwise specified, all files are licensed under GPLv2+. There are parts of koji code in pyrpkg/cli, those parts are licensed under LGPLv2(.1).
Contribution¶
You are welcome to write patches to fix or improve rpkg. All code should work with Python 2.6, 2.7, and 3. Before you create a PR to propose your changes, 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. - pass all test cases by running
detox
ortox
in a Python virtual environment.
More Information¶
See https://pagure.io/rpkg2 for more information, bug tracking, etc.