r2383 - in zope2.12/trunk/debian (5 files)

mejo at users.alioth.debian.org mejo at users.alioth.debian.org
Mon Oct 10 16:56:15 UTC 2011


    Date: Monday, October 10, 2011 @ 16:56:11
  Author: mejo
Revision: 2383

use python wrapper from michael again; shell rewrite introduced new issues

Added:
  zope2.12/trunk/debian/python_interpreter_template.in
    (from rev 2382, zope2.12/trunk/debian/python_interpreter_template.in.old)
  zope2.12/trunk/debian/python_interpreter_template.in.shell
    (from rev 2382, zope2.12/trunk/debian/python_interpreter_template.in)
Modified:
  zope2.12/trunk/debian/changelog
Deleted:
  zope2.12/trunk/debian/python_interpreter_template.in
  zope2.12/trunk/debian/python_interpreter_template.in.old

Modified: zope2.12/trunk/debian/changelog
===================================================================
--- zope2.12/trunk/debian/changelog	2011-10-08 18:09:01 UTC (rev 2382)
+++ zope2.12/trunk/debian/changelog	2011-10-10 16:56:11 UTC (rev 2383)
@@ -28,9 +28,6 @@
   * Remove upstream LICENSE.txt in eggs from zope2.12 binary package.
   * Remove scripts from EGG-INFO subfolders in zope2.12 binary package.
   * Add versions to dependencies on python modules for zope2.12 package.
-  * Rewrite python_interpreter_template as small shell script: sets
-    PYTHONPATH instead using site.addsitepath(), doesn't introduce recursive
-    shebang, which breaks lenny kernels.
   * Fix debian/build-scripts/fetch.py to lowercase dependency names before
     checking for them. gen_versions_cfg.py already writes lowercased names.
     Thanks to Michael Mulich for help with investigation.
@@ -47,7 +44,7 @@
   TODO: WAIT FOR BUGS BEING FIXED:
   * bug#644003: Wait for namespace bug being fixed, bump (build-)depends on python-pkg-resources once in the archive
 
- -- Jonas Meurer <mejo at debian.org>  Sat, 08 Oct 2011 20:07:32 +0200
+ -- Jonas Meurer <mejo at debian.org>  Mon, 10 Oct 2011 18:55:07 +0200
 
 zope2.12 (2.12.11-1) unstable; urgency=low
 

Deleted: zope2.12/trunk/debian/python_interpreter_template.in
===================================================================
--- zope2.12/trunk/debian/python_interpreter_template.in	2011-10-08 18:09:01 UTC (rev 2382)
+++ zope2.12/trunk/debian/python_interpreter_template.in	2011-10-10 16:56:11 UTC (rev 2383)
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-ZPYPATH="$(echo $(for dir in /usr/lib/zope at ZVER@/lib/python/*.egg; do echo $dir; done) | sed 's/ /:/g')"
-
-if [ -n "$PYTHONPATH" ]; then
-	export PYTHONPATH="$PYTHONPATH:$ZPYPATH"
-else
-	export PYTHONPATH="$ZPYPATH"
-fi
-
-if [ -n "$INSTANCE_HOME" ]; then
-	export PYTHONPATH="$PYTHONPATH:${INSTANCE_HOME}/lib/python"
-fi
-
-/usr/bin/python at PYVER@ "$@"

Copied: zope2.12/trunk/debian/python_interpreter_template.in (from rev 2382, zope2.12/trunk/debian/python_interpreter_template.in.old)
===================================================================
--- zope2.12/trunk/debian/python_interpreter_template.in	                        (rev 0)
+++ zope2.12/trunk/debian/python_interpreter_template.in	2011-10-10 16:56:11 UTC (rev 2383)
@@ -0,0 +1,35 @@
+#!/usr/bin/python2.6
+import os
+import sys
+import site
+
+instance = os.getenv('INSTANCE_HOME')
+if instance:
+    site.addsitedir(instance + '/lib/python')
+site.addsitedir('/usr/lib/zope at ZVER@/lib/python')
+sys.executable = os.path.abspath(__file__)
+
+_interactive = True
+if len(sys.argv) > 1:
+    _options, _args = __import__("getopt").getopt(sys.argv[1:], 'ic:m:')
+    _interactive = False
+    for (_opt, _val) in _options:
+        if _opt == '-i':
+            _interactive = True
+        elif _opt == '-c':
+            exec _val
+        elif _opt == '-m':
+            sys.argv[1:] = _args
+            _args = []
+            __import__("runpy").run_module(
+                 _val, {}, "__main__", alter_sys=True)
+
+    if _args:
+        sys.argv[:] = _args
+        __file__ = _args[0]
+        del _options, _args
+        execfile(__file__)
+
+if _interactive:
+    del _interactive
+    __import__("code").interact(banner="", local=globals())

Deleted: zope2.12/trunk/debian/python_interpreter_template.in.old
===================================================================
--- zope2.12/trunk/debian/python_interpreter_template.in.old	2011-10-08 18:09:01 UTC (rev 2382)
+++ zope2.12/trunk/debian/python_interpreter_template.in.old	2011-10-10 16:56:11 UTC (rev 2383)
@@ -1,35 +0,0 @@
-#!/usr/bin/python2.6
-import os
-import sys
-import site
-
-instance = os.getenv('INSTANCE_HOME')
-if instance:
-    site.addsitedir(instance + '/lib/python')
-site.addsitedir('/usr/lib/zope at ZVER@/lib/python')
-sys.executable = os.path.abspath(__file__)
-
-_interactive = True
-if len(sys.argv) > 1:
-    _options, _args = __import__("getopt").getopt(sys.argv[1:], 'ic:m:')
-    _interactive = False
-    for (_opt, _val) in _options:
-        if _opt == '-i':
-            _interactive = True
-        elif _opt == '-c':
-            exec _val
-        elif _opt == '-m':
-            sys.argv[1:] = _args
-            _args = []
-            __import__("runpy").run_module(
-                 _val, {}, "__main__", alter_sys=True)
-
-    if _args:
-        sys.argv[:] = _args
-        __file__ = _args[0]
-        del _options, _args
-        execfile(__file__)
-
-if _interactive:
-    del _interactive
-    __import__("code").interact(banner="", local=globals())

Copied: zope2.12/trunk/debian/python_interpreter_template.in.shell (from rev 2382, zope2.12/trunk/debian/python_interpreter_template.in)
===================================================================
--- zope2.12/trunk/debian/python_interpreter_template.in.shell	                        (rev 0)
+++ zope2.12/trunk/debian/python_interpreter_template.in.shell	2011-10-10 16:56:11 UTC (rev 2383)
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# WARNING: this is an ugly hack which was introduced in order to workaround
+#          shebang recursion issues with linux kernel << 2.6.32. It doesn't
+#          work as expected. Python addsitedir() needs to be implemented in
+#          shell in order to make it work.
+
+ZPYPATH="$(echo $(for dir in /usr/lib/zope at ZVER@/lib/python/*.egg; do echo $dir; done) | sed 's/ /:/g')"
+
+if [ -n "$PYTHONPATH" ]; then
+	export PYTHONPATH="$PYTHONPATH:$ZPYPATH"
+else
+	export PYTHONPATH="$ZPYPATH"
+fi
+
+if [ -n "$INSTANCE_HOME" ]; then
+	export PYTHONPATH="$PYTHONPATH:${INSTANCE_HOME}/lib/python"
+fi
+
+/usr/bin/python at PYVER@ "$@"




More information about the pkg-zope-developers mailing list