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