Merge branch 'master' into f24
This commit is contained in:
commit
466ea10ef6
@ -1,25 +1,15 @@
|
||||
%global with_python3 1
|
||||
|
||||
%if 0%{?fedora} && 0%{?fedora} <= 12
|
||||
%global with_python3 0
|
||||
# Enable Python 3 builds for Fedora + EPEL >5
|
||||
%if 0%{?fedora} || 0%{?rhel} > 5
|
||||
# If the definition isn't available for python3_pkgversion, define it
|
||||
%{?!python3_pkgversion:%global python3_pkgversion 3}
|
||||
%bcond_without python3
|
||||
%else
|
||||
%bcond_with python3
|
||||
%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())")}
|
||||
%global with_python3 0
|
||||
%endif
|
||||
|
||||
# compatibility with older releases
|
||||
%{!?__python2: %global __python2 /usr/bin/python2}
|
||||
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
||||
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
||||
%{!?py2_build: %global py2_build %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} build --executable="%{__python2} -s"}}
|
||||
%{!?py2_install: %global py2_install %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} install -O1 --skip-build --root %{buildroot}}}
|
||||
|
||||
Name: python-productmd
|
||||
Version: 1.4
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Library providing parsers for metadata related to OS installation
|
||||
|
||||
Group: Development/Tools
|
||||
@ -37,10 +27,10 @@ BuildRequires: python2-devel
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: python-six
|
||||
|
||||
%if 0%{?with_python3}
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-six
|
||||
%if 0%{?with_python3}
|
||||
BuildRequires: python%{python3_pkgversion}-devel
|
||||
BuildRequires: python%{python3_pkgversion}-setuptools
|
||||
BuildRequires: python%{python3_pkgversion}-six
|
||||
%endif
|
||||
|
||||
BuildArch: noarch
|
||||
@ -50,12 +40,12 @@ Python library providing parsers for metadata related to composes
|
||||
and installation media.
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python3-productmd
|
||||
%package -n python%{python3_pkgversion}-productmd
|
||||
Summary: Library providing parsers for metadata related to OS installation
|
||||
Group: Development/Tools
|
||||
Requires: python3-six
|
||||
Requires: python%{python3_pkgversion}-six
|
||||
|
||||
%description -n python3-productmd
|
||||
%description -n python%{python3_pkgversion}-productmd
|
||||
Python library providing parsers for metadata related to composes
|
||||
and installation media.
|
||||
%endif
|
||||
@ -84,18 +74,14 @@ and installation media.
|
||||
%{__python3} ./setup.py test
|
||||
%endif
|
||||
|
||||
# this must go after all 'License:' tags
|
||||
%{!?_licensedir:%global license %doc}
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%doc AUTHORS
|
||||
%{python_sitelib}/productmd/
|
||||
%{python_sitelib}/productmd-%{version}-py?.?.egg-info
|
||||
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python3-productmd
|
||||
%files -n python%{python3_pkgversion}-productmd
|
||||
%license LICENSE
|
||||
%doc AUTHORS
|
||||
%{python3_sitelib}/productmd/
|
||||
@ -103,6 +89,9 @@ and installation media.
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Feb 10 2017 Adam Williamson <awilliam@redhat.com> - 1.4-2
|
||||
- Enable Python 3 build for EL 6+
|
||||
|
||||
* Tue Jan 10 2017 Lubomír Sedlář <lsedlar@redhat.com> 1.4-1
|
||||
- Fix loading variants from legacy composeinfo. (dmach@redhat.com)
|
||||
- Fix sorting composes (lsedlar@redhat.com)
|
||||
|
Loading…
Reference in New Issue
Block a user