Skip to content

Commit

Permalink
Support 32-bit windows for conda-unpack.exe
Browse files Browse the repository at this point in the history
  • Loading branch information
johanjeppsson committed Sep 24, 2019
1 parent 52daedd commit eb76175
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions conda_pack/compat.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import os
import sys

default_encoding = sys.getdefaultencoding()
on_win = sys.platform == 'win32'
is_32bit = sys.maxsize < 2**32 or os.environ.get('CONDA_FORCE_32BIT', '0') == '1'

PY2 = sys.version_info.major == 2

Expand Down
5 changes: 3 additions & 2 deletions conda_pack/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from contextlib import contextmanager
from fnmatch import fnmatch

from .compat import on_win, default_encoding, find_py_source
from .compat import on_win, default_encoding, find_py_source, is_32bit
from .prefixes import SHEBANG_REGEX, replace_prefix
from ._progress import progressbar

Expand Down Expand Up @@ -1021,5 +1021,6 @@ def finish(self):
os.unlink(fil.name)

if on_win:
cli_exe = pkg_resources.resource_filename('setuptools', 'cli-64.exe')
exe = 'cli-32.exe' if is_32bit else 'cli-64.exe'
cli_exe = pkg_resources.resource_filename('setuptools', exe)
self.archive.add(cli_exe, os.path.join(BIN_DIR, 'conda-unpack.exe'))

0 comments on commit eb76175

Please sign in to comment.