Compare commits

..

No commits in common. "c8-beta" and "c8-stream-3.8" have entirely different histories.

3 changed files with 61 additions and 77 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/six-1.11.0.tar.gz
SOURCES/six-1.12.0.tar.gz

View File

@ -1 +1 @@
3647372a0e104e7b53bd477762392024e1083ac0 SOURCES/six-1.11.0.tar.gz
1957b44942be21822414f4dde936e6c40b687565 SOURCES/six-1.12.0.tar.gz

View File

@ -1,18 +1,16 @@
%global modname six
%global build_wheel 1
%global py2_wheel 0
# tests are enabled by default, but on Fedora 32+, Python 2 tests are skipped
%bcond_without tests
# python2 is enabled by default, Fedora 32+ exception is anticipated
%bcond_with python2
%bcond_without python3
%global python2_wheelname %{modname}-%{version}-py2.py3-none-any.whl
%global python3_wheelname %python2_wheelname
%global python_wheelname %{modname}-%{version}-py2.py3-none-any.whl
Name: python-%{modname}
Version: 1.11.0
Release: 8%{?dist}
Version: 1.12.0
Release: 9%{?dist}
Summary: Python 2 and 3 compatibility utilities
License: MIT
@ -20,6 +18,10 @@ URL: https://pypi.python.org/pypi/six
Source0: https://files.pythonhosted.org/packages/source/%(n=%{modname}; echo ${n:0:1})/%{modname}/%{modname}-%{version}.tar.gz
BuildArch: noarch
# Exclude i686 arch. Due to a modularity issue it's being added to the
# x86_64 compose of CRB, but we don't want to ship it at all.
# See: https://projects.engineering.redhat.com/browse/RCM-72605
ExcludeArch: i686
%global _description \
%%{name} provides simple utilities for wrapping over differences between\
@ -34,14 +36,9 @@ Summary: %{summary}
BuildRequires: python2-devel
BuildRequires: python2-setuptools
%if %{with tests}
%if %{with tests} && 0%{?fedora} < 32
BuildRequires: python2-pytest
#BuildRequires: python2-tkinter
%endif
%if 0%{?py2_wheel}
BuildRequires: python2-pip
BuildRequires: python2-wheel
BuildRequires: python2-tkinter
%endif
%description -n python2-%{modname} %{_description}
@ -50,29 +47,23 @@ Python 2 version.
%endif
%if %{with python3}
%package -n python3-%{modname}
%package -n python%{python3_pkgversion}-%{modname}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{modname}}
Obsoletes: platform-python-%{modname} < %{version}-%{release}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%if %{with tests}
BuildRequires: python3-pytest
BuildRequires: python3-tkinter
%endif
%if 0%{?build_wheel}
%{?python_provide:%python_provide python%{python3_pkgversion}-%{modname}}
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python%{python3_pkgversion}-pip
BuildRequires: python%{python3_pkgversion}-wheel
BuildRequires: python%{python3_pkgversion}-rpm-macros
%if %{with tests}
BuildRequires: python%{python3_pkgversion}-pytest
BuildRequires: python%{python3_pkgversion}-tkinter
%endif
%description -n python3-%{modname} %{_description}
%description -n python%{python3_pkgversion}-%{modname} %{_description}
Python 3 version.
%endif
%prep
%autosetup -n %{modname}-%{version}
@ -80,49 +71,25 @@ Python 3 version.
%build
%if %{with python2}
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
%if 0%{?py2_wheel}
%py2_build_wheel
%else
%py2_build
%endif
%endif
%if %{with python3}
%if 0%{?build_wheel}
%py3_build_wheel
%else
%py3_build
%endif
%endif
%install
%if %{with python2}
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
%if 0%{?py2_wheel}
%py2_install_wheel %{python2_wheelname}
%else
%py2_install
%endif
%endif
%if %{with python3}
%if 0%{?build_wheel}
%py3_install_wheel %{python3_wheelname}
%else
%py3_install
%endif
%endif
%py3_install_wheel %{python_wheelname}
%if %{with tests}
%check
%if %{with python2}
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
py.test-2 -rfsxX test_six.py
%endif #{with python2}
py.test-3 -rfsxX test_six.py
%if %{with python2} && 0%{?fedora} < 32
PYTHONPATH=%{buildroot}%{python2_sitelib} py.test-2 -rfsxX test_six.py
%endif
PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} -rfsxX test_six.py
%endif
@ -130,37 +97,54 @@ py.test-3 -rfsxX test_six.py
%files -n python2-%{modname}
%license LICENSE
%doc README.rst documentation/index.rst
%{python2_sitelib}/%{modname}-*.*-info/
%{python2_sitelib}/%{modname}-*.egg-info/
%{python2_sitelib}/%{modname}.py*
%endif
%if %{with python3}
%files -n python3-%{modname}
%files -n python%{python3_pkgversion}-%{modname}
%license LICENSE
%doc README.rst documentation/index.rst
%{python3_sitelib}/%{modname}-*.dist-info/
%{python3_sitelib}/%{modname}.py
%{python3_sitelib}/__pycache__/%{modname}.*
%endif
%changelog
* Fri Jul 13 2018 Petr Viktorin <pviktori@redhat.com> - 1.11.0-8
- Disable the Python 2 subpackage
https://bugzilla.redhat.com/show_bug.cgi?id=1594157
* Fri Dec 13 2019 Tomas Orsava <torsava@redhat.com> - 1.12.0-9
- Exclude unsupported i686 arch
* Wed Jun 27 2018 Petr Viktorin <pviktori@redhat.com> - 1.11.0-7
- Drop dependency on python2-tkinter
This results in one skipped test.
* Tue Nov 19 2019 Lumír Balhar <lbalhar@redhat.com> - 1.12.0-8
- Adjusted for Python 3.8 module in RHEL 8
* Fri Jun 22 2018 Petr Viktorin <pviktori@redhat.com> - 1.11.0-6
- Do not use wheel on Python 2
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.12.0-7
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Fri Jun 22 2018 Petr Viktorin <pviktori@redhat.com> - 1.11.0-5
- Conditionalize bulding wheel on Python 2
* Mon Aug 26 2019 Miro Hrončok <mhroncok@redhat.com> - 1.12.0-6
- Reduce Python 2 build dependencies
* Thu Jun 21 2018 Lumír Balhar <lbalhar@redhat.com> - 1.11.0-4
- Allow build with Python 2
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 1.12.0-5
- Rebuilt for Python 3.8
* Wed Aug 14 2019 Miro Hrončok <mhroncok@redhat.com> - 1.12.0-4
- Bootstrap for Python 3.8
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.12.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Wed Feb 13 2019 Yatin Karel <ykarel@redhat.com> - 1.12.0-1
- Update to 1.12.0
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Sat Jun 16 2018 Miro Hrončok <mhroncok@redhat.com> - 1.11.0-5
- Rebuilt for Python 3.7
* Wed Jun 13 2018 Miro Hrončok <mhroncok@redhat.com> - 1.11.0-4
- Bootstrap for Python 3.7
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild