Skip to content

Commit e9cdd60

Browse files
committed
Successfully build SLIP39.app w/ official python.org/download install
1 parent 37cb288 commit e9cdd60

File tree

9 files changed

+370
-240
lines changed

9 files changed

+370
-240
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ dist/
2525
.pytest_cache/
2626
.cache/
2727
*.spec
28+
.eggs

GNUmakefile

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,24 @@
33
#
44

55
# PY[3] is the target Python interpreter. It must have pytest installed.
6-
PY3=python3
6+
PY3 ?= python3
77

88
VERSION=$(shell $(PY3) -c 'exec(open("slip39/version.py").read()); print( __version__ )')
99

1010
# To see all pytest output, uncomment --capture=no
11-
PYTESTOPTS=-vv # --capture=no --log-cli-level=INFO
11+
PYTESTOPTS = -vv # --capture=no --log-cli-level=INFO
1212

13-
PY3TEST=TZ=$(TZ) $(PY3) -m pytest $(PYTESTOPTS)
13+
PY3TEST = $(PY3) -m pytest $(PYTESTOPTS)
1414

15-
.PHONY: all test clean upload
16-
all: help
15+
.PHONY: all help test doctest analyze pylint build-check build install upload clean FORCE
16+
17+
all: help
1718

1819
help:
1920
@echo "GNUmakefile for cpppo. Targets:"
2021
@echo " help This help"
2122
@echo " test Run unit tests under Python3"
22-
@echo " build Build dist packages under Python3"
23+
@echo " build Build dist wheel and app under Python3"
2324
@echo " install Install in /usr/local for Python3"
2425
@echo " clean Remove build artifacts"
2526
@echo " upload Upload new version to pypi (package maintainer only)"
@@ -43,25 +44,39 @@ pylint:
4344

4445
build-check:
4546
@$(PY3) -m build --version \
46-
|| ( echo "\n*** Missing Python modules; run:\n\n $(PY3) -m pip install --upgrade pip setuptools build\n" \
47+
|| ( echo "\n*** Missing Python modules; run:\n\n $(PY3) -m pip install --upgrade pip setuptools wheel build\n" \
4748
&& false )
4849

49-
build: build-check clean
50+
build: wheel app
51+
52+
wheel: dist/slip39-$(VERSION)-py3-none-any.whl
53+
54+
dist/slip39-$(VERSION)-py3-none-any.whl: build-check FORCE
5055
$(PY3) -m build
5156
@ls -last dist
5257

53-
dist/slip39-$(VERSION)-py3-none-any.whl: build
58+
# Install from wheel, including all optional extra dependencies
59+
install: dist/slip39-$(VERSION)-py3-none-any.whl FORCE
60+
$(PY3) -m pip install --force-reinstall $^[gui,serial,json]
61+
62+
# Generate, Sign and Zip the App package TODO: Code signing w/ Apple Developer ID
63+
app: dist/SLIP39.app.zip
64+
65+
dist/SLIP39.app.zip: dist/SLIP39.app
66+
rm -f $@
67+
(cd dist; zip -r SLIP39.app.zip SLIP39.app)
68+
@ls -last dist
5469

55-
install: dist/slip39-$(VERSION)-py3-none-any.whl
56-
$(PY3) -m pip install --force-reinstall $^
70+
dist/SLIP39.app: SLIP39.py FORCE
71+
pyinstaller --noconfirm --windowed --onefile --collect-data shamir_mnemonic $<
5772

5873

5974
# Support uploading a new version of slip32 to pypi. Must:
6075
# o advance __version__ number in slip32/version.py
6176
# o log in to your pypi account (ie. for package maintainer only)
6277

63-
upload: build
64-
python3 -m twine upload --repository pypi dist/*
78+
upload: wheel
79+
python3 -m twine upload --repository pypi dist/slip39-$(VERSION)*
6580

6681
clean:
6782
@rm -rf MANIFEST *.png build dist auto *.egg-info $(shell find . -name '*.pyc' -o -name '__pycache__' )

README.org

Lines changed: 153 additions & 114 deletions
Large diffs are not rendered by default.

README.pdf

6.34 KB
Binary file not shown.

README.txt

Lines changed: 186 additions & 110 deletions
Large diffs are not rendered by default.

SLIP39.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#! /usr/bin/env python3
22

33
import sys
4+
45
from slip39.App.main import main
56

67
sys.exit( main() )

requirements-gui.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
pysimplegui >=4.56
2-
tkinter

requirements-optional.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

slip39/App/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def groups_layout( names, group_threshold, groups, passphrase=None ):
7474
[
7575
sg.Text( "Requires recovery of at least: ", size=prefix, **T_kwds ),
7676
sg.Input( f"{group_threshold}", key='-THRESHOLD-', **I_kwds ),
77-
sg.Text( f" of {len(groups)} SLIP-39 Recovery Groups", key='-RECOVERY-', **T_kwds ),
77+
sg.Text( f"of {len(groups)} SLIP-39 Recovery Groups", key='-RECOVERY-', **T_kwds ),
7878
],
7979
] + [
8080
[

0 commit comments

Comments
 (0)