[pyferret] 71/110: Include pyferret executable in python*-ferret, with alternatives
Alastair McKinstry
mckinstry at moszumanska.debian.org
Fri Jul 28 08:42:12 UTC 2017
This is an automated email from the git hooks/post-receive script.
mckinstry pushed a commit to branch debian/master
in repository pyferret.
commit 9468be81b783ed16841f76a4f02bede3ed203357
Author: Alastair McKinstry <mckinstry at debian.org>
Date: Sat Aug 13 21:58:13 2016 +0100
Include pyferret executable in python*-ferret, with alternatives
---
debian/changelog | 1 +
debian/pyferret2 | 27 +++++++++++++++++++++++++++
debian/pyferret3 | 27 +++++++++++++++++++++++++++
debian/python-ferret.install | 1 +
debian/python3-ferret.install | 1 +
debian/rules | 2 +-
6 files changed, 58 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 7b91381..e208d77 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ pyferret (7.0.0-1) UNRELEASED; urgency=medium
* New upstream release
* Experimental python3 build
+ * Include pyferret executable in python*-ferret, with alternatives
-- Alastair McKinstry <mckinstry at debian.org> Fri, 12 Aug 2016 16:27:39 +0100
diff --git a/debian/pyferret2 b/debian/pyferret2
new file mode 100755
index 0000000..a04e459
--- /dev/null
+++ b/debian/pyferret2
@@ -0,0 +1,27 @@
+#! /bin/sh
+## This Bourne-shell script is used to initialize and run Ferret using
+## the pyferret Python module. The intent of this script is to provide
+## a traditional Ferret interface through the pyferret module.
+
+## set python_exe to the (optionally full-path) python executable to use
+python_exe=python2.7
+
+##
+## ==== The following should not need any modifications ====
+##
+
+## The pyferret assignment to PYTHONPATH and LD_LIBRARY_PATH
+## is now done in the ferret_paths script.
+
+## Finally, execute an in-line Python script to run Ferret using the pyferret
+## module. The init method explicity processes the $PYTHONSTARTUP file, if it
+## exists and if '-secure' was not given as a command-line argument.
+if echo "$@" | grep -q -- "-linebuffer"; then
+ GFORTRAN_UNBUFFERED_PRECONNECTED=1
+ export GFORTRAN_UNBUFFERED_PRECONNECTED
+ python_flags="-u -i"
+else
+ python_flags="-i"
+fi
+${python_exe} ${python_flags} -c "import sys; import pyferret; (errval, errmsg) = pyferret.init(sys.argv[1:], True)" "$@"
+
diff --git a/debian/pyferret3 b/debian/pyferret3
new file mode 100755
index 0000000..477a3df
--- /dev/null
+++ b/debian/pyferret3
@@ -0,0 +1,27 @@
+#! /bin/sh
+## This Bourne-shell script is used to initialize and run Ferret using
+## the pyferret Python module. The intent of this script is to provide
+## a traditional Ferret interface through the pyferret module.
+
+## set python_exe to the (optionally full-path) python executable to use
+python_exe=python3
+
+##
+## ==== The following should not need any modifications ====
+##
+
+## The pyferret assignment to PYTHONPATH and LD_LIBRARY_PATH
+## is now done in the ferret_paths script.
+
+## Finally, execute an in-line Python script to run Ferret using the pyferret
+## module. The init method explicity processes the $PYTHONSTARTUP file, if it
+## exists and if '-secure' was not given as a command-line argument.
+if echo "$@" | grep -q -- "-linebuffer"; then
+ GFORTRAN_UNBUFFERED_PRECONNECTED=1
+ export GFORTRAN_UNBUFFERED_PRECONNECTED
+ python_flags="-u -i"
+else
+ python_flags="-i"
+fi
+${python_exe} ${python_flags} -c "import sys; import pyferret; (errval, errmsg) = pyferret.init(sys.argv[1:], True)" "$@"
+
diff --git a/debian/python-ferret.install b/debian/python-ferret.install
index 9b6e09b..f0c3804 100644
--- a/debian/python-ferret.install
+++ b/debian/python-ferret.install
@@ -1,2 +1,3 @@
lib/python2.7/site-packages/* /usr/lib/python2.7/dist-packages
+debian/pyferret2 /usr/bin
# efmem/ferret_ef_mem_subsc.so /usr/lib/ferret-vis/efmem
diff --git a/debian/python3-ferret.install b/debian/python3-ferret.install
index 1b27047..3a542e3 100644
--- a/debian/python3-ferret.install
+++ b/debian/python3-ferret.install
@@ -1,2 +1,3 @@
lib/python3*/site-packages/* /usr/lib/python3/dist-packages
+debian/pyferret3 /usr/bin
#efmem/ferret_ef_mem_subsc.so /usr/lib/ferret-vis/efmem
diff --git a/debian/rules b/debian/rules
index 4878f6d..3776afb 100755
--- a/debian/rules
+++ b/debian/rules
@@ -33,7 +33,7 @@ override_dh_auto_install:
$(MAKE) HOSTTYPE=debian PYTHON_EXE=$$p clean all install ; \
done
find debian -name '*.pyo' -o -name '*.pyc' -delete
- find debiab -type d -name __pycache__ -delete
+ find debian -type d -name __pycache__ -delete
# libpyferret.so needs a link because its linked by externally loaded modules
# FIXME: How to cope when there are two versions?
dh_link -p python-ferret /usr/lib/python2.7/dist-packages/pyferret/libpyferret.$(ARCH).so $(LIBDIR)/libpyferret.so
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pyferret.git
More information about the debian-science-commits
mailing list