python2-rpmUtils/python2-rpmUtils.spec

47 lines
1.2 KiB
RPMSpec

Name: python2-rpmUtils
Version: 0.1
Release: 2%{?dist}
Summary: python rpmUtils
License: GPLv2+
URL: none
Source0: rpmUtils-%{version}.tar.bz2
BuildArch: noarch
%{?python_provide:%python_provide python2-rpmUtils}
BuildRequires: python2-devel
BuildRequires: make
%description
taken from yum with slightly adaptions in Makefile
Needed for eg. repoview, or for checking rpm-versions (taken from
https://stackoverflow.com/questions/3206319/how-do-i-compare-rpm-versions-in-python):
import rpmUtils.miscutils
>>> rpmUtils.miscutils.compareEVR(("foo", "3.7.4", "1"), ("foo", "3.7.4", "1"))
0
>>> rpmUtils.miscutils.compareEVR(("foo", "3.7.4", "1"), ("foo", "3.7.4a", "1"))
-1
>>> rpmUtils.miscutils.compareEVR(("foo", "3.7.4a", "1"), ("foo", "3.7.4", "1"))
1
%prep
%autosetup -n rpmUtils-%{version}
%build
# empty
%install
make DESTDIR=$RPM_BUILD_ROOT install
%files
%{python2_sitelib}/rpmUtils/*
%dir %{python2_sitelib}/rpmUtils/
%changelog
* Thu Dec 05 2024 Jean-Philippe Pialasse <jpp@koozali.org> 0.1-2.sme
- SME 11 import
* Thu Dec 05 2019 josef radinger <cheese@nosuchhost.net> - 0.1-1
- initial version