churchyard / rpms / python-six

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