@@ -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
@@ -407,24 +411,29 @@ $(VENV):
407411wheel : deps $(WHEEL )
408412
409413$(WHEEL ) : FORCE
410- $(PYTHON ) -m pip install -r requirements-tests .txt
414+ $(PYTHON ) -m pip install -r requirements-dev .txt
411415 $(PYTHON ) -m build
412416 @ls -last dist
413417
414- # Install from wheel, including all optional extra dependencies (except dev)
418+ # Install from wheel, including all optional extra dependencies (except dev). Always use the venv (or global)
415419install : $(WHEEL ) FORCE
416- $(PYTHON ) -m pip install --force-reinstall $< [all]
420+ $(PYTHON ) -m pip install --no-user -- force-reinstall $< [all]
417421
418422install-% : # ...-dev, -tests
419- $(PYTHON ) -m pip install --upgrade -r requirements-$* .txt
423+ $(PYTHON ) -m pip install --no-user -- upgrade -r requirements-$* .txt
420424
421425
422426# Building / Signing / Notarizing and Uploading the macOS or win32 App
423427# o TODO: no signed and notarized package yet accepted for upload by macOS App Store
424428#
425429# Mac: To build the .dmg installer, run:
430+ # nix develop
431+ # PYTHON=python3.12 make venv
432+ # - In the venv:
426433# make clean
427434# make installer # continue running every couple of minutes 'til the App is notarized
435+ # - Once .pkg is successfully notarized, upload it:
436+ # make app-pkg-upload
428437#
429438installer : $(INSTALLER )
430439
@@ -676,7 +685,7 @@ dist/SLIP-39-$(VERSION).zip: dist/SLIP-39.app
676685 codesign -dv -r- $<
677686 codesign -vv $<
678687 rm -f $@
679- /usr/bin/ditto -c -k --keepParent " $<" " $@ "
688+ /usr/bin/ditto -c -k --sequesterRsrc -- keepParent " $<" " $@ "
680689 @ls -last dist
681690
682691# Upload and notarize the .zip, unless we've already uploaded it and have a RequestUUID
@@ -811,13 +820,13 @@ dist/SLIP-39.app: SLIP-39-macOS.spec \
811820 $(PROVISION )
812821 @echo -e " \n\n*** Rebuilding $@ , version $( VERSION) ..."
813822 rm -rf build $@ *
814- sed -I " " -E " s/version=.*/version='$( VERSION) ',/" $<
815- sed -I " " -E " s/'CFBundleVersion':.*/'CFBundleVersion':'$( VERSION) ',/" $<
816- sed -I " " -E " s/codesign_identity=.*/codesign_identity='$( DEVID) ',/" $<
823+ sed -i " " -E " s/version=.*/version='$( VERSION) ',/" $<
824+ sed -i " " -E " s/'CFBundleVersion':.*/'CFBundleVersion':'$( VERSION) ',/" $<
825+ sed -i " " -E " s/codesign_identity=.*/codesign_identity='$( DEVID) ',/" $<
817826 pyinstaller --noconfirm $<
818827 # echo "Copying Provisioning Profile..."; rsync -va $(PROVISION) $@/Contents/embedded.provisionprofile
819828 echo " Checking signature (pyinstaller signed)..." ; ./SLIP-39.metadata/check-signature $@ || true
820- codesign --verify --verbose $@
829+ codesign --verify --verbose $@ || echo " Not valid; codesign-ing... "
821830 # codesign --deep --force \
822831 # --all-architectures --options=runtime --timestamp \
823832 # --sign "$(DEVID)" \
0 commit comments