Skip to content

Commit 3ea607a

Browse files
committed
Merge branch 'feature-freeze'; v8.1.2; macOS and win32 installers
2 parents bb59746 + 2b85d85 commit 3ea607a

18 files changed

+293
-144
lines changed

GNUmakefile

Lines changed: 117 additions & 46 deletions
Large diffs are not rendered by default.

README.org

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,6 +1275,12 @@ by entering the mnemonics right on the device.
12751275
: $ cd src
12761276
: $ git clone [email protected]:pjkundert/python-slip39.git
12771277

1278+
**** Code Signing
1279+
1280+
The MMC (Microsoft Management Console) is used to store your code-signing certificates.
1281+
See [[stackoverflow.com/questions/19879812/signing-exe-with-cer-file-what-is-my-certificates-name-that-signtool-exe-is][stackoverflow.com]] for how to enable its Certificate management.
1282+
1283+
12781284
* Dependencies
12791285

12801286
Internally, python-slip39 project uses Trezor's [[https://gihub.com/trezor/python-shamir-mnemonic.git][python-shamir-mnemonic]] to encode the seed data to

SLIP-39-macOS.spec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ coll = COLLECT(exe,
5050
app = BUNDLE(coll,
5151
name='SLIP-39.app',
5252
icon='images/SLIP-39.icns',
53-
version='8.0.2',
53+
version='8.1.2',
5454
info_plist={
55-
'CFBundleVersion':'8.0.2',
55+
'CFBundleVersion':'8.1.2',
5656
'CFBundlePackageType':'APPL',
5757
'LSApplicationCategoryType':'public.app-category.finance',
5858
'LSMinimumSystemVersion':'10.15.0',

images/SLIP-39.ico

108 KB
Binary file not shown.

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ pytest
55
setuptools
66
wheel
77
pyinstaller >= 4.9
8+
cx_Freeze >= 6.10

requirements.txt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
base58 >=2.0.1, <3
2-
chacha20poly1305 >=0.0.3
3-
fpdf2 >=2.5, <3
4-
hdwallet >=2.1, <3
5-
mnemonic >=0.19, <1
6-
qrcode >=7.3
7-
shamir-mnemonic >=0.2, <1
1+
base58 >=2.0.1, <3
2+
chacha20poly1305>=0.0.3
3+
fpdf2 >=2.5, <3
4+
hdwallet >=2.1, <3
5+
mnemonic >=0.19, <1
6+
qrcode >=7.3
7+
shamir-mnemonic >=0.2, <1
8+
cx_Freeze >= 6.10

setup.py

Lines changed: 117 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,124 @@
1-
from setuptools import setup
2-
31
import os
42
import sys
53
import glob
64
import fnmatch
75

6+
Executable = None
7+
if sys.platform == 'win32':
8+
# We use cx_Freeze for executable/installer packaging on Windows, only, for now.
9+
from cx_Freeze import setup, Executable
10+
print( f"sys.platform {sys.platform}: Using cx_Freeze.setup" )
11+
else:
12+
from setuptools import setup
13+
print( f"sys.platform {sys.platform}: Using setuptools.setup" )
14+
15+
#
16+
# For various platforms, extra setup options are required. Collect them here
17+
#
18+
extra_options = {}
19+
20+
#
21+
# cx_Freeze options -- Windows .exe/.msi support
22+
# cx-freeze.readthedocs.io/en/latest/setup_script.html
23+
#
24+
mainscript = "SLIP-39.py"
25+
copyright = "Copyright (c) 2022 Perry Kundert",
26+
27+
if sys.platform == 'win32':
28+
company_name = "pjkundert"
29+
product_name = "python-slip39"
30+
icon_win = "images/SLIP-39.ico"
31+
32+
shortcut = (
33+
"DesktopShortcut", # Shortcut
34+
"DesktopFolder", # Directory_
35+
"SLIP-39", # Name
36+
"TARGETDIR", # Component_
37+
"[TARGETDIR]SLIP-39.exe", # Target
38+
None, # Arguments
39+
None, # Description
40+
None, # Hotkey
41+
None, # Icon
42+
None, # IconIndex
43+
None, # ShowCmd
44+
"TARGETDIR", # WkDir
45+
)
46+
47+
msi_data = dict(
48+
Shortcut = [
49+
shortcut,
50+
],
51+
#Icon = [
52+
# icon_win,
53+
#]
54+
)
55+
56+
bdist_msi_options = dict(
57+
add_to_path = True,
58+
data = msi_data,
59+
initial_target_dir = rf"[ProgramFilesFolder]\{company_name}\{product_name}",
60+
)
61+
62+
build_exe_options = dict(
63+
packages = [],
64+
excludes = [],
65+
include_msvcr = True,
66+
)
67+
68+
executables = [
69+
Executable(
70+
mainscript,
71+
copyright = copyright,
72+
base = "Win32GUI",
73+
icon = icon_win,
74+
),
75+
]
76+
77+
extra_options = dict(
78+
executables = executables,
79+
options = dict(
80+
bdist_msi = bdist_msi_options,
81+
build_exe = build_exe_options,
82+
)
83+
)
84+
85+
86+
'''
87+
if sys.platform == 'darwin':
88+
# For py2{app,exe} App Generation. TODO: Does not work; use PyInstaller instead
89+
extra_options = dict(
90+
setup_requires = [ 'py2app' ],
91+
app = [ mainscript ],
92+
# Cross-platform applications generally expect sys.argv to
93+
# be used for opening files.
94+
# Don't use this with GUI toolkits, the argv
95+
# emulator causes problems and toolkits generally have
96+
# hooks for responding to file-open events.
97+
options = dict(
98+
py2app = dict(
99+
argv_emulation = True,
100+
iconfile = 'images/SLIP39.icns',
101+
includes = 'tkinter',
102+
),
103+
),
104+
)
105+
elif sys.platform == 'win32':
106+
extra_options = dict(
107+
setup_requires = [ 'py2exe' ],
108+
app = [ mainscript ],
109+
)
110+
else:
111+
extra_options = dict(
112+
# Normally unix-like platforms will use "setup.py install"
113+
# and install the main script as such
114+
scripts = [ mainscript ],
115+
)
116+
'''
117+
118+
119+
#
120+
# All platforms
121+
#
8122
HERE = os.path.dirname( os.path.abspath( __file__ ))
9123

10124
# Must work if setup.py is run in the source distribution context, or from
@@ -187,40 +301,6 @@
187301
"Bug Tracker": "https://github.com/pjkundert/python-slip39/issues",
188302
}
189303

190-
'''
191-
# For py2{app,exe} App Generation. TODO: Does not work; use PyInstaller instead
192-
mainscript = "SLIP39.py"
193-
194-
if sys.platform == 'darwin':
195-
extra_options = dict(
196-
setup_requires = [ 'py2app' ],
197-
app = [ mainscript ],
198-
# Cross-platform applications generally expect sys.argv to
199-
# be used for opening files.
200-
# Don't use this with GUI toolkits, the argv
201-
# emulator causes problems and toolkits generally have
202-
# hooks for responding to file-open events.
203-
options = dict(
204-
py2app = dict(
205-
argv_emulation = True,
206-
iconfile = 'images/SLIP39.icns',
207-
includes = 'tkinter',
208-
),
209-
),
210-
)
211-
elif sys.platform == 'win32':
212-
extra_options = dict(
213-
setup_requires = [ 'py2exe' ],
214-
app = [ mainscript ],
215-
)
216-
else:
217-
extra_options = dict(
218-
# Normally unix-like platforms will use "setup.py install"
219-
# and install the main script as such
220-
scripts = [ mainscript ],
221-
)
222-
'''
223-
224304
setup(
225305
name = "slip39",
226306
version = __version__,
@@ -244,5 +324,5 @@
244324
url = "https://github.com/pjkundert/python-slip39",
245325
classifiers = classifiers,
246326
python_requires = ">=3.9",
247-
#**extra_options
327+
**extra_options
248328
)

slip39/generator_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import os
22
import logging
3-
import pty
43
import threading
54

65
import pytest
76

87
try:
8+
import pty
99
from serial import Serial
1010
except ImportError:
1111
Serial = None

slip39/gui/SLIP-39-CRYPTO.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ displayed, for information purposes only, to illustrate *which* Wallets
66
are derived from this Seed. The cryptocurrencies supported, and the
77
standard BIP-44 derivation paths (Trezor compatible) displayed are:
88

9-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
109
BTC m/84'/0'/0'/0/0 (Bech32)
1110
ETH m/44'/60'/0'/0/0
1211
LTC m/44'/2'/0'/0/0
1312
DOGE m/44'/3'/0'/0/0
14-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

slip39/gui/SLIP-39-G-NAME.org

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ The default Group names and their intended usages are:
1010
| Second | A 1-card group stored in the First safe place |
1111
| Fam | A smaller group of Family members |
1212
| Fren | A larger group of Friends; increase Needed |
13-
1413
#+END_ABSTRACT
1514

1615
* 1-Card Groups

0 commit comments

Comments
 (0)