Igor Gnatenko 3e1f14a
%global modname pycurl
f0122bf
Igor Gnatenko 3e1f14a
Name:           python-%{modname}
22f94c6
Version:        7.43.0
d10ca8c
Release:        11%{?dist}
f0122bf
Summary:        A Python interface to libcurl
f0122bf
Karel Klíč 84dd1c6
License:        LGPLv2+ or MIT
f0122bf
URL:            http://pycurl.sourceforge.net/
22f94c6
Source0:        https://dl.bintray.com/pycurl/pycurl/pycurl-%{version}.tar.gz
6b6c0da
a80dc1d
# disable TLS-SRP test because TLS-SRP is not supported by OpenSSL in Fedora
7f51a76
Patch1:         0001-python-pycurl-7.43.0-openssl-srp.patch
7f51a76
a80dc1d
# drop link-time vs. run-time TLS backend check (#1446850)
a80dc1d
Patch2:         0002-python-pycurl-7.43.0-tls-backend.patch
a80dc1d
7f51a76
BuildRequires:  libcurl-devel
d8a2d0a
BuildRequires:  openssl-devel
9e1f883
BuildRequires:  vsftpd
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.
44e5b79
%global libcurl_sed '/^#define LIBCURL_VERSION "/!d;s/"[^"]*$//;s/.*"//;q'
44e5b79
%global curlver_h /usr/include/curl/curlver.h
44e5b79
%global libcurl_ver %(sed %{libcurl_sed} %{curlver_h} 2>/dev/null || echo 0)
Igor Gnatenko 3e1f14a
Igor Gnatenko 3e1f14a
%description
Igor Gnatenko 3e1f14a
PycURL is a Python interface to libcurl. PycURL can be used to fetch
Igor Gnatenko 3e1f14a
objects identified by a URL from a Python program, similar to the
Igor Gnatenko 3e1f14a
urllib Python module. PycURL is mature, very fast, and supports a lot
Igor Gnatenko 3e1f14a
of features.
Igor Gnatenko 3e1f14a
Igor Gnatenko 3e1f14a
%package -n python2-%{modname}
Igor Gnatenko 3e1f14a
Summary:        Python interface to libcurl for Python 2
Igor Gnatenko 3e1f14a
%{?python_provide:%python_provide python2-%{modname}}
Igor Gnatenko 3e1f14a
BuildRequires:  python2-devel
8c7e04a
BuildRequires:  python2-bottle
Igor Gnatenko 3e1f14a
BuildRequires:  python2-nose
Igor Gnatenko 3e1f14a
BuildRequires:  python-pyflakes
40f3b8b
Requires:       libcurl%{?_isa} >= %{libcurl_ver}
f8241f4
Igor Gnatenko 3e1f14a
Provides:       %{modname} = %{version}-%{release}
f0122bf
Igor Gnatenko 3e1f14a
%description -n python2-%{modname}
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
Igor Gnatenko 3e1f14a
Python 2 version.
Igor Gnatenko 3e1f14a
Igor Gnatenko 3e1f14a
%package -n python3-%{modname}
Igor Gnatenko 3e1f14a
Summary:        Python interface to libcurl for Python 3
Igor Gnatenko 3e1f14a
%{?python_provide:%python_provide python3-%{modname}}
Igor Gnatenko 3e1f14a
BuildRequires:  python3-devel
Igor Gnatenko 3e1f14a
BuildRequires:  python3-bottle
Igor Gnatenko 3e1f14a
BuildRequires:  python3-nose
Igor Gnatenko 3e1f14a
BuildRequires:  python3-pyflakes
Igor Gnatenko 3e1f14a
Requires:       libcurl%{?_isa} >= %{libcurl_ver}
85c2f20
Igor Gnatenko 3e1f14a
%description -n python3-%{modname}
85c2f20
PycURL is a Python interface to libcurl. PycURL can be used to fetch
85c2f20
objects identified by a URL from a Python program, similar to the
85c2f20
urllib Python module. PycURL is mature, very fast, and supports a lot
85c2f20
of features.
85c2f20
Igor Gnatenko 3e1f14a
Python 3 version.
Igor Gnatenko 3e1f14a
f0122bf
%prep
7f51a76
%autosetup -n %{modname}-%{version} -p1
fb13180
b654718
# remove binaries packaged by upstream
b654718
rm -f tests/fake-curl/libcurl/*.so
b654718
573253e
# remove a test-case that relies on sftp://web.sourceforge.net being available
573253e
rm -f tests/ssh_key_cb_test.py
85c2f20
b754aea
# remove tests depending on the 'flaky' nose plug-in (not available in Fedora)
b754aea
grep '^import flaky' -r tests | cut -d: -f1 | xargs rm -fv
22f94c6
22f94c6
# drop options that are not supported by nose in Fedora
22f94c6
sed -e 's/ --show-skipped//' \
22f94c6
    -e 's/ --with-flaky//' \
22f94c6
    -i tests/run.sh
b754aea
f0122bf
%build
7f51a76
%py2_build -- --with-openssl
7f51a76
%py3_build -- --with-openssl
Igor Gnatenko 3e1f14a
Igor Gnatenko 3e1f14a
%install
Igor Gnatenko 3e1f14a
%py2_install
Igor Gnatenko 3e1f14a
%py3_install
Igor Gnatenko 3e1f14a
rm -rf %{buildroot}%{_datadir}/doc/pycurl
f0122bf
f0122bf
%check
Igor Gnatenko 3e1f14a
export PYTHONPATH=%{buildroot}%{python2_sitearch}
Igor Gnatenko 3e1f14a
make test PYTHON=%{__python2} NOSETESTS="nosetests-%{python2_version} -v"
0d9daab
rm -fv tests/fake-curl/libcurl/*.so
Igor Gnatenko 3e1f14a
Igor Gnatenko 3e1f14a
export PYTHONPATH=%{buildroot}%{python3_sitearch}
ab1c9f6
make test PYTHON=%{__python3} NOSETESTS="nosetests-%{python3_version} -v"
0d9daab
rm -fv tests/fake-curl/libcurl/*.so
f0122bf
8c7e04a
%files -n python2-%{modname}
6a7d7b8
%license COPYING-LGPL COPYING-MIT
6a7d7b8
%doc ChangeLog README.rst examples doc tests
Igor Gnatenko 3e1f14a
%{python2_sitearch}/curl/
Igor Gnatenko 3e1f14a
%{python2_sitearch}/%{modname}.so
Igor Gnatenko 3e1f14a
%{python2_sitearch}/%{modname}-%{version}-*.egg-info
f0122bf
8c7e04a
%files -n python3-%{modname}
6a7d7b8
%license COPYING-LGPL COPYING-MIT
6a7d7b8
%doc ChangeLog README.rst examples doc tests
Igor Gnatenko 3e1f14a
%{python3_sitearch}/curl/
Igor Gnatenko 3e1f14a
%{python3_sitearch}/%{modname}.*.so
Igor Gnatenko 3e1f14a
%{python3_sitearch}/%{modname}-%{version}-*.egg-info
85c2f20
f0122bf
%changelog
d10ca8c
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 7.43.0-11
d10ca8c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
d10ca8c
efa51cc
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 7.43.0-10
efa51cc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
efa51cc
a80dc1d
* Tue May 02 2017 Kamil Dudka <kdudka@redhat.com> - 7.43.0-9
a80dc1d
- drop link-time vs. run-time TLS backend check (#1446850)
a80dc1d
7f51a76
* Thu Apr 27 2017 Kamil Dudka <kdudka@redhat.com> - 7.43.0-8
7f51a76
- make pycurl compile against libcurl-openssl (#1445153)
7f51a76
bea0b6e
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 7.43.0-7
bea0b6e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
bea0b6e
d6de4a9
* Mon Dec 12 2016 Stratakis Charalampos <cstratak@redhat.com> - 7.43.0-6
d6de4a9
- Rebuild for Python 3.6
d6de4a9
8c7e04a
* Tue Nov 29 2016 Charalampos Stratakis <cstratak@redhat.com> - 7.43.0-5
8c7e04a
- Fix python2 subpackage name
8c7e04a
79e3dca
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.43.0-4
79e3dca
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
79e3dca
Igor Gnatenko 3e1f14a
* Thu Apr 14 2016 Igor Gnatenko <ignatenko@redhat.com> - 7.43.0-3
Igor Gnatenko 3e1f14a
- Follow new packaging guidelines
Igor Gnatenko 3e1f14a
40f3b8b
* Fri Feb 26 2016 Kamil Dudka <kdudka@redhat.com> - 7.43.0-2
40f3b8b
- require libcurl of the same architecture as python-pycurl
40f3b8b
22f94c6
* Sat Feb 06 2016 Kamil Dudka <kdudka@redhat.com> - 7.43.0-1
22f94c6
- update to 7.43.0
22f94c6
f13b8f6
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 7.21.5-4
f13b8f6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
f13b8f6
00df9eb
* Wed Jan 06 2016 Kamil Dudka <kdudka@redhat.com> - 7.21.5-3
00df9eb
- remove explicit dependency on keyutils-libs (reported by rpmlint)
6b6c0da
- update FSF address in COPYING-LGPL (detected by rpmlint)
00df9eb
0d9daab
* Tue Jan 05 2016 Kamil Dudka <kdudka@redhat.com> - 7.21.5-2
0d9daab
- avoid installing binaries generated in %%check to /usr/share
0d9daab
b654718
* Tue Jan 05 2016 Kamil Dudka <kdudka@redhat.com> - 7.21.5-1
b654718
- update to 7.21.5
b654718
b4f17ae
* Sat Nov 14 2015 Toshio Kuratomi <toshio@fedoraproject.org> - - 7.19.5.3-3
b4f17ae
- Remove build dependency on cherrypy as it's no longer needed for testing
b4f17ae
e5d27d8
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.19.5.3-2
e5d27d8
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
e5d27d8
a1b34dc
* Tue Nov 03 2015 Kamil Dudka <kdudka@redhat.com> - 7.19.5.3-1
a1b34dc
- update to 7.19.5.3
a1b34dc
b754aea
* Mon Nov 02 2015 Kamil Dudka <kdudka@redhat.com> - 7.19.5.2-1
b754aea
- update to 7.19.5.2
b754aea
1cf5811
* Mon Sep 07 2015 Kamil Dudka <kdudka@redhat.com> - 7.19.5.1-3
1cf5811
- introduce CURL_SSLVERSION_TLSv1_[0-2] (#1260408)
1cf5811
8447d54
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.19.5.1-2
8447d54
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
8447d54
d9b6151
* Mon Jan 12 2015 Kamil Dudka <kdudka@redhat.com> - 7.19.5.1-1
d9b6151
- update to 7.19.5.1
d9b6151
ca30d1c
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.19.5-3
ca30d1c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
ca30d1c
6a7d7b8
* Sun Aug  3 2014 Tom Callaway <spot@fedoraproject.org> - 7.19.5-2
6a7d7b8
- fix license handling
6a7d7b8
27346e9
* Mon Jul 14 2014 Kamil Dudka <kdudka@redhat.com> - 7.19.5-1
27346e9
- update to 7.19.5
27346e9
bb97c22
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.19.3.1-3
bb97c22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
bb97c22
ab1c9f6
* Mon May 19 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 7.19.3.1-2
ab1c9f6
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
ab1c9f6
97716a9
* Thu Feb 06 2014 Kamil Dudka <kdudka@redhat.com> - 7.19.3.1-1
97716a9
- update to 7.19.3.1
97716a9
85c2f20
* Fri Jan 10 2014 Kamil Dudka <kdudka@redhat.com> - 7.19.3-2
85c2f20
- add python3 subpackage (#1014583)
85c2f20
e867829
* Fri Jan 10 2014 Kamil Dudka <kdudka@redhat.com> - 7.19.3-1
e867829
- update to 7.19.3
e867829
f2b887d
* Thu Jan 02 2014 Kamil Dudka <kdudka@redhat.com> - 7.19.0.3-1
f2b887d
- update to 7.19.0.3
f2b887d
0350911
* Tue Oct 08 2013 Kamil Dudka <kdudka@redhat.com> - 7.19.0.2-1
0350911
- update to 7.19.0.2
0350911
205ad20
* Wed Sep 25 2013 Kamil Dudka <kdudka@redhat.com> - 7.19.0.1-1
205ad20
- update to 7.19.0.1
205ad20
c2150c3
* Thu Aug 08 2013 Kamil Dudka <kdudka@redhat.com> - 7.19.0-18.20130315git8d654296
c2150c3
- sync with upstream 8d654296
c2150c3
ffc10df
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.19.0-17.20120408git9b8f4e38
ffc10df
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
ffc10df
9e1f883
* Tue Apr 09 2013 Kamil Dudka <kdudka@redhat.com> - 7.19.0-16.20120408git9b8f4e38
9e1f883
- sync with upstream 9b8f4e38 (fixes #928370)
536a4e5
- add the GLOBAL_ACK_EINTR constant to the list of exported symbols (#920589)
fb13180
- temporarily disable tests/multi_socket_select_test.py
9e1f883
77fac8b
* Wed Mar 06 2013 Kamil Dudka <kdudka@redhat.com> - 7.19.0-15
77fac8b
- allow to return -1 from the write callback (#857875) 
77fac8b
- remove the patch for curl-config --static-libs no longer needed
2423e9d
- run the tests against the just built pycurl, not the system one
77fac8b
0a2fc21
* Mon Feb 25 2013 Kamil Dudka <kdudka@redhat.com> - 7.19.0-14
0a2fc21
- apply bug-fixes committed to upstream CVS since 7.19.0 (fixes #896025)
0a2fc21
e3f6d66
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.19.0-13
e3f6d66
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
e3f6d66
44e5b79
* Wed Aug 22 2012 Jan Synáček <jsynacek@redhat.com> - 7.19.0-12
44e5b79
- Improve spec
44e5b79
263fe2b
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.19.0-11
263fe2b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
263fe2b
22ad004
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.19.0-10
22ad004
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
22ad004
d600138
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.19.0-9
d600138
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
d600138
f95cf62
* Mon Dec 20 2010 Dennis Gilmore <dennis@ausil.us> - 7.19.0-8
f95cf62
- add Missing Requires on keyutils-libs
f95cf62
ac3344c
* Tue Aug 17 2010 Jeffrey C. Ollie <jeff@ocjtech.us> - 7.19.0-7
ac3344c
- Add patch developed by David Malcolm to fix segfaults caused by a missing incref
ac3344c
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