rpkg gets RPM package metadata from SPEC file via both rpm python binding and rpm command. There are duplicate code handling successful rpm command execution or the potential failure. All the code to get RPM package metadata are mixed in individual methods. It must be nice to move them into a separate dedicated place with exposing easy-to-call APIs.
Usage:
Commands._get_build_arches_from_spec
Commands.clog
name
version
release
epoch
Commands.load_nameverrel
The final solution should be easy to use and easy to get package metadata, like:
spec = RPMSpec('/path/to/spec') print(spec.name) print(spec.version) print(spec.release) print(spec.epoch) print(spec.arches) print(spec.changelogs)
In addition, another big benefit is not to depend on rpm-py-installer any more and hack requires in the egginfo.
rpm-py-installer
requires
Metadata Update from @cqi: - Issue tagged with: refactor
Metadata Update from @cqi: - Issue assigned to cqi