summaryrefslogtreecommitdiff
path: root/data/_python3.7
diff options
context:
space:
mode:
authorSam Bingner <sam@bingner.com>2019-05-06 14:31:17 -1000
committerSam Bingner <sam@bingner.com>2019-05-08 10:08:11 -1000
commitca02b0697f2f05de3bdd6c2f7cce928c9937bbc6 (patch)
tree84db78b776542f88532a184baa833f4727107cdc /data/_python3.7
parentd02b5fde55f6681ee84d901b8226c552fa7bb81b (diff)
Updates to apollo's python3.7 build
Diffstat (limited to 'data/_python3.7')
-rw-r--r--data/_python3.7/Python-3.7.3.tar.xzbin0 -> 17108364 bytes
-rw-r--r--data/_python3.7/_metadata/description1
l---------data/_python3.7/_metadata/expat.dep1
-rw-r--r--data/_python3.7/_metadata/in.1443.000
l---------data/_python3.7/_metadata/libffi.dep1
l---------data/_python3.7/_metadata/libssl1.0.dep1
l---------data/_python3.7/_metadata/maintainer1
-rw-r--r--data/_python3.7/_metadata/name1
l---------data/_python3.7/_metadata/ncurses.dep1
-rw-r--r--data/_python3.7/_metadata/priority1
l---------data/_python3.7/_metadata/readline.dep1
-rw-r--r--data/_python3.7/_metadata/role1
-rw-r--r--data/_python3.7/_metadata/section1
-rw-r--r--data/_python3.7/_metadata/tags1
-rw-r--r--data/_python3.7/_metadata/version1
l---------data/_python3.7/_metadata/xz.dep1
-rw-r--r--data/_python3.7/configure.diff175
-rw-r--r--data/_python3.7/header.diff16
-rwxr-xr-xdata/_python3.7/install_certificates.command44
-rw-r--r--data/_python3.7/make.sh42
-rw-r--r--data/_python3.7/proxies.diff44
-rw-r--r--data/_python3.7/setup.diff28
22 files changed, 363 insertions, 0 deletions
diff --git a/data/_python3.7/Python-3.7.3.tar.xz b/data/_python3.7/Python-3.7.3.tar.xz
new file mode 100644
index 000000000..9d6454c5c
--- /dev/null
+++ b/data/_python3.7/Python-3.7.3.tar.xz
Binary files differ
diff --git a/data/_python3.7/_metadata/description b/data/_python3.7/_metadata/description
new file mode 100644
index 000000000..cf36e1f16
--- /dev/null
+++ b/data/_python3.7/_metadata/description
@@ -0,0 +1 @@
+Interpreted, interactive, object-oriendted programming language.
diff --git a/data/_python3.7/_metadata/expat.dep b/data/_python3.7/_metadata/expat.dep
new file mode 120000
index 000000000..2100fb19e
--- /dev/null
+++ b/data/_python3.7/_metadata/expat.dep
@@ -0,0 +1 @@
+../../expat \ No newline at end of file
diff --git a/data/_python3.7/_metadata/in.1443.00 b/data/_python3.7/_metadata/in.1443.00
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/data/_python3.7/_metadata/in.1443.00
diff --git a/data/_python3.7/_metadata/libffi.dep b/data/_python3.7/_metadata/libffi.dep
new file mode 120000
index 000000000..da9d6c358
--- /dev/null
+++ b/data/_python3.7/_metadata/libffi.dep
@@ -0,0 +1 @@
+../../libffi \ No newline at end of file
diff --git a/data/_python3.7/_metadata/libssl1.0.dep b/data/_python3.7/_metadata/libssl1.0.dep
new file mode 120000
index 000000000..a501d00a8
--- /dev/null
+++ b/data/_python3.7/_metadata/libssl1.0.dep
@@ -0,0 +1 @@
+../../libssl1.0 \ No newline at end of file
diff --git a/data/_python3.7/_metadata/maintainer b/data/_python3.7/_metadata/maintainer
new file mode 120000
index 000000000..0c538aadb
--- /dev/null
+++ b/data/_python3.7/_metadata/maintainer
@@ -0,0 +1 @@
+../../../people/mac \ No newline at end of file
diff --git a/data/_python3.7/_metadata/name b/data/_python3.7/_metadata/name
new file mode 100644
index 000000000..358eeddf0
--- /dev/null
+++ b/data/_python3.7/_metadata/name
@@ -0,0 +1 @@
+Python 3
diff --git a/data/_python3.7/_metadata/ncurses.dep b/data/_python3.7/_metadata/ncurses.dep
new file mode 120000
index 000000000..a395fad08
--- /dev/null
+++ b/data/_python3.7/_metadata/ncurses.dep
@@ -0,0 +1 @@
+../../ncurses \ No newline at end of file
diff --git a/data/_python3.7/_metadata/priority b/data/_python3.7/_metadata/priority
new file mode 100644
index 000000000..134d9bc32
--- /dev/null
+++ b/data/_python3.7/_metadata/priority
@@ -0,0 +1 @@
+optional
diff --git a/data/_python3.7/_metadata/readline.dep b/data/_python3.7/_metadata/readline.dep
new file mode 120000
index 000000000..f35c9185b
--- /dev/null
+++ b/data/_python3.7/_metadata/readline.dep
@@ -0,0 +1 @@
+../../readline \ No newline at end of file
diff --git a/data/_python3.7/_metadata/role b/data/_python3.7/_metadata/role
new file mode 100644
index 000000000..52b4d7301
--- /dev/null
+++ b/data/_python3.7/_metadata/role
@@ -0,0 +1 @@
+hacker
diff --git a/data/_python3.7/_metadata/section b/data/_python3.7/_metadata/section
new file mode 100644
index 000000000..ddc7f1fd8
--- /dev/null
+++ b/data/_python3.7/_metadata/section
@@ -0,0 +1 @@
+Scripting
diff --git a/data/_python3.7/_metadata/tags b/data/_python3.7/_metadata/tags
new file mode 100644
index 000000000..ad5d50831
--- /dev/null
+++ b/data/_python3.7/_metadata/tags
@@ -0,0 +1 @@
+purpose::console
diff --git a/data/_python3.7/_metadata/version b/data/_python3.7/_metadata/version
new file mode 100644
index 000000000..c1e43e6d4
--- /dev/null
+++ b/data/_python3.7/_metadata/version
@@ -0,0 +1 @@
+3.7.3
diff --git a/data/_python3.7/_metadata/xz.dep b/data/_python3.7/_metadata/xz.dep
new file mode 120000
index 000000000..d5eb7ae54
--- /dev/null
+++ b/data/_python3.7/_metadata/xz.dep
@@ -0,0 +1 @@
+../../xz \ No newline at end of file
diff --git a/data/_python3.7/configure.diff b/data/_python3.7/configure.diff
new file mode 100644
index 000000000..f8b11e254
--- /dev/null
+++ b/data/_python3.7/configure.diff
@@ -0,0 +1,175 @@
+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/_python3.7/header.diff b/data/_python3.7/header.diff
new file mode 100644
index 000000000..d41804464
--- /dev/null
+++ b/data/_python3.7/header.diff
@@ -0,0 +1,16 @@
+diff -ur Python-3.7.3/Modules/posixmodule.c Python-3.7.3+iPhone/Modules/posixmodule.c
+--- Python-3.7.3/Modules/posixmodule.c 2019-03-25 10:21:05.000000000 -1000
++++ Python-3.7.3+iPhone/Modules/posixmodule.c 2019-05-06 14:01:00.000000000 -1000
+@@ -5910,11 +5910,10 @@
+ #else
+ #ifdef HAVE_LIBUTIL_H
+ #include <libutil.h>
+-#else
++#endif /* HAVE_LIBUTIL_H */
+ #ifdef HAVE_UTIL_H
+ #include <util.h>
+ #endif /* HAVE_UTIL_H */
+-#endif /* HAVE_LIBUTIL_H */
+ #endif /* HAVE_PTY_H */
+ #ifdef HAVE_STROPTS_H
+ #include <stropts.h>
diff --git a/data/_python3.7/install_certificates.command b/data/_python3.7/install_certificates.command
new file mode 100755
index 000000000..529e4c400
--- /dev/null
+++ b/data/_python3.7/install_certificates.command
@@ -0,0 +1,44 @@
+#!/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/_python3.7/make.sh b/data/_python3.7/make.sh
new file mode 100644
index 000000000..128f98d09
--- /dev/null
+++ b/data/_python3.7/make.sh
@@ -0,0 +1,42 @@
+pkg:extract
+
+############################################
+
+# Build for the host. Configure is picky about having python >= 3.7.
+
+if [ -z "$(which python3.7)" ]; then
+ SRC_DIR="$(echo *)"
+ mkdir host-python
+ cd host-python
+ ../Python*/configure --prefix=${PWD}
+ make install -j16
+ export PATH="${PWD}/bin:$PATH"
+ cd ..
+fi
+
+cd Python*
+pkg:patch
+
+# Feel free to use another variable for this.
+# PYTHON_FOR_BUILD will break the build (don't use it).
+
+###########################################
+
+export cross_compiling=yes
+autoconf
+pkg:configure CPPFLAGS="-I$(PKG_DEST_ ncurses)"/usr/include/ncursesw \
+ --enable-loadable-sqlite-extensions \
+ --with-system-ffi --with-signal-module --enable-big-digits \
+ --with-system-expat --enable-ipv6 --without-ensurepip \
+ 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/_python3.7/proxies.diff b/data/_python3.7/proxies.diff
new file mode 100644
index 000000000..b4959ace3
--- /dev/null
+++ b/data/_python3.7/proxies.diff
@@ -0,0 +1,44 @@
+--- 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/_python3.7/setup.diff b/data/_python3.7/setup.diff
new file mode 100644
index 000000000..648b020d0
--- /dev/null
+++ b/data/_python3.7/setup.diff
@@ -0,0 +1,28 @@
+diff -ur Python-3.7.3/setup.py Python-3.7.3+iPhone/setup.py
+--- Python-3.7.3/setup.py 2019-03-25 10:21:05.000000000 -1000
++++ Python-3.7.3+iPhone/setup.py 2019-05-07 14:47:15.000000000 -1000
+@@ -98,7 +98,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
+@@ -611,11 +611,10 @@
+ # Add the sysroot paths. 'sysroot' is a compiler option used to
+ # set the logical path of the standard system headers and
+ # libraries.
+- lib_dirs = (self.compiler.library_dirs +
+- sysroot_paths(('LDFLAGS', 'CC'), system_lib_dirs))
+- inc_dirs = (self.compiler.include_dirs +
+- sysroot_paths(('CPPFLAGS', 'CFLAGS', 'CC'),
+- system_include_dirs))
++ lib_dirs = ([os.getenv('PKG_ROOT') + '/usr/lib'] +
++ os.getenv('LIBRARY_PATH').split(':'))
++ inc_dirs = ([os.getenv('PKG_ROOT') + '/usr/include'] +
++ os.getenv('CPATH').split(':'))
+ exts = []
+ missing = []
+