churchyard / rpms / python-six

Forked from rpms/python-six 3 years ago
Clone
08742e
%global modname six
08742e
%global build_wheel 1
08742e
%global py2_wheel 0
08742e
08742e
%bcond_without tests
08742e
08742e
%bcond_with python2
08742e
%bcond_without python3
08742e
08742e
%global python2_wheelname %{modname}-%{version}-py2.py3-none-any.whl
08742e
%global python3_wheelname %python2_wheelname
08742e
08742e
Name:           python-%{modname}
08742e
Version:        1.11.0
08742e
Release:        8%{?dist}
08742e
Summary:        Python 2 and 3 compatibility utilities
08742e
08742e
License:        MIT
08742e
URL:            https://pypi.python.org/pypi/six
08742e
Source0:        https://files.pythonhosted.org/packages/source/%(n=%{modname}; echo ${n:0:1})/%{modname}/%{modname}-%{version}.tar.gz
08742e
08742e
BuildArch:      noarch
08742e
08742e
%global _description \
08742e
%%{name} provides simple utilities for wrapping over differences between\
08742e
Python 2 and Python 3.
08742e
08742e
%description %{_description}
08742e
08742e
%if %{with python2}
08742e
%package -n python2-%{modname}
08742e
Summary:        %{summary}
08742e
%{?python_provide:%python_provide python2-%{modname}}
08742e
BuildRequires:  python2-devel
08742e
BuildRequires:  python2-setuptools
08742e
08742e
%if %{with tests}
08742e
BuildRequires:  python2-pytest
08742e
#BuildRequires:  python2-tkinter
08742e
%endif
08742e
08742e
%if 0%{?py2_wheel}
08742e
BuildRequires:  python2-pip
08742e
BuildRequires:  python2-wheel
08742e
%endif
08742e
08742e
%description -n python2-%{modname} %{_description}
08742e
Python 2 version.
08742e
08742e
%endif
08742e
08742e
08742e
%if %{with python3}
08742e
%package -n python3-%{modname}
08742e
Summary:        %{summary}
08742e
%{?python_provide:%python_provide python3-%{modname}}
08742e
Obsoletes:      platform-python-%{modname} < %{version}-%{release}
08742e
BuildRequires:  python3-devel
08742e
BuildRequires:  python3-setuptools
08742e
08742e
%if %{with tests}
08742e
BuildRequires:  python3-pytest
08742e
BuildRequires:  python3-tkinter
08742e
%endif
08742e
08742e
%if 0%{?build_wheel}
08742e
BuildRequires:  python%{python3_pkgversion}-pip
08742e
BuildRequires:  python%{python3_pkgversion}-wheel
08742e
%endif
08742e
08742e
%description -n python3-%{modname} %{_description}
08742e
Python 3 version.
08742e
08742e
%endif
08742e
08742e
08742e
%prep
08742e
%autosetup -n %{modname}-%{version}
08742e
08742e
08742e
%build
08742e
%if %{with python2}
08742e
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
08742e
%if 0%{?py2_wheel}
08742e
%py2_build_wheel
08742e
%else
08742e
%py2_build
08742e
%endif
08742e
%endif
08742e
08742e
%if %{with python3}
08742e
%if 0%{?build_wheel}
08742e
%py3_build_wheel
08742e
%else
08742e
%py3_build
08742e
%endif
08742e
%endif
08742e
08742e
08742e
%install
08742e
%if %{with python2}
08742e
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
08742e
%if 0%{?py2_wheel}
08742e
%py2_install_wheel %{python2_wheelname}
08742e
%else
08742e
%py2_install
08742e
%endif
08742e
%endif
08742e
08742e
%if %{with python3}
08742e
%if 0%{?build_wheel}
08742e
%py3_install_wheel %{python3_wheelname}
08742e
%else
08742e
%py3_install
08742e
%endif
08742e
%endif
08742e
08742e
08742e
%if %{with tests}
08742e
%check
08742e
%if %{with python2}
08742e
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
08742e
py.test-2 -rfsxX test_six.py
08742e
%endif #{with python2}
08742e
py.test-3 -rfsxX test_six.py
08742e
%endif
08742e
08742e
08742e
%if %{with python2}
08742e
%files -n python2-%{modname}
08742e
%license LICENSE
08742e
%doc README.rst documentation/index.rst
08742e
%{python2_sitelib}/%{modname}-*.*-info/
08742e
%{python2_sitelib}/%{modname}.py*
08742e
%endif
08742e
08742e
%if %{with python3}
08742e
%files -n python3-%{modname}
08742e
%license LICENSE
08742e
%doc README.rst documentation/index.rst
08742e
%{python3_sitelib}/%{modname}-*.dist-info/
08742e
%{python3_sitelib}/%{modname}.py
08742e
%{python3_sitelib}/__pycache__/%{modname}.*
08742e
%endif
08742e
08742e
08742e
%changelog
08742e
* Fri Jul 13 2018 Petr Viktorin <pviktori@redhat.com> - 1.11.0-8
08742e
- Disable the Python 2 subpackage
08742e
  https://bugzilla.redhat.com/show_bug.cgi?id=1594157
08742e
08742e
* Wed Jun 27 2018 Petr Viktorin <pviktori@redhat.com> - 1.11.0-7
08742e
- Drop dependency on python2-tkinter
08742e
  This results in one skipped test.
08742e
08742e
* Fri Jun 22 2018 Petr Viktorin <pviktori@redhat.com> - 1.11.0-6
08742e
- Do not use wheel on Python 2
08742e
08742e
* Fri Jun 22 2018 Petr Viktorin <pviktori@redhat.com> - 1.11.0-5
08742e
- Conditionalize bulding wheel on Python 2
08742e
08742e
* Thu Jun 21 2018 Lumír Balhar <lbalhar@redhat.com> - 1.11.0-4
08742e
- Allow build with Python 2
08742e
08742e
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.0-3
08742e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
08742e
08742e
* Wed Nov 15 2017 Lumír Balhar <lbalhar@redhat.com> - 1.11.0-2
08742e
- Removed and obsoleted the platform-python subpackage
08742e
08742e
* Tue Sep 19 2017 Charalampos Stratakis <cstratak@redhat.com> - 1.11.0-1
08742e
- Update to 1.11.0
08742e
08742e
* Thu Aug 10 2017 Tomas Orsava <torsava@redhat.com> - 1.10.0-11
08742e
- Added the platform-python subpackage
08742e
08742e
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.0-10
08742e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
08742e
08742e
* Mon Jul 03 2017 Petr Viktorin <pviktori@redhat.com> - 1.10.0-9
08742e
- Fix unversioned Python BuildRequires
08742e
08742e
* Mon Feb 13 2017 Charalampos Stratakis <cstratak@redhat.com> - 1.10.0-8
08742e
- Rebuild as wheel
08742e
08742e
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.0-7
08742e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
08742e
08742e
* Tue Dec 13 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.10.0-6
08742e
- Enable tests
08742e
08742e
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.10.0-5
08742e
- Rebuild for Python 3.6
08742e
- Disable python3 tests
08742e
08742e
* Tue Aug 09 2016 Igor Gnatenko <ignatenko@redhat.com> - 1.10.0-4
08742e
- Modernize spec more
08742e
- Depend on system-python(abi)
08742e
- Cleanups
08742e
08742e
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10.0-3
08742e
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
08742e
08742e
* Wed Feb 3 2016 Orion Poplawski <orion@cora.nwra.com> - 1.10.0-2
08742e
- Modernize spec
08742e
- Fix python3 package file ownership
08742e
08742e
* Fri Nov 13 2015 Slavek Kabrda <bkabrda@redhat.com> - 1.10.0-1
08742e
- Update to 1.10.0
08742e
08742e
* Tue Oct 13 2015 Robert Kuska <rkuska@redhat.com> - 1.9.0-4
08742e
- Rebuilt for Python3.5 rebuild
08742e
08742e
* Mon Jul 13 2015 Slavek Kabrda <bkabrda@redhat.com> - 1.9.0-3
08742e
- Added python2-six provide to python-six
08742e
08742e
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.0-2
08742e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
08742e
08742e
* Mon Feb 23 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 1.9.0-1
08742e
- Upstream 1.9.0
08742e
- Packaging cleanups
08742e
08742e
* Fri Nov 14 2014 Slavek Kabrda <bkabrda@redhat.com> - 1.8.0-1
08742e
- upgrade to 1.8.0 (rhbz#1105861)
08742e
08742e
* Sun Aug  3 2014 Tom Callaway <spot@fedoraproject.org> - 1.7.3-2
08742e
- fix license handling
08742e
08742e
* Thu Jul 31 2014 Pádraig Brady <pbrady@redhat.com> - 1.7.3-1
08742e
- Latest upstream
08742e
08742e
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.1-3
08742e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
08742e
08742e
* Thu May 08 2014 Orion Poplawski <orion@cora.nwra.com> - 1.6.1-2
08742e
- Rebuild for Python 3.4
08742e
08742e
* Tue Apr 29 2014 Matthias Runge <mrugne@redhat.com> - 1.6.1-1
08742e
- upgrade to 1.6.1 (rhbz#1076578)
08742e
08742e
* Fri Mar 07 2014 Matthias Runge <mrunge@redhat.com> - 1.5.2-1
08742e
- upgrade to 1.5.2 (rhbz#1048819)
08742e
08742e
* Mon Sep 16 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 1.4.1-1
08742e
- 1.4.1
08742e
08742e
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-2
08742e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
08742e
08742e
* Thu Mar 21 2013 David Malcolm <dmalcolm@redhat.com> - 1.3.0-1
08742e
- 1.3.0
08742e
08742e
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-2
08742e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
08742e
08742e
* Wed Aug 29 2012 David Malcolm <dmalcolm@redhat.com> - 1.2.0-1
08742e
- 1.2.0 (rhbz#852658)
08742e
- add %%check section
08742e
08742e
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 1.1.0-4
08742e
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
08742e
08742e
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-3
08742e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
08742e
08742e
* Fri Jun 22 2012 Ralph Bean <rbean@redhat.com> - 1.1.0-2
08742e
- Conditionalized python3-six, allowing an el6 build.
08742e
08742e
* Tue Feb  7 2012 David Malcolm <dmalcolm@redhat.com> - 1.1.0-1
08742e
- 1.1.0
08742e
08742e
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-2
08742e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
08742e
08742e
* Thu Mar 24 2011 David Malcolm <dmalcolm@redhat.com> - 1.0.0-1
08742e
- initial packaging
08742e
08742e