Compiling locales into a Pyinstaller Package?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Compiling locales into a Pyinstaller Package?

TheTechRobo
I was compiling a Python script with
pyinstaller --onefile palc.py

and it works perfectly — except when I try to run it it attempts to use the locales stored in the locales directory (meaning it can't find them if I don't distribute the package with the locales directory). As you can imagine, this is a big drawback.

So my main question is: Is there a way that PyInstaller can compile the python script and add the gettext locales in? Thanks! :)

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/f21794ac-bb2c-480e-9ff6-ab8664688e7e%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

RE: Compiling locales into a Pyinstaller Package?

Steve Barnes

You can include the locales data in the compiled package with the date file options and then either:

  1. Modify the locales search path before the first use of it or
  2. Have a post install or pre-run script that copies the data to the appropriate location.

 

From: [hidden email] <[hidden email]> On Behalf Of TheTechRobo
Sent: 11 May 2020 01:30
To: PyInstaller <[hidden email]>
Subject: [PyInstaller] Compiling locales into a Pyinstaller Package?

 

I was compiling a Python script with

pyinstaller --onefile palc.py


and it works perfectly — except when I try to run it it attempts to use the locales stored in the locales directory (meaning it can't find them if I don't distribute the package with the locales directory). As you can imagine, this is a big drawback.

So my main question is: Is there a way that PyInstaller can compile the python script and add the gettext locales in? Thanks! :)

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/f21794ac-bb2c-480e-9ff6-ab8664688e7e%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/VI1PR03MB44790F971167A6FB8DBD434A9BA10%40VI1PR03MB4479.eurprd03.prod.outlook.com.