Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

depends: python: fix urllib on darwin

  • Loading branch information...
commit df33686f13d9d2496d61a01a04377677a598835c 1 parent 4150e93
theuni authored Cory Fields committed
View
12 tools/depends/target/python26/Makefile
@@ -15,10 +15,6 @@ CONFIGURE=OPT="$(CFLAGS)" \
./configure --prefix=$(PREFIX) \
--disable-toolbox-glue --disable-framework --with-system-ffi \
-ifeq ($(OS),ios)
-CONFIGURE+=LDFLAGS="$(LDFLAGS) -miphoneos-version-min=3.0"
-endif
-
LIBDYLIB=$(PLATFORM)/libpython2.6.a
all: .installed-$(PLATFORM)
@@ -37,16 +33,14 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
cd $(PLATFORM); patch -p1 < ../python-osx-environ-fix.patch
cd $(PLATFORM); patch -p0 < ../Python-2.6.5-ffi-static.patch
ifeq ($(OS),ios)
- cd $(PLATFORM); patch -p0 < ../Python-2.6.5-scproxy.patch
+ cd $(PLATFORM); patch -p0 < ../Python-2.6.5-urllib.diff
endif
cp modules.setup $(PLATFORM)/Modules/Setup.dist
#Add -liconv as needed, and add the _scproxy module for darwin
- cd $(PLATFORM); sed -ie 's|_locale _localemodule.c -lintl|_locale _localemodule.c -lintl $(LINK_ICONV) |' Modules/Setup.dist
-ifeq (darwin, $(findstring darwin, $(HOST)))
+ cd $(PLATFORM); sed -ie 's|_locale _localemodule.c -lintl|_locale _localemodule.c -lintl $(LINK_ICONV) -framework SystemConfiguration -framework CoreFoundation |' Modules/Setup.dist
+ifeq ($(OS),osx)
echo "_scproxy \$$(srcdir)/Mac/Modules/_scproxy.c -framework SystemConfiguration -framework CoreFoundation" >> $(PLATFORM)/Modules/Setup.dist
-else
- cd $(PLATFORM); sed -ie 's|-framework CoreFoundation||' configure.in
endif
cd $(PLATFORM); $(AUTORECONF)
View
51 tools/depends/target/python26/Python-2.6.5-scproxy.patch
@@ -1,51 +0,0 @@
---- Mac/Modules/_scproxy.c 2009-09-20 15:21:24.000000000 -0400
-+++ Mac/Modules/_scproxy.c 2013-01-22 19:40:41.000000000 -0500
-@@ -4,7 +4,6 @@
- */
- #include <Python.h>
- #include <SystemConfiguration/SystemConfiguration.h>
--
- static int32_t
- cfnum_to_int32(CFNumberRef num)
- {
-@@ -48,6 +47,7 @@
- static PyObject*
- get_proxy_settings(PyObject* mod __attribute__((__unused__)))
- {
-+/*
- CFDictionaryRef proxyDict = NULL;
- CFNumberRef aNum = NULL;
- CFArrayRef anArray = NULL;
-@@ -55,7 +55,7 @@
- PyObject* v;
- int r;
-
-- proxyDict = SCDynamicStoreCopyProxies(NULL);
-+ proxyDict = CFNetworkCopyProxiesForURL(NULL);
- if (!proxyDict) {
- Py_INCREF(Py_None);
- return Py_None;
-@@ -114,6 +114,7 @@
- error:
- if (proxyDict) CFRelease(proxyDict);
- Py_XDECREF(result);
-+*/
- return NULL;
- }
-
-@@ -163,6 +164,7 @@
- static PyObject*
- get_proxies(PyObject* mod __attribute__((__unused__)))
- {
-+/*
- PyObject* result = NULL;
- int r;
- CFDictionaryRef proxyDict = NULL;
-@@ -201,6 +203,7 @@
- error:
- if (proxyDict) CFRelease(proxyDict);
- Py_XDECREF(result);
-+*/
- return NULL;
- }
-
View
15 tools/depends/target/python26/Python-2.6.5-urllib.diff
@@ -0,0 +1,15 @@
+--- Lib/urllib.py 2010-02-20 17:13:01.000000000 -0500
++++ Lib/urllib.py 2013-03-14 01:11:49.000000000 -0400
+@@ -1401,10 +1401,10 @@
+ if getproxies_environment():
+ return proxy_bypass_environment(host)
+ else:
+- return proxy_bypass_macosx_sysconf(host)
++ return false
+
+ def getproxies():
+- return getproxies_environment() or getproxies_macosx_sysconf()
++ return getproxies_environment()
+
+ elif os.name == 'nt':
+ def getproxies_registry():
Please sign in to comment.
Something went wrong with that request. Please try again.