| 1 | %define modname pycurl |
|---|
| 2 | |
|---|
| 3 | Name: python-%{modname} |
|---|
| 4 | Version: 7.43.0.4 |
|---|
| 5 | Release: 1%{?_dist_release} |
|---|
| 6 | Summary: A Python interface to libcurl |
|---|
| 7 | Summary(ja): libcurl の Python インタフェース |
|---|
| 8 | Group: programming |
|---|
| 9 | Vendor: Project Vine |
|---|
| 10 | Distribution: Vine Linux |
|---|
| 11 | |
|---|
| 12 | License: LGPLv2+ |
|---|
| 13 | URL: http://pycurl.io/ |
|---|
| 14 | Source0: https://dl.bintray.com/pycurl/pycurl/pycurl-%{version}.tar.gz |
|---|
| 15 | # drop link-time vs. run-time TLS backend check (#1446850) |
|---|
| 16 | Patch2: 0002-python-pycurl-7.43.0-tls-backend.patch |
|---|
| 17 | |
|---|
| 18 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
|---|
| 19 | |
|---|
| 20 | BuildRequires: python-rpm-macros |
|---|
| 21 | |
|---|
| 22 | BuildRequires: python-devel |
|---|
| 23 | BuildRequires: python2-rpm-macros |
|---|
| 24 | BuildRequires: curl-devel >= 7.19.0 |
|---|
| 25 | BuildRequires: openssl-devel |
|---|
| 26 | BuildRequires: openldap-devel |
|---|
| 27 | |
|---|
| 28 | # During its initialization, PycURL checks that the actual libcurl version |
|---|
| 29 | # is not lower than the one used when PycURL was built. |
|---|
| 30 | # Yes, that should be handled by library versioning (which would then get |
|---|
| 31 | # automatically reflected by rpm). |
|---|
| 32 | # For now, we have to reflect that dependency. |
|---|
| 33 | %define libcurl_sed '/^#define LIBCURL_VERSION "/!d;s/"[^"]*$//;s/.*"//;q' |
|---|
| 34 | %define curlver_h /usr/include/curl/curlver.h |
|---|
| 35 | %define libcurl_ver %(sed %{libcurl_sed} %{curlver_h} 2>/dev/null || echo 0) |
|---|
| 36 | Requires: curl >= %{libcurl_ver} |
|---|
| 37 | |
|---|
| 38 | Provides: %{modname} = %{version}-%{release} |
|---|
| 39 | |
|---|
| 40 | %description |
|---|
| 41 | PycURL is a Python interface to libcurl. PycURL can be used to fetch |
|---|
| 42 | objects identified by a URL from a Python program, similar to the |
|---|
| 43 | urllib Python module. PycURL is mature, very fast, and supports a lot |
|---|
| 44 | of features. |
|---|
| 45 | |
|---|
| 46 | |
|---|
| 47 | %package -n python3-%{modname} |
|---|
| 48 | Summary: A Python3 interface to libcurl |
|---|
| 49 | Summary(ja): libcurl の Python3 インタフェース |
|---|
| 50 | Group: programming |
|---|
| 51 | BuildRequires: python3-devel |
|---|
| 52 | BuildRequires: python3-rpm-macros |
|---|
| 53 | |
|---|
| 54 | %description -n python3-%{modname} |
|---|
| 55 | PycURL is a Python interface to libcurl. PycURL can be used to fetch |
|---|
| 56 | objects identified by a URL from a Python program, similar to the |
|---|
| 57 | urllib Python module. PycURL is mature, very fast, and supports a lot |
|---|
| 58 | of features. |
|---|
| 59 | |
|---|
| 60 | |
|---|
| 61 | %prep |
|---|
| 62 | %autosetup -n %{modname}-%{version} -p1 |
|---|
| 63 | |
|---|
| 64 | # remove binaries packaged by upstream |
|---|
| 65 | rm -f tests/fake-curl/libcurl/*.so |
|---|
| 66 | |
|---|
| 67 | # remove a test-case that relies on sftp://web.sourceforge.net being available |
|---|
| 68 | rm -f tests/ssh_key_cb_test.py |
|---|
| 69 | |
|---|
| 70 | # remove a test-case that fails in Koji |
|---|
| 71 | rm -f tests/seek_cb_test.py |
|---|
| 72 | |
|---|
| 73 | # remove tests depending on the 'flaky' nose plug-in |
|---|
| 74 | grep '^import flaky' -r tests | cut -d: -f1 | xargs rm -fv |
|---|
| 75 | |
|---|
| 76 | # drop options that are not supported by nose |
|---|
| 77 | sed -e 's/ --show-skipped//' \ |
|---|
| 78 | -e 's/ --with-flaky//' \ |
|---|
| 79 | -i tests/run.sh |
|---|
| 80 | |
|---|
| 81 | %build |
|---|
| 82 | %py_build -- --with-openssl |
|---|
| 83 | %py3_build -- --with-openssl |
|---|
| 84 | |
|---|
| 85 | %check |
|---|
| 86 | #export PYTHONPATH=$PWD/build/lib* |
|---|
| 87 | #%{__python} tests/test_internals.py -q |
|---|
| 88 | |
|---|
| 89 | %install |
|---|
| 90 | rm -rf %{buildroot} |
|---|
| 91 | export PYCURL_SSL_LIBRARY=openssl |
|---|
| 92 | %py_install |
|---|
| 93 | %py3_install |
|---|
| 94 | rm -rf %{buildroot}%{_datadir}/doc/pycurl |
|---|
| 95 | |
|---|
| 96 | |
|---|
| 97 | %clean |
|---|
| 98 | rm -rf %{buildroot} |
|---|
| 99 | |
|---|
| 100 | %files |
|---|
| 101 | %defattr(-,root,root,-) |
|---|
| 102 | %license COPYING-LGPL COPYING-MIT |
|---|
| 103 | %doc ChangeLog README.rst examples doc tests |
|---|
| 104 | %{python_sitearch}/* |
|---|
| 105 | |
|---|
| 106 | %files -n python3-%{modname} |
|---|
| 107 | %defattr(-,root,root,-) |
|---|
| 108 | %license COPYING-LGPL COPYING-MIT |
|---|
| 109 | %doc ChangeLog README.rst examples doc tests |
|---|
| 110 | %{python3_sitearch}/* |
|---|
| 111 | |
|---|
| 112 | %changelog |
|---|
| 113 | * Sun Aug 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 7.43.0.4-1 |
|---|
| 114 | - new upstream release: the latest version with python2 support. |
|---|
| 115 | |
|---|
| 116 | * Wed Apr 03 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 7.43.0.2-1 |
|---|
| 117 | - new upstream release. |
|---|
| 118 | - added python3 support. |
|---|
| 119 | |
|---|
| 120 | * Sun Jan 12 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 7.19.0-5 |
|---|
| 121 | - rebuild with VineSeed environment |
|---|
| 122 | |
|---|
| 123 | * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 7.19.0-4 |
|---|
| 124 | - rebuild with python-2.7.2 |
|---|
| 125 | |
|---|
| 126 | * Tue Feb 02 2010 Shu KONNO <owa@bg.wakwak.com> 7.19.0-3 |
|---|
| 127 | - rebuild with python-2.6 |
|---|
| 128 | |
|---|
| 129 | * Sat Aug 8 2009 Shu KONNO <owa@bg.wakwak.com> - 7.19.0-2 |
|---|
| 130 | - spec in utf-8 |
|---|
| 131 | - added BR: openldap-devel |
|---|
| 132 | |
|---|
| 133 | * Thu Aug 6 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 7.19.0-1 |
|---|
| 134 | - initial build for VineSeed |
|---|
| 135 | |
|---|
| 136 | * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.19.0-4 |
|---|
| 137 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild |
|---|
| 138 | |
|---|
| 139 | * Fri Apr 17 2009 Stepan Kasal <skasal@redhat.com> - 7.19.0-3 |
|---|
| 140 | - fix typo in the previous change |
|---|
| 141 | |
|---|
| 142 | * Fri Apr 17 2009 Stepan Kasal <skasal@redhat.com> - 7.19.0-2 |
|---|
| 143 | - add a require to reflect a dependency on libcurl version (#496308) |
|---|
| 144 | |
|---|
| 145 | * Thu Mar 5 2009 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.19.0-1 |
|---|
| 146 | - Update to 7.19.0 |
|---|
| 147 | |
|---|
| 148 | * Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.18.2-3 |
|---|
| 149 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild |
|---|
| 150 | |
|---|
| 151 | * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 7.18.2-2 |
|---|
| 152 | - Rebuild for Python 2.6 |
|---|
| 153 | |
|---|
| 154 | * Thu Jul 3 2008 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.18.2-1 |
|---|
| 155 | - Update to 7.18.2 |
|---|
| 156 | - Thanks to Ville Skytt辰 re-enable the tests and fix a minor problem |
|---|
| 157 | with the setup.py. (Bug # 45400) |
|---|
| 158 | |
|---|
| 159 | * Thu Jun 5 2008 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.18.1-1 |
|---|
| 160 | - Update to 7.18.1 |
|---|
| 161 | - Disable tests because it's not testing the built library, it's trying to |
|---|
| 162 | test an installed library. |
|---|
| 163 | |
|---|
| 164 | * Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 7.16.4-3 |
|---|
| 165 | - Autorebuild for GCC 4.3 |
|---|
| 166 | |
|---|
| 167 | * Thu Jan 3 2008 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.16.4-2 |
|---|
| 168 | - BR openssl-devel |
|---|
| 169 | |
|---|
| 170 | * Wed Aug 29 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.16.4-1 |
|---|
| 171 | - Update to 7.16.4 |
|---|
| 172 | - Update license tag. |
|---|
| 173 | |
|---|
| 174 | * Sat Jun 9 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.16.2.1-1 |
|---|
| 175 | - Update to released version. |
|---|
| 176 | |
|---|
| 177 | * Thu Dec 7 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.16.0-0.1.20061207 |
|---|
| 178 | - Update to a CVS snapshot since development has a newer version of curl than is in FC <= 6 |
|---|
| 179 | |
|---|
| 180 | * Thu Dec 7 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.15.5.1-4 |
|---|
| 181 | - Add -DHAVE_CURL_OPENSSL to fix PPC build problem. |
|---|
| 182 | |
|---|
| 183 | * Thu Dec 7 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.15.5.1-3 |
|---|
| 184 | - Don't forget to Provide: pycurl!!! |
|---|
| 185 | |
|---|
| 186 | * Thu Dec 7 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.15.5.1-2 |
|---|
| 187 | - Remove INSTALL from the list of documentation |
|---|
| 188 | - Use python_sitearch for all of the files |
|---|
| 189 | |
|---|
| 190 | * Thu Dec 7 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.15.5.1-1 |
|---|
| 191 | - First version for Fedora Extras |
|---|