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