Skip to content

Commit c6808e5

Browse files
committed
Merge branch 'main' into 3.12
2 parents 6a363be + 7431428 commit c6808e5

File tree

9 files changed

+429
-1020
lines changed

9 files changed

+429
-1020
lines changed

.github/dependabot.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
# Check for updates on Sunday, 8PM UTC
8+
interval: "weekly"
9+
day: "sunday"
10+
time: "20:00"

.github/workflows/publish.yaml

+23-17
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,30 @@ jobs:
88
publish:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v4
12+
1213
- name: Set up Python environment
13-
uses: actions/setup-python@v1
14+
uses: actions/setup-python@v4.7.1
1415
with:
1516
python-version: "3.X"
17+
1618
- name: Set build variables
19+
id: build-vars
1720
env:
1821
TAG_NAME: ${{ github.ref }}
1922
run: |
2023
export TAG=$(basename $TAG_NAME)
2124
echo "TAG=${TAG}"
22-
export TAG_VERSION="${TAG%-*}"
23-
export TAG_BUILD="${TAG#*-}"
24-
echo "PY_VERSION=${TAG_VERSION}"
25-
echo "BUILD_NUMBER=${TAG_BUILD}"
26-
echo "TAG=${TAG}" >> $GITHUB_ENV
27-
echo "PY_VERSION=${TAG_VERSION}" >> $GITHUB_ENV
28-
echo "BUILD_NUMBER=${TAG_BUILD}" >> $GITHUB_ENV
25+
export PYTHON_VER="${TAG%-*}"
26+
export BUILD_NUMBER="${TAG#*-}"
27+
28+
echo "PYTHON_VER=${PYTHON_VER}"
29+
echo "BUILD_NUMBER=${BUILD_NUMBER}"
30+
31+
echo "TAG=${TAG}" >> ${GITHUB_OUTPUT}
32+
echo "PYTHON_VER=${PYTHON_VER}" >> ${GITHUB_OUTPUT}
33+
echo "BUILD_NUMBER=${BUILD_NUMBER}" >> ${GITHUB_OUTPUT}
34+
2935
- name: Update Release Asset to S3
3036
env:
3137
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
@@ -35,14 +41,14 @@ jobs:
3541
python -m pip install -U setuptools
3642
python -m pip install awscli
3743
# macOS build
38-
curl -o macOS-artefact.tar.gz -L https://github.com/beeware/Python-Apple-support/releases/download/${{ env.TAG }}/Python-${{ env.PY_VERSION }}-macOS-support.${{ env.BUILD_NUMBER }}.tar.gz
39-
aws s3 cp macOS-artefact.tar.gz s3://briefcase-support/python/${{ env.PY_VERSION }}/macOS/Python-${{ env.PY_VERSION }}-macOS-support.${{ env.BUILD_NUMBER }}.tar.gz
44+
curl -o macOS-artefact.tar.gz -L https://github.com/beeware/Python-Apple-support/releases/download/${{ steps.build-vars.outputs.TAG }}/Python-${{ steps.build-vars.outputs.PY_VERSION }}-macOS-support.${{ steps.build-vars.outputs.BUILD_NUMBER }}.tar.gz
45+
aws s3 cp macOS-artefact.tar.gz s3://briefcase-support/python/${{ steps.build-vars.outputs.PY_VERSION }}/macOS/Python-${{ steps.build-vars.outputs.PY_VERSION }}-macOS-support.${{ steps.build-vars.outputs.BUILD_NUMBER }}.tar.gz
4046
# iOS build
41-
curl -o iOS-artefact.tar.gz -L https://github.com/beeware/Python-Apple-support/releases/download/${{ env.TAG }}/Python-${{ env.PY_VERSION }}-iOS-support.${{ env.BUILD_NUMBER }}.tar.gz
42-
aws s3 cp iOS-artefact.tar.gz s3://briefcase-support/python/${{ env.PY_VERSION }}/iOS/Python-${{ env.PY_VERSION }}-iOS-support.${{ env.BUILD_NUMBER }}.tar.gz
47+
curl -o iOS-artefact.tar.gz -L https://github.com/beeware/Python-Apple-support/releases/download/${{ steps.build-vars.outputs.TAG }}/Python-${{ steps.build-vars.outputs.PY_VERSION }}-iOS-support.${{ steps.build-vars.outputs.BUILD_NUMBER }}.tar.gz
48+
aws s3 cp iOS-artefact.tar.gz s3://briefcase-support/python/${{ steps.build-vars.outputs.PY_VERSION }}/iOS/Python-${{ steps.build-vars.outputs.PY_VERSION }}-iOS-support.${{ steps.build-vars.outputs.BUILD_NUMBER }}.tar.gz
4349
# tvOS build
44-
curl -o tvOS-artefact.tar.gz -L https://github.com/beeware/Python-Apple-support/releases/download/${{ env.TAG }}/Python-${{ env.PY_VERSION }}-tvOS-support.${{ env.BUILD_NUMBER }}.tar.gz
45-
aws s3 cp tvOS-artefact.tar.gz s3://briefcase-support/python/${{ env.PY_VERSION }}/tvOS/Python-${{ env.PY_VERSION }}-tvOS-support.${{ env.BUILD_NUMBER }}.tar.gz
50+
curl -o tvOS-artefact.tar.gz -L https://github.com/beeware/Python-Apple-support/releases/download/${{ steps.build-vars.outputs.TAG }}/Python-${{ steps.build-vars.outputs.PY_VERSION }}-tvOS-support.${{ steps.build-vars.outputs.BUILD_NUMBER }}.tar.gz
51+
aws s3 cp tvOS-artefact.tar.gz s3://briefcase-support/python/${{ steps.build-vars.outputs.PY_VERSION }}/tvOS/Python-${{ steps.build-vars.outputs.PY_VERSION }}-tvOS-support.${{ steps.build-vars.outputs.BUILD_NUMBER }}.tar.gz
4652
# watchOS build
47-
curl -o watchOS-artefact.tar.gz -L https://github.com/beeware/Python-Apple-support/releases/download/${{ env.TAG }}/Python-${{ env.PY_VERSION }}-watchOS-support.${{ env.BUILD_NUMBER }}.tar.gz
48-
aws s3 cp watchOS-artefact.tar.gz s3://briefcase-support/python/${{ env.PY_VERSION }}/watchOS/Python-${{ env.PY_VERSION }}-watchOS-support.${{ env.BUILD_NUMBER }}.tar.gz
53+
curl -o watchOS-artefact.tar.gz -L https://github.com/beeware/Python-Apple-support/releases/download/${{ steps.build-vars.outputs.TAG }}/Python-${{ steps.build-vars.outputs.PY_VERSION }}-watchOS-support.${{ steps.build-vars.outputs.BUILD_NUMBER }}.tar.gz
54+
aws s3 cp watchOS-artefact.tar.gz s3://briefcase-support/python/${{ steps.build-vars.outputs.PY_VERSION }}/watchOS/Python-${{ steps.build-vars.outputs.PY_VERSION }}-watchOS-support.${{ steps.build-vars.outputs.BUILD_NUMBER }}.tar.gz

.github/workflows/release.yaml

+80-68
Original file line numberDiff line numberDiff line change
@@ -8,89 +8,101 @@ on:
88
- '*-b*'
99

1010
jobs:
11-
make-release:
12-
runs-on: ubuntu-latest
13-
steps:
14-
- name: Set build variables
15-
env:
16-
TAG_NAME: ${{ github.ref }}
17-
run: |
18-
export TAG=$(basename $TAG_NAME)
19-
echo "TAG=${TAG}"
20-
export TAG_VERSION="${TAG%-*}"
21-
export TAG_BUILD="${TAG#*-}"
22-
echo "PY_VERSION=${TAG_VERSION}"
23-
echo "BUILD_NUMBER=${TAG_BUILD}"
24-
echo "TAG=${TAG}" >> $GITHUB_ENV
25-
echo "PY_VERSION=${TAG_VERSION}" >> $GITHUB_ENV
26-
echo "BUILD_NUMBER=${TAG_BUILD}" >> $GITHUB_ENV
27-
- name: Create Release
28-
id: create_release
29-
uses: actions/create-release@v1
30-
env:
31-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32-
with:
33-
tag_name: ${{ github.ref }}
34-
release_name: ${{ github.ref }}
35-
draft: true
36-
prerelease: false
37-
body: |
38-
Build ${{ env.BUILD_NUMBER }} of the BeeWare support package for Python ${{ env.PY_VERSION }}.
39-
40-
Includes:
41-
* Python ${{ env.PY_VERSION }}.?
42-
* OpenSSL 3.1.2
43-
* BZip2 1.0.8
44-
* XZ 5.4.4
45-
* LibFFI 3.4.4
46-
outputs:
47-
upload_url: ${{ steps.create_release.outputs.upload_url }}
48-
4911
build:
5012
runs-on: macOS-latest
51-
needs: make-release
13+
outputs:
14+
TAG: ${{ steps.build-vars.outputs.TAG }}
15+
PYTHON_VER: ${{ steps.build-vars.outputs.PYTHON_VER }}
16+
BUILD_NUMBER: ${{ steps.build-vars.outputs.BUILD_NUMBER }}
17+
PYTHON_VERSION: ${{ steps.version-details.outputs.PYTHON_VERSION }}
18+
BZIP2_VERSION: ${{ steps.version-details.outputs.BZIP2_VERSION }}
19+
XZ_VERSION: ${{ steps.version-details.outputs.XZ_VERSION }}
20+
LIBFFI_VERSION: ${{ steps.version-details.outputs.LIBFFI_VERSION }}
21+
OPENSSL_VERSION: ${{ steps.version-details.outputs.OPENSSL_VERSION }}
5222
strategy:
53-
max-parallel: 4
5423
matrix:
5524
target: ['macOS', 'iOS', 'tvOS', 'watchOS']
5625
steps:
57-
- uses: actions/checkout@v2
26+
- uses: actions/checkout@v4
27+
5828
- name: Set build variables
29+
id: build-vars
5930
env:
6031
TAG_NAME: ${{ github.ref }}
6132
run: |
6233
export TAG=$(basename $TAG_NAME)
6334
echo "TAG=${TAG}"
64-
export TAG_VERSION="${TAG%-*}"
65-
export TAG_BUILD="${TAG#*-}"
66-
echo "PY_VERSION=${TAG_VERSION}"
67-
echo "BUILD_NUMBER=${TAG_BUILD}"
68-
echo "TAG=${TAG}" >> $GITHUB_ENV
69-
echo "PY_VERSION=${TAG_VERSION}" >> $GITHUB_ENV
70-
echo "BUILD_NUMBER=${TAG_BUILD}" >> $GITHUB_ENV
35+
export PYTHON_VER="${TAG%-*}"
36+
export BUILD_NUMBER="${TAG#*-}"
37+
38+
echo "PYTHON_VER=${PYTHON_VER}"
39+
echo "BUILD_NUMBER=${BUILD_NUMBER}"
40+
41+
echo "TAG=${TAG}" >> ${GITHUB_OUTPUT}
42+
echo "PYTHON_VER=${PYTHON_VER}" >> ${GITHUB_OUTPUT}
43+
echo "BUILD_NUMBER=${BUILD_NUMBER}" >> ${GITHUB_OUTPUT}
44+
7145
- name: Set up Python
72-
uses: actions/setup-python@v3.1.2
46+
uses: actions/setup-python@v4.7.1
7347
with:
74-
python-version: ${{ env.TAG_VERSION }}
48+
python-version: "${{ steps.build-vars.outputs.PYTHON_VER }}"
49+
7550
- name: Build ${{ matrix.target }}
76-
env:
77-
BUILD_NUMBER: ${{ env.BUILD_NUMBER }}
7851
run: |
79-
# 2020-06-24: The Homebrew copy of gettext leaks into the macOS build
80-
# if it is present. Uninstall gettext to make sure that doesn't happen.
81-
# 2021-01-02: Uninstall curl as well. We need curl to download the
82-
# source bundles, but Homebrew's curl has a runtime dependency on
83-
# gettext. However macOS provides a version of curl that works fine.
84-
brew uninstall --ignore-dependencies gettext curl
85-
8652
# Do the build for the requested target.
87-
make -e ${{ matrix.target }}
88-
- name: Upload ${{ matrix.target }} release asset
89-
uses: actions/upload-release-asset@v1
90-
env:
91-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
make ${{ matrix.target }} BUILD_NUMBER=${{ steps.build-vars.outputs.BUILD_NUMBER }}
54+
55+
- name: Extract version details
56+
id: version-details
57+
run: |
58+
export PYTHON_VERSION=$(grep "Python version:" support/${{ steps.build-vars.outputs.PYTHON_VER }}/${{ matrix.target }}/VERSIONS | cut -d " " -f 3)
59+
export BZIP2_VERSION=$(grep "BZip2:" support/${{ steps.build-vars.outputs.PYTHON_VER }}/${{ matrix.target }}/VERSIONS | cut -d " " -f 2)
60+
export XZ_VERSION=$(grep "XZ:" support/${{ steps.build-vars.outputs.PYTHON_VER }}/${{ matrix.target }}/VERSIONS | cut -d " " -f 2)
61+
export OPENSSL_VERSION=$(grep "OpenSSL:" support/${{ steps.build-vars.outputs.PYTHON_VER }}/${{ matrix.target }}/VERSIONS | cut -d " " -f 2)
62+
export LIBFFI_VERSION=$(grep "libFFI:" support/${{ steps.build-vars.outputs.PYTHON_VER }}/${{ matrix.target }}/VERSIONS | cut -d " " -f 2)
63+
64+
echo "PYTHON_VERSION=${PYTHON_VERSION}"
65+
echo "BZIP2_VERSION=${BZIP2_VERSION}"
66+
echo "XZ_VERSION=${XZ_VERSION}"
67+
echo "OPENSSL_VERSION=${OPENSSL_VERSION}"
68+
echo "LIBFFI_VERSION=${LIBFFI_VERSION}"
69+
70+
echo "PYTHON_VERSION=${PYTHON_VERSION}" >> ${GITHUB_OUTPUT}
71+
echo "BZIP2_VERSION=${BZIP2_VERSION}" >> ${GITHUB_OUTPUT}
72+
echo "XZ_VERSION=${XZ_VERSION}" >> ${GITHUB_OUTPUT}
73+
echo "OPENSSL_VERSION=${OPENSSL_VERSION}" >> ${GITHUB_OUTPUT}
74+
echo "LIBFFI_VERSION=${LIBFFI_VERSION}" >> ${GITHUB_OUTPUT}
75+
76+
- name: Upload build artifact
77+
uses: actions/[email protected]
78+
with:
79+
name: dist
80+
path: "dist"
81+
if-no-files-found: error
82+
83+
make-release:
84+
runs-on: ubuntu-latest
85+
needs: build
86+
steps:
87+
- name: Get build artifacts
88+
uses: actions/[email protected]
9289
with:
93-
upload_url: ${{ needs.make-release.outputs.upload_url }}
94-
asset_path: ./dist/Python-${{ env.PY_VERSION }}-${{ matrix.target }}-support.${{ env.BUILD_NUMBER }}.tar.gz
95-
asset_name: Python-${{ env.PY_VERSION }}-${{ matrix.target }}-support.${{ env.BUILD_NUMBER }}.tar.gz
96-
asset_content_type: application/gzip
90+
name: dist
91+
path: dist
92+
93+
- name: Create Release
94+
uses: ncipollo/[email protected]
95+
with:
96+
name: ${{ needs.build.outputs.PYTHON_VER }}-${{ needs.build.outputs.BUILD_NUMBER }}
97+
tag: ${{ needs.build.outputs.PYTHON_VER }}-${{ needs.build.outputs.BUILD_NUMBER }}
98+
draft: true
99+
body: |
100+
Build ${{ needs.build.outputs.BUILD_NUMBER }} of the BeeWare support package for Python ${{ needs.build.outputs.PYTHON_VER }}.
101+
102+
Includes:
103+
* Python ${{ needs.build.outputs.PYTHON_VERSION }}
104+
* OpenSSL ${{ needs.build.outputs.OPENSSL_VERSION }}
105+
* BZip2 ${{ needs.build.outputs.BZIP2_VERSION }}
106+
* XZ ${{ needs.build.outputs.XZ_VERSION }}
107+
* LibFFI ${{ needs.build.outputs.LIBFFI_VERSION }}
108+
artifacts: "dist/*"

.gitignore

+6-12
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,12 @@
22
*.swp
33
.envrc
44
.vscode/
5-
alias/*
6-
archive/*
7-
build/*
8-
diff/*
9-
dist/*
10-
downloads/*
11-
install/*
12-
local/*
13-
merge/*
14-
src/*
15-
support/*
16-
wheels/*
5+
build
6+
dist
7+
downloads
8+
install
9+
local
10+
support
1711
*.dist-info
1812
__pycache__
1913
tests/testbed/macOS

0 commit comments

Comments
 (0)