9feed6c
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
9feed6c
9feed6c
Name:           python-blist
70bdc2a
Version:        1.2.1
16805ea
Release:        3%{?dist}
9feed6c
Summary:        A faster list implementation for Python
9feed6c
9feed6c
Group:          Development/Languages
9feed6c
License:        BSD
9feed6c
URL:            http://pypi.python.org/pypi/blist/
9feed6c
Source0:        http://pypi.python.org/packages/source/b/blist/blist-%{version}.tar.gz
783ae02
Patch0:		blist-1.2.1-use-sys-setuptools.patch
9feed6c
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
9feed6c
9feed6c
BuildRequires:  python-devel python-setuptools
9feed6c
9feed6c
%description
9feed6c
The BList is a type that looks, acts, and quacks like a Python list,
9feed6c
but has better performance for for modifying large lists.
9feed6c
9feed6c
For small lists (fewer than 128 elements), BLists and the built-in
9feed6c
list have very similar performance, although BLists are memory
9feed6c
inefficient if you need to create a larger number of small lists.
9feed6c
9feed6c
9feed6c
%prep
9feed6c
%setup -q -n blist-%{version}
783ae02
%patch0 -p1 -b .use-sys-setuptools
1392efd
9feed6c
# Replace the not-zip-safe file; keep rpmlint happy by not having
9feed6c
# CRLF line endings
9feed6c
echo > not-zip-safe
9feed6c
touch -r blist.egg-info/not-zip-safe not-zip-safe
9feed6c
rm blist.egg-info/not-zip-safe
9feed6c
# egg-info files should not be executables
9feed6c
chmod -x blist.egg-info/*
9feed6c
# Move the new not-zip-safe file back
9feed6c
mv not-zip-safe blist.egg-info/
9feed6c
9feed6c
9feed6c
%build
9feed6c
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" %{__python} setup.py build
9feed6c
9feed6c
9feed6c
%install
9feed6c
rm -rf $RPM_BUILD_ROOT
9feed6c
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
9feed6c
9feed6c
 
9feed6c
%check
9feed6c
%{__python} setup.py test
9feed6c
9feed6c
9feed6c
%clean
9feed6c
rm -rf $RPM_BUILD_ROOT
9feed6c
9feed6c
9feed6c
%files
9feed6c
%defattr(-,root,root,-)
70bdc2a
%doc LICENSE README.rst
9feed6c
%{python_sitearch}/*
9feed6c
9feed6c
9feed6c
%changelog
16805ea
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-3
16805ea
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
16805ea
6f38bca
* Mon Jul 26 2010 David Malcolm <dmalcolm@redhat.com> - 1.2.1-2
6f38bca
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
6f38bca
70bdc2a
* Mon Jul 26 2010 Michel Salim <salimma@fedoraproject.org> - 1.2.1-1
70bdc2a
- Update to 1.2.1
70bdc2a
9feed6c
* Fri May 21 2010 Michel Salim <salimma@fedoraproject.org> - 1.1.1-1
9feed6c
- Update to 1.1.1
9feed6c
9feed6c
* Fri Oct 23 2009 Michel Salim <salimma@fedoraproject.org> - 1.0.2-1
9feed6c
- Update to 1.0.2
9feed6c
9feed6c
* Sat Oct 10 2009 Michel Salim <salimma@fedoraproject.org> - 1.0.1-1
9feed6c
- Initial package
9feed6c