From 3bff312697c86a5580ce4bfc32f3fb77ecb7f5f5 Mon Sep 17 00:00:00 2001 From: "http://weakish.pigro.net/" Date: Sun, 27 Dec 2009 07:18:30 +0000 Subject: repost bug: rst plugin has python hardcode in shebang line --- .../rst_plugin_has_python_hardcode_in_shebang_line.mdwn | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 doc/bugs/rst_plugin_has_python_hardcode_in_shebang_line.mdwn (limited to 'doc/bugs/rst_plugin_has_python_hardcode_in_shebang_line.mdwn') diff --git a/doc/bugs/rst_plugin_has_python_hardcode_in_shebang_line.mdwn b/doc/bugs/rst_plugin_has_python_hardcode_in_shebang_line.mdwn new file mode 100644 index 000000000..f89c76fe8 --- /dev/null +++ b/doc/bugs/rst_plugin_has_python_hardcode_in_shebang_line.mdwn @@ -0,0 +1,13 @@ +Current the rst plugin uses this shebang line: + + #!/usr/bin/python + +The problem is that rst plugin uses some feature (for example, iterator comprehension) which is unavailable on old version of Python. + +So rst plugin will not work on a machine which has an old version of python in system path even though +the user have installed a new version of python in other place. For example, I am using ikiwiki with the rst plugin on Mac OS X 10.4 which ships python 2.3 but I do have python2.6 installed on /opt/local/bin/python (via macports). + +Thus I suggest to change the shebang line to: + + #!/usr/bin/env python + -- cgit v1.2.3 From 9f841c07dff16433fce805111d8ab45ff38ce228 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 29 Dec 2009 15:56:25 -0500 Subject: Use env hack in python scripts. --- debian/changelog | 1 + doc/bugs/rst_plugin_has_python_hardcode_in_shebang_line.mdwn | 2 ++ plugins/pythondemo | 2 +- plugins/rst | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) (limited to 'doc/bugs/rst_plugin_has_python_hardcode_in_shebang_line.mdwn') diff --git a/debian/changelog b/debian/changelog index dec2423fe..ee6f9adfb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ ikiwiki (3.20091219) UNRELEASED; urgency=low example sites also used by auto-blog.setup. The example setup file can be generated at any time using ikiwiki --dumpsetup so I do not see a reason to ship it. Closes: #562183 + * Use env hack in python scripts. -- Joey Hess Fri, 25 Dec 2009 14:31:22 -0500 diff --git a/doc/bugs/rst_plugin_has_python_hardcode_in_shebang_line.mdwn b/doc/bugs/rst_plugin_has_python_hardcode_in_shebang_line.mdwn index f89c76fe8..a594adc09 100644 --- a/doc/bugs/rst_plugin_has_python_hardcode_in_shebang_line.mdwn +++ b/doc/bugs/rst_plugin_has_python_hardcode_in_shebang_line.mdwn @@ -11,3 +11,5 @@ Thus I suggest to change the shebang line to: #!/usr/bin/env python +> [[done]], although the irony of all the perl hashbangs in ikiwiki +> being hardcoded doesn't escape me. --[[Joey]] diff --git a/plugins/pythondemo b/plugins/pythondemo index c63ce3973..911f4d7d9 100755 --- a/plugins/pythondemo +++ b/plugins/pythondemo @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # -*- coding: utf-8 -*- # # pythondemo — demo Python ikiwiki plugin diff --git a/plugins/rst b/plugins/rst index 449dba415..9f64b33a0 100755 --- a/plugins/rst +++ b/plugins/rst @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # -*- coding: utf-8 -*- # # rst — xml-rpc-based ikiwiki plugin to process RST files -- cgit v1.2.3