takluyver / pynsist

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

Support for offline usage #135

Closed wlongxiang closed 5 years ago

wlongxiang commented 6 years ago

I am working on a python project in an isolated network, so no connection to internet is allowed. But when using pynsist, it tries to fetch a embedded python from https://www.python.org/ftp/python. This does not work for me because the url seems to be hardcoded. Is there any fix or new requirement planned for this?

takluyver commented 6 years ago

I haven't got any immediate plans to change that. I hadn't really considered offline use - sorry. If you can figure out from the code the cache location that it stores Python in after downloading it, you can put the file there manually, and then it will use that rather than trying to download it.

On 23 Nov 2017 10:17 p.m., "Longxiang" notifications@github.com wrote:

I am working on a python project in an isolated network, so no connection to internet is allowed. But when using pynsist, it tries to fetch a embedded python from https://www.python.org/ftp/python. This does not work for me because the url seems to be hardcoded. Is there any fix or new requirement planned for this?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/takluyver/pynsist/issues/135, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUA9RYa8XclaO7LB5Cvm0Z93s7tyegBks5s5e7fgaJpZM4QpNow .

takluyver commented 5 years ago

I'm going to close this because I still don't have any plans to support it explicitly. See the docs page on why I say no to features and what you can do instead:

https://pynsist.readthedocs.io/en/latest/design.html

In particular, if you wanted to reuse Pynsist's code for this, you can probably do it by changing or overriding one method, fetch_python_embeddable:

https://github.com/takluyver/pynsist/blob/b066fabf3d8b31e8d8980d383992a0f5b3de6124/nsist/__init__.py#L180-L212