Closed johanneskastl closed 1 year ago
Hi @johanneskastl please allow me to do a quick braindump:
sys.executable
rather than 'python3',
technically. python3
. Please help me understand why your environment is missing that command and/or file and why that is considered intact. Is this with a virtualenv or without? Which distro? Are you dropping things from $PATH
? There is probably something to fix outside of ans2html also or primarily, but let's see.Sorry for the duplicate issues, somehow Github threw lots of 500 errors on me and did not show that it already created the issue...
I have a patch ready that solves this for us, as soon as I am allowed to fork the repo I'll open a PR.
The environment is for building a package for openSUSE, where there is only python3.11 but no python3 executable. Or it should use the same executable it was called with, in case there is more than one python version available.
Sorry for the duplicate issues, somehow Github threw lots of 500 errors on me and did not show that it already created the issue...
@johanneskastl no worries :+1:
I have a patch ready that solves this for us, as soon as I am allowed to fork the repo I'll open a PR.
Thanks!
it should use the same executable it was called with, in case there is more than one python version available.
That's a fair point :+1:
The environment is for building a package for openSUSE, where there is only python3.11 but no python3 executable.
Why is that considered an intact environment? Doesn't this break a lot of things? #! /usr/bin/env python3
is a standard Python 3 shebang for instance. Please help me understand.
PS: @johanneskastl for backup of my argument, I would like to share this reference:
We expect Unix-like software distributions [..] to install the
python2
command into the default path whenever a version of the Python 2 interpreter is installed, and the same forpython3
and the Python 3 interpreter.
(from https://peps.python.org/pep-0394/#for-python-runtime-distributors)
The environment is for building a package for openSUSE, where there is only python3.11 but no python3 executable.
Why is that considered an intact environment? Doesn't this break a lot of things?
#! /usr/bin/env python3
is a standard Python 3 shebang for instance. Please help me understand.
In this case the regular python3 is provided by a different python version (3.6) that cannot be changed. But the package I am trying to build is for a newer python stack that is to be installed in parallel. And which is not the same version.
Hence using python3
would run python3.6, while the package itself is for python3.11...
And during build only python3.11 is available, which is not providing the python3 executable.
Does this explain things a little?
@johanneskastl this sounds contradictory:
Please help me clean up the picture. Thanks!
Sure.
During the RPM build only the required dependencies are present, which means python3.11 but no python3.6. Hence no python3
executable.
This is done because python3.11 MUST NOT provide this executable, so it can be installed in parallel to 3.6 later on an actual server.
On the server there is a python3 present, but it is 3.6 and not 3.11 which the package is built for. Hence this comment:
it should use the same executable it was called with, in case there is more than one python version available.
@johanneskastl okay, thanks for elaborating :+1:
@johanneskastl okay, thanks for elaborating +1
Sure, sorry for not being concise in the first place.
tests/test_ansi2html.py
contains a hardcodedpython3
executable name, which makes this test fail if there is no python3 available (but python3.11 or similar).The patch is easy, I'll open a PR once Github fixes the outage that prevents forking this repository...