takluyver / pynsist

Build Windows installers for Python applications
https://pynsist.readthedocs.io/
Other
882 stars 119 forks source link

Exception on extracting wheel using anaconda python 2.7 #141

Closed joepal1976 closed 5 years ago

joepal1976 commented 6 years ago

I get this when trying to use include / pypi_wheels with pynsist 1.12 running on anaconda python 2.7.14:

Copying Python installer to build directory
PyLauncher MSI already in build directory.
Copying packages into build directory...
Using cached wheel: PySide-1.2.4-cp27-none-win_amd64.whl
Traceback (most recent call last):
  File "c:\anaconda2\envs\py2\lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "c:\anaconda2\envs\py2\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Anaconda2\envs\py2\Scripts\pynsist.exe\__main__.py", line 9, in <module>
  File "c:\anaconda2\envs\py2\lib\site-packages\nsist\__init__.py", line 540, in main
    InstallerBuilder(**args).run(makensis=(not options.no_makensis))
  File "c:\anaconda2\envs\py2\lib\site-packages\nsist\__init__.py", line 495, in run
    self.prepare_packages()
  File "c:\anaconda2\envs\py2\lib\site-packages\nsist\__init__.py", line 377, in prepare_packages
    py_version=self.py_version, bitness=self.py_bitness)
  File "c:\anaconda2\envs\py2\lib\site-packages\nsist\pypi.py", line 207, in fetch_pypi_wheels
    extract_wheel(whl_file, target_dir)
  File "c:\anaconda2\envs\py2\lib\site-packages\nsist\pypi.py", line 189, in extract_wheel
    target.joinpath(p.name).mkdir(exist_ok = True)
TypeError: mkdir() got an unexpected keyword argument 'exist_ok'

(py2) E:\makehuman\export>python --version
Python 2.7.14 :: Anaconda, Inc.
takluyver commented 6 years ago

I'm only really supporting Python 3 now. If you want to make a pull request against the 1.x branch I'll merge it, though.