[gimp] plug-ins: install the pygimp.interp file.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: install the pygimp.interp file.
- Date: Mon, 29 Jul 2019 12:29:38 +0000 (UTC)
commit aab75bb1d00bf008004883980a447591c65121ea
Author: Jehan <jehan girinstud io>
Date: Mon Jul 29 14:25:44 2019 +0200
plug-ins: install the pygimp.interp file.
Python scripts should already properly run, whether you run them with a
direct python shebang or a `env python` one (cf. previous commit). But
it's still nice to install a `.interp` file, which allows to control
exactly the interpreter to use, overriding the shebang. With this file,
Python scripts will use installation-time Python interpreter.
Also update old code to make the interp contents about Python 3 instead
of 2.
plug-ins/pygimp/Makefile.am | 13 ++-----------
plug-ins/python/Makefile.am | 17 +++++++++++++++++
2 files changed, 19 insertions(+), 11 deletions(-)
---
diff --git a/plug-ins/pygimp/Makefile.am b/plug-ins/pygimp/Makefile.am
index 801b78a8d2..be2da76c1e 100644
--- a/plug-ins/pygimp/Makefile.am
+++ b/plug-ins/pygimp/Makefile.am
@@ -143,26 +143,17 @@ codegen_files = \
gimpui.override
pyenvdir = $(gimpplugindir)/environ
-pyinterpdir = $(gimpplugindir)/interpreters
pyenvfile = $(pyenvdir)/pygimp.env
-pyinterpfile = $(pyinterpdir)/pygimp.interp
install-env-file:
$(mkinstalldirs) '$(DESTDIR)$(pyenvdir)'
echo '$(path_separator) PYTHONPATH=$${gimp_plug_in_dir}/$(pygimpbase)' > '$(DESTDIR)$(pyenvfile)'
-install-interp-file:
- $(mkinstalldirs) '$(DESTDIR)$(pyinterpdir)'
- echo 'python=$(PYBIN_PATH)' > '$(DESTDIR)$(pyinterpfile)'
- echo 'python2=$(PYBIN_PATH)' >> '$(DESTDIR)$(pyinterpfile)'
- echo '/usr/bin/python=$(PYBIN_PATH)' >> '$(DESTDIR)$(pyinterpfile)'
- echo ":Python:E::py::`basename $(PYTHON)`:" >> '$(DESTDIR)$(pyinterpfile)'
-
-install-data-local: install-env-file install-interp-file
+install-data-local: install-env-file
uninstall-local:
- rm -f '$(DESTDIR)$(pyenvfile)' '$(DESTDIR)$(pyinterpfile)'
+ rm -f '$(DESTDIR)$(pyenvfile)'
EXTRA_DIST = \
$(pygimp_DATA) \
diff --git a/plug-ins/python/Makefile.am b/plug-ins/python/Makefile.am
index dd87529169..039d10d2fc 100644
--- a/plug-ins/python/Makefile.am
+++ b/plug-ins/python/Makefile.am
@@ -62,3 +62,20 @@ EXTRA_DIST = \
# $(console_scripts)
CLEANFILES = $(scripts) $(test_scripts)
+
+# Python interpreter file.
+
+pyinterpdir = $(gimpplugindir)/interpreters
+pyinterpfile = $(pyinterpdir)/pygimp.interp
+
+install-interp-file:
+ $(mkinstalldirs) '$(DESTDIR)$(pyinterpdir)'
+ echo 'python=$(PYBIN_PATH)' > '$(DESTDIR)$(pyinterpfile)'
+ echo 'python3=$(PYBIN_PATH)' >> '$(DESTDIR)$(pyinterpfile)'
+ echo '/usr/bin/python=$(PYBIN_PATH)' >> '$(DESTDIR)$(pyinterpfile)'
+ echo ":Python:E::py::`basename $(PYTHON)`:" >> '$(DESTDIR)$(pyinterpfile)'
+
+install-data-local: install-interp-file
+
+uninstall-local:
+ rm -f '$(DESTDIR)$(pyinterpfile)'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]