configure.py assumes "python" command exists

Scott Kostyshak skostysh at lyx.org
Tue Dec 28 14:46:40 UTC 2021


On Mon, Dec 27, 2021 at 07:30:46PM +0000, José Abílio Matos wrote:
> On Saturday, 25 December 2021 18.32.21 WET Scott Kostyshak wrote:
> > On Sun, Oct 31, 2021 at 12:58:19PM -0400, Scott Kostyshak wrote:
> 
> Hi Scott,
>   I find you choice of dates very convenient. :-)
> 
> https://journeys.dartmouth.edu/folklorearchive/2016/11/12/halloween-and-christmas/
> 
> “Why do programmers always mix up Halloween and Christmas?”
> “Because Oct 31 = Dec 25.”

Ha that is a good one!

> Regarding the problem at hand, as an example, my suggestion is to change:
> 
> \converter pdf4   pdf8  "python $$s/scripts/convert_pdf.py $$i $$o ebook"
> 
> to
> 
> \converter pdf4   pdf8  "$${python} $$s/scripts/convert_pdf.py $$i $$o ebook"
> 
> The idea is to use the converter code, e.g. the $$i $$o ..., and add there the 
> substitution from $${python} to the python path that we have already 
> determined in os::find_python.
> 
> Before doing that my question is if others are comfortable with this plan.
> 
> The idea of using that syntax is to be in the same spirit as the ones we 
> already have:
> 
> $$i
> $$o
> $$s
> 
> and so on.
> 
> The idea of using the curly brackets is similar to what shell (almost all the 
> variants) does.
> 
> I also intend to add the -t to the command invocation, and thus removing all 
> those from configure.py.

I like the idea of centralizing the command. That will make things
easier when we switch everything back to Perl :) /s

In more seriousness, I like the idea. I don't see any disadvantage to
your proposal.

Thanks,
Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20211228/3b11356a/attachment.asc>


More information about the lyx-devel mailing list