From a37700f136824cd7ddd68f413d72495418f5ebca Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 26 Jan 2016 09:57:56 -0600 Subject: [PATCH] provide python2-productmd - remove defattr --- python-productmd.spec | 41 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/python-productmd.spec b/python-productmd.spec index 898815b..9cd82b0 100644 --- a/python-productmd.spec +++ b/python-productmd.spec @@ -1,5 +1,8 @@ %global with_python3 1 +# this must go after all 'License:' tags +%{!?_licensedir:%global license %doc} + %if 0%{?fedora} && 0%{?fedora} <= 12 %global with_python3 0 %endif @@ -19,6 +22,12 @@ Group: Development/Tools License: LGPLv2+ URL: https://github.com/release-engineering/productmd Source0: productmd-%{version}.tar.gz + +Obsoletes: productmd <= %{version}-%{release} +Provides: productmd = %{version}-%{release} +Provides: python2-productmd = %{version}-%{release} +Requires: python-six + BuildRequires: python2-devel python-setuptools %if 0%{?with_python3} BuildRequires: python3-devel python3-setuptools @@ -28,26 +37,10 @@ BuildRequires: python-six BuildArch: noarch -# this must go after all 'License:' tags -%{!?_licensedir:%global license %doc} - %description Python library providing parsers for metadata related to composes and installation media. -%package -n python2-productmd -Summary: Library providing parsers for metadata related to OS installation -Group: Development/Tools -Obsoletes: python-productmd <= %{version}-%{release} -Provides: python-productmd = %{version}-%{release} -Obsoletes: productmd <= %{version}-%{release} -Provides: productmd = %{version}-%{release} -Requires: python-six - -%description -n python2-productmd -Python library providing parsers for metadata related to composes -and installation media. - %if 0%{?with_python3} %package -n python3-productmd Summary: Library providing parsers for metadata related to OS installation @@ -79,16 +72,16 @@ popd %endif %install +pushd python2 +%{__python2} setup.py install --skip-build --root $RPM_BUILD_ROOT +popd + %if 0%{?with_python3} pushd python3 %{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT popd %endif -pushd python2 -%{__python2} setup.py install --skip-build --root $RPM_BUILD_ROOT -popd - %check pushd python2 %{__python2} ./setup.py test @@ -100,8 +93,7 @@ pushd python3 popd %endif -%files -n python2-productmd -%defattr(-,root,root,-) +%files %license LICENSE %doc AUTHORS %{python_sitelib}/productmd/ @@ -117,9 +109,12 @@ popd %endif %changelog +* Tue Jan 26 2016 Dennis Gilmore - 1.0-10 +- provide python2-productmd +- remove defattr + * Fri Dec 11 2015 Daniel Mach - 1.0-9 - Use v1.0 tarball from github -- Rename python-productmd to python2-productmd - Fix spec for el6 (license macro) - Add dependency on python(3)-six