Skip to content

Commit

Permalink
downloads: upgrade CPython 3.9.7 to 3.9.9
Browse files Browse the repository at this point in the history
This required refreshing a patch involving MULTIARCH. The upstream
patch has been backported to other release branches but there is only
a release for 3.9 so far.
  • Loading branch information
indygreg committed Nov 17, 2021
1 parent 3307e39 commit ee7fe10
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 6 deletions.
46 changes: 44 additions & 2 deletions cpython-unix/build-cpython.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,27 @@ if [ "${BUILD_TRIPLE}" != "${TARGET_TRIPLE}" ]; then

# Same patch as below. See comment there.
if [ "${CC}" = "clang" ]; then
patch -p1 <<"EOF"
if [ "${PYTHON_MAJMIN_VERSION}" = "3.9" ]; then
patch -p1 <<"EOF"
diff --git a/configure b/configure
index 33ecb16f71..7f21822d97 100755
--- a/configure
+++ b/configure
@@ -5354,10 +5354,7 @@ $as_echo "none" >&6; }
fi
rm -f conftest.c conftest.out
-if test x$PLATFORM_TRIPLET != xdarwin; then
- MULTIARCH=$($CC --print-multiarch 2>/dev/null)
-fi
-
+MULTIARCH=
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
EOF
else
patch -p1 <<"EOF"
diff --git a/configure b/configure
index 7cad0e2f98..50212236c4 100755
--- a/configure
Expand All @@ -110,6 +130,7 @@ index 7cad0e2f98..50212236c4 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
EOF
fi
fi

# When cross-compiling, we need to build a host Python that has working zlib
Expand Down Expand Up @@ -332,7 +353,27 @@ fi
# configure. This is reported as https://bugs.python.org/issue45405. We nerf the
# check since we know what we're doing.
if [ "${CC}" = "clang" ]; then
patch -p1 <<"EOF"
if [ "${PYTHON_MAJMIN_VERSION}" = "3.9" ]; then
patch -p1 <<"EOF"
diff --git a/configure b/configure
index 33ecb16f71..7f21822d97 100755
--- a/configure
+++ b/configure
@@ -5354,10 +5354,7 @@ $as_echo "none" >&6; }
fi
rm -f conftest.c conftest.out
-if test x$PLATFORM_TRIPLET != xdarwin; then
- MULTIARCH=$($CC --print-multiarch 2>/dev/null)
-fi
-
+MULTIARCH=
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
EOF
else
patch -p1 <<"EOF"
diff --git a/configure b/configure
index 7cad0e2f98..50212236c4 100755
--- a/configure
Expand All @@ -347,6 +388,7 @@ index 7cad0e2f98..50212236c4 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
EOF
fi
fi

# Add a make target to write the PYTHON_FOR_BUILD variable so we can
Expand Down
8 changes: 4 additions & 4 deletions pythonbuild/downloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@
"python_tag": "cp38",
},
"cpython-3.9": {
"url": "https://www.python.org/ftp/python/3.9.7/Python-3.9.7.tar.xz",
"size": 19123232,
"sha256": "f8145616e68c00041d1a6399b76387390388f8359581abc24432bb969b5e3c57",
"version": "3.9.7",
"url": "https://www.python.org/ftp/python/3.9.9/Python-3.9.9.tar.xz",
"size": 19144372,
"sha256": "06828c04a573c073a4e51c4292a27c1be4ae26621c3edc7cf9318418ce3b6d27",
"version": "3.9.9",
"licenses": ["Python-2.0", "CNRI-Python"],
"license_file": "LICENSE.cpython.txt",
"python_tag": "cp39",
Expand Down

0 comments on commit ee7fe10

Please sign in to comment.