diff options
author | Sam Bingner <sam@bingner.com> | 2019-05-06 14:31:17 -1000 |
---|---|---|
committer | Sam Bingner <sam@bingner.com> | 2019-05-08 10:08:11 -1000 |
commit | ca02b0697f2f05de3bdd6c2f7cce928c9937bbc6 (patch) | |
tree | 84db78b776542f88532a184baa833f4727107cdc /data/_python3.7/make.sh | |
parent | d02b5fde55f6681ee84d901b8226c552fa7bb81b (diff) |
Updates to apollo's python3.7 build
Diffstat (limited to 'data/_python3.7/make.sh')
-rw-r--r-- | data/_python3.7/make.sh | 42 |
1 files changed, 42 insertions, 0 deletions
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* |