First stab at universal 3.9.1 macadmins python (#18)

* First stab at universal 3.9.1 macadmins python

* Update workflow files

* Removed old build workflows

* Add improvements from IAs

* Revert to older MP as signing failed, update release notes
This commit is contained in:
Nate Walck
2020-12-14 17:05:39 -06:00
committed by GitHub
parent 60cc8f5a5c
commit 92fa66f67e
6 changed files with 389 additions and 470 deletions
-104
View File
@@ -1,104 +0,0 @@
name: Build and upload recommended package
env:
TYPE: "recommended"
DEV_ID: "Developer ID Installer: Clever DevOps Co. (9GQZ7KUFR6)"
PYTHON_VERSION: "3.8.3"
on:
pull_request:
push:
branches:
- main
jobs:
build:
runs-on: macos-latest
steps:
- name: Set environment variables
id: set_env_var
run: |
echo ::set-env name=BUILD_DATE::$(/bin/date -u "+%m%d%Y%H%M%S")
echo ::set-env name=BUILD_DATE_RELEASE::$(/bin/date -u "+%B %d %Y %H:%M:%S")
- name: Checkout python repo
uses: actions/checkout@v2
- name: Install Apple certificates
if: github.ref == 'refs/heads/main'
uses: apple-actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
- name: Run build package script
run: /usr/bin/sudo ./build_python_framework_pkgs.zsh "$TYPE" "$DEV_ID" "$PYTHON_VERSION" "${BUILD_DATE}"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v.${{env.PYTHON_VERSION}}.${{env.BUILD_DATE}}
release_name: Python ${{env.PYTHON_VERSION}} (${{env.BUILD_DATE_RELEASE}})
body: |
# Notes
Python 3.8.3 Framework
The package versions comes with two symbolic links to ease the use. Please see the README for more information.
- `/usr/local/bin/managed_python3`
- `/Library/ManagedFrameworks/Python/Python3.framework/Versions/Current/bin/python3`
## Changes
- Python3.framework is now in `/Library/ManagedFrameworks/Python` and no longer in `/Library/ManagedFrameworks`
- `/Library/SystemFrameworks` is now `/Library/ManagedFrameworks`
- `/Library/ManagedFrameworks/Python/Python3.framework/Versions/Current/bin/python3` is the new recommended shebang path
- `/usr/local/bin/python3.framework` is now `/usr/local/bin/managed_python3`
- Add optional signed packages, build by [Clever DevOps](https://www.cleverdevops.com) signing certificate
- Remove unnecessary `Python3.framework/python3` symlink
# Flavors of Python
At this time, the automated build process will **only** create the Recommended package
## Recommended
This is a Python.framework that contains everything from minimal, and a few libraries that various well known open source projects require.
draft: false
prerelease: true
- name: Upload Unsigned Package Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./outputs/python_${{env.TYPE}}-${{env.PYTHON_VERSION}}.${{env.BUILD_DATE}}.pkg
asset_name: python_${{env.TYPE}}-${{env.PYTHON_VERSION}}.${{env.BUILD_DATE}}.pkg
asset_content_type: application/x-newton-compatible-pkg
- name: Upload Signed Package Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./outputs/python_${{env.TYPE}}_signed-${{env.PYTHON_VERSION}}.${{env.BUILD_DATE}}.pkg
asset_name: python_${{env.TYPE}}_signed-${{env.PYTHON_VERSION}}.${{env.BUILD_DATE}}.pkg
asset_content_type: application/x-newton-compatible-pkg
- name: Upload Python Framework Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./outputs/Python3.framework_${{env.TYPE}}-${{env.PYTHON_VERSION}}.${{env.BUILD_DATE}}.zip
asset_name: Python3.framework_${{env.TYPE}}-${{env.PYTHON_VERSION}}.${{env.BUILD_DATE}}.zip
asset_content_type: application/zip
- name: Upload packages
uses: actions/upload-artifact@v1
with:
name: packages
path: outputs/
@@ -3,7 +3,7 @@ name: Build and upload recommended package
env:
TYPE: "recommended"
DEV_ID: "Developer ID Installer: Clever DevOps Co. (9GQZ7KUFR6)"
PYTHON_VERSION: "3.8.2"
PYTHON_VERSION: "3.9.1"
on:
pull_request:
@@ -19,8 +19,8 @@ jobs:
- name: Set environment variables
id: set_env_var
run: |
echo ::set-env name=BUILD_DATE::$(/bin/date -u "+%m%d%Y%H%M%S")
echo ::set-env name=BUILD_DATE_RELEASE::$(/bin/date -u "+%B %d %Y %H:%M:%S")
echo "BUILD_DATE=$(/bin/date -u "+%m%d%Y%H%M%S")" >> $GITHUB_ENV
echo "BUILD_DATE_RELEASE=$(/bin/date -u "+%B %d %Y %H:%M:%S")" >> $GITHUB_ENV
- name: Checkout python repo
uses: actions/checkout@v2
@@ -45,19 +45,12 @@ jobs:
release_name: Python ${{env.PYTHON_VERSION}} (${{env.BUILD_DATE_RELEASE}})
body: |
# Notes
Python 3.8.2 Framework
The package versions comes with two symbolic links to ease the use. Please see the README for more information.
- `/usr/local/bin/managed_python3`
- `/Library/ManagedFrameworks/Python/Python3.framework/Versions/Current/bin/python3`
Python 3.9.1 Framework
## Changes
- Python3.framework is now in `/Library/ManagedFrameworks/Python` and no longer in `/Library/ManagedFrameworks`
- `/Library/SystemFrameworks` is now `/Library/ManagedFrameworks`
- `/Library/ManagedFrameworks/Python/Python3.framework/Versions/Current/bin/python3` is the new recommended shebang path
- `/usr/local/bin/python3.framework` is now `/usr/local/bin/managed_python3`
- Add optional signed packages, build by [Clever DevOps](https://www.cleverdevops.com) signing certificate
- Remove unnecessary `Python3.framework/python3` symlink
- Universal build! Now supports Apple M1 Machines
- Upgraded Python to 3.9.1
- pyobjc is now 7.0.1
# Flavors of Python
At this time, the automated build process will **only** create the Recommended package