takluyver / pynsist

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

Ship built-in python modules by default #249

Open kobroli opened 2 years ago

kobroli commented 2 years ago

Hey, thanks for this great project!

I'm using the [Command my_command] section feature to accommodate multiple entry points to my application.

However, when invoking "\Program Files\my_app\bin\my_command.exe" [OPTIONS], error messages indicate that some standard built-in python modules are not available (No module named <module>), e.g., http, stringprep, or mimetypes.

Is there a simple way to bundle the built-in modules? It'd also help to find out which modules are used by my application, such that I don't have to add a module/package and test until I listed them all. Thanks!

takluyver commented 2 years ago

The standard library should always be bundled without you needing to ask for it (except for tkinter, which needs some specific workarounds). I don't know what would cause them to be unavailable - I don't remember seeing that before.

It'd also help to find out which modules are used by my application,

I started work years ago on a prototype tool called kartoffel, where you'd run your application in the tool and it would record which modules were loaded, then group them by installed distribution. It's absolutely a prototype, not something ready to go, but if you're interested, feel free to play around and build it further. I never had time to take it very far.