churchyard / rpms / python-six

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