How to package executables
George N. White III
gnwiii at gmail.com
Tue Jul 21 21:53:12 CEST 2020
On Tue, 21 Jul 2020 at 12:28, Takuto ASAKURA <tkt.asakura at gmail.com> wrote:
> by roughly looking at the argument, I misunderstood that the author (Louis)
> wants to serve the script not simply as a command line tool but also
> as a python library (because I saw that the names "__init__" and "__main__"
> were thought somewhat sources of the issue.) But it was not the case, and
> now I got in this particular case, it can be regarded as "just a simple
> single file command line tool". Then, it seems 100% reasonable to put the
> single script file to the bin directory in TeX Live.
> > At last, once everything works, I offer to write some documentation
> > about how to package a python script for easy integration in texlive
> > based on this thread (that you would review and publish on ). Are you
> > interested (or is this just another burden for you)?
> In my opinion, it would be nice to have such an extended instruction.
> I personally also prefer, even for projects irrelevant to TeX, single
> "<command>.py" for command line tool implemented in python. However, as far
> as I know, the standard way of python packaging scheme is not like that,
> but provide __init__.py, __main__.py, and so on. I guess this way would
> be convenient if one also want to utilize the package as "a python
at the same time. However, this "python standard way" would not work well
> in TeX Live, if I understand correctly. It would be nice if it is clearly
> documented that "TeX Live prefers single file executable even for python."
> and possibly with other useful advices.
This should work for linux or macOS users (especially if the script
python2 and python3) but many Windows systems won't have python, or if they
do have python, it was installed by an application such as ArcGIS or QGIS.
Windows, PyInstaller <https://pyinstaller.readthedocs.io/en/stable/> makes
a .exe file combining a Python interpreter with
George N. White III
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the tex-live