churchyard / rpms / python-six

Forked from rpms/python-six 3 years ago
Clone
1f49b7
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
1f49b7
1f49b7
%if 0%{?fedora} > 12 || 0%{?rhel} > 7
1f49b7
%global with_python3 1
1f49b7
1f49b7
%global __python3 python3
1f49b7
1f49b7
%{!?python3_sitelib: %global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
1f49b7
%endif
1f49b7
1f49b7
Name:           python-six
1f49b7
Version:        1.9.0
1f49b7
Release:        2%{?dist}
1f49b7
Summary:        Python 2 and 3 compatibility utilities
1f49b7
1f49b7
Group:          Development/Languages
1f49b7
License:        MIT
1f49b7
URL:            http://pypi.python.org/pypi/six/
1f49b7
Source0:        http://pypi.python.org/packages/source/s/six/six-%{version}.tar.gz
1f49b7
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
1f49b7
1f49b7
BuildArch:      noarch
1f49b7
BuildRequires:  python-devel
1f49b7
# For use by selftests:
1f49b7
BuildRequires:  pytest
1f49b7
BuildRequires:  tkinter
1f49b7
%if 0%{?with_python3}
1f49b7
BuildRequires:  python3-devel
1f49b7
# For use by selftests:
1f49b7
BuildRequires:  python3-pytest
1f49b7
BuildRequires:  python3-tkinter
1f49b7
%endif
1f49b7
1f49b7
%description
1f49b7
python-six provides simple utilities for wrapping over differences between
1f49b7
Python 2 and Python 3.
1f49b7
1f49b7
This is the Python 2 build of the module.
1f49b7
1f49b7
%if 0%{?with_python3}
1f49b7
%package -n python3-six
1f49b7
Summary:        Python 2 and 3 compatibility utilities
1f49b7
Group:          Development/Languages
1f49b7
1f49b7
%description -n python3-six
1f49b7
python-six provides simple utilities for wrapping over differences between
1f49b7
Python 2 and Python 3.
1f49b7
1f49b7
This is the Python 3 build of the module.
1f49b7
%endif
1f49b7
1f49b7
%prep
1f49b7
%setup -q -n six-%{version}
1f49b7
%if 0%{?with_python3}
1f49b7
rm -rf %{py3dir}
1f49b7
cp -a . %{py3dir}
1f49b7
%endif
1f49b7
1f49b7
1f49b7
%build
1f49b7
%{__python} setup.py build
1f49b7
%if 0%{?with_python3}
1f49b7
pushd %{py3dir}
1f49b7
%{__python3} setup.py build
1f49b7
popd
1f49b7
%endif
1f49b7
1f49b7
%install
1f49b7
rm -rf $RPM_BUILD_ROOT
1f49b7
%if 0%{?with_python3}
1f49b7
pushd %{py3dir}
1f49b7
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
1f49b7
popd
1f49b7
%endif
1f49b7
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
1f49b7
1f49b7
1f49b7
%clean
1f49b7
rm -rf $RPM_BUILD_ROOT
1f49b7
1f49b7
%check
1f49b7
py.test -rfsxX test_six.py
1f49b7
%if 0%{?with_python3}
1f49b7
pushd %{py3dir}
1f49b7
py.test-%{python3_version} -rfsxX test_six.py
1f49b7
popd
1f49b7
%endif
1f49b7
1f49b7
1f49b7
%files
1f49b7
%defattr(-,root,root,-)
1f49b7
%doc LICENSE README documentation/index.rst
1f49b7
%{python_sitelib}/*
1f49b7
1f49b7
%if 0%{?with_python3}
1f49b7
%files -n python3-six
1f49b7
%defattr(-,root,root,-)
1f49b7
%doc LICENSE README documentation/index.rst
1f49b7
%{python3_sitelib}/*
1f49b7
%endif
1f49b7
1f49b7
1f49b7
%changelog
1f49b7
* Thu May 14 2015 Matej Stuchlik <mstuchli@redhat.com> - 1.9.0-2
1f49b7
- Bump for RHEL7
1f49b7
Resolves: rhbz#1185409
1f49b7
1f49b7
* Wed May 06 2015 Matej Stuchlik <mstuchli@redhat.com> - 1.9.0-1
1f49b7
- Update to 1.9.0
1f49b7
Resolves: rhbz#1185409
1f49b7
1f49b7
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.3.0-4
1f49b7
- Mass rebuild 2013-12-27
1f49b7
1f49b7
* Thu Mar 21 2013 David Malcolm <dmalcolm@redhat.com> - 1.3.0-1
1f49b7
- 1.3.0
1f49b7
1f49b7
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-2
1f49b7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
1f49b7
1f49b7
* Wed Aug 29 2012 David Malcolm <dmalcolm@redhat.com> - 1.2.0-1
1f49b7
- 1.2.0 (rhbz#852658)
1f49b7
- add %%check section
1f49b7
1f49b7
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 1.1.0-4
1f49b7
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
1f49b7
1f49b7
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-3
1f49b7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
1f49b7
1f49b7
* Fri Jun 22 2012 Ralph Bean <rbean@redhat.com> - 1.1.0-2
1f49b7
- Conditionalized python3-six, allowing an el6 build.
1f49b7
1f49b7
* Tue Feb  7 2012 David Malcolm <dmalcolm@redhat.com> - 1.1.0-1
1f49b7
- 1.1.0
1f49b7
1f49b7
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-2
1f49b7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
1f49b7
1f49b7
* Thu Mar 24 2011 David Malcolm <dmalcolm@redhat.com> - 1.0.0-1
1f49b7
- initial packaging
1f49b7
1f49b7