%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Name: python-pycurl Version: 7.15.5.1 Release: 7.99%{?dist} Summary: A Python interface to libcurl Group: Development/Languages License: LGPL URL: http://pycurl.sourceforge.net/ Source0: http://pycurl.sourceforge.net/download/pycurl-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel BuildRequires: curl-devel >= 7.15.5 Provides: pycurl = %{version}-%{release} # Fixes errors on the documentation files reported by xmllint. Patch0: python-pycurl-7.15.5.1-xml_validity.patch %description PycURL is a Python interface to libcurl. PycURL can be used to fetch objects identified by a URL from a Python program, similar to the urllib Python module. PycURL is mature, very fast, and supports a lot of features. %prep %setup -q -n pycurl-%{version} %patch0 -p1 -b .xml_validity rm -f doc/*.xml_validity chmod a-x examples/* %build CFLAGS="$RPM_OPT_FLAGS -DHAVE_CURL_OPENSSL" %{__python} setup.py build %check %{__python} tests/test_internals.py -q %install rm -rf %{buildroot} %{__python} setup.py install -O1 --skip-build --root %{buildroot} rm -rf %{buildroot}%{_datadir}/doc/pycurl %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc COPYING ChangeLog README TODO examples doc tests %{python_sitearch}/* %changelog * Wed Sep 29 2010 Karel Klic - 7.15.5.1-8 - Do not include unpatched files in the doc directory * Wed Sep 29 2010 Karel Klic - 7.15.5.1-7 - Added a patch to fix errors reported by xmllint * Mon Sep 27 2010 Marek Grac - 7.15.5.1-6 - Update package number * Thu Dec 7 2006 Jeffrey C. Ollie - 7.15.5.1-4 - Add -DHAVE_CURL_OPENSSL to fix PPC build problem. * Thu Dec 7 2006 Jeffrey C. Ollie - 7.15.5.1-3 - Don't forget to Provide: pycurl!!! * Thu Dec 7 2006 Jeffrey C. Ollie - 7.15.5.1-2 - Remove INSTALL from the list of documentation - Use python_sitearch for all of the files * Thu Dec 7 2006 Jeffrey C. Ollie - 7.15.5.1-1 - First version for Fedora Extras