Skip to content

Commit 493dc76

Browse files
committed
Merge branch 'main' into framework-lib
2 parents c0cc333 + 62237a5 commit 493dc76

File tree

4 files changed

+27
-23
lines changed

4 files changed

+27
-23
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,8 @@ jobs:
4040
run: |
4141
PYTHON_VER=$(make config | grep "PYTHON_VER=" | cut -d "=" -f 2)
4242
echo "PYTHON_VER=${PYTHON_VER}" | tee -a ${GITHUB_OUTPUT}
43-
4443
- name: Set up Python
45-
uses: actions/setup-python@v4.7.1
44+
uses: actions/setup-python@v5.1.1
4645
with:
4746
# Appending -dev ensures that we can always build the dev release.
4847
# It's a no-op for versions that have been published.
@@ -52,14 +51,13 @@ jobs:
5251
run: |
5352
# Do the build for the requested target.
5453
make ${{ matrix.target }}
55-
5654
- name: Upload build artefacts
57-
uses: actions/upload-artifact@v3.1.3
55+
uses: actions/upload-artifact@v4.3.4
5856
with:
5957
name: Python-${{ steps.config-vars.outputs.PYTHON_VER }}-${{ matrix.target }}-support.custom.tar.gz
6058
path: dist/Python-${{ steps.config-vars.outputs.PYTHON_VER }}-${{ matrix.target }}-support.custom.tar.gz
6159

62-
- uses: actions/checkout@v4
60+
- uses: actions/checkout@v4.1.7
6361
if: matrix.run-tests
6462
with:
6563
repository: beeware/Python-support-testbed
@@ -72,7 +70,6 @@ jobs:
7270
run: |
7371
# Use the development version of Briefcase
7472
python -m pip install git+https://github.com/beeware/briefcase.git
75-
7673
- name: Run support testbed check
7774
if: matrix.run-tests
7875
working-directory: Python-support-testbed

.github/workflows/publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- uses: actions/checkout@v4
1212

1313
- name: Set up Python environment
14-
uses: actions/setup-python@v4.7.1
14+
uses: actions/setup-python@v5.1.1
1515
with:
1616
python-version: "3.X"
1717

.github/workflows/release.yaml

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99

1010
jobs:
1111
build:
12+
name: Build
1213
runs-on: macOS-latest
1314
outputs:
1415
TAG: ${{ steps.build-vars.outputs.TAG }}
@@ -21,25 +22,26 @@ jobs:
2122
OPENSSL_VERSION: ${{ steps.version-details.outputs.OPENSSL_VERSION }}
2223
strategy:
2324
matrix:
24-
target: ['macOS', 'iOS', 'tvOS', 'watchOS']
25+
target: [ "macOS", "iOS", "tvOS", "watchOS" ]
2526
steps:
26-
- uses: actions/checkout@v4
27+
- name: Checkout
28+
uses: actions/[email protected]
2729

28-
- name: Set build variables
30+
- name: Set Build Variables
2931
id: build-vars
3032
env:
3133
TAG_NAME: ${{ github.ref }}
3234
run: |
33-
TAG=$(basename $TAG_NAME)
34-
echo "TAG=${TAG}" | tee -a ${GITHUB_OUTPUT}
35+
export TAG=$(basename $TAG_NAME)
36+
export PYTHON_VER="${TAG%-*}"
37+
export BUILD_NUMBER="${TAG#*-}"
3538
36-
PYTHON_VER="${TAG%-*}"
37-
BUILD_NUMBER="${TAG#*-}"
39+
echo "TAG=${TAG}" | tee -a ${GITHUB_OUTPUT}
3840
echo "PYTHON_VER=${PYTHON_VER}" | tee -a ${GITHUB_OUTPUT}
3941
echo "BUILD_NUMBER=${BUILD_NUMBER}" | tee -a ${GITHUB_OUTPUT}
4042
4143
- name: Set up Python
42-
uses: actions/setup-python@v4.7.1
44+
uses: actions/setup-python@v5.1.1
4345
with:
4446
python-version: "${{ steps.build-vars.outputs.PYTHON_VER }}-dev"
4547

@@ -48,7 +50,7 @@ jobs:
4850
# Do the build for the requested target.
4951
make ${{ matrix.target }} BUILD_NUMBER=${{ steps.build-vars.outputs.BUILD_NUMBER }}
5052
51-
- name: Extract version details
53+
- name: Extract Version Details
5254
id: version-details
5355
run: |
5456
PYTHON_VERSION=$(grep "Python version:" support/${{ steps.build-vars.outputs.PYTHON_VER }}/${{ matrix.target }}/VERSIONS | cut -d " " -f 3)
@@ -63,25 +65,27 @@ jobs:
6365
echo "OPENSSL_VERSION=${OPENSSL_VERSION}" | tee -a ${GITHUB_OUTPUT}
6466
echo "LIBFFI_VERSION=${LIBFFI_VERSION}" | tee -a ${GITHUB_OUTPUT}
6567
66-
- name: Upload build artifact
67-
uses: actions/upload-artifact@v3.1.3
68+
- name: Upload Build Artifact
69+
uses: actions/upload-artifact@v4.3.4
6870
with:
69-
name: dist
70-
path: "dist"
71+
name: dist-${{ matrix.target }}
72+
path: dist
7173
if-no-files-found: error
7274

7375
make-release:
76+
name: Make Release
7477
runs-on: ubuntu-latest
7578
needs: build
7679
steps:
7780
- name: Get build artifacts
78-
uses: actions/download-artifact@v3.0.2
81+
uses: actions/download-artifact@v4.1.8
7982
with:
80-
name: dist
83+
pattern: dist-*
8184
path: dist
85+
merge-multiple: true
8286

8387
- name: Create Release
84-
uses: ncipollo/release-action@v1.13.0
88+
uses: ncipollo/release-action@v1.14.0
8589
with:
8690
name: ${{ needs.build.outputs.PYTHON_VER }}-${{ needs.build.outputs.BUILD_NUMBER }}
8791
tag: ${{ needs.build.outputs.PYTHON_VER }}-${{ needs.build.outputs.BUILD_NUMBER }}

USAGE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ echo "Signing as $EXPANDED_CODE_SIGN_IDENTITY_NAME ($EXPANDED_CODE_SIGN_IDENTITY
166166
find "$CODESIGNING_FOLDER_PATH/Contents/Resources/python-stdlib/lib-dynload" -name "*.so" -exec /usr/bin/codesign --force --sign "$EXPANDED_CODE_SIGN_IDENTITY" -o runtime --timestamp=none --preserve-metadata=identifier,entitlements,flags --generate-entitlement-der {} \;
167167
```
168168

169+
8. Disable dead code removal. As of March 2024 Xcode has "Dead Code Stripping" enabled by default. This _will_ remove functions from linked Python library that linker found unused.
170+
Navigate to Build Settings -> Linkin - General. Find "Dead Code Stripping" and select "No"
171+
169172
You will now be able to access the Python runtime in your Python code.
170173

171174
If you are on iOS, you will be able to deploy to an iOS simulator without specifying

0 commit comments

Comments
 (0)