Skip to content

Commit 7c531aa

Browse files
FeodorFitsnerCreeper19472
authored andcommitted
Exclude module.modulemap from framework headers
Updated the packaging script and exclude file to remove module.modulemap from Python.framework Headers for both iOS and macOS targets. This helps prevent unwanted module map files from being included in the packaged frameworks.
1 parent 8d9849b commit 7c531aa

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

darwin/package-macos-for-dart.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ rsync -av --exclude-from=$script_dir/python-darwin-framework.exclude $python_app
2929
cp -r $script_dir/Modules $frameworks_dir/Python.xcframework/macos-arm64_x86_64/Python.framework
3030
mkdir -p $frameworks_dir/Python.xcframework/macos-arm64_x86_64/Python.framework/Headers
3131
cp -r $python_apple_support_root/support/$python_version_short/macOS/Python.xcframework/macos-arm64_x86_64/Python.framework/Versions/$python_version_short/include/python$python_version_short/* $frameworks_dir/Python.xcframework/macos-arm64_x86_64/Python.framework/Headers
32+
rm $frameworks_dir/Python.xcframework/macos-arm64_x86_64/Python.framework/Headers/module.modulemap
3233

3334
# copy stdlibs
3435
rsync -av --exclude-from=$script_dir/python-darwin-stdlib.exclude $python_apple_support_root/install/macOS/macosx/python-*/Python.framework/Versions/Current/lib/python$python_version_short/* $stdlib_dir

darwin/python-darwin-framework.exclude

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
ios-arm64/bin
22
ios-arm64/include
33
ios-arm64/lib
4+
ios-arm64/platform-config
5+
ios-arm64/Python.framework/Headers/module.modulemap
46
ios-arm64_x86_64-simulator/bin
57
ios-arm64_x86_64-simulator/include
68
ios-arm64_x86_64-simulator/lib
9+
ios-arm64_x86_64-simulator/platform-config
10+
ios-arm64_x86_64-simulator/Python.framework/Headers/module.modulemap
711
macos-arm64_x86_64/Python.framework/Headers
812
macos-arm64_x86_64/Python.framework/Versions/*/_CodeSignature
913
macos-arm64_x86_64/Python.framework/Versions/*/Headers

0 commit comments

Comments
 (0)