[tex-live] perl or lua standard library modules in texlive
karl at freefriends.org
Sun Sep 23 00:57:19 CEST 2012
Thanks for writing. I looked at your mol2chemfig when it hit CTAN and
regretted that I could not make it work in TL as-is.
The issue is not Python, per se -- any language is possible,
dependencies permitting. There are a couple Python scripts in TL now
(dviasm, ebong), but they are standalone executables. I expect it would
be possible to make mol2chemfig work in Python (if users have whatever
prerequisite libraries installed, if any).
I haven't written anything beyond the terse notes on pkgcontrib.html
that you already found. Here is a more verbose version:
The two principal issues are:
- The installation instructions said to run "python setup.py", which I
know is the standard method for Python packages, but it doesn't work
at all with TL. What I need are files that I can install in TL
directly and that do not depend on the "install-time" environment.
(Since the TL user who eventually runs the script will have an
environment that arbitrarily differs from mine doing the install.)
- The executables have to be "self-locating", which is to say, they have
to find their data files relative to their own location, not based on
any absolute prefix. (Since users can install TL anywhere.) The
package structure would end up being something like this:
bin/*/mol2chemfig symlink to:
In practice, when mol2chemfig is run, it needs to use kpsewhich to find
its files (or likely, in this case, find the directory to add to
PYTHONPATH or however it works ...):
subpath=`kpsewhich --progname=mol2chemfig --format=texmfscripts mol2chemfig.py`
.. `dirname $subpath` ...
I know I'm not spelling everything out, but hopefully those clues make a
little sense? Please do ask further as needed.
Heiko, you probably do more than anyone with finding subsidiary script
files. If you have anything to add/correct to the above, please do ...
More information about the tex-live