f0122bf
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
f0122bf
f0122bf
Name:           python-pycurl
626ea09
Version:        7.19.0
3552c5e
Release:        6%{?dist}
f0122bf
Summary:        A Python interface to libcurl
f0122bf
f0122bf
Group:          Development/Languages
Karel Klíč 84dd1c6
License:        LGPLv2+ or MIT
f0122bf
URL:            http://pycurl.sourceforge.net/
f2a5f2a
Source0:        http://pycurl.sourceforge.net/download/pycurl-%{version}.tar.gz
39374f4
Patch0:		python-pycurl-no-static-libs.patch
0fdcd96
f0122bf
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
f0122bf
f0122bf
BuildRequires:  python-devel
626ea09
BuildRequires:  curl-devel >= 7.19.0
d8a2d0a
BuildRequires:  openssl-devel
f0122bf
f8241f4
# During its initialization, PycURL checks that the actual libcurl version
f8241f4
# is not lower than the one used when PycURL was built.
f8241f4
# Yes, that should be handled by library versioning (which would then get
f8241f4
# automatically reflected by rpm).
f8241f4
# For now, we have to reflect that dependency.
441d890
%define libcurl_sed '/^#define LIBCURL_VERSION "/!d;s/"[^"]*$//;s/.*"//;q'
441d890
%define curlver_h /usr/include/curl/curlver.h
441d890
%define libcurl_ver %(sed %{libcurl_sed} %{curlver_h} 2>/dev/null || echo 0)
d72ed29
Requires:	libcurl >= %{libcurl_ver}
f8241f4
0fdcd96
Provides:       pycurl = %{version}-%{release}
f0122bf
f0122bf
%description
f0122bf
PycURL is a Python interface to libcurl. PycURL can be used to fetch
f0122bf
objects identified by a URL from a Python program, similar to the
f0122bf
urllib Python module. PycURL is mature, very fast, and supports a lot
f0122bf
of features.
f0122bf
f0122bf
%prep
39374f4
%setup0 -q -n pycurl-%{version}
39374f4
%patch0 -p0
f0122bf
chmod a-x examples/*
f0122bf
f0122bf
%build
94188fd
CFLAGS="$RPM_OPT_FLAGS -DHAVE_CURL_OPENSSL" %{__python} setup.py build
f0122bf
f0122bf
%check
39374f4
export PYTHONPATH=$PWD/build/lib*
39374f4
%{__python} tests/test_internals.py -q
f0122bf
f0122bf
%install
f0122bf
rm -rf %{buildroot}
f0122bf
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
f0122bf
rm -rf %{buildroot}%{_datadir}/doc/pycurl
f0122bf
 
f0122bf
%clean
f0122bf
rm -rf %{buildroot}
f0122bf
f0122bf
%files
f0122bf
%defattr(-,root,root,-)
Karel Klíč 84dd1c6
%doc COPYING COPYING2 ChangeLog README TODO examples doc tests
f0122bf
%{python_sitearch}/*
f0122bf
f0122bf
%changelog
3552c5e
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 7.19.0-6
3552c5e
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
3552c5e
Karel Klíč 84dd1c6
* Tue Mar  2 2010 Karel Klic <kklic@redhat.com> - 7.19.0-5
Karel Klíč 84dd1c6
- Package COPYING2 file
Karel Klíč 84dd1c6
- Added MIT as a package license
Karel Klíč 84dd1c6
d3ac8a3
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.19.0-4
d3ac8a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
d3ac8a3
d72ed29
* Fri Apr 17 2009 Stepan Kasal <skasal@redhat.com> - 7.19.0-3
d72ed29
- fix typo in the previous change
d72ed29
f8241f4
* Fri Apr 17 2009 Stepan Kasal <skasal@redhat.com> - 7.19.0-2
f8241f4
- add a require to reflect a dependency on libcurl version (#496308)
f8241f4
626ea09
* Thu Mar  5 2009 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.19.0-1
626ea09
- Update to 7.19.0
626ea09
e90ebe0
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.18.2-3
e90ebe0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
e90ebe0
3f57cf8
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 7.18.2-2
3f57cf8
- Rebuild for Python 2.6
3f57cf8
39374f4
* Thu Jul  3 2008 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.18.2-1
39374f4
- Update to 7.18.2
39374f4
- Thanks to Ville Skyttä re-enable the tests and fix a minor problem
39374f4
  with the setup.py. (Bug # 45400)
39374f4
0d696a6
* Thu Jun  5 2008 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.18.1-1
0d696a6
- Update to 7.18.1
0d696a6
- Disable tests because it's not testing the built library, it's trying to
0d696a6
  test an installed library.
0d696a6
f0e5198
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 7.16.4-3
f0e5198
- Autorebuild for GCC 4.3
f0e5198
d8a2d0a
* Thu Jan  3 2008 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.16.4-2
d8a2d0a
- BR openssl-devel
d8a2d0a
90e7b00
* Wed Aug 29 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.16.4-1
90e7b00
- Update to 7.16.4
90e7b00
- Update license tag.
90e7b00
f2a5f2a
* Sat Jun  9 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.16.2.1-1
f2a5f2a
- Update to released version.
f2a5f2a
0fdcd96
* Thu Dec  7 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.16.0-0.1.20061207
0fdcd96
- Update to a CVS snapshot since development has a newer version of curl than is in FC <= 6
0fdcd96
94188fd
* Thu Dec  7 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.15.5.1-4
94188fd
- Add -DHAVE_CURL_OPENSSL to fix PPC build problem.
94188fd
f0122bf
* Thu Dec  7 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.15.5.1-3
f0122bf
- Don't forget to Provide: pycurl!!!
f0122bf
f0122bf
* Thu Dec  7 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.15.5.1-2
f0122bf
- Remove INSTALL from the list of documentation
f0122bf
- Use python_sitearch for all of the files
f0122bf
f0122bf
* Thu Dec  7 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.15.5.1-1
f0122bf
- First version for Fedora Extras