Skip to content

Commit 8e48d7d

Browse files
committed
Fix up make targets, add app-packages to build and notarize all packages
o No signed and notarized zip, pkg or dmg package accepted by App Store
1 parent 0db847f commit 8e48d7d

File tree

1 file changed

+33
-27
lines changed

1 file changed

+33
-27
lines changed

GNUmakefile

Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,12 @@ help:
4646
@echo "GNUmakefile for cpppo. Targets:"
4747
@echo " help This help"
4848
@echo " test Run unit tests under Python3"
49-
@echo " build Build dist wheel and app under Python3"
50-
@echo " install Install in /usr/local for Python3"
5149
@echo " clean Remove build artifacts"
50+
@echo " build Build clean dist wheel and app under Python3"
51+
@echo " install Install in /usr/local for Python3"
5252
@echo " upload Upload new version to pypi (package maintainer only)"
53+
@echo " app Build the macOS SLIP39.app"
54+
@echo " app-packages Build and sign the macOSSLIP39.app, and all App zip, dmg and pkg format packages"
5355

5456
test:
5557
$(PY3TEST)
@@ -71,6 +73,30 @@ build-check:
7173

7274
build: clean wheel app
7375

76+
77+
#
78+
# VirtualEnv build, install and activate
79+
#
80+
81+
venv: $(LOCAL)/$(VENV_NAME)
82+
venv-activate: $(LOCAL)/$(VENV_NAME)-activate
83+
84+
85+
$(LOCAL)/$(VENV_NAME):
86+
@echo; echo "*** Building $@ VirtualEnv..."
87+
@rm -rf $@ && $(PY3) -m venv $(VENV_OPTS) $@ \
88+
&& cd $@ && git clone $(GHUB_REPO) $(GHUB_BRCH) \
89+
&& . ./bin/activate && make -C $(GHUB_NAME) install-dev install
90+
91+
# Activate a given VirtualEnv, and go to its python-slip39 installation
92+
# o Creates a custom venv-activate.sh script in the venv, and uses it start
93+
# start a sub-shell in that venv, with a CWD in the contained python-slip39 installation
94+
$(LOCAL)/$(VENV_NAME)-activate: $(LOCAL)/$(VENV_NAME)
95+
@echo; echo "*** Activating $@ VirtualEnv"
96+
[ -s $</start ] || echo ". $</bin/activate; cd $</$(GHUB_NAME)" > $</venv-activate.sh
97+
bash --init-file $</venv-activate.sh -i
98+
99+
74100
wheel: dist/slip39-$(VERSION)-py3-none-any.whl
75101

76102
dist/slip39-$(VERSION)-py3-none-any.whl: build-check FORCE
@@ -84,9 +110,12 @@ install-dev:
84110
install: dist/slip39-$(VERSION)-py3-none-any.whl FORCE
85111
$(PY3) -m pip install --force-reinstall $<[gui,serial,json]
86112

87-
# Building / Upload a macOS App
113+
# Building / Signing / Notarizing and Uploading the macOS App
114+
# o TODO: no signed and notarized package yet accepted for upload by macOS App Store
88115
app: dist/SLIP39.app
89-
app-upload: app-pkg-upload
116+
app-packages: app-zip-valid app-dmg-valid app-pkg-valid
117+
app-upload: app-dmg-upload
118+
90119

91120
# Generate, Sign and Package the macOS SLIP39.app GUI for App Store or local/manual installation
92121
# o Try all the approaches of packaging a macOS App for App Store upload
@@ -526,26 +555,3 @@ unit-%:
526555
print-%:
527556
@echo $* = $($*)
528557
@echo $*\'s origin is $(origin $*)
529-
530-
531-
#
532-
# VirtualEnv build, install and activate
533-
#
534-
535-
venv: $(LOCAL)/$(VENV_NAME)
536-
venv-activate: $(LOCAL)/$(VENV_NAME)-activate
537-
538-
539-
$(LOCAL)/$(VENV_NAME):
540-
@echo; echo "*** Building $@ VirtualEnv..."
541-
@rm -rf $@ && $(PY3) -m venv $(VENV_OPTS) $@ \
542-
&& cd $@ && git clone $(GHUB_REPO) $(GHUB_BRCH) \
543-
&& . ./bin/activate && make -C $(GHUB_NAME) install-dev install
544-
545-
# Activate a given VirtualEnv, and go to its python-slip39 installation
546-
# o Creates a custom venv-activate.sh script in the venv, and uses it start
547-
# start a sub-shell in that venv, with a CWD in the contained python-slip39 installation
548-
$(LOCAL)/$(VENV_NAME)-activate: $(LOCAL)/$(VENV_NAME)
549-
@echo; echo "*** Activating $@ VirtualEnv"
550-
[ -s $</start ] || echo ". $</bin/activate; cd $</$(GHUB_NAME)" > $</venv-activate.sh
551-
bash --init-file $</venv-activate.sh -i

0 commit comments

Comments
 (0)