New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python usage in build #2896
Comments
|
Thanks @eht16, dunno why it didn't show in my search, but anyway that doesn't have the configure.ac so I left it and the other two build scripts and put them here so we have the milestone of next release. So first question, what should
|
I guess its possible for But then still need Python 3 for |
On Wed, 15 Sept 2021 at 18:48, elextr ***@***.***> wrote:
| Thanks @eht16 <https://github.com/eht16>, dunno why it didn't show in my
| search, but anyway that doesn't have the configure.ac so I left it and
| the other two build scripts and put them here so we have the milestone of
| next release.
|
| So first question, what should configure.ac test for, python3? And is the
| windows py still relevant?
It should test for "python" first, and then execute python -V to get the version and test for "version > 3". If either fails, it should test for "python3" and accept any version. If that fails it should report that it requires a "python version > 3".
Python2 is no longer supported except (for maybe source only) releases for security fixes.
Unless we make a pure windows build using the Microsoft tool chain, we should not look for "py".
| geany_gtk_doc_header.m4 is entirely @b4n <https://github.com/b4n> ping
Does this mean it is OK? I.e. in geany's control.
| gen_api_gtkdoc.py has had lots of contributors, so anybody know if it will run on python3
I found a copy of gen_api_gtkdoc.py at https://nest.parrot.sh/packages/debian/geany/-/blob/master/scripts/gen-api-gtkdoc.py.
It uses "#!/usr/bin/env python" and I "saw" no python2 only code. I did not look to see if they were patching it as their commits had over 1000 files.
Doug
…--
Doug Henderson, Calgary, Alberta, Canada - from gmail.com
Edit: clean up emailed comment (a bit).
|
The Python PEP requires the versioned
Its in this Geany repo, so yeah. Ditto gen_api_gtkdoc.py, what debian does to it is their concern.
@eht16 which Python does the new windows build use, one in msys2 that is called |
Debian patch for
So I guess Python3 must work there. |
I just tested the Python 3.9 installer and it still installs the
Of course it does.
Let's check for and use
Don't mix different things here.
The |
Yes for sure, I was only talking about for the build.
Ahhh, ok, so yes these days it definitely needs to be python3 or py so Geany users code will work out of the box.
Ok, are there any build time python scripts we control? (except If any I guess they use the shebang, so we just need to change that, and apply the Debian patch for the above. And do we check for a Python for the build (eg for rst2html)? |
I didn't check the shebangs but I'm pretty much sure my MSYS2 environment has no Python2 installed (though it might be a
Not explicitly, I think. Apart from that, I think the 1.38 milestone is a bit optimistic. I'm sure we can and should solve all related issues for 1.38. After all, using only Python3 for builds is nice to have but not release critical. |
@elextr all of the parts mentioned in the OP are already resolved. Can we close this one? |
I'm surprised there isn't already an issue for this, but I can't find it, better googlers may.
The python checks and commands used in the build need updating to python3. The
python
command does not exist on many systems now.configure.ac
checks forpython
so the docs have to be disabled here, even though I havepython3
and arst2html
with#!/usr/bin/python3
shebang.geany_gtkdoc_header.m4
explicitly checks for Python 2.7 if I read it right.gen_api_gtkdoc.py
uses#!/usr/binenv python
See also #2615, these kept here with milestone of next release so release builds will work (unless releasers and packagers have python2 and 3).
The text was updated successfully, but these errors were encountered: