From 27f5183b26a9061b2961fbbf7870781d682f4498 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Fri, 11 Dec 2015 07:24:00 -0500 Subject: [PATCH 1/2] Use v1.0 tarball from github. --- .gitignore | 1 + python-productmd.spec | 46 ++++++++++++++++++++++++++++++++----------- sources | 2 +- 3 files changed, 36 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index a870ac8..79639ff 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /productmd-1.0.tar.bz2 +/productmd-1.0.tar.gz diff --git a/python-productmd.spec b/python-productmd.spec index 7941c72..898815b 100644 --- a/python-productmd.spec +++ b/python-productmd.spec @@ -1,25 +1,24 @@ -%if 0%{?fedora} > 12 %global with_python3 1 -%else + +%if 0%{?fedora} && 0%{?fedora} <= 12 +%global with_python3 0 +%endif + %if 0%{?rhel} && 0%{?rhel} <= 7 %{!?__python2: %global __python2 /usr/bin/python2} %{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} -%else -%global with_python3 1 -%endif +%global with_python3 0 %endif Name: python-productmd Version: 1.0 -Release: 8%{?dist}.git3b72969 +Release: 9%{?dist} Summary: Library providing parsers for metadata related to OS installation Group: Development/Tools License: LGPLv2+ URL: https://github.com/release-engineering/productmd -#tarball made by running python2 setup.py sdist in the checkout -#commit has used: 3b72969cca33021954ee61746c9ba5b3e3d47dd9 -Source0: productmd-%{version}.tar.bz2 +Source0: productmd-%{version}.tar.gz BuildRequires: python2-devel python-setuptools %if 0%{?with_python3} BuildRequires: python3-devel python3-setuptools @@ -29,14 +28,31 @@ 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 Group: Development/Tools +Requires: python3-six %description -n python3-productmd Python library providing parsers for metadata related to composes @@ -84,10 +100,10 @@ pushd python3 popd %endif -%files +%files -n python2-productmd %defattr(-,root,root,-) %license LICENSE -%doc AUTHORS +%doc AUTHORS %{python_sitelib}/productmd/ %{python_sitelib}/productmd-%{version}-py?.?.egg-info @@ -95,12 +111,18 @@ popd %if 0%{?with_python3} %files -n python3-productmd %license LICENSE -%doc AUTHORS +%doc AUTHORS %{python3_sitelib}/productmd/ %{python3_sitelib}/productmd-%{version}-py?.?.egg-info %endif %changelog +* 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 + * Wed Dec 09 2015 Dennis Gilmore - 1.0-8.git3b72969 - enable building only on python 2 on epel diff --git a/sources b/sources index 0e49620..92b88ea 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c0bcc12eae91e68efb0f9bb57bb55439 productmd-1.0.tar.bz2 +e46907ebeb70c2d96f4c2beca5f65850 productmd-1.0.tar.gz From a37700f136824cd7ddd68f413d72495418f5ebca Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 26 Jan 2016 09:57:56 -0600 Subject: [PATCH 2/2] 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