Skip to content

Commit

Permalink
depends: python: fix urllib on darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
theuni authored and Cory Fields committed Mar 14, 2013
1 parent 4150e93 commit df33686
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 60 deletions.
12 changes: 3 additions & 9 deletions tools/depends/target/python26/Makefile
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
51 changes: 0 additions & 51 deletions tools/depends/target/python26/Python-2.6.5-scproxy.patch

This file was deleted.

15 changes: 15 additions & 0 deletions 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():

0 comments on commit df33686

Please sign in to comment.