| 1 | %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} |
|---|
| 2 | |
|---|
| 3 | Name: python-pycurl |
|---|
| 4 | Version: 7.19.0 |
|---|
| 5 | Release: 3%{?_dist_release} |
|---|
| 6 | Summary: A Python interface to libcurl |
|---|
| 7 | Summary(ja): libcurl の Python インタフェース |
|---|
| 8 | |
|---|
| 9 | Group: Development/Languages |
|---|
| 10 | License: LGPLv2+ |
|---|
| 11 | URL: http://pycurl.sourceforge.net/ |
|---|
| 12 | Source0: http://pycurl.sourceforge.net/download/pycurl-%{version}.tar.gz |
|---|
| 13 | Patch0: python-pycurl-no-static-libs.patch |
|---|
| 14 | |
|---|
| 15 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
|---|
| 16 | |
|---|
| 17 | BuildRequires: python-devel |
|---|
| 18 | BuildRequires: curl-devel >= 7.19.0 |
|---|
| 19 | BuildRequires: openssl-devel |
|---|
| 20 | BuildRequires: openldap-devel |
|---|
| 21 | |
|---|
| 22 | # During its initialization, PycURL checks that the actual libcurl version |
|---|
| 23 | # is not lower than the one used when PycURL was built. |
|---|
| 24 | # Yes, that should be handled by library versioning (which would then get |
|---|
| 25 | # automatically reflected by rpm). |
|---|
| 26 | # For now, we have to reflect that dependency. |
|---|
| 27 | %define libcurl_sed '/^#define LIBCURL_VERSION "/!d;s/"[^"]*$//;s/.*"//;q' |
|---|
| 28 | %define curlver_h /usr/include/curl/curlver.h |
|---|
| 29 | %define libcurl_ver %(sed %{libcurl_sed} %{curlver_h} 2>/dev/null || echo 0) |
|---|
| 30 | Requires: curl >= %{libcurl_ver} |
|---|
| 31 | |
|---|
| 32 | Provides: pycurl = %{version}-%{release} |
|---|
| 33 | |
|---|
| 34 | %description |
|---|
| 35 | PycURL is a Python interface to libcurl. PycURL can be used to fetch |
|---|
| 36 | objects identified by a URL from a Python program, similar to the |
|---|
| 37 | urllib Python module. PycURL is mature, very fast, and supports a lot |
|---|
| 38 | of features. |
|---|
| 39 | |
|---|
| 40 | %prep |
|---|
| 41 | %setup0 -q -n pycurl-%{version} |
|---|
| 42 | %patch0 -p0 |
|---|
| 43 | chmod a-x examples/* |
|---|
| 44 | |
|---|
| 45 | %build |
|---|
| 46 | CFLAGS="$RPM_OPT_FLAGS -DHAVE_CURL_OPENSSL" %{__python} setup.py build |
|---|
| 47 | |
|---|
| 48 | %check |
|---|
| 49 | export PYTHONPATH=$PWD/build/lib* |
|---|
| 50 | %{__python} tests/test_internals.py -q |
|---|
| 51 | |
|---|
| 52 | %install |
|---|
| 53 | rm -rf %{buildroot} |
|---|
| 54 | %{__python} setup.py install -O1 --skip-build --root %{buildroot} |
|---|
| 55 | rm -rf %{buildroot}%{_datadir}/doc/pycurl |
|---|
| 56 | |
|---|
| 57 | %clean |
|---|
| 58 | rm -rf %{buildroot} |
|---|
| 59 | |
|---|
| 60 | %files |
|---|
| 61 | %defattr(-,root,root,-) |
|---|
| 62 | %doc COPYING ChangeLog README TODO examples doc tests |
|---|
| 63 | %{python_sitearch}/* |
|---|
| 64 | |
|---|
| 65 | %changelog |
|---|
| 66 | * Tue Feb 02 2010 Shu KONNO <owa@bg.wakwak.com> 7.19.0-3 |
|---|
| 67 | - rebuild with python-2.6 |
|---|
| 68 | |
|---|
| 69 | * Sat Aug 8 2009 Shu KONNO <owa@bg.wakwak.com> - 7.19.0-2 |
|---|
| 70 | - spec in utf-8 |
|---|
| 71 | - added BR: openldap-devel |
|---|
| 72 | |
|---|
| 73 | * Thu Aug 6 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 7.19.0-1 |
|---|
| 74 | - initial build for VineSeed |
|---|
| 75 | |
|---|
| 76 | * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.19.0-4 |
|---|
| 77 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild |
|---|
| 78 | |
|---|
| 79 | * Fri Apr 17 2009 Stepan Kasal <skasal@redhat.com> - 7.19.0-3 |
|---|
| 80 | - fix typo in the previous change |
|---|
| 81 | |
|---|
| 82 | * Fri Apr 17 2009 Stepan Kasal <skasal@redhat.com> - 7.19.0-2 |
|---|
| 83 | - add a require to reflect a dependency on libcurl version (#496308) |
|---|
| 84 | |
|---|
| 85 | * Thu Mar 5 2009 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.19.0-1 |
|---|
| 86 | - Update to 7.19.0 |
|---|
| 87 | |
|---|
| 88 | * Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.18.2-3 |
|---|
| 89 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild |
|---|
| 90 | |
|---|
| 91 | * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 7.18.2-2 |
|---|
| 92 | - Rebuild for Python 2.6 |
|---|
| 93 | |
|---|
| 94 | * Thu Jul 3 2008 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.18.2-1 |
|---|
| 95 | - Update to 7.18.2 |
|---|
| 96 | - Thanks to Ville Skytt辰 re-enable the tests and fix a minor problem |
|---|
| 97 | with the setup.py. (Bug # 45400) |
|---|
| 98 | |
|---|
| 99 | * Thu Jun 5 2008 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.18.1-1 |
|---|
| 100 | - Update to 7.18.1 |
|---|
| 101 | - Disable tests because it's not testing the built library, it's trying to |
|---|
| 102 | test an installed library. |
|---|
| 103 | |
|---|
| 104 | * Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 7.16.4-3 |
|---|
| 105 | - Autorebuild for GCC 4.3 |
|---|
| 106 | |
|---|
| 107 | * Thu Jan 3 2008 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.16.4-2 |
|---|
| 108 | - BR openssl-devel |
|---|
| 109 | |
|---|
| 110 | * Wed Aug 29 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.16.4-1 |
|---|
| 111 | - Update to 7.16.4 |
|---|
| 112 | - Update license tag. |
|---|
| 113 | |
|---|
| 114 | * Sat Jun 9 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.16.2.1-1 |
|---|
| 115 | - Update to released version. |
|---|
| 116 | |
|---|
| 117 | * Thu Dec 7 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.16.0-0.1.20061207 |
|---|
| 118 | - Update to a CVS snapshot since development has a newer version of curl than is in FC <= 6 |
|---|
| 119 | |
|---|
| 120 | * Thu Dec 7 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.15.5.1-4 |
|---|
| 121 | - Add -DHAVE_CURL_OPENSSL to fix PPC build problem. |
|---|
| 122 | |
|---|
| 123 | * Thu Dec 7 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.15.5.1-3 |
|---|
| 124 | - Don't forget to Provide: pycurl!!! |
|---|
| 125 | |
|---|
| 126 | * Thu Dec 7 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.15.5.1-2 |
|---|
| 127 | - Remove INSTALL from the list of documentation |
|---|
| 128 | - Use python_sitearch for all of the files |
|---|
| 129 | |
|---|
| 130 | * Thu Dec 7 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.15.5.1-1 |
|---|
| 131 | - First version for Fedora Extras |
|---|