Skip to content

Commit c01ccd0

Browse files
committed
Merge branch 'feature-py3.11'; v12.0.0
2 parents 98ba69b + a76e54b commit c01ccd0

File tree

2 files changed

+28
-19
lines changed

2 files changed

+28
-19
lines changed

GNUmakefile

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ PKGID ?= Developer ID Installer: Perry Kundert ($(TEAMID))
2626
BUNDLEID ?= ca.kundert.perry.SLIP39
2727
APIISSUER ?= 5f3b4519-83ae-4e01-8d31-f7db26f68290
2828
APIKEY ?= 5H98J7LKPC
29+
APICREDENTIALS ?= ~/.private_keys/AuthKey_$(APIKEY).p8
30+
2931
#PROVISION ?= ~/Documents/Apple/Certificates/SLIP39_Mac_App_Store_Provisioning.provisionprofile
3032
PROVISION ?= ~/Documents/Apple/Certificates/SLIP39_Mac_General_Provisioning.provisionprofile
3133

@@ -38,12 +40,12 @@ CXFREEZE_EXT ?= win-$(CXFREEZE_ARCH)-$(CXFREEZE_VER)
3840
SIGNTOOL ?= "c:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86\signtool.exe"
3941

4042

41-
# PY[3] is the target Python interpreter; require 3.9+. Detect if it is named python3 or python.
43+
# PY[3] is the target Python interpreter; require 3.11+. Detect if it is named python3 or python.
4244
PY3 ?= $(shell python3 --version >/dev/null 2>&1 && echo python3 || echo python )
4345
VERSION = $(shell $(PY3) -c 'exec(open("slip39/version.py").read()); print( __version__ )')
4446
PLATFORM ?= $(shell $(PY3) -c "import sys; print( sys.platform )" )
4547
ifeq ($(PLATFORM),darwin)
46-
INSTALLER := dmg
48+
INSTALLER := pkg
4749
else ifeq ($(PLATFORM),win32)
4850
INSTALLER := msi
4951
else
@@ -210,7 +212,7 @@ $(VENV_LOCAL)/$(VENV_NAME):
210212
@rm -rf $@ && $(PY3) -m venv $(VENV_OPTS) $@ \
211213
&& cd $@ && git clone $(GHUB_REPO) -b $(GHUB_BRCH) \
212214
&& . ./bin/activate \
213-
&& make -C $(GHUB_NAME) install-dev install
215+
&& make -C $(GHUB_NAME) install-tests install
214216

215217
# Activate a given VirtualEnv, and go to its python-slip39 installation
216218
# o Creates a custom venv-activate.sh script in the venv, and uses it start
@@ -237,8 +239,8 @@ dist/slip39-$(VERSION)-py3-none-any.whl: build-check FORCE
237239
install: dist/slip39-$(VERSION)-py3-none-any.whl FORCE
238240
$(PY3) -m pip install --force-reinstall $<[all]
239241

240-
install-dev:
241-
$(PY3) -m pip install --upgrade -r requirements-dev.txt
242+
install-tests:
243+
$(PY3) -m pip install --upgrade -r requirements-tests.txt
242244

243245
# Building / Signing / Notarizing and Uploading the macOS or win32 App
244246
# o TODO: no signed and notarized package yet accepted for upload by macOS App Store
@@ -303,7 +305,7 @@ dist/slip39-$(VERSION)-win64.msi: build/exe.$(CXFREEZE_EXT)/SLIP-39.exe # signin
303305
#
304306
dist/SLIP-39-$(VERSION).dmg: dist/SLIP-39.app
305307
@echo -e "\n\n*** Creating and signing DMG $@..."
306-
npx create-dmg --overwrite $<
308+
npx create-dmg -v --overwrite --identity "$(PKGID)" $< dist/
307309
mv "SLIP-39 $(VERSION).dmg" "$@"
308310
@echo "Checking signature..."; ./SLIP-39.metadata/check-signature $@
309311

@@ -428,27 +430,34 @@ dist/SLIP-39-$(VERSION).pkg-verify: dist/SLIP-39-$(VERSION).pkg
428430
#
429431
# macOS Package Notarization
430432
# See: https://oozou.com/blog/scripting-notarization-for-macos-app-distribution-38
433+
# https://developer.apple.com/documentation/technotes/tn3147-migrating-to-the-latest-notarization-tool
431434
# o The .pkg version doesn't work due to incorrect signing keys for the .pkg (unknown reason)
435+
#
436+
# Submits the version's .pkg for notariation, and waits for completion (success or failure).
437+
# - The output contains the Submission ID, required to obtain the JSON notary log
432438
dist/SLIP-39-$(VERSION).pkg.notarization: dist/SLIP-39-$(VERSION).pkg dist/SLIP-39-$(VERSION).pkg-verify
433-
jq -r '.["notarization-upload"]["RequestUUID"]' $@ 2>/dev/null \
434-
|| xcrun altool --notarize-app -f $< \
435-
--primary-bundle-id $(BUNDLEID) \
436-
--team-id $(TEAMID) \
437-
--apiKey $(APIKEY) --apiIssuer $(APIISSUER) \
438-
--output-format json \
439+
grep "Submission ID" $@ 2>/dev/null \
440+
|| xcrun notarytool submit \
441+
--issuer $(APIISSUER) \
442+
--key-id $(APIKEY) \
443+
--key $(APICREDENTIALS) \
444+
--wait \
445+
$< \
439446
> $@
440447

441448
dist/SLIP-39-$(VERSION).pkg.notarization-status: dist/SLIP-39-$(VERSION).pkg.notarization FORCE
442449
[ -s $@ ] && grep "Status: success" $@ \
443-
|| xcrun altool \
444-
--apiKey $(APIKEY) --apiIssuer $(APIISSUER) \
445-
--notarization-info $$( jq -r '.["notarization-upload"]["RequestUUID"]' $< ) \
446-
| tee -a $@
450+
|| xcrun notarytool log \
451+
--issuer $(APIISSUER) \
452+
--key-id $(APIKEY) \
453+
--key $(APICREDENTIALS) \
454+
$$( grep -A1 "Submission ID" < $< | grep "id:" | awk '{print $$2}' ) \
455+
> $@
447456

448457
# Check notarization status 'til Status: success, then staple it to ...pkg, and create ...pkg.valid marker file
449458
dist/SLIP-39-$(VERSION).pkg.valid: dist/SLIP-39-$(VERSION).pkg.notarization-status FORCE
450-
@grep "Status: success" $< || \
451-
( tail -10 $<; echo -e "\n\n!!! App not yet notarized; try again in a few seconds..."; false )
459+
@grep "Ready for distribution" $< || \
460+
( tail -10 $<; echo -e "\n\n!!! App not yet notarized..."; false )
452461
( [ -r $@ ] ) \
453462
&& ( echo -e "\n\n*** Notarization complete; refreshing $@" && touch $@ ) \
454463
|| ( \

slip39/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
__version_info__ = ( 11, 2, 1 )
1+
__version_info__ = ( 12, 0, 0 )
22
__version__ = '.'.join( map( str, __version_info__ ))

0 commit comments

Comments
 (0)