How to package executables

Norbert Preining norbert at preining.info
Tue Jul 21 02:08:27 CEST 2020


On Mon, 20 Jul 2020, Karl Berry wrote:
>     - put spix directory containing __init__.py and __main__.py into
> 
> Names like __*__.py with no package name are inherently ambiguous in the
> TeX world.

Indeed, that is a good point, and problematic. These files should not be
searched via kpsewhich. Maybe texmf-dist/python/ hierarchy?

> Maybe that doesn't matter in this particular case, since there's
> presumably no reason to ever look up __main__.py with kpsewhich. On the

But we might and up with many of the __main__.py files if python module
based programs proliferate. And they will, because Python is designed to
be a PITA and force people to strange naming requirements. (Been there,
done that, always asked myself why Python is popular).

> other hand, this is breaking new ground -- there are no __*__.py files
> in TL now. I am automatically leery. 

Of course it would be possible to merge the __init__.py and __main__.py
into one file, and use that as ultimate source and binary. This is what
i would suggests.

Splitting functionality into modules is only useful if there will be an
actual use of the module.

But then, it is Python, and object encapsulation is based on file level
and file naming *and* directory naming, how retro.

Best

Norbert

--
PREINING Norbert                              https://www.preining.info
Accelia Inc. + IFMGA ProGuide + TU Wien + JAIST + TeX Live + Debian Dev
GPG: 0x860CDC13   fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13


More information about the tex-live mailing list.