This should work fine on systems with only Python3, only Python2 and also with both versions installed and do not rely on just being "python" available in $PATH. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/2572
-- Commit Summary --
* Use Python interpreter detected by autotools for geany-gtkdoc.h
-- File Changes --
M doc/Makefile.am (2)
-- Patch Links --
https://github.com/geany/geany/pull/2572.patch https://github.com/geany/geany/pull/2572.diff
This is happening on Debian Testing currently since `python-docutils` was migrated to Python3, only Python3 is installed as build dependency. But `scripts/gen-api-gtkdoc.py` uses `#!/usr/bin/env python` as Python interpreter which is not available when only installed Python3. Maybe this is just temporary on Debian Testing and once the Python3 transition is done, they add also a generic `python` binary in $PATH. But anyway, since autotools check for a Python installed already for us, let's use its result.
@codebrainz approved this pull request.
Tested works fine on Ubuntu 20.04.
they add also a generic python binary in $PATH
The python PEP that talks about this allows for no `python` IIRC so might never re-appear.
Merged #2572 into master.
Hum, what does set the `PYTHON` Make variable? I don't see we call any of the related Autotools macros that would set it, so I'm kind of surprised this works, and wonder if we shouldn't make something more explicit.
Also, I'd be happy using `python3` in the script if that script is python3, I don't think supporting Python2-only installs makes much sense in 2020.
Wait, I'm really not good at this anymore. Scratch the above comment, we *do* call `AM_PATH_PYTHON` in *m4/geany-gtkdoc-header.m4*.
Also, I'd be happy using `python3` in the script if that script is python3, I don't think supporting Python2-only installs makes much sense in 2020.
Yes, that is even better. Will be done in #2615.
github-comments@lists.geany.org