]> git.pld-linux.org Git - packages/python3.git/blame - python3-pythonpath.patch
- buildfix
[packages/python3.git] / python3-pythonpath.patch
CommitLineData
32d83abb 1--- Python-3.0.1/Modules/getpath.c.wiget 2009-02-12 16:56:48.000000000 +0100
ce5ce022 2+++ Python-3.0.1/Modules/getpath.c 2009-03-14 18:12:32.000000000 +0100
32d83abb
AF
3@@ -481,7 +481,7 @@ calculate_path(void)
4 * "#!/opt/python2.3/bin/python", the kernel only passes "python"
5 * as argv[0], which falls through to the $PATH search below.
6 * If /opt/python2.3/bin isn't in your path, or is near the end,
7- * this algorithm may incorrectly find /usr/bin/python. To work
ce5ce022 8+ * this algorithm may incorrectly find /usr/bin/python3. To work
32d83abb
AF
9 * around this, we can use _NSGetExecutablePath to get a better
10 * hint of what the intended interpreter was, although this
11 * will fail if a relative path was used. but in that case,
12--- Python-3.0.1/Lib/distutils/tests/test_build_scripts.py.wiget 2004-08-26 07:44:02.000000000 +0200
ce5ce022 13+++ Python-3.0.1/Lib/distutils/tests/test_build_scripts.py 2009-03-14 18:12:32.000000000 +0100
32d83abb
AF
14@@ -58,7 +58,7 @@ class BuildScriptsTestCase(support.Tempd
15 "pass\n"))
16 expected.append("script2.py")
17 self.write_script(dir, "script2.py",
18- ("#!/usr/bin/python\n"
ce5ce022 19+ ("#!/usr/bin/python3\n"
32d83abb
AF
20 "# bogus script w/ Python sh-bang\n"
21 "pass\n"))
22 expected.append("shell.sh")
23--- Python-3.0.1/Lib/distutils/tests/test_install_scripts.py.wiget 2004-08-03 20:53:07.000000000 +0200
ce5ce022 24+++ Python-3.0.1/Lib/distutils/tests/test_install_scripts.py 2009-03-14 18:12:32.000000000 +0100
32d83abb
AF
25@@ -48,7 +48,7 @@ class InstallScriptsTestCase(support.Tem
26 write_script("script1.py", ("#! /usr/bin/env python2.3\n"
27 "# bogus script w/ Python sh-bang\n"
28 "pass\n"))
29- write_script("script2.py", ("#!/usr/bin/python\n"
ce5ce022 30+ write_script("script2.py", ("#!/usr/bin/python3\n"
32d83abb
AF
31 "# bogus script w/ Python sh-bang\n"
32 "pass\n"))
33 write_script("shell.sh", ("#!/bin/sh\n"
34--- Python-3.0.1/Lib/test/test_optparse.py.wiget 2008-05-20 23:35:26.000000000 +0200
ce5ce022 35+++ Python-3.0.1/Lib/test/test_optparse.py 2009-03-14 18:12:32.000000000 +0100
e684db95 36@@ -1,4 +1,4 @@
32d83abb 37-#!/usr/bin/python
ce5ce022 38+#!/usr/bin/python3
e684db95 39
32d83abb
AF
40 #
41 # Test suite for Optik. Supplied by Johannes Gijsbers
42--- Python-3.0.1/Lib/test/test_bz2.py.wiget 2008-07-16 05:43:04.000000000 +0200
ce5ce022 43+++ Python-3.0.1/Lib/test/test_bz2.py 2009-03-14 18:12:32.000000000 +0100
32d83abb
AF
44@@ -1,4 +1,4 @@
45-#!/usr/bin/python
ce5ce022 46+#!/usr/bin/python3
32d83abb
AF
47 from test import support
48 from test.support import TESTFN
49
50--- Python-3.0.1/Lib/cgi.py.wiget 2008-12-04 21:11:57.000000000 +0100
ce5ce022 51+++ Python-3.0.1/Lib/cgi.py 2009-03-14 18:12:32.000000000 +0100
32d83abb
AF
52@@ -1,6 +1,6 @@
53-#! /usr/local/bin/python
ce5ce022 54+#! /usr/bin/python3
e684db95 55
32d83abb 56-# NOTE: the above "/usr/local/bin/python" is NOT a mistake. It is
ce5ce022 57+# NOTE: the above "/usr/bin/python3" is NOT a mistake. It is
32d83abb
AF
58 # intentionally NOT "/usr/bin/env python". On many systems
59 # (e.g. Solaris), /usr/local/bin is not in $PATH as passed to CGI
60 # scripts, and /usr/local/bin is the default directory where Python is
61--- Python-3.0.1/Demo/cgi/cgi2.py.wiget 2007-08-06 23:07:53.000000000 +0200
ce5ce022 62+++ Python-3.0.1/Demo/cgi/cgi2.py 2009-03-14 18:12:32.000000000 +0100
e684db95
AM
63@@ -1,4 +1,4 @@
64-#!/usr/local/bin/python
ce5ce022 65+#!/usr/bin/python3
e684db95
AM
66
67 """CGI test 2 - basic use of cgi module."""
68
32d83abb 69--- Python-3.0.1/Demo/cgi/cgi1.py.wiget 2007-07-17 22:59:35.000000000 +0200
ce5ce022 70+++ Python-3.0.1/Demo/cgi/cgi1.py 2009-03-14 18:12:32.000000000 +0100
32d83abb
AF
71@@ -1,4 +1,4 @@
72-#!/usr/local/bin/python
ce5ce022 73+#!/usr/bin/python3
32d83abb
AF
74
75 """CGI test 1 - check server setup."""
76
77--- Python-3.0.1/Demo/cgi/cgi3.py.wiget 2002-10-17 17:53:02.000000000 +0200
ce5ce022 78+++ Python-3.0.1/Demo/cgi/cgi3.py 2009-03-14 18:12:32.000000000 +0100
e684db95
AM
79@@ -1,4 +1,4 @@
80-#!/usr/local/bin/python
ce5ce022 81+#!/usr/bin/python3
e684db95
AM
82
83 """CGI test 3 (persistent data)."""
84
32d83abb 85--- Python-3.0.1/Demo/tix/INSTALL.txt.wiget 2001-11-11 15:07:37.000000000 +0100
ce5ce022 86+++ Python-3.0.1/Demo/tix/INSTALL.txt 2009-03-14 18:12:32.000000000 +0100
32d83abb 87@@ -71,7 +71,7 @@ _tkinter _tkinter.c tkappinit.c -DWITH_A
e684db95
AM
88 You should now have a working Tix implementation in Python. To see if all
89 is as it should be, run the 'tixwidgets.py' script in the Demo/tix directory.
90 Under X windows, do
91- /usr/local/bin/python Demo/tix/tixwidgets.py
ce5ce022 92+ /usr/bin/python3 Demo/tix/tixwidgets.py
e684db95
AM
93
94 If this does not work, you may need to tell python where to find
95 the Tcl, Tk and Tix library files. This is done by setting the
32d83abb 96@@ -80,7 +80,7 @@ TCL_LIBRARY, TK_LIBRARY and TIX_LIBRARY
e684db95
AM
97 env TCL_LIBRARY=/usr/local/lib/tcl8.3 \
98 TK_LIBRARY=/usr/local/lib/tk8.3 \
99 TIX_LIBRARY=/usr/local/lib/tix8.1 \
100- /usr/local/bin/python Demo/tix/tixwidgets.py
ce5ce022 101+ /usr/bin/python3 Demo/tix/tixwidgets.py
e684db95
AM
102
103
104 If you find any bugs or have suggestions for improvement, please report them
32d83abb 105--- Python-3.0.1/Tools/faqwiz/faqw.py.wiget 2008-02-23 19:30:17.000000000 +0100
ce5ce022 106+++ Python-3.0.1/Tools/faqwiz/faqw.py 2009-03-14 18:12:32.000000000 +0100
32d83abb
AF
107@@ -1,4 +1,4 @@
108-#! /usr/local/bin/python
ce5ce022 109+#! /usr/bin/python3
e3304645 110
32d83abb 111 """FAQ wizard bootstrap."""
e3304645 112
e684db95 113@@ -10,7 +10,7 @@
32d83abb 114 # executable.
e684db95 115
32d83abb
AF
116 # You need to edit the first line and the lines that define FAQDIR and
117-# SRCDIR, below: change /usr/local/bin/python to where your Python
ce5ce022 118+# SRCDIR, below: change /usr/bin/python3 to where your Python
32d83abb
AF
119 # interpreter lives, change the value for FAQDIR to where your FAQ
120 # lives, and change the value for SRCDIR to where your faqwiz.py
121 # module lives. The faqconf.py and faqcust.py files live there, too.
122--- Python-3.0.1/Tools/pybench/README.wiget 2009-02-07 18:28:46.000000000 +0100
ce5ce022 123+++ Python-3.0.1/Tools/pybench/README 2009-03-14 18:12:32.000000000 +0100
32d83abb 124@@ -142,7 +142,7 @@ Benchmark: 2006-06-12 12:09:25
e684db95 125
32d83abb
AF
126 Python:
127 Implementation: CPython
128- Executable: /usr/local/bin/python
ce5ce022 129+ Executable: /usr/bin/python3
32d83abb
AF
130 Version: 3.0
131 Compiler: GCC 3.3.4 (pre 3.3.5 20040809)
132 Bits: 64bit
133--- Python-3.0.1/Tools/pybench/pybench.py.wiget 2009-02-07 18:28:46.000000000 +0100
ce5ce022 134+++ Python-3.0.1/Tools/pybench/pybench.py 2009-03-14 18:12:32.000000000 +0100
e3304645 135@@ -1,4 +1,4 @@
32d83abb 136-#!/usr/local/bin/python -O
ce5ce022 137+#!/usr/bin/python3 -O
32d83abb
AF
138
139 """ A Python Benchmark Suite
e3304645 140
32d83abb 141--- Python-3.0.1/Tools/scripts/README.wiget 2007-10-13 20:56:00.000000000 +0200
ce5ce022 142+++ Python-3.0.1/Tools/scripts/README 2009-03-14 18:12:32.000000000 +0100
32d83abb
AF
143@@ -44,7 +44,7 @@ ndiff.py Intelligent diff between text
144 nm2def.py Create a template for PC/python_nt.def (Marc Lemburg)
145 objgraph.py Print object graph from nm output on a library
146 parseentities.py Utility for parsing HTML entity definitions
147-pathfix.py Change #!/usr/local/bin/python into something else
ce5ce022 148+pathfix.py Change #!/usr/bin/python3 into something else
32d83abb
AF
149 pdeps.py Print dependencies between Python modules
150 pickle2db.py Load a pickle generated by db2pickle.py to a database
151 pindent.py Indent Python code, giving block-closing comments
152--- Python-3.0.1/Tools/scripts/parseentities.py.wiget 2008-05-16 17:23:30.000000000 +0200
ce5ce022 153+++ Python-3.0.1/Tools/scripts/parseentities.py 2009-03-14 18:12:32.000000000 +0100
e3304645 154@@ -1,4 +1,4 @@
32d83abb 155-#!/usr/local/bin/python
ce5ce022 156+#!/usr/bin/python3
32d83abb 157 """ Utility for parsing HTML entity definitions available from:
e3304645 158
32d83abb
AF
159 http://www.w3.org/ as e.g.
160--- Python-3.0.1/Tools/scripts/fixps.py.wiget 2007-08-03 19:06:41.000000000 +0200
ce5ce022 161+++ Python-3.0.1/Tools/scripts/fixps.py 2009-03-14 18:12:32.000000000 +0100
32d83abb
AF
162@@ -15,13 +15,13 @@ def main():
163 print(filename, ': can\'t open :', msg)
164 continue
165 line = f.readline()
166- if not re.match('^#! */usr/local/bin/python', line):
167- print(filename, ': not a /usr/local/bin/python script')
ce5ce022
AF
168+ if not re.match('^#! */usr/bin/python3', line):
169+ print(filename, ': not a /usr/bin/python3 script')
32d83abb
AF
170 f.close()
171 continue
172 rest = f.read()
173 f.close()
174- line = re.sub('/usr/local/bin/python',
ce5ce022 175+ line = re.sub('/usr/bin/python3',
32d83abb
AF
176 '/usr/bin/env python', line)
177 print(filename, ':', repr(line))
178 f = open(filename, "w")
32d83abb 179--- Python-3.0.1/Doc/install/index.rst.wiget 2009-01-04 01:09:41.000000000 +0100
ce5ce022 180+++ Python-3.0.1/Doc/install/index.rst 2009-03-14 18:12:32.000000000 +0100
32d83abb
AF
181@@ -362,16 +362,16 @@ However, if you are installing Python mo
182 them to go in :file:`/usr/local/lib/python2.{X}` rather than
183 :file:`/usr/lib/python2.{X}`. This can be done with ::
e684db95 184
32d83abb 185- /usr/bin/python setup.py install --prefix=/usr/local
ce5ce022 186+ /usr/bin/python3 setup.py install --prefix=/usr/local
e684db95 187
32d83abb
AF
188 Another possibility is a network filesystem where the name used to write to a
189 remote directory is different from the name used to read it: for example, the
190-Python interpreter accessed as :file:`/usr/local/bin/python` might search for
ce5ce022 191+Python interpreter accessed as :file:`/usr/bin/python3` might search for
32d83abb
AF
192 modules in :file:`/usr/local/lib/python2.{X}`, but those modules would have to
193 be installed to, say, :file:`/mnt/{@server}/export/lib/python2.{X}`. This could
194 be done with ::
e3304645 195
32d83abb 196- /usr/local/bin/python setup.py install --prefix=/mnt/@server/export
ce5ce022 197+ /usr/bin/python3 setup.py install --prefix=/mnt/@server/export
32d83abb
AF
198
199 In either case, the :option:`--prefix` option defines the installation base, and
200 the :option:`--exec-prefix` option defines the platform-specific installation
201--- Python-3.0.1/Doc/README.txt.wiget 2009-02-13 00:46:00.000000000 +0100
ce5ce022 202+++ Python-3.0.1/Doc/README.txt 2009-03-14 18:12:32.000000000 +0100
32d83abb
AF
203@@ -37,7 +37,7 @@ the top-level index `build/html/index.ht
204 To use a Python interpreter that's not called ``python``, use the standard
205 way to set Makefile variables, using e.g. ::
206
207- make html PYTHON=/usr/bin/python2.5
ce5ce022 208+ make html PYTHON=/usr/bin/python3
32d83abb
AF
209
210 Available make targets are:
211
212--- Python-3.0.1/Doc/tutorial/interpreter.rst.wiget 2009-01-04 01:04:26.000000000 +0100
ce5ce022
AF
213+++ Python-3.0.1/Doc/tutorial/interpreter.rst 2009-03-14 18:13:35.000000000 +0100
214@@ -10,11 +10,11 @@ Using the Python Interpreter
32d83abb
AF
215 Invoking the Interpreter
216 ========================
217
218-The Python interpreter is usually installed as :file:`/usr/local/bin/python3.0`
ce5ce022
AF
219+The Python interpreter is usually installed as :file:`/usr/local/bin/python3`
220 on those machines where it is available; putting :file:`/usr/local/bin` in your
32d83abb
AF
221 Unix shell's search path makes it possible to start it by typing the command ::
222
ce5ce022
AF
223- python3.0
224+ python3
225
226 to the shell. [#]_ Since the choice of the directory where the interpreter lives
227 is an installation option, other places are possible; check with your local
32d83abb 228--- Python-3.0.1/Doc/c-api/init.rst.wiget 2009-02-06 03:50:18.000000000 +0100
ce5ce022 229+++ Python-3.0.1/Doc/c-api/init.rst 2009-03-14 18:12:32.000000000 +0100
32d83abb
AF
230@@ -194,7 +194,7 @@ Initialization, Finalization, and Thread
231 Return the *prefix* for installed platform-independent files. This is derived
232 through a number of complicated rules from the program name set with
233 :cfunc:`Py_SetProgramName` and some environment variables; for example, if the
234- program name is ``'/usr/local/bin/python'``, the prefix is ``'/usr/local'``. The
ce5ce022 235+ program name is ``'/usr/bin/python3'``, the prefix is ``'/usr/local'``. The
32d83abb
AF
236 returned string points into static storage; the caller should not modify its
237 value. This corresponds to the :makevar:`prefix` variable in the top-level
238 :file:`Makefile` and the :option:`--prefix` argument to the :program:`configure`
239@@ -207,7 +207,7 @@ Initialization, Finalization, and Thread
240 Return the *exec-prefix* for installed platform-*dependent* files. This is
241 derived through a number of complicated rules from the program name set with
242 :cfunc:`Py_SetProgramName` and some environment variables; for example, if the
243- program name is ``'/usr/local/bin/python'``, the exec-prefix is
ce5ce022 244+ program name is ``'/usr/bin/python3'``, the exec-prefix is
32d83abb
AF
245 ``'/usr/local'``. The returned string points into static storage; the caller
246 should not modify its value. This corresponds to the :makevar:`exec_prefix`
247 variable in the top-level :file:`Makefile` and the :option:`--exec-prefix`
248--- Python-3.0.1/Doc/c-api/intro.rst.wiget 2009-01-17 19:00:58.000000000 +0100
ce5ce022 249+++ Python-3.0.1/Doc/c-api/intro.rst 2009-03-14 18:12:32.000000000 +0100
32d83abb
AF
250@@ -536,7 +536,7 @@ where the executable named :file:`python
251 path (the environment variable :envvar:`PATH`).
252
253 For instance, if the Python executable is found in
254-:file:`/usr/local/bin/python`, it will assume that the libraries are in
ce5ce022 255+:file:`/usr/bin/python3`, it will assume that the libraries are in
32d83abb
AF
256 :file:`/usr/local/lib/python{X.Y}`. (In fact, this particular path is also
257 the "fallback" location, used when no executable file named :file:`python` is
258 found along :envvar:`PATH`.) The user can override this behavior by setting the
259--- Python-3.0.1/Doc/library/cgi.rst.wiget 2008-09-04 00:49:01.000000000 +0200
ce5ce022 260+++ Python-3.0.1/Doc/library/cgi.rst 2009-03-14 18:12:32.000000000 +0100
32d83abb
AF
261@@ -360,7 +360,7 @@ mode should be ``0o755`` octal (use ``ch
262 first line of the script contains ``#!`` starting in column 1 followed by the
263 pathname of the Python interpreter, for instance::
264
265- #!/usr/local/bin/python
ce5ce022 266+ #!/usr/bin/python3
32d83abb
AF
267
268 Make sure the Python interpreter exists and is executable by "others".
269
270--- Python-3.0.1/PC/os2vacpp/readme.txt.wiget 2006-03-01 07:28:58.000000000 +0100
ce5ce022 271+++ Python-3.0.1/PC/os2vacpp/readme.txt 2009-03-14 18:12:32.000000000 +0100
32d83abb
AF
272@@ -78,7 +78,7 @@ A few new attributes have been added to
273 -- Using Python as the Default OS/2 Batch Language
274
275 Note that OS/2 supports the Unix technique of putting the special
276-comment line at the time of scripts e.g. "#!/usr/bin/python" in
ce5ce022 277+comment line at the time of scripts e.g. "#!/usr/bin/python3" in
32d83abb
AF
278 a different syntactic form. To do this, put your script into a file
279 with a .CMD extension and added 'extproc' to the top as follows:
280
281--- Python-3.0.1/Misc/HISTORY.wiget 2008-02-22 17:37:40.000000000 +0100
ce5ce022 282+++ Python-3.0.1/Misc/HISTORY 2009-03-14 18:12:32.000000000 +0100
32d83abb 283@@ -13231,9 +13231,9 @@ but not in sys.argv[0], so you can still
e684db95
AM
284 were invoked.
285
286 - It is now recommended to use ``#!/usr/bin/env python'' instead of
287-``#!/usr/local/bin/python'' at the start of executable scripts, except
ce5ce022 288+``#!/usr/bin/python3'' at the start of executable scripts, except
e684db95
AM
289 for CGI scripts. It has been determined that the use of /usr/bin/env
290-is more portable than that of /usr/local/bin/python -- scripts almost
ce5ce022 291+is more portable than that of /usr/bin/python3 -- scripts almost
e684db95
AM
292 never have to be edited when the Python interpreter lives in a
293 non-standard place. Note that this doesn't work for CGI scripts since
294 the python executable often doesn't live in the HTTP server's default
32d83abb 295@@ -16518,7 +16518,7 @@ assign a function object to sys.exitfunc
e684db95
AM
296 Python exits or receives a SIGTERM or SIGHUP signal.
297
298 The interpreter is now generally assumed to live in
299-/usr/local/bin/python (as opposed to /usr/local/python). The script
ce5ce022 300+/usr/bin/python3 (as opposed to /usr/local/python). The script
e684db95
AM
301 demo/scripts/fixps.py will update old scripts in place (you can easily
302 modify it to do other similar changes).
303
This page took 0.121458 seconds and 4 git commands to generate.