X Tutup
Skip to content

Commit 601dea4

Browse files
committed
Fixed problematic guidata compatibility issue between v1.5 and v1.6
1 parent 7da1d3c commit 601dea4

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

make.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import shutil
2020
import sys
2121

22-
from guidata import disthelpers
22+
from guidata.disthelpers import get_msvc_dlls
2323

2424
# Local imports
2525
from winpython import wppm, utils
@@ -374,9 +374,8 @@ def _extract_python(self):
374374
def _add_msvc_files(self):
375375
"""Adding Microsoft Visual C++ DLLs"""
376376
print("Adding Microsoft Visual C++ DLLs""")
377-
for fname in disthelpers.get_msvc_dlls(
378-
architecture=self.distribution.architecture,
379-
python_version=self.distribution.version):
377+
for fname in get_msvc_dlls(architecture=self.distribution.architecture,
378+
python_version=self.distribution.version):
380379
shutil.copy(fname, self.python_dir)
381380

382381
def _install_required_packages(self):

winpython/utils.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
import atexit
2424
import sys
2525
import stat
26-
27-
from guidata.utils import decode_fs_string
26+
import locale
2827

2928

3029
# Development only
@@ -137,6 +136,13 @@ def is_python_distribution(path):
137136
and osp.isdir(osp.join(path, 'Lib', 'site-packages'))
138137

139138

139+
def decode_fs_string(string):
140+
"""Convert string from file system charset to unicode"""
141+
charset = sys.getfilesystemencoding()
142+
if charset is None:
143+
charset = locale.getpreferredencoding()
144+
return string.decode(charset)
145+
140146
def exec_shell_cmd(args, path):
141147
"""Execute shell command (*args* is a list of arguments) in *path*"""
142148
#print " ".join(args)

0 commit comments

Comments
 (0)
X Tutup