component/tesseract: do not hardcode python executable name for the case where only python3 exists.
-
Owner
I think it's OK, we should try to run
SlapOS.SoftwareReleases.IntegrationTest-Master
with this, it will tell if there's a problem like "shared part depending on something not shared from a software", in case${buildout:executable}
is somewhere in software (but I guess it's not)As far as I remember, parts are anyway not shared between python2 softwares and python3 softwares, if this is what you were worried about.
-
Owner
We could also use
$PYTHON
instead of${buildout:executable}
it's an environment variable set bycomponent/defaults.cfg
during build, but I'm not sure which one is best -
Owner
@tomo @xavier_thompson in theia this was not a problem because we have
python
in$PATH
, but with slapos python3 softwares we no longer havepython
in$PATH
( in slapos python2 softwares we have it, only slapos python3 software do not have it, I realized recently that python3 does not installsbin/python
c5cd4e06 (comment 168678) ). I start to believe it might be a good idea to not have apython
in PATH with theia, because this was a scenario of "it works in theia" -
Owner
I start to believe it might be a good idea to not have a
python
in PATH with theia, because this was a scenario of "it works in theia"Yes I agree. I would remove
python
from PATH in Theia. -
Owner
I agree as well, and we can probably easily remove (rename) the
python
that is generated in the software'sbuildout:bin-directory
, but so far we've also kept the host's/usr/bin
inPATH
and there's often apython
there as well. -
Owner
Yes, we cannot remove
/usr/bin
because we need few "core" programs for compilation. One thing I would like to try (first in software/slapos-sr-testing and in theia) is to put a "broken" python in$PATH
, a program that would just print an error message explaining that the user should use python3 or python2 and exit with error code. -
Owner
I tried this idea of putting a broken python in
$PATH
for slapos-sr-testing in !1278 (merged) -
Owner
With !1282 (comment 171958) theia does not have "python" either