@@ -22,14 +22,14 @@ APPID ?= 1608360813
2222# DEVID ?= DDB5489E29389E9081E0A2FD83B6555D1B101829
2323# DEVID ?= 3rd Party Mac Developer Application: Perry Kundert ($(TEAMID))
2424# DEVID ?= A5DE932A0649AE3B6F06A8134F3E19D2E19A8196
25- # Developer ID Application (not for Mac App Store)
26- DEVID ?= EAA134BE299C43D27E33E2B8645FF4CF55DE8A92
27-
28- # PKGID ?= 3rd Party Mac Developer Installer: Perry Kundert ($(TEAMID))
29- # PKGID ?= 1B482CEB543825C33C366A5665B935D3CEC9FD05
25+ # Developer ID Application (not for Mac App Store) (exp. Friday, November 10, 2028 at 14:19:34 Mountain Standard Time)
26+ # DEVID ?= EAA134BE299C43D27E33E2B8645FF4CF55DE8A92
27+ # 3rd Party Mac Developer Application; for signing for Mac App Store
28+ DEVID ?= AAEEBB68998F340D00A05926C67D77980D562856
3029
3130PKGID ?= Developer ID Installer: Perry Kundert ($(TEAMID ) )
32-
31+ # PKGID ?= CC8AA39695DCC81F0DD56063EBCF033DC2529CC7
32+ # PKGID ?= 3rd Party Mac Developer Installer: Perry Kundert ($(TEAMID))
3333
3434BUNDLEID ?= ca.kundert.perry.SLIP39
3535APIISSUER ?= 5f3b4519-83ae-4e01-8d31-f7db26f68290
@@ -49,7 +49,11 @@ SIGNTOOL ?= "c:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86\signtoo
4949
5050NIX_OPTS ?= # --pure
5151
52- # PY[3] is the target Python interpreter; require 3.11+. Detect if it is named python3 or python, and if system, nix or venv-supplied.
52+ # PY[3] is the target Python interpreter; require 3.11+. Detect if it is named python3 or python,
53+ # and if system, nix or venv-supplied. NOTE: Don't try to provide a full path to a Python
54+ # interpreter as the PYTHON variable, as this will interfere with properly using the venv-supplied
55+ # python. Instead, alter the PATH variable so the 'make' invocation sees the correct target Python.
56+
5357PYTHON ?= $(shell python3 --version >/dev/null 2>&1 && echo python3 || echo python )
5458PYTHON_P = $(shell which $(PYTHON ) )
5559PYTHON_V = $(shell $(PYTHON ) -c "import sys; print('-'.join((('venv' if sys.prefix != sys.base_prefix else next(iter(filter(None,sys.base_prefix.split('/') )))),sys.platform,sys.implementation.cache_tag)))" 2>/dev/null )
6569endif
6670
6771# To see all pytest output, uncomment --capture=no, ...
68- PYTEST_OPTS ?= -v # --log-cli-level=WARNING --capture=no # --doctest-modules
72+ PYTEST_OPTS ?= -vv # --capture=no -- log-cli-level=INFO # --doctest-modules
6973
7074PYTEST = $(PYTHON ) -m pytest $(PYTEST_OPTS )
7175
@@ -373,24 +377,29 @@ $(VENV):
373377wheel : deps $(WHEEL )
374378
375379$(WHEEL ) : FORCE
376- $(PYTHON ) -m pip install -r requirements-tests .txt
380+ $(PYTHON ) -m pip install -r requirements-dev .txt
377381 $(PYTHON ) -m build
378382 @ls -last dist
379383
380- # Install from wheel, including all optional extra dependencies (except dev)
384+ # Install from wheel, including all optional extra dependencies (except dev). Always use the venv (or global)
381385install : $(WHEEL ) FORCE
382- $(PYTHON ) -m pip install --force-reinstall $< [all]
386+ $(PYTHON ) -m pip install --no-user -- force-reinstall $< [all]
383387
384388install-% : # ...-dev, -tests
385- $(PYTHON ) -m pip install --upgrade -r requirements-$* .txt
389+ $(PYTHON ) -m pip install --no-user -- upgrade -r requirements-$* .txt
386390
387391
388392# Building / Signing / Notarizing and Uploading the macOS or win32 App
389393# o TODO: no signed and notarized package yet accepted for upload by macOS App Store
390394#
391395# Mac: To build the .dmg installer, run:
396+ # nix develop
397+ # PYTHON=python3.12 make venv
398+ # - In the venv:
392399# make clean
393400# make installer # continue running every couple of minutes 'til the App is notarized
401+ # - Once .pkg is successfully notarized, upload it:
402+ # make app-pkg-upload
394403#
395404installer : $(INSTALLER )
396405
@@ -642,7 +651,7 @@ dist/SLIP-39-$(VERSION).zip: dist/SLIP-39.app
642651 codesign -dv -r- $<
643652 codesign -vv $<
644653 rm -f $@
645- /usr/bin/ditto -c -k --keepParent " $<" " $@ "
654+ /usr/bin/ditto -c -k --sequesterRsrc -- keepParent " $<" " $@ "
646655 @ls -last dist
647656
648657# Upload and notarize the .zip, unless we've already uploaded it and have a RequestUUID
@@ -777,13 +786,13 @@ dist/SLIP-39.app: SLIP-39-macOS.spec \
777786 $(PROVISION )
778787 @echo -e " \n\n*** Rebuilding $@ , version $( VERSION) ..."
779788 rm -rf build $@ *
780- sed -I " " -E " s/version=.*/version='$( VERSION) ',/" $<
781- sed -I " " -E " s/'CFBundleVersion':.*/'CFBundleVersion':'$( VERSION) ',/" $<
782- sed -I " " -E " s/codesign_identity=.*/codesign_identity='$( DEVID) ',/" $<
789+ sed -i " " -E " s/version=.*/version='$( VERSION) ',/" $<
790+ sed -i " " -E " s/'CFBundleVersion':.*/'CFBundleVersion':'$( VERSION) ',/" $<
791+ sed -i " " -E " s/codesign_identity=.*/codesign_identity='$( DEVID) ',/" $<
783792 pyinstaller --noconfirm $<
784793 # echo "Copying Provisioning Profile..."; rsync -va $(PROVISION) $@/Contents/embedded.provisionprofile
785794 echo " Checking signature (pyinstaller signed)..." ; ./SLIP-39.metadata/check-signature $@ || true
786- codesign --verify --verbose $@
795+ codesign --verify --verbose $@ || echo " Not valid; codesign-ing... "
787796 # codesign --deep --force \
788797 # --all-architectures --options=runtime --timestamp \
789798 # --sign "$(DEVID)" \
0 commit comments