python-six/python-six.spec

103 lines
2.4 KiB
RPMSpec
Raw Normal View History

2011-07-21 17:56:10 +00:00
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%if 0%{?fedora} > 12 || 0%{?rhel} > 7
%global with_python3 1
2011-07-21 17:56:10 +00:00
%global __python3 python3
%{!?python3_sitelib: %global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%endif
2011-07-21 17:56:10 +00:00
Name: python-six
2012-02-07 13:19:51 +00:00
Version: 1.1.0
Release: 2%{?dist}
2011-07-21 17:56:10 +00:00
Summary: Python 2 and 3 compatibility utilities
Group: Development/Languages
License: MIT
URL: http://pypi.python.org/pypi/six/
Source0: http://pypi.python.org/packages/source/s/six/six-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python-devel
%if 0%{?with_python3}
2011-07-21 17:56:10 +00:00
BuildRequires: python3-devel
%endif
2011-07-21 17:56:10 +00:00
%description
python-six provides simple utilities for wrapping over differences between
Python 2 and Python 3.
This is the Python 2 build of the module.
%if 0%{?with_python3}
2011-07-21 17:56:10 +00:00
%package -n python3-six
Summary: Python 2 and 3 compatibility utilities
Group: Development/Languages
%description -n python3-six
python-six provides simple utilities for wrapping over differences between
Python 2 and Python 3.
This is the Python 3 build of the module.
%endif
2011-07-21 17:56:10 +00:00
%prep
%setup -q -n six-%{version}
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif
2011-07-21 17:56:10 +00:00
%build
%{__python} setup.py build
%if 0%{?with_python3}
pushd %{py3dir}
2011-07-21 17:56:10 +00:00
%{__python3} setup.py build
popd
%endif
2011-07-21 17:56:10 +00:00
%install
rm -rf $RPM_BUILD_ROOT
%if 0%{?with_python3}
pushd %{py3dir}
2011-07-21 17:56:10 +00:00
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
popd
%endif
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
2011-07-21 17:56:10 +00:00
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc LICENSE README documentation/index.rst
%{python_sitelib}/*
%if 0%{?with_python3}
2011-07-21 17:56:10 +00:00
%files -n python3-six
%defattr(-,root,root,-)
%doc LICENSE README documentation/index.rst
%{python3_sitelib}/*
%endif
2011-07-21 17:56:10 +00:00
%changelog
* Fri Jun 22 2012 Ralph Bean <rbean@redhat.com> - 1.1.0-2
- Conditionalized python3-six, allowing an el6 build.
2012-02-07 13:19:51 +00:00
* Tue Feb 7 2012 David Malcolm <dmalcolm@redhat.com> - 1.1.0-1
- 1.1.0
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
2011-07-21 17:56:10 +00:00
* Thu Mar 24 2011 David Malcolm <dmalcolm@redhat.com> - 1.0.0-1
- initial packaging