Skip to content

Commit 3534f65

Browse files
committed
Initial cx_Freeze support
1 parent bb59746 commit 3534f65

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

GNUmakefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ APIISSUER ?= 5f3b4519-83ae-4e01-8d31-f7db26f68290
2020
APIKEY ?= 5H98J7LKPC
2121

2222
# PY[3] is the target Python interpreter. It must have pytest installed.
23-
PY3 ?= python3
23+
PY3 ?= $(shell which python3 2>/dev/null && echo python3 || echo python )
2424

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

2727
# To see all pytest output, uncomment --capture=no
2828
PYTESTOPTS = -vv # --capture=no --log-cli-level=INFO

setup.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1-
from setuptools import setup
1+
#from setuptools import setup
2+
from cx_Freeze import setup, Executable
23

34
import os
45
import sys
56
import glob
67
import fnmatch
78

9+
#build_exe_options = { "packages": ["os"], "excludes": [] }
10+
11+
# cx_Freeze executable options
12+
base = None
13+
if sys.platform == 'win32':
14+
base = "Win32GUI"
15+
executables = [ Executable( "SLIP-39.py", base=base ) ]
16+
817
HERE = os.path.dirname( os.path.abspath( __file__ ))
918

1019
# Must work if setup.py is run in the source distribution context, or from
@@ -244,5 +253,6 @@
244253
url = "https://github.com/pjkundert/python-slip39",
245254
classifiers = classifiers,
246255
python_requires = ">=3.9",
256+
executables = executables,
247257
#**extra_options
248258
)

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

0 commit comments

Comments
 (0)