Skip to content

Commit aa65c31

Browse files
committed
Include includes in the support package.
1 parent 604325a commit aa65c31

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

excludes/all/pythonhome-excludes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ lib/python*/wsgiref/*
2121
lib/python*/curses/*
2222
# Remove config-* directory, which is used for compiling C extension modules.
2323
lib/python*/config-*
24-
# Remove ensurepip. If user code needs pip, it can add it to
24+
# Remove ensurepip. If user code needs pip, it can add it to
2525
lib/python*/ensurepip/*
2626
# Remove Tcl/Tk GUI code. We don't build against Tcl/Tk at the moment, so this
2727
# will not work.

main.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,13 @@ function build_one_abi() {
104104
-f python.Dockerfile .
105105
# Extract the build artifacts we need to create our zip file.
106106
docker run -v "${PWD}"/build/"${PYTHON_VERSION}"/:/mnt/ --rm --entrypoint rsync "$TAG_NAME" -a /opt/python-build/approot/. /mnt/.
107-
# Extract pyconfig.h for debugging ./configure strangeness.
108-
docker run -v "${PWD}"/build/"${PYTHON_VERSION}"/:/mnt/ --rm --entrypoint rsync "$TAG_NAME" -a /opt/python-build/built/python/include/python"${PYTHON_SOVERSION}"/pyconfig.h /mnt/
107+
# Extract header files
108+
docker run -v "${PWD}"/build/"${PYTHON_VERSION}"/app/include/:/mnt/ --rm --entrypoint rsync "$TAG_NAME" -a /opt/python-build/built/python/include/ /mnt/
109+
110+
# Move pyconfig.h to a platform-specific name.
111+
mv "${PWD}"/build/"${PYTHON_VERSION}"/app/include/python"${PYTHON_SOVERSION}"/pyconfig.h "${PWD}"/build/"${PYTHON_VERSION}"/app/include/python"${PYTHON_SOVERSION}"/pyconfig-${TARGET_ABI_SHORTNAME}.h
112+
# Inject a platform-agnostic pyconfig.h wrapper.
113+
cp "${PWD}/patches/all/pyconfig.h" "${PWD}"/build/"${PYTHON_VERSION}"/app/include/python"${PYTHON_SOVERSION}"/
109114
# Remove temporary local tag.
110115
docker rmi "$TAG_NAME" > /dev/null
111116
fix_permissions

patches/all/pyconfig.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#ifdef __arm__
2+
#include "pyconfig-armeabi-v7a.h"
3+
#endif
4+
5+
#ifdef __arm64__
6+
#include "pyconfig-arm64-v8a.h"
7+
#endif
8+
9+
#ifdef __i386__
10+
#include "pyconfig-x386.h"
11+
#endif
12+
13+
#ifdef __x86_64__
14+
#include "pyconfig-x86_64.h"
15+
#endif

0 commit comments

Comments
 (0)