2015-12-10 02:33:36 +00:00
|
|
|
%global with_python3 1
|
2015-12-11 12:24:00 +00:00
|
|
|
|
2016-01-26 15:57:56 +00:00
|
|
|
# this must go after all 'License:' tags
|
|
|
|
%{!?_licensedir:%global license %doc}
|
|
|
|
|
2015-12-11 12:24:00 +00:00
|
|
|
%if 0%{?fedora} && 0%{?fedora} <= 12
|
|
|
|
%global with_python3 0
|
|
|
|
%endif
|
|
|
|
|
2015-12-10 02:33:36 +00:00
|
|
|
%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())")}
|
2015-12-11 12:24:00 +00:00
|
|
|
%global with_python3 0
|
2015-12-10 02:33:36 +00:00
|
|
|
%endif
|
|
|
|
|
2015-03-13 19:24:22 +00:00
|
|
|
Name: python-productmd
|
|
|
|
Version: 1.0
|
2016-02-04 20:32:09 +00:00
|
|
|
Release: 10%{?dist}
|
2015-03-13 19:24:22 +00:00
|
|
|
Summary: Library providing parsers for metadata related to OS installation
|
|
|
|
|
|
|
|
Group: Development/Tools
|
|
|
|
License: LGPLv2+
|
|
|
|
URL: https://github.com/release-engineering/productmd
|
2015-12-11 12:24:00 +00:00
|
|
|
Source0: productmd-%{version}.tar.gz
|
2016-01-26 15:57:56 +00:00
|
|
|
|
|
|
|
Obsoletes: productmd <= %{version}-%{release}
|
|
|
|
Provides: productmd = %{version}-%{release}
|
|
|
|
Provides: python2-productmd = %{version}-%{release}
|
|
|
|
Requires: python-six
|
|
|
|
|
2015-03-13 19:24:22 +00:00
|
|
|
BuildRequires: python2-devel python-setuptools
|
2015-12-10 02:33:36 +00:00
|
|
|
%if 0%{?with_python3}
|
2015-03-13 19:24:22 +00:00
|
|
|
BuildRequires: python3-devel python3-setuptools
|
2015-12-10 02:33:36 +00:00
|
|
|
BuildRequires: python3-six
|
|
|
|
%endif
|
|
|
|
BuildRequires: python-six
|
2015-03-13 19:24:22 +00:00
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description
|
|
|
|
Python library providing parsers for metadata related to composes
|
|
|
|
and installation media.
|
|
|
|
|
2015-12-10 02:33:36 +00:00
|
|
|
%if 0%{?with_python3}
|
2015-03-13 19:24:22 +00:00
|
|
|
%package -n python3-productmd
|
|
|
|
Summary: Library providing parsers for metadata related to OS installation
|
|
|
|
Group: Development/Tools
|
2015-12-11 12:24:00 +00:00
|
|
|
Requires: python3-six
|
2015-03-13 19:24:22 +00:00
|
|
|
|
|
|
|
%description -n python3-productmd
|
|
|
|
Python library providing parsers for metadata related to composes
|
|
|
|
and installation media.
|
2015-12-10 02:33:36 +00:00
|
|
|
%endif
|
2015-03-13 19:24:22 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -qc -n productmd-%{version}
|
|
|
|
mv productmd-%{version} python2
|
|
|
|
|
|
|
|
cp -a python2 python3
|
|
|
|
cp python2/LICENSE .
|
|
|
|
cp python2/AUTHORS .
|
|
|
|
|
|
|
|
%build
|
|
|
|
pushd python2
|
|
|
|
CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py build
|
|
|
|
popd
|
|
|
|
|
2015-12-10 02:33:36 +00:00
|
|
|
%if 0%{?with_python3}
|
2015-03-13 19:24:22 +00:00
|
|
|
pushd python3
|
|
|
|
CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
|
|
|
|
popd
|
2015-12-10 02:33:36 +00:00
|
|
|
%endif
|
2015-03-13 19:24:22 +00:00
|
|
|
|
|
|
|
%install
|
2016-01-26 15:57:56 +00:00
|
|
|
pushd python2
|
|
|
|
%{__python2} setup.py install --skip-build --root $RPM_BUILD_ROOT
|
|
|
|
popd
|
|
|
|
|
2015-12-10 02:33:36 +00:00
|
|
|
%if 0%{?with_python3}
|
2015-03-13 19:24:22 +00:00
|
|
|
pushd python3
|
|
|
|
%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
|
|
|
|
popd
|
2015-12-10 02:33:36 +00:00
|
|
|
%endif
|
2015-03-13 19:24:22 +00:00
|
|
|
|
|
|
|
%check
|
|
|
|
pushd python2
|
|
|
|
%{__python2} ./setup.py test
|
|
|
|
popd
|
|
|
|
|
2015-12-10 02:33:36 +00:00
|
|
|
%if 0%{?with_python3}
|
2015-03-13 19:24:22 +00:00
|
|
|
pushd python3
|
|
|
|
%{__python3} ./setup.py test
|
|
|
|
popd
|
2015-12-10 02:33:36 +00:00
|
|
|
%endif
|
2015-03-13 19:24:22 +00:00
|
|
|
|
2016-01-26 15:57:56 +00:00
|
|
|
%files
|
2015-03-13 19:24:22 +00:00
|
|
|
%license LICENSE
|
2015-12-11 12:24:00 +00:00
|
|
|
%doc AUTHORS
|
2015-03-13 19:24:22 +00:00
|
|
|
%{python_sitelib}/productmd/
|
|
|
|
%{python_sitelib}/productmd-%{version}-py?.?.egg-info
|
|
|
|
|
|
|
|
|
2015-12-10 02:33:36 +00:00
|
|
|
%if 0%{?with_python3}
|
2015-03-13 19:24:22 +00:00
|
|
|
%files -n python3-productmd
|
|
|
|
%license LICENSE
|
2015-12-11 12:24:00 +00:00
|
|
|
%doc AUTHORS
|
2015-03-13 19:24:22 +00:00
|
|
|
%{python3_sitelib}/productmd/
|
|
|
|
%{python3_sitelib}/productmd-%{version}-py?.?.egg-info
|
2015-12-10 02:33:36 +00:00
|
|
|
%endif
|
2015-03-13 19:24:22 +00:00
|
|
|
|
|
|
|
%changelog
|
2016-02-04 20:32:09 +00:00
|
|
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-10
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
|
|
2016-01-26 15:57:56 +00:00
|
|
|
* Tue Jan 26 2016 Dennis Gilmore <dennis@ausil.us> - 1.0-10
|
|
|
|
- provide python2-productmd
|
|
|
|
- remove defattr
|
|
|
|
|
2015-12-11 12:24:00 +00:00
|
|
|
* Fri Dec 11 2015 Daniel Mach <dmach@redhat.com> - 1.0-9
|
|
|
|
- Use v1.0 tarball from github
|
|
|
|
- Fix spec for el6 (license macro)
|
|
|
|
- Add dependency on python(3)-six
|
|
|
|
|
2015-12-10 02:33:36 +00:00
|
|
|
* Wed Dec 09 2015 Dennis Gilmore <dennis@ausil.us> - 1.0-8.git3b72969
|
|
|
|
- enable building only on python 2 on epel
|
|
|
|
|
2015-11-10 16:44:46 +00:00
|
|
|
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-7.git3b72969
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
|
|
|
|
|
2015-11-03 19:39:16 +00:00
|
|
|
* Tue Nov 03 2015 Dennis Gilmore <dennis@ausil.us> - 1.0-6.git3b72969
|
|
|
|
- update git snapshot
|
|
|
|
- rebuild for python-3.5
|
|
|
|
|
2015-06-18 20:20:28 +00:00
|
|
|
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-5.gitec8c627
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
|
|
2015-06-07 16:08:57 +00:00
|
|
|
* Sun Jun 07 2015 Dennis Gilmore <dennis@ausil.us> - 1.0-4.gitec8c627
|
|
|
|
- update git snapshot to latest git head with fixes for pungi
|
|
|
|
|
2015-03-13 19:24:22 +00:00
|
|
|
* Fri Mar 13 2015 Dennis Gilmore <dennis@ausil.us> - 1.0-3.git57efab
|
|
|
|
- rename to python-productmd
|
|
|
|
|
|
|
|
* Wed Mar 11 2015 Dennis Gilmore <dennis@ausil.us> - 1.0-2.git57efab
|
|
|
|
- update git tarball so we can run tests at build time
|
|
|
|
|
|
|
|
* Tue Mar 10 2015 Dennis Gilmore <dennis@ausil.us> - 1.0-1
|
|
|
|
- Initial packaging
|