Skip to content

Commit c479670

Browse files
committed
fix building process on Windows
1 parent 5573bde commit c479670

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

setup.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
""" File used by cx_freeze to package python application. """
22
import sys
3+
import os
34
from cx_Freeze import setup, Executable
45

56
additional_mods = ['numpy.core._methods', 'numpy.lib.format']
@@ -8,6 +9,15 @@
89
base = None
910
if sys.platform == "win32":
1011
base = "Win32GUI"
12+
# building on Windows: copy tcl and tk to the build
13+
PYTHON_INSTALL_DIR = os.path.dirname(os.path.dirname(os.__file__))
14+
os.environ['TCL_LIBRARY'] = os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tcl8.6')
15+
os.environ['TK_LIBRARY'] = os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tk8.6')
16+
include_files.extend([
17+
os.path.join(PYTHON_INSTALL_DIR, 'DLLs', 'tk86t.dll'),
18+
os.path.join(PYTHON_INSTALL_DIR, 'DLLs', 'tcl86t.dll'),
19+
])
20+
1121

1222
setup(
1323
name="Digitaizer",

0 commit comments

Comments
 (0)