---- setup.py~ 2008-04-22 17:00:45.000000000 +0300
-+++ setup.py 2008-07-03 21:53:36.000000000 +0300
-@@ -97,8 +97,7 @@
- else:
- extra_compile_args.append(e)
- libs = split_quoted(
-- os.popen("'%s' --libs" % CURL_CONFIG).read()+\
-- os.popen("'%s' --static-libs" % CURL_CONFIG).read())
-+ os.popen("'%s' --libs" % CURL_CONFIG).read())
- for e in libs:
- if e[:2] == "-l":
- libraries.append(e[2:])
+--- pycurl-7.19.0.2/setup.py.orig 2013-10-08 14:28:53.000000000 +0200
++++ pycurl-7.19.0.2/setup.py 2013-10-17 17:48:12.440601971 +0200
+@@ -101,8 +101,8 @@
+ # support one or the other of these curl-config options, so gracefully
+ # tolerate failure of either, but not both.
+ optbuf = ""
+- for option in ["--libs", "--static-libs"]:
+- p = subprocess.Popen("'%s' %s" % (CURL_CONFIG, option), shell=True,
++ for option in ["--libs", "--static --libs"]:
++ p = subprocess.Popen("'%s' %s libcurl" % ('pkg-config', option), shell=True,
+ stdout=subprocess.PIPE)
+ (stdout, stderr) = p.communicate()
+ if p.wait() == 0:
-# TODO
-# - as-needed fix: drop libssh2 dep from curl
-
# During its initialization, PycURL checks that the actual libcurl version
# is not lower than the one used when PycURL was built.
# Yes, that should be handled by library versioning (which would then get
Summary: Free and easy-to-use client-side URL transfer library
Summary(pl.UTF-8): Łatwa w użyciu biblioteka obsługi URL od strony klienta
Name: python-%{module}
-Version: 7.19.0
-Release: 8
+Version: 7.19.0.2
+Release: 1
License: LGPL v2 or MIT-like
Group: Libraries/Python
Source0: http://pycurl.sourceforge.net/download/%{module}-%{version}.tar.gz
-# Source0-md5: 919d58fe37e69fe87ce4534d8b6a1c7b
+# Source0-md5: 518be33976dbc6838e42495ada64b43f
Patch0: %{name}-no-static-libs.patch
URL: http://pycurl.sourceforge.net/
BuildRequires: curl-devel >= 7.19
+BuildRequires: pkgconfig >= 1:0.20
BuildRequires: python >= 1:2.5
BuildRequires: python-devel >= 1:2.5
BuildRequires: python-modules >= 1:2.5
%prep
%setup -q -n %{module}-%{version}
-%patch0 -p0
+%patch0 -p1
%build
+CC="%{__cc}" \
+CFLAGS="%{rpmcflags}" \
+LDFLAGS="%{rpmldflags}" \
%{__python} setup.py build \
--debug
%files
%defattr(644,root,root,755)
-%doc COPYING2 ChangeLog README TODO
+%doc COPYING2 ChangeLog README.rst TODO
%attr(755,root,root) %{py_sitedir}/pycurl.so
%dir %{py_sitedir}/curl
%{py_sitedir}/curl/*.py[co]