From 3b6f5fb7105a1548f5f6755c5d7e22390745c72a Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 9 Oct 2012 22:18:13 +0200 Subject: [PATCH] python-pycurl: Add missing patches. --- ...on-pycurl-fix-do_curl_reset-refcount.patch | 24 +++++++++++++++++++ .../python-pycurl-no-static-libs.patch | 12 ++++++++++ 2 files changed, 36 insertions(+) create mode 100644 src/patches/python-pycurl-fix-do_curl_reset-refcount.patch create mode 100644 src/patches/python-pycurl-no-static-libs.patch diff --git a/src/patches/python-pycurl-fix-do_curl_reset-refcount.patch b/src/patches/python-pycurl-fix-do_curl_reset-refcount.patch new file mode 100644 index 000000000..7e20b15c2 --- /dev/null +++ b/src/patches/python-pycurl-fix-do_curl_reset-refcount.patch @@ -0,0 +1,24 @@ +--- a/src/pycurl.c ++++ a/src/pycurl.c +@@ -1452,6 +1452,7 @@ do_curl_reset(CurlObject *self) + } + } + ++ Py_INCREF(Py_None); + return Py_None; + } + +--- a/tests/test_internals.py ++++ a/tests/test_internals.py +@@ -245,6 +245,11 @@ if 1 and gc: + if opts.verbose >= 1: + print "Tracked objects:", len(gc.get_objects()) + ++if 1: ++ # Ensure that the refcounting error in "reset" is fixed: ++ for i in xrange(100000): ++ c = Curl() ++ c.reset() + + # /*********************************************************************** + # // done diff --git a/src/patches/python-pycurl-no-static-libs.patch b/src/patches/python-pycurl-no-static-libs.patch new file mode 100644 index 000000000..c1410dcdf --- /dev/null +++ b/src/patches/python-pycurl-no-static-libs.patch @@ -0,0 +1,12 @@ +--- 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:]) -- 2.39.5