summaryrefslogtreecommitdiff
path: root/data/_python-3.7.3
diff options
context:
space:
mode:
Diffstat (limited to 'data/_python-3.7.3')
-rw-r--r--data/_python-3.7.3/Python-3.7.3.tar.xzbin17108364 -> 0 bytes
-rw-r--r--data/_python-3.7.3/_metadata/description1
l---------data/_python-3.7.3/_metadata/expat.dep1
-rw-r--r--data/_python-3.7.3/_metadata/in.1443.000
l---------data/_python-3.7.3/_metadata/libffi.dep1
l---------data/_python-3.7.3/_metadata/libssl1.0.dep1
l---------data/_python-3.7.3/_metadata/maintainer1
-rw-r--r--data/_python-3.7.3/_metadata/name1
l---------data/_python-3.7.3/_metadata/ncurses.dep1
-rw-r--r--data/_python-3.7.3/_metadata/priority1
l---------data/_python-3.7.3/_metadata/readline.dep1
-rw-r--r--data/_python-3.7.3/_metadata/role1
-rw-r--r--data/_python-3.7.3/_metadata/section1
-rw-r--r--data/_python-3.7.3/_metadata/tags1
-rw-r--r--data/_python-3.7.3/_metadata/version1
l---------data/_python-3.7.3/_metadata/xz.dep1
-rw-r--r--data/_python-3.7.3/configure.patch175
-rwxr-xr-xdata/_python-3.7.3/install_certificates.command44
-rw-r--r--data/_python-3.7.3/make.sh39
-rw-r--r--data/_python-3.7.3/proxies.patch44
-rw-r--r--data/_python-3.7.3/setup.patch179
21 files changed, 0 insertions, 495 deletions
diff --git a/data/_python-3.7.3/Python-3.7.3.tar.xz b/data/_python-3.7.3/Python-3.7.3.tar.xz
deleted file mode 100644
index 9d6454c5c..000000000
--- a/data/_python-3.7.3/Python-3.7.3.tar.xz
+++ /dev/null
Binary files differ
diff --git a/data/_python-3.7.3/_metadata/description b/data/_python-3.7.3/_metadata/description
deleted file mode 100644
index cf36e1f16..000000000
--- a/data/_python-3.7.3/_metadata/description
+++ /dev/null
@@ -1 +0,0 @@
-Interpreted, interactive, object-oriendted programming language.
diff --git a/data/_python-3.7.3/_metadata/expat.dep b/data/_python-3.7.3/_metadata/expat.dep
deleted file mode 120000
index 2100fb19e..000000000
--- a/data/_python-3.7.3/_metadata/expat.dep
+++ /dev/null
@@ -1 +0,0 @@
-../../expat \ No newline at end of file
diff --git a/data/_python-3.7.3/_metadata/in.1443.00 b/data/_python-3.7.3/_metadata/in.1443.00
deleted file mode 100644
index e69de29bb..000000000
--- a/data/_python-3.7.3/_metadata/in.1443.00
+++ /dev/null
diff --git a/data/_python-3.7.3/_metadata/libffi.dep b/data/_python-3.7.3/_metadata/libffi.dep
deleted file mode 120000
index da9d6c358..000000000
--- a/data/_python-3.7.3/_metadata/libffi.dep
+++ /dev/null
@@ -1 +0,0 @@
-../../libffi \ No newline at end of file
diff --git a/data/_python-3.7.3/_metadata/libssl1.0.dep b/data/_python-3.7.3/_metadata/libssl1.0.dep
deleted file mode 120000
index a501d00a8..000000000
--- a/data/_python-3.7.3/_metadata/libssl1.0.dep
+++ /dev/null
@@ -1 +0,0 @@
-../../libssl1.0 \ No newline at end of file
diff --git a/data/_python-3.7.3/_metadata/maintainer b/data/_python-3.7.3/_metadata/maintainer
deleted file mode 120000
index 0c538aadb..000000000
--- a/data/_python-3.7.3/_metadata/maintainer
+++ /dev/null
@@ -1 +0,0 @@
-../../../people/mac \ No newline at end of file
diff --git a/data/_python-3.7.3/_metadata/name b/data/_python-3.7.3/_metadata/name
deleted file mode 100644
index 358eeddf0..000000000
--- a/data/_python-3.7.3/_metadata/name
+++ /dev/null
@@ -1 +0,0 @@
-Python 3
diff --git a/data/_python-3.7.3/_metadata/ncurses.dep b/data/_python-3.7.3/_metadata/ncurses.dep
deleted file mode 120000
index a395fad08..000000000
--- a/data/_python-3.7.3/_metadata/ncurses.dep
+++ /dev/null
@@ -1 +0,0 @@
-../../ncurses \ No newline at end of file
diff --git a/data/_python-3.7.3/_metadata/priority b/data/_python-3.7.3/_metadata/priority
deleted file mode 100644
index 134d9bc32..000000000
--- a/data/_python-3.7.3/_metadata/priority
+++ /dev/null
@@ -1 +0,0 @@
-optional
diff --git a/data/_python-3.7.3/_metadata/readline.dep b/data/_python-3.7.3/_metadata/readline.dep
deleted file mode 120000
index f35c9185b..000000000
--- a/data/_python-3.7.3/_metadata/readline.dep
+++ /dev/null
@@ -1 +0,0 @@
-../../readline \ No newline at end of file
diff --git a/data/_python-3.7.3/_metadata/role b/data/_python-3.7.3/_metadata/role
deleted file mode 100644
index 52b4d7301..000000000
--- a/data/_python-3.7.3/_metadata/role
+++ /dev/null
@@ -1 +0,0 @@
-hacker
diff --git a/data/_python-3.7.3/_metadata/section b/data/_python-3.7.3/_metadata/section
deleted file mode 100644
index ddc7f1fd8..000000000
--- a/data/_python-3.7.3/_metadata/section
+++ /dev/null
@@ -1 +0,0 @@
-Scripting
diff --git a/data/_python-3.7.3/_metadata/tags b/data/_python-3.7.3/_metadata/tags
deleted file mode 100644
index ad5d50831..000000000
--- a/data/_python-3.7.3/_metadata/tags
+++ /dev/null
@@ -1 +0,0 @@
-purpose::console
diff --git a/data/_python-3.7.3/_metadata/version b/data/_python-3.7.3/_metadata/version
deleted file mode 100644
index c1e43e6d4..000000000
--- a/data/_python-3.7.3/_metadata/version
+++ /dev/null
@@ -1 +0,0 @@
-3.7.3
diff --git a/data/_python-3.7.3/_metadata/xz.dep b/data/_python-3.7.3/_metadata/xz.dep
deleted file mode 120000
index d5eb7ae54..000000000
--- a/data/_python-3.7.3/_metadata/xz.dep
+++ /dev/null
@@ -1 +0,0 @@
-../../xz \ No newline at end of file
diff --git a/data/_python-3.7.3/configure.patch b/data/_python-3.7.3/configure.patch
deleted file mode 100644
index f8b11e254..000000000
--- a/data/_python-3.7.3/configure.patch
+++ /dev/null
@@ -1,175 +0,0 @@
-diff -ur Python-3.7.3/configure.ac Python-3.7.3+iPhone/configure.ac
---- Python-3.7.3/configure.ac 2019-03-25 20:21:05.000000000 +0000
-+++ Python-3.7.3+iPhone/configure.ac 2019-04-11 14:26:49.751953155 +0000
-@@ -379,6 +379,9 @@
- *-*-cygwin*)
- ac_sys_system=Cygwin
- ;;
-+ *-*-darwin*)
-+ ac_sys_system=Darwin
-+ ;;
- *)
- # for now, limit cross builds to known configurations
- MACHDEP="unknown"
-@@ -423,6 +426,9 @@
- *-*-cygwin*)
- _host_cpu=
- ;;
-+ *-*-darwin*)
-+ _host_cpu=$host_cpu
-+ ;;
- *)
- # for now, limit cross builds to known configurations
- MACHDEP="unknown"
-@@ -1202,11 +1208,15 @@
-
- AC_CHECK_TOOLS([READELF], [readelf], [:])
- if test "$cross_compiling" = yes; then
-- case "$READELF" in
-- readelf|:)
-- AC_MSG_ERROR([readelf for the host is required for cross builds])
-- ;;
-- esac
-+ if test "$ac_sys_system" = Darwin; then
-+ :
-+ else
-+ case "$READELF" in
-+ readelf|:)
-+ AC_MSG_ERROR([readelf for the host is required for cross builds])
-+ ;;
-+ esac
-+ fi
- fi
- AC_SUBST(READELF)
-
-@@ -2407,63 +2417,63 @@
-
- AC_SUBST(LIBTOOL_CRUFT)
- case $ac_sys_system/$ac_sys_release in
-- Darwin/@<:@01567@:>@\..*)
-- LIBTOOL_CRUFT="-framework System -lcc_dynamic"
-- if test "${enable_universalsdk}"; then
-- :
-- else
-- LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
-- fi
-- LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
-- LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
-+# Darwin/@<:@01567@:>@\..*)
-+# LIBTOOL_CRUFT="-framework System -lcc_dynamic"
-+# if test "${enable_universalsdk}"; then
-+# :
-+# else
-+# LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
-+# fi
-+# LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
-+# LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
- Darwin/*)
-- gcc_version=`gcc -dumpversion`
-- if test ${gcc_version} '<' 4.0
-- then
-- LIBTOOL_CRUFT="-lcc_dynamic"
-- else
-+# gcc_version=`gcc -dumpversion`
-+# if test ${gcc_version} '<' 4.0
-+# then
-+# LIBTOOL_CRUFT="-lcc_dynamic"
-+# else
- LIBTOOL_CRUFT=""
-- fi
-- AC_RUN_IFELSE([AC_LANG_SOURCE([[
-- #include <unistd.h>
-- int main(int argc, char*argv[])
-- {
-- if (sizeof(long) == 4) {
-- return 0;
-- } else {
-- return 1;
-- }
-- }
-- ]])],[ac_osx_32bit=yes],[ac_osx_32bit=no],[ac_osx_32bit=yes])
--
-- if test "${ac_osx_32bit}" = "yes"; then
-- case `/usr/bin/arch` in
-- i386)
-- MACOSX_DEFAULT_ARCH="i386"
-- ;;
-- ppc)
-- MACOSX_DEFAULT_ARCH="ppc"
-- ;;
-- *)
-- AC_MSG_ERROR([Unexpected output of 'arch' on OSX])
-- ;;
-- esac
-- else
-- case `/usr/bin/arch` in
-- i386)
-- MACOSX_DEFAULT_ARCH="x86_64"
-- ;;
-- ppc)
-- MACOSX_DEFAULT_ARCH="ppc64"
-- ;;
-- *)
-- AC_MSG_ERROR([Unexpected output of 'arch' on OSX])
-- ;;
-- esac
--
-- fi
-+# fi
-+# AC_RUN_IFELSE([AC_LANG_SOURCE([[
-+# #include <unistd.h>
-+# int main(int argc, char*argv[])
-+# {
-+# if (sizeof(long) == 4) {
-+# return 0;
-+# } else {
-+# return 1;
-+# }
-+# }
-+# ]])],[ac_osx_32bit=yes],[ac_osx_32bit=no],[ac_osx_32bit=yes])
-+
-+# if test "${ac_osx_32bit}" = "yes"; then
-+# case `/usr/bin/arch` in
-+# i386)
-+# MACOSX_DEFAULT_ARCH="i386"
-+# ;;
-+# ppc)
-+# MACOSX_DEFAULT_ARCH="ppc"
-+# ;;
-+# *)
-+# AC_MSG_ERROR([Unexpected output of 'arch' on OSX])
-+# ;;
-+# esac
-+# else
-+# case `/usr/bin/arch` in
-+# i386)
-+# MACOSX_DEFAULT_ARCH="x86_64"
-+# ;;
-+# ppc)
-+# MACOSX_DEFAULT_ARCH="ppc64"
-+# ;;
-+# *)
-+# AC_MSG_ERROR([Unexpected output of 'arch' on OSX])
-+# ;;
-+# esac
-+#
-+# fi
-
-- LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
-+ LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs"
- LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
- LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
- esac
-@@ -4052,7 +4062,11 @@
-
- if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
- then
-- if test $ipv6 = yes
-+ if test "$cross_compiling" = yes && test "$ac_cv_buggy_getaddrinfo" = yes; then
-+ echo 'Warning: Buggy getaddrinfo! Skipping fatal error.'
-+ echo ' or you can specify "--disable-ipv6".'
-+ AC_DEFINE(HAVE_GETADDRINFO, 1, [Define if you have the getaddrinfo function.])
-+ elif test $ipv6 = yes
- then
- echo 'Fatal: You must get working getaddrinfo() function.'
- echo ' or you can specify "--disable-ipv6"'.
diff --git a/data/_python-3.7.3/install_certificates.command b/data/_python-3.7.3/install_certificates.command
deleted file mode 100755
index 529e4c400..000000000
--- a/data/_python-3.7.3/install_certificates.command
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/env python3
-# install_certifi.py
-#
-# sample script to install or update a set of default Root Certificates
-# for the ssl module. Uses the certificates provided by the certifi package:
-# https://pypi.org/project/certifi/
-
-import os
-import os.path
-import ssl
-import stat
-import subprocess
-import sys
-
-STAT_0o775 = ( stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR
- | stat.S_IRGRP | stat.S_IWGRP | stat.S_IXGRP
- | stat.S_IROTH | stat.S_IXOTH )
-
-def main():
- openssl_dir, openssl_cafile = os.path.split(
- ssl.get_default_verify_paths().openssl_cafile)
-
- print(" -- pip install --upgrade certifi")
- subprocess.check_call([sys.executable,
- "-E", "-s", "-m", "pip", "install", "--upgrade", "certifi"])
-
- import certifi
-
- # change working directory to the default SSL directory
- os.chdir(openssl_dir)
- relpath_to_certifi_cafile = os.path.relpath(certifi.where())
- print(" -- removing any existing file or link")
- try:
- os.remove(openssl_cafile)
- except FileNotFoundError:
- pass
- print(" -- creating symlink to certifi certificate bundle")
- os.symlink(relpath_to_certifi_cafile, openssl_cafile)
- print(" -- setting permissions")
- os.chmod(openssl_cafile, STAT_0o775)
- print(" -- update complete")
-
-if __name__ == '__main__':
- main()
diff --git a/data/_python-3.7.3/make.sh b/data/_python-3.7.3/make.sh
deleted file mode 100644
index a380cacfe..000000000
--- a/data/_python-3.7.3/make.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-pkg:setup
-
-############################################
-
-# Build for the host. Configure is picky about having python >= 3.7.
-dir=${PWD}
-pushd ..
- mkdir host-python
- cd host-python
- ${dir}/configure --prefix=${PWD}
- make install -j16
-popd
-export PATH="${dir}/../host-python/bin:$PATH"
-# Feel free to use another variable for this.
-# PYTHON_FOR_BUILD will break the build (don't use it).
-
-###########################################
-
-for x in "${PKG_DATA}"/*.patch; do
- echo "Patching ${x##*/}"
- patch -p1 < ${x}
-done
-
-autoreconf -ivf
-pkg:configure --enable-loadable-sqlite-extensions \
- --with-system-ffi --with-signal-module --enable-big-digits \
- --with-system-expat --enable-ipv6 --with-ensurepip=install \
- ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no \
- ac_cv_func_sendfile=no # <- Sendfile *might* be broken.
-pkg:make
-pkg:install
-
-# (FIXME) Fix the config to allow for pip installs.
-# ./configure / Python will use the $CC from the build.
-sed -i -e "s/-gcc/-clang/" -e "s/-cc/-clang/" \
- -e "s/-c++/-clang++/" -e "s/-g++/-clang++/" \
- -e "s/${PKG_TARG}-//" \
- ${PKG_DEST}/${PKG_TAPF}/lib/python*/_sysconfigdata*.py
-cp ${PKG_DATA}/install_certificates.command ${PKG_DEST}/${PKG_TAPF}/lib/python*
diff --git a/data/_python-3.7.3/proxies.patch b/data/_python-3.7.3/proxies.patch
deleted file mode 100644
index b4959ace3..000000000
--- a/data/_python-3.7.3/proxies.patch
+++ /dev/null
@@ -1,44 +0,0 @@
---- Python-3.7.3/Lib/urllib/request.py 2019-03-25 20:21:05.000000000 +0000
-+++ Python-3.7.3+iPhone/Lib/urllib/request.py 2019-04-12 18:43:13.605127939 +0000
-@@ -2580,21 +2580,28 @@
-
-
- if sys.platform == 'darwin':
-- from _scproxy import _get_proxy_settings, _get_proxies
--
-- def proxy_bypass_macosx_sysconf(host):
-- proxy_settings = _get_proxy_settings()
-- return _proxy_bypass_macosx_sysconf(host, proxy_settings)
--
-- def getproxies_macosx_sysconf():
-- """Return a dictionary of scheme -> proxy server URL mappings.
--
-- This function uses the MacOSX framework SystemConfiguration
-- to fetch the proxy information.
-- """
-- return _get_proxies()
-+ try:
-+ from _scproxy import _get_proxy_settings, _get_proxies
-
-+ def proxy_bypass_macosx_sysconf(host):
-+ proxy_settings = _get_proxy_settings()
-+ return _proxy_bypass_macosx_sysconf(host, proxy_settings)
-+
-+ def getproxies_macosx_sysconf():
-+ """Return a dictionary of scheme -> proxy server URL mappings.
-+
-+ This function uses the MacOSX framework SystemConfiguration
-+ to fetch the proxy information.
-+ """
-+ return _get_proxies()
-+
-+ except ModuleNotFoundError:
-+ # iOS fix:
-+ def proxy_bypass_macosx_sysconf(host):
-+ return False
-
-+ def getproxies_macosx_sysconf():
-+ return {}
-
- def proxy_bypass(host):
- """Return True, if host should be bypassed.
diff --git a/data/_python-3.7.3/setup.patch b/data/_python-3.7.3/setup.patch
deleted file mode 100644
index 6ac2390b7..000000000
--- a/data/_python-3.7.3/setup.patch
+++ /dev/null
@@ -1,179 +0,0 @@
---- Python-3.7.3/setup.py 2019-03-25 20:21:05.000000000 +0000
-+++ Python-3.7.3+iPhone/setup.py 2019-04-11 20:54:37.306532874 +0000
-@@ -18,6 +18,9 @@
-
- cross_compiling = "_PYTHON_HOST_PLATFORM" in os.environ
-
-+#if cross_compiling:
-+# sys.platform = 'darwin'
-+
- # Set common compiler and linker flags derived from the Makefile,
- # reserved for building the interpreter and the stdlib modules.
- # See bpo-21121 and bpo-35257
-@@ -98,7 +101,7 @@
- cflags = sysconfig.get_config_var('CFLAGS')
- m = re.search(r'-isysroot\s+(\S+)', cflags)
- if m is None:
-- sysroot = '/'
-+ sysroot = os.environ['PKG_ROOT'] or '/'
- else:
- sysroot = m.group(1)
- return sysroot
-@@ -107,7 +110,7 @@
- """
- Returns True if 'path' can be located in an OSX SDK
- """
-- return ( (path.startswith('/usr/') and not path.startswith('/usr/local'))
-+ return ( path.startswith('/usr/')
- or path.startswith('/System/')
- or path.startswith('/Library/') )
-
-@@ -781,6 +784,9 @@
-
- # readline
- do_readline = self.compiler.find_library_file(lib_dirs, 'readline')
-+ if cross_compiling:
-+ # Just say yes to this check.
-+ do_readline = True
- readline_termcap_library = ""
- curses_library = ""
- # Cannot use os.popen here in py3k.
-@@ -789,11 +795,11 @@
- os.makedirs(self.build_temp)
- # Determine if readline is already linked against curses or tinfo.
- if do_readline:
-- if cross_compiling:
-+ if cross_compiling and host_platform != 'darwin':
- ret = os.system("%s -d %s | grep '(NEEDED)' > %s" \
- % (sysconfig.get_config_var('READELF'),
- do_readline, tmpfile))
-- elif find_executable('ldd'):
-+ elif find_executable('ldd') and host_platform != 'darwin':
- ret = os.system("ldd %s > %s" % (do_readline, tmpfile))
- else:
- ret = 256
-@@ -833,7 +839,7 @@
- # MacOSX 10.4 has a broken readline. Don't try to build
- # the readline module unless the user has installed a fixed
- # readline package
-- if find_file('readline/rlconf.h', inc_dirs, []) is None:
-+ if find_file('readline/rlconf.h', inc_dirs, []) is None and not cross_compiling:
- do_readline = False
- if do_readline:
- if host_platform == 'darwin' and os_release < 9:
-@@ -1346,6 +1352,9 @@
- curses_defines = []
- curses_includes = []
- panel_library = 'panel'
-+ if cross_compiling:
-+ # Default to ncurses here.
-+ curses_library = curses_library or 'ncurses'
- if curses_library == 'ncursesw':
- curses_defines.append(('HAVE_NCURSESW', '1'))
- if not cross_compiling:
-@@ -1390,7 +1399,7 @@
-
- # If the curses module is enabled, check for the panel module
- if (module_enabled(exts, '_curses') and
-- self.compiler.find_library_file(lib_dirs, panel_library)):
-+ self.compiler.find_library_file(lib_dirs, panel_library)) or cross_compiling:
- exts.append( Extension('_curses_panel', ['_curses_panel.c'],
- include_dirs=curses_includes,
- define_macros=curses_defines,
-@@ -1412,22 +1421,24 @@
- # http://www.gzip.org/zlib/
- zlib_inc = find_file('zlib.h', [], inc_dirs)
- have_zlib = False
-- if zlib_inc is not None:
-- zlib_h = zlib_inc[0] + '/zlib.h'
-- version = '"0.0.0"'
-+ if zlib_inc is not None or cross_compiling:
-+# zlib_h = zlib_inc[0] + '/zlib.h'
-+# version = '"0.0.0"'
-+ version = '"1.1.3"'
- version_req = '"1.1.3"'
-- if host_platform == 'darwin' and is_macosx_sdk_path(zlib_h):
-- zlib_h = os.path.join(macosx_sdk_root(), zlib_h[1:])
-- with open(zlib_h) as fp:
-- while 1:
-- line = fp.readline()
-- if not line:
-- break
-- if line.startswith('#define ZLIB_VERSION'):
-- version = line.split()[2]
-- break
-- if version >= version_req:
-- if (self.compiler.find_library_file(lib_dirs, 'z')):
-+# if host_platform == 'darwin' and is_macosx_sdk_path(zlib_h):
-+# zlib_h = os.path.join(macosx_sdk_root(), zlib_h[1:])
-+# with open(zlib_h) as fp:
-+# while 1:
-+# line = fp.readline()
-+# if not line:
-+# break
-+# if line.startswith('#define ZLIB_VERSION'):
-+# version = line.split()[2]
-+# break
-+ if version >= version_req or cross_compiling:
-+ # zlib is a default lib on iOS.
-+ if (self.compiler.find_library_file(lib_dirs, 'z')) or cross_compiling:
- if host_platform == "darwin":
- zlib_extra_link_args = ('-Wl,-search_paths_first',)
- else:
-@@ -1459,7 +1470,8 @@
- extra_link_args = extra_link_args) )
-
- # Gustavo Niemeyer's bz2 module.
-- if (self.compiler.find_library_file(lib_dirs, 'bz2')):
-+ if (self.compiler.find_library_file(lib_dirs, 'bz2')) or cross_compiling:
-+ # BZ2 is in the iOS SDK
- if host_platform == "darwin":
- bz2_extra_link_args = ('-Wl,-search_paths_first',)
- else:
-@@ -1471,7 +1483,8 @@
- missing.append('_bz2')
-
- # LZMA compression support.
-- if self.compiler.find_library_file(lib_dirs, 'lzma'):
-+ if self.compiler.find_library_file(lib_dirs, 'lzma') or cross_compiling:
-+ # LZMA is in the iOS SDK
- exts.append( Extension('_lzma', ['_lzmamodule.c'],
- libraries = ['lzma']) )
- else:
-@@ -1631,11 +1644,12 @@
-
- # Build the _uuid module if possible
- uuid_incs = find_file("uuid.h", inc_dirs, ["/usr/include/uuid"])
-- if uuid_incs is not None:
-- if self.compiler.find_library_file(lib_dirs, 'uuid'):
-- uuid_libs = ['uuid']
-- else:
-- uuid_libs = []
-+ if uuid_incs is not None or cross_compiling:
-+ # uuid/uuid.h exists in the iOS SDK.
-+# if self.compiler.find_library_file(lib_dirs, 'uuid'):
-+# uuid_libs = ['uuid']
-+# else:
-+ uuid_libs = []
- self.extensions.append(Extension('_uuid', ['_uuidmodule.c'],
- libraries=uuid_libs,
- include_dirs=uuid_incs))
-@@ -1926,6 +1940,9 @@
-
- def configure_ctypes(self, ext):
- if not self.use_system_libffi:
-+ if cross_compiling:
-+ return True
-+ # Bypass the check, assume library path is correct
- if host_platform == 'darwin':
- return self.configure_ctypes_darwin(ext)
- print('INFO: Could not locate ffi libs and/or headers')
-@@ -1984,7 +2001,7 @@
- return
- # OS X 10.5 comes with libffi.dylib; the include files are
- # in /usr/include/ffi
-- inc_dirs.append('/usr/include/ffi')
-+ inc_dirs.append(sysroot + '/usr/include/ffi')
-
- ffi_inc = [sysconfig.get_config_var("LIBFFI_INCLUDEDIR")]
- if not ffi_inc or ffi_inc[0] == '':