Skip to content

Commit 6ad009a

Browse files
committed
Restructure build products to give better control over outputs.
1 parent 99af12b commit 6ad009a

File tree

8 files changed

+492
-397
lines changed

8 files changed

+492
-397
lines changed

.gitignore

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
*.swo
22
*.swp
3-
src/*
3+
.envrc
4+
.vscode/
45
archive/*
56
build/*
6-
downloads/*
77
diff/*
88
dist/*
9-
.envrc
10-
.vscode/
9+
downloads/*
10+
install/*
1111
local/*
12+
merge/*
13+
src/*
14+
support/*
1215
*.dist-info
1316
__pycache__
1417
tests/testbed/macOS

Makefile

Lines changed: 424 additions & 342 deletions
Large diffs are not rendered by default.

patch/Python/Python.patch

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3742,19 +3742,22 @@ index 6a33c0cc9d..09ae5d1aa8 100644
37423742
# This file is free software; the Free Software Foundation
37433743
# gives unlimited permission to copy and/or distribute it,
37443744
diff --git a/config.sub b/config.sub
3745-
index d74fb6deac..09ebc4287c 100755
3745+
index d74fb6deac..a30f74f03d 100755
37463746
--- a/config.sub
37473747
+++ b/config.sub
3748-
@@ -1121,7 +1121,7 @@
3748+
@@ -1121,10 +1121,9 @@
37493749
xscale-* | xscalee[bl]-*)
37503750
cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
37513751
;;
37523752
- arm64-*)
37533753
+ arm64-* | arm64_32-*)
37543754
cpu=aarch64
37553755
;;
3756-
3757-
@@ -1723,7 +1723,7 @@
3756+
-
3757+
# Recognize the canonical CPU Types that limit and/or modify the
3758+
# company names they are paired with.
3759+
cr16-*)
3760+
@@ -1723,7 +1722,7 @@
37583761
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
37593762
| sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
37603763
| hiux* | abug | nacl* | netware* | windows* \
@@ -3763,7 +3766,7 @@ index d74fb6deac..09ebc4287c 100755
37633766
| mpw* | magic* | mmixware* | mon960* | lnews* \
37643767
| amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
37653768
| aos* | aros* | cloudabi* | sortix* | twizzler* \
3766-
@@ -1786,6 +1786,8 @@
3769+
@@ -1786,6 +1785,8 @@
37673770
;;
37683771
*-eabi* | *-gnueabi*)
37693772
;;

patch/Python/release.common.exclude

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,30 @@
11
# This is a list of support package path patterns that we exclude
22
# from all Python-Apple-support tarballs.
33
# It is used by `tar -X` during the Makefile build.
4-
#
5-
# Remove binaries; not needed for embedded builds
6-
Python/Resources/bin
7-
# Remove includes; use the version packaged in Headers
8-
Python/Resources/include
9-
# Remove the Resources version of libpython;
10-
# we use the version packaged at the root level
11-
Python/Resources/lib/libpython3.*.a
12-
# Remove lib/pkgconfig files. These are used for compiling C extension modules.
13-
Python/Resources/lib/pkgconfig
144
# Remove standard library test suites.
15-
Python/Resources/lib/python*/ctypes/test
16-
Python/Resources/lib/python*/distutils/tests
17-
Python/Resources/lib/python*/lib2to3/tests
18-
Python/Resources/lib/python*/sqlite3/test
19-
Python/Resources/lib/python*/test
5+
python-stdlib/ctypes/test
6+
python-stdlib/distutils/tests
7+
python-stdlib/lib2to3/tests
8+
python-stdlib/sqlite3/test
9+
python-stdlib/test
2010
# Remove config-* directory, which is used for compiling C extension modules.
21-
Python/Resources/lib/python*/config-*
11+
python-stdlib/config-*
2212
# Remove ensurepip. If user code needs pip, it can add it to
23-
Python/Resources/lib/python*/ensurepip
13+
python-stdlib/ensurepip
2414
# Remove libraries supporting IDLE. We don't need to ship an IDE
25-
Python/Resources/lib/python*/idlelib
15+
python-stdlib/idlelib
2616
# Remove Tcl/Tk GUI code. We don't build against Tcl/Tk at the moment, so this
2717
# will not work.
28-
Python/Resources/lib/python*/tkinter
29-
Python/Resources/lib/python*/turtle.py
30-
Python/Resources/lib/python*/turtledemo
18+
python-stdlib/tkinter
19+
python-stdlib/turtle.py
20+
python-stdlib/turtledemo
21+
# Remove the testing binary modules
22+
python-stdlib/lib-dynload/_test*.so
23+
python-stdlib/lib-dynload/_xx*.so
24+
python-stdlib/lib-dynload/xx*.so
3125
# Remove site-packages directory. The template unpacks user code and
3226
# dependencies to a different path.
33-
Python/Resources/lib/python*/site-packages
34-
# Remove share/ directory, which contains user documentation (man pages).
35-
Python/Resources/share
27+
python-stdlib/site-packages
3628
# Remove pyc files. These take up space, but since most stdlib modules are
3729
# never imported by user code, they mostly have no value.
38-
Python/Resources/*/*.pyc
30+
*/__pycache__

patch/Python/release.iOS.exclude

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# It is used by `tar -X` during the Makefile build.
44
#
55
# Remove command-line curses toolkit.
6-
Python/Resources/lib/python*/curses
6+
python-stdlib/curses

patch/Python/test.exclude

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,6 @@
22
# we exclude from the embedded device Python-Apple-support test tarballs.
33
# It is used by `tar -X` during the Makefile build.
44
#
5-
# Remove binaries
6-
Python/Resources/bin
7-
# Remove include/ directory, only useful for compiling C extension modules.
8-
Python/Resources/include
9-
# Remove the Resources version of libpython;
10-
# we use the version packaged at the root level
11-
Python/Resources/lib/libpython3.*.a
12-
# Remove lib/pkgconfig files. These are used for compiling C extension modules.
13-
Python/Resources/lib/pkgconfig
14-
# Remove compiled test and example modules.
15-
Python/Resources/lib/python*/lib-dynload/_test*.so
16-
Python/Resources/lib/python*/lib-dynload/_ctypes_test*.so
17-
Python/Resources/lib/python*/lib-dynload/xxlimited*.so
18-
Python/Resources/lib/python*/lib-dynload/_xxtestfuzz.so
19-
# Remove site-packages directory. The template unpacks user code and
20-
# dependencies to a different path.
21-
Python/Resources/lib/python*/site-packages
22-
# Remove share/ directory, which contains user documentation (man pages).
23-
Python/Resources/share
245
# Remove pyc files. These take up space, but since most stdlib modules are
256
# never imported by user code, they mostly have no value.
26-
Python/Resources/*/*.pyc
7+
*/__pycache__
File renamed without changes.

patch/xz-5.2.5.patch

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
diff -ru xz-5.2.5/build-aux/config.sub xz-5.2.5-patched/build-aux/config.sub
2+
--- xz-5.2.5/build-aux/config.sub 2020-03-17 22:29:35.000000000 +0800
3+
+++ xz-5.2.5-patched/build-aux/config.sub 2022-08-10 08:38:41.000000000 +0800
4+
@@ -116,6 +116,7 @@
5+
case $maybe_os in
6+
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
7+
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
8+
+ ios*-simulator | tvos*-simulator | watchos*-simulator | \
9+
knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
10+
kopensolaris*-gnu* | cloudabi*-eabi* | \
11+
storm-chaos* | os2-emx* | rtmk-nova*)
12+
@@ -450,6 +451,9 @@
13+
| ymp-* \
14+
| z8k-* | z80-*)
15+
;;
16+
+ arm64-* | arm64e-* | arm64_32-*)
17+
+ basic_machine=aarch64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
18+
+ ;;
19+
# Recognize the basic CPU types without company name, with glob match.
20+
xtensa*)
21+
basic_machine=$basic_machine-unknown
22+
@@ -1520,7 +1524,11 @@
23+
;;
24+
-nacl*)
25+
;;
26+
- -ios)
27+
+ -ios | -ios-simulator)
28+
+ ;;
29+
+ -tvos | -tvos-simulator)
30+
+ ;;
31+
+ -watchos | -watchos-simulator)
32+
;;
33+
-none)
34+
;;

0 commit comments

Comments
 (0)