takluyver / pynsist

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

launchwin.msi download is not working anymore (pynsist 1.12) #188

Closed eliabieri closed 4 years ago

eliabieri commented 4 years ago

pynsist version 1.12 downloads launchwin.msi from the following URL: https://bitbucket.org/vinay.sajip/pylauncher/downloads/launchwin.msi:

The file at this URL does no longer exist, thus the download fails with the following output:

Copying Python installer to build directory
Downloading PyLauncher MSI...
Traceback (most recent call last):
  File "/home/HASLERRAIL/bieri/git/build/hrtrdpsim/venv_dev/bin/pynsist", line 8, in <module>
    sys.exit(main())
  File "/home/HASLERRAIL/bieri/git/build/hrtrdpsim/venv_dev/local/lib/python2.7/site-packages/nsist/__init__.py", line 540, in main
    InstallerBuilder(**args).run(makensis=(not options.no_makensis))
  File "/home/HASLERRAIL/bieri/git/build/hrtrdpsim/venv_dev/local/lib/python2.7/site-packages/nsist/__init__.py", line 487, in run
    self.fetch_pylauncher()
  File "/home/HASLERRAIL/bieri/git/build/hrtrdpsim/venv_dev/local/lib/python2.7/site-packages/nsist/__init__.py", line 262, in fetch_pylauncher
    download(url, target)
  File "/home/HASLERRAIL/bieri/git/build/hrtrdpsim/venv_dev/local/lib/python2.7/site-packages/nsist/util.py", line 33, in download
    r.raise_for_status()
  File "/home/HASLERRAIL/bieri/git/build/hrtrdpsim/venv_dev/local/lib/python2.7/site-packages/requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://bitbucket.org/vinay.sajip/pylauncher/downloads/launchwin.msi

Any ideas on where to get the launchwin.msi from now on? If anyone has an idea, I would then create a pull request. Thanks

Update: I tried to contact the owner of the bitbucket repo. Maybe he can reupload the file. https://bitbucket.org/vinay.sajip/pylauncher/issues/6/404-for-msi-installers

takluyver commented 4 years ago

The 2.x series is the focus now, and so 1.12 is largely unsupported. If Vinay wants to put the msi file back up, that's great. But if not, I don't plan to spend effort figuring out alternative solutions.

And I wouldn't blame Vinay if he takes a similar attitude: the only remaining version of Python that doesn't ship with the py launcher on Windows is Python 2.7, which will reach the end of its extended life next year.

eliabieri commented 4 years ago

I understand. The problem is, that I have to ship an old python project which unfortunately cant me migrated to python3 yet. Is there a way to build an installer that circumvents downloading the PyLauncher? Thanks for the Help!

takluyver commented 4 years ago

If you can find a copy of the msi somewhere else, you can locally patch the code that tries to download it:

https://github.com/takluyver/pynsist/blob/1.12/nsist/__init__.py#L249-L262

But I don't have a copy of it handy, and I don't know an obvious place to find one. You could download the source code and build it yourself, if you have a Windows machine handy and can install the necessary Visual Studio version on it.

eliabieri commented 4 years ago

I found the file in a windows installer package generated before. I uploaded the file here so others could copy that approach. launchwin.zip

takluyver commented 4 years ago

Vinay has put the files back up for download, so this should be working again now.