Add support for selecting the default Python command
Add a configure option to select the command used as the Python interpreter by default in the Python filetype. This can typically be useful if a setup has non-standard paths or do not provide a generic `python` interpreter but only versioned ones.
This commit is contained in:
parent
7e7e087901
commit
28a5b1029b
@ -145,6 +145,14 @@ AM_COND_IF([MINGW],
|
||||
AC_SUBST([GEANY_DATA_DIR], [$(eval echo $(eval echo $pkgdatadir))])
|
||||
AC_SUBST([pkgdatadir])
|
||||
|
||||
# The default Python command
|
||||
AC_ARG_WITH([python-command],
|
||||
[AS_HELP_STRING([--with-python-command],
|
||||
[the default Python command [default=python]])],
|
||||
[with_python_command=$withval],
|
||||
[with_python_command=python])
|
||||
AC_SUBST([PYTHON_COMMAND], [$with_python_command])
|
||||
|
||||
# Documentation tools
|
||||
GEANY_CHECK_DOCUTILS
|
||||
GEANY_CHECK_DOXYGEN
|
||||
@ -176,6 +184,7 @@ AC_CONFIG_FILES([
|
||||
plugins/Makefile
|
||||
po/Makefile.in
|
||||
data/Makefile
|
||||
data/filedefs/filetypes.python
|
||||
doc/Makefile
|
||||
doc/geany.1
|
||||
geany.pc
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
colorschemes = \
|
||||
colorschemes/alt.conf
|
||||
|
||||
filetypes = \
|
||||
filetypes_dist = \
|
||||
filedefs/filetypes.abaqus \
|
||||
filedefs/filetypes.abc \
|
||||
filedefs/filetypes.actionscript \
|
||||
@ -57,7 +57,6 @@ filetypes = \
|
||||
filedefs/filetypes.php \
|
||||
filedefs/filetypes.po \
|
||||
filedefs/filetypes.powershell \
|
||||
filedefs/filetypes.python \
|
||||
filedefs/filetypes.r \
|
||||
filedefs/filetypes.restructuredtext \
|
||||
filedefs/filetypes.ruby \
|
||||
@ -75,6 +74,10 @@ filetypes = \
|
||||
filedefs/filetypes.yaml \
|
||||
filedefs/filetypes.zephir
|
||||
|
||||
# generated filetypes
|
||||
filetypes_nodist = \
|
||||
filedefs/filetypes.python
|
||||
|
||||
tagfiles = \
|
||||
tags/std99.c.tags \
|
||||
tags/std.php.tags \
|
||||
@ -106,7 +109,7 @@ templates = \
|
||||
|
||||
nobase_dist_pkgdata_DATA = \
|
||||
$(colorschemes) \
|
||||
$(filetypes) \
|
||||
$(filetypes_dist) \
|
||||
$(tagfiles) \
|
||||
$(template_files) \
|
||||
$(templates) \
|
||||
@ -115,6 +118,9 @@ nobase_dist_pkgdata_DATA = \
|
||||
ui_toolbar.xml \
|
||||
geany.glade
|
||||
|
||||
nobase_pkgdata_DATA = \
|
||||
$(filetypes_nodist)
|
||||
|
||||
if GTK3
|
||||
nobase_dist_pkgdata_DATA += \
|
||||
geany-3.0.css \
|
||||
|
||||
@ -72,12 +72,12 @@ context_action_cmd=
|
||||
# %e will be replaced by the filename without extension
|
||||
# (use only one of it at one time)
|
||||
FT_00_LB=_Compile
|
||||
FT_00_CM=python -m py_compile "%f"
|
||||
FT_00_CM=@PYTHON_COMMAND@ -m py_compile "%f"
|
||||
FT_00_WD=
|
||||
FT_02_LB=_Lint
|
||||
FT_02_CM=pep8 --max-line-length=80 "%f"
|
||||
FT_02_WD=
|
||||
error_regex=(.+):([0-9]+):([0-9]+)
|
||||
EX_00_LB=_Execute
|
||||
EX_00_CM=python "%f"
|
||||
EX_00_CM=@PYTHON_COMMAND@ "%f"
|
||||
EX_00_WD=
|
||||
Loading…
x
Reference in New Issue
Block a user