[geany/geany] b2151b: Merge pull request #2223 from b4n/windows-py-command

Colomban Wendling git-noreply at xxxxx
Sat Oct 10 07:29:23 UTC 2020


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Sat, 10 Oct 2020 07:29:23 UTC
Commit:      b2151bd5f0abdbae94b2fe6b0a39e3b0a6e4f583
             https://github.com/geany/geany/commit/b2151bd5f0abdbae94b2fe6b0a39e3b0a6e4f583

Log Message:
-----------
Merge pull request #2223 from b4n/windows-py-command

Allow to select the Python command, and use `py` on Windows


Modified Paths:
--------------
    configure.ac
    data/Makefile.am
    data/filedefs/filetypes.python.in

Modified: configure.ac
11 lines changed, 11 insertions(+), 0 deletions(-)
===================================================================
@@ -142,6 +142,16 @@ AM_COND_IF([MINGW],
 AC_SUBST([GEANY_DATA_DIR], [$(eval echo $(eval echo $pkgdatadir))])
 AC_SUBST([pkgdatadir])
 
+# The default Python command.  On Windows, use the `py` launcher by default
+AC_ARG_WITH([python-command],
+			[AS_HELP_STRING([--with-python-command],
+							[the default Python command [defaults to "py" on Windows and "python" otherwise]])],
+			[with_python_command=$withval],
+			[with_python_command=auto])
+AS_IF([test "x$with_python_command" = xauto],
+	  [AM_COND_IF([MINGW], [with_python_command=py], [with_python_command=python])])
+AC_SUBST([PYTHON_COMMAND], [$with_python_command])
+
 # Documentation tools
 GEANY_CHECK_DOCUTILS
 GEANY_CHECK_DOXYGEN
@@ -173,6 +183,7 @@ AC_CONFIG_FILES([
 		plugins/Makefile
 		po/Makefile.in
 		data/Makefile
+		data/filedefs/filetypes.python
 		doc/Makefile
 		doc/geany.1
 		geany.pc


Modified: data/Makefile.am
12 lines changed, 9 insertions(+), 3 deletions(-)
===================================================================
@@ -2,7 +2,7 @@
 colorschemes = \
 	colorschemes/alt.conf
 
-filetypes = \
+filetypes_dist = \
 	filedefs/filetypes.abaqus \
 	filedefs/filetypes.abc \
 	filedefs/filetypes.actionscript \
@@ -60,7 +60,6 @@ filetypes = \
 	filedefs/filetypes.php \
 	filedefs/filetypes.po \
 	filedefs/filetypes.powershell \
-	filedefs/filetypes.python \
 	filedefs/filetypes.r \
 	filedefs/filetypes.restructuredtext \
 	filedefs/filetypes.ruby \
@@ -80,6 +79,10 @@ filetypes = \
 	filedefs/filetypes.yaml \
 	filedefs/filetypes.zephir
 
+# generated filetypes
+filetypes_nodist = \
+	filedefs/filetypes.python
+
 tagfiles = \
 	tags/std99.c.tags \
 	tags/std.php.tags \
@@ -111,7 +114,7 @@ templates = \
 
 nobase_dist_pkgdata_DATA = \
 	$(colorschemes) \
-	$(filetypes) \
+	$(filetypes_dist) \
 	$(tagfiles) \
 	$(template_files) \
 	$(templates) \
@@ -120,6 +123,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 \


Modified: data/filedefs/filetypes.python.in
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -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=



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list