]> git.pld-linux.org Git - packages/python.git/blob - python-pythonpath.patch
- update to 2.7 (builds but fails on files; still some small fixes and testing is...
[packages/python.git] / python-pythonpath.patch
1 diff -urN Python-2.7.org/Demo/tix/INSTALL.txt Python-2.7/Demo/tix/INSTALL.txt
2 --- Python-2.7.org/Demo/tix/INSTALL.txt 2001-11-11 15:07:37.000000000 +0100
3 +++ Python-2.7/Demo/tix/INSTALL.txt     2010-07-05 20:00:03.472866047 +0200
4 @@ -71,7 +71,7 @@
5  You should now have a working Tix implementation in Python. To see if all
6  is as it should be, run the 'tixwidgets.py' script in the Demo/tix directory.
7  Under X windows, do
8 -       /usr/local/bin/python Demo/tix/tixwidgets.py
9 +       /usr/bin/python Demo/tix/tixwidgets.py
10  
11  If this does not work, you may need to tell python where to find
12  the Tcl, Tk and Tix library files. This is done by setting the
13 @@ -80,7 +80,7 @@
14         env     TCL_LIBRARY=/usr/local/lib/tcl8.3 \
15                 TK_LIBRARY=/usr/local/lib/tk8.3 \
16                 TIX_LIBRARY=/usr/local/lib/tix8.1 \
17 -               /usr/local/bin/python Demo/tix/tixwidgets.py
18 +               /usr/bin/python Demo/tix/tixwidgets.py
19  
20  
21  If you find any bugs or have suggestions for improvement, please report them
22 diff -urN Python-2.7.org/Doc/c-api/init.rst Python-2.7/Doc/c-api/init.rst
23 --- Python-2.7.org/Doc/c-api/init.rst   2010-06-14 17:58:39.000000000 +0200
24 +++ Python-2.7/Doc/c-api/init.rst       2010-07-05 20:00:03.475503986 +0200
25 @@ -196,7 +196,7 @@
26     Return the *prefix* for installed platform-independent files. This is derived
27     through a number of complicated rules from the program name set with
28     :cfunc:`Py_SetProgramName` and some environment variables; for example, if the
29 -   program name is ``'/usr/local/bin/python'``, the prefix is ``'/usr/local'``. The
30 +   program name is ``'/usr/bin/python'``, the prefix is ``'/usr/local'``. The
31     returned string points into static storage; the caller should not modify its
32     value.  This corresponds to the :makevar:`prefix` variable in the top-level
33     :file:`Makefile` and the :option:`--prefix` argument to the :program:`configure`
34 @@ -209,7 +209,7 @@
35     Return the *exec-prefix* for installed platform-*dependent* files.  This is
36     derived through a number of complicated rules from the program name set with
37     :cfunc:`Py_SetProgramName` and some environment variables; for example, if the
38 -   program name is ``'/usr/local/bin/python'``, the exec-prefix is
39 +   program name is ``'/usr/bin/python'``, the exec-prefix is
40     ``'/usr/local'``.  The returned string points into static storage; the caller
41     should not modify its value.  This corresponds to the :makevar:`exec_prefix`
42     variable in the top-level :file:`Makefile` and the :option:`--exec-prefix`
43 diff -urN Python-2.7.org/Doc/c-api/intro.rst Python-2.7/Doc/c-api/intro.rst
44 --- Python-2.7.org/Doc/c-api/intro.rst  2010-06-11 02:23:01.000000000 +0200
45 +++ Python-2.7/Doc/c-api/intro.rst      2010-07-05 20:00:03.482863587 +0200
46 @@ -541,7 +541,7 @@
47  path (the environment variable :envvar:`PATH`).
48  
49  For instance, if the Python executable is found in
50 -:file:`/usr/local/bin/python`, it will assume that the libraries are in
51 +:file:`/usr/bin/python`, it will assume that the libraries are in
52  :file:`/usr/local/lib/python{X.Y}`.  (In fact, this particular path is also
53  the "fallback" location, used when no executable file named :file:`python` is
54  found along :envvar:`PATH`.)  The user can override this behavior by setting the
55 diff -urN Python-2.7.org/Doc/faq/library.rst Python-2.7/Doc/faq/library.rst
56 --- Python-2.7.org/Doc/faq/library.rst  2010-03-12 10:57:43.000000000 +0100
57 +++ Python-2.7/Doc/faq/library.rst      2010-07-05 20:00:03.486197135 +0200
58 @@ -54,7 +54,7 @@
59  The second can be done in a number of ways.  The most straightforward way is to
60  write ::
61  
62 -  #!/usr/local/bin/python
63 +  #!/usr/bin/python
64  
65  as the very first line of your file, using the pathname for where the Python
66  interpreter is installed on your platform.
67 @@ -650,7 +650,7 @@
68  
69  Yes. Here's a simple example that uses httplib::
70  
71 -   #!/usr/local/bin/python
72 +   #!/usr/bin/python
73  
74     import httplib, sys, time
75  
76 diff -urN Python-2.7.org/Doc/install/index.rst Python-2.7/Doc/install/index.rst
77 --- Python-2.7.org/Doc/install/index.rst        2009-10-28 00:06:10.000000000 +0100
78 +++ Python-2.7/Doc/install/index.rst    2010-07-05 20:00:03.506197416 +0200
79 @@ -369,12 +369,12 @@
80  
81  Another possibility is a network filesystem where the name used to write to a
82  remote directory is different from the name used to read it: for example, the
83 -Python interpreter accessed as :file:`/usr/local/bin/python` might search for
84 +Python interpreter accessed as :file:`/usr/bin/python` might search for
85  modules in :file:`/usr/local/lib/python2.{X}`, but those modules would have to
86  be installed to, say, :file:`/mnt/{@server}/export/lib/python2.{X}`.  This could
87  be done with ::
88  
89 -   /usr/local/bin/python setup.py install --prefix=/mnt/@server/export
90 +   /usr/bin/python setup.py install --prefix=/mnt/@server/export
91  
92  In either case, the :option:`--prefix` option defines the installation base, and
93  the :option:`--exec-prefix` option defines the platform-specific installation
94 diff -urN Python-2.7.org/Doc/library/cgi.rst Python-2.7/Doc/library/cgi.rst
95 --- Python-2.7.org/Doc/library/cgi.rst  2009-08-17 21:26:49.000000000 +0200
96 +++ Python-2.7/Doc/library/cgi.rst      2010-07-05 20:00:03.509530626 +0200
97 @@ -387,7 +387,7 @@
98  first line of the script contains ``#!`` starting in column 1 followed by the
99  pathname of the Python interpreter, for instance::
100  
101 -   #!/usr/local/bin/python
102 +   #!/usr/bin/python
103  
104  Make sure the Python interpreter exists and is executable by "others".
105  
106 diff -urN Python-2.7.org/Doc/library/pickle.rst Python-2.7/Doc/library/pickle.rst
107 --- Python-2.7.org/Doc/library/pickle.rst       2009-04-27 17:29:09.000000000 +0200
108 +++ Python-2.7/Doc/library/pickle.rst   2010-07-05 20:00:03.512863651 +0200
109 @@ -737,7 +737,7 @@
110  reading resumes from the last location. The :meth:`__setstate__` and
111  :meth:`__getstate__` methods are used to implement this behavior. ::
112  
113 -   #!/usr/local/bin/python
114 +   #!/usr/bin/python
115  
116     class TextReader:
117         """Print and number lines in a text file."""
118 @@ -774,7 +774,7 @@
119     >>> import TextReader
120     >>> obj = TextReader.TextReader("TextReader.py")
121     >>> obj.readline()
122 -   '1: #!/usr/local/bin/python'
123 +   '1: #!/usr/bin/python'
124     >>> obj.readline()
125     '2: '
126     >>> obj.readline()
127 diff -urN Python-2.7.org/Doc/tutorial/interpreter.rst Python-2.7/Doc/tutorial/interpreter.rst
128 --- Python-2.7.org/Doc/tutorial/interpreter.rst 2010-04-10 13:16:59.000000000 +0200
129 +++ Python-2.7/Doc/tutorial/interpreter.rst     2010-07-05 20:00:03.516196870 +0200
130 @@ -10,7 +10,7 @@
131  Invoking the Interpreter
132  ========================
133  
134 -The Python interpreter is usually installed as :file:`/usr/local/bin/python` on
135 +The Python interpreter is usually installed as :file:`/usr/bin/python` on
136  those machines where it is available; putting :file:`/usr/local/bin` in your
137  Unix shell's search path makes it possible to start it by typing the command ::
138  
139 diff -urN Python-2.7.org/Lib/cgi.py Python-2.7/Lib/cgi.py
140 --- Python-2.7.org/Lib/cgi.py   2010-03-17 21:05:11.000000000 +0100
141 +++ Python-2.7/Lib/cgi.py       2010-07-05 20:00:03.522865338 +0200
142 @@ -1,6 +1,6 @@
143 -#! /usr/local/bin/python
144 +#! /usr/bin/python
145  
146 -# NOTE: the above "/usr/local/bin/python" is NOT a mistake.  It is
147 +# NOTE: the above "/usr/bin/python" is NOT a mistake.  It is
148  # intentionally NOT "/usr/bin/env python".  On many systems
149  # (e.g. Solaris), /usr/local/bin is not in $PATH as passed to CGI
150  # scripts, and /usr/local/bin is the default directory where Python is
151 diff -urN Python-2.7.org/Mac/PythonLauncher/factorySettings.plist Python-2.7/Mac/PythonLauncher/factorySettings.plist
152 --- Python-2.7.org/Mac/PythonLauncher/factorySettings.plist     2004-07-16 14:34:23.000000000 +0200
153 +++ Python-2.7/Mac/PythonLauncher/factorySettings.plist 2010-07-05 20:00:03.526197587 +0200
154 @@ -10,7 +10,7 @@
155                  <false/>
156                  <key>interpreter_list</key>
157                  <array>
158 -                    <string>/usr/local/bin/pythonw</string>
159 +                    <string>/usr/bin/pythonw</string>
160                      <string>/usr/bin/pythonw</string>
161                      <string>/sw/bin/pythonw</string>
162                  </array>
163 @@ -35,8 +35,8 @@
164                  <false/>
165                  <key>interpreter_list</key>
166                  <array>
167 -                    <string>/usr/local/bin/pythonw</string>
168 -                    <string>/usr/local/bin/python</string>
169 +                    <string>/usr/bin/pythonw</string>
170 +                    <string>/usr/bin/python</string>
171                      <string>/usr/bin/pythonw</string>
172                      <string>/usr/bin/python</string>
173                      <string>/sw/bin/pythonw</string>
174 @@ -63,8 +63,8 @@
175                  <false/>
176                  <key>interpreter_list</key>
177                  <array>
178 -                    <string>/usr/local/bin/pythonw</string>
179 -                    <string>/usr/local/bin/python</string>
180 +                    <string>/usr/bin/pythonw</string>
181 +                    <string>/usr/bin/python</string>
182                      <string>/usr/bin/pythonw</string>
183                      <string>/usr/bin/python</string>
184                      <string>/sw/bin/pythonw</string>
185 diff -urN Python-2.7.org/Mac/README Python-2.7/Mac/README
186 --- Python-2.7.org/Mac/README   2010-04-30 17:11:22.000000000 +0200
187 +++ Python-2.7/Mac/README       2010-07-05 20:00:03.529530323 +0200
188 @@ -213,7 +213,7 @@
189  to be supplied later. Some useful (but outdated) info can be found in
190  Mac/Demo.
191  
192 -The commandline scripts /usr/local/bin/python and pythonw can be used to run
193 +The commandline scripts /usr/bin/python and pythonw can be used to run
194  non-GUI and GUI python scripts from the command line, respectively.
195  
196  How do I create a binary distribution?
197 diff -urN Python-2.7.org/Misc/HISTORY Python-2.7/Misc/HISTORY
198 --- Python-2.7.org/Misc/HISTORY 2010-03-07 16:23:59.000000000 +0100
199 +++ Python-2.7/Misc/HISTORY     2010-07-05 20:00:03.576196805 +0200
200 @@ -13236,9 +13236,9 @@
201  were invoked.
202  
203  - It is now recommended to use ``#!/usr/bin/env python'' instead of
204 -``#!/usr/local/bin/python'' at the start of executable scripts, except
205 +``#!/usr/bin/python'' at the start of executable scripts, except
206  for CGI scripts.  It has been determined that the use of /usr/bin/env
207 -is more portable than that of /usr/local/bin/python -- scripts almost
208 +is more portable than that of /usr/bin/python -- scripts almost
209  never have to be edited when the Python interpreter lives in a
210  non-standard place.  Note that this doesn't work for CGI scripts since
211  the python executable often doesn't live in the HTTP server's default
212 @@ -16523,7 +16523,7 @@
213  Python exits or receives a SIGTERM or SIGHUP signal.
214  
215  The interpreter is now generally assumed to live in
216 -/usr/local/bin/python (as opposed to /usr/local/python).  The script
217 +/usr/bin/python (as opposed to /usr/local/python).  The script
218  demo/scripts/fixps.py will update old scripts in place (you can easily
219  modify it to do other similar changes).
220  
221 diff -urN Python-2.7.org/Misc/RPM/python-2.7.spec Python-2.7/Misc/RPM/python-2.7.spec
222 --- Python-2.7.org/Misc/RPM/python-2.7.spec     2010-07-03 15:56:13.000000000 +0200
223 +++ Python-2.7/Misc/RPM/python-2.7.spec 2010-07-05 20:00:03.579531210 +0200
224 @@ -159,10 +159,10 @@
225  
226  * Sat Mar 27 2004 Sean Reifschneider <jafo-rpms@tummy.com> [2.3.2-3pydotorg]
227  - Being more agressive about finding the paths to fix for
228 -  #!/usr/local/bin/python.
229 +  #!/usr/bin/python.
230  
231  * Sat Feb 07 2004 Sean Reifschneider <jafo-rpms@tummy.com> [2.3.3-2pydotorg]
232 -- Adding code to remove "#!/usr/local/bin/python" from particular files and
233 +- Adding code to remove "#!/usr/bin/python" from particular files and
234    causing the RPM build to terminate if there are any unexpected files
235    which have that line in them.
236  
237 @@ -317,7 +317,7 @@
238  
239  #  fix the #! line in installed files
240  find "$RPM_BUILD_ROOT" -type f -print0 |
241 -      xargs -0 grep -l /usr/local/bin/python | while read file
242 +      xargs -0 grep -l /usr/bin/python | while read file
243  do
244     FIXFILE="$file"
245     sed 's|^#!.*python|#!%{__prefix}/bin/env python'"%{binsuffix}"'|' \
246 @@ -327,7 +327,7 @@
247  done
248  
249  #  check to see if there are any straggling #! lines
250 -find "$RPM_BUILD_ROOT" -type f | xargs egrep -n '^#! */usr/local/bin/python' \
251 +find "$RPM_BUILD_ROOT" -type f | xargs egrep -n '^#! */usr/bin/python' \
252        | grep ':1:#!' >/tmp/python-rpm-files.$$ || true
253  if [ -s /tmp/python-rpm-files.$$ ]
254  then
255 @@ -335,7 +335,7 @@
256     cat /tmp/python-rpm-files.$$
257     cat <<@EOF
258     *****************************************************
259 -     There are still files referencing /usr/local/bin/python in the
260 +     There are still files referencing /usr/bin/python in the
261       install directory.  They are listed above.  Please fix the .spec
262       file and try again.  If you are an end-user, you probably want
263       to report this to jafo-rpms@tummy.com as well.
264 diff -urN Python-2.7.org/README Python-2.7/README
265 --- Python-2.7.org/README       2010-07-03 15:56:13.000000000 +0200
266 +++ Python-2.7/README   2010-07-05 20:00:03.586197142 +0200
267 @@ -331,7 +331,7 @@
268          1.5.2 on most older Red Hat installations; several key Red Hat tools
269          require this version.  Python 2.1.x may be installed as
270          /usr/bin/python2.  The Makefile installs Python as
271 -        /usr/local/bin/python, which may or may not take precedence
272 +        /usr/bin/python, which may or may not take precedence
273          over /usr/bin/python, depending on how you have set up $PATH.
274  
275  FreeBSD 3.x and probably platforms with NCurses that use libmytinfo or
276 diff -urN Python-2.7.org/Tools/faqwiz/faqw.py Python-2.7/Tools/faqwiz/faqw.py
277 --- Python-2.7.org/Tools/faqwiz/faqw.py 2010-03-11 23:33:25.000000000 +0100
278 +++ Python-2.7/Tools/faqwiz/faqw.py     2010-07-05 20:00:03.589530209 +0200
279 @@ -10,7 +10,7 @@
280  # executable.
281  
282  # You need to edit the first line and the lines that define FAQDIR and
283 -# SRCDIR, below: change /usr/local/bin/python to where your Python
284 +# SRCDIR, below: change /usr/bin/python to where your Python
285  # interpreter lives, change the value for FAQDIR to where your FAQ
286  # lives, and change the value for SRCDIR to where your faqwiz.py
287  # module lives.  The faqconf.py and faqcust.py files live there, too.
288 diff -urN Python-2.7.org/Tools/pybench/pybench.py Python-2.7/Tools/pybench/pybench.py
289 --- Python-2.7.org/Tools/pybench/pybench.py     2009-10-09 16:32:19.000000000 +0200
290 +++ Python-2.7/Tools/pybench/pybench.py 2010-07-05 20:00:03.592863527 +0200
291 @@ -1,4 +1,4 @@
292 -#!/usr/local/bin/python -O
293 +#!/usr/bin/python -O
294  
295  """ A Python Benchmark Suite
296  
297 diff -urN Python-2.7.org/Tools/pybench/README Python-2.7/Tools/pybench/README
298 --- Python-2.7.org/Tools/pybench/README 2006-06-13 20:56:56.000000000 +0200
299 +++ Python-2.7/Tools/pybench/README     2010-07-05 20:00:03.596196761 +0200
300 @@ -141,7 +141,7 @@
301         Processor:    x86_64
302  
303      Python:
304 -       Executable:   /usr/local/bin/python
305 +       Executable:   /usr/bin/python
306         Version:      2.4.2
307         Compiler:     GCC 3.3.4 (pre 3.3.5 20040809)
308         Bits:         64bit
309 diff -urN Python-2.7.org/Tools/scripts/fixps.py Python-2.7/Tools/scripts/fixps.py
310 --- Python-2.7.org/Tools/scripts/fixps.py       2004-08-09 19:27:55.000000000 +0200
311 +++ Python-2.7/Tools/scripts/fixps.py   2010-07-05 20:00:03.599292989 +0200
312 @@ -15,13 +15,13 @@
313              print filename, ': can\'t open :', msg
314              continue
315          line = f.readline()
316 -        if not re.match('^#! */usr/local/bin/python', line):
317 -            print filename, ': not a /usr/local/bin/python script'
318 +        if not re.match('^#! */usr/bin/python', line):
319 +            print filename, ': not a /usr/bin/python script'
320              f.close()
321              continue
322          rest = f.read()
323          f.close()
324 -        line = re.sub('/usr/local/bin/python',
325 +        line = re.sub('/usr/bin/python',
326                        '/usr/bin/env python', line)
327          print filename, ':', repr(line)
328          f = open(filename, "w")
329 diff -urN Python-2.7.org/Tools/scripts/README Python-2.7/Tools/scripts/README
330 --- Python-2.7.org/Tools/scripts/README 2010-02-24 18:06:31.000000000 +0100
331 +++ Python-2.7/Tools/scripts/README     2010-07-05 20:00:03.602863895 +0200
332 @@ -47,7 +47,7 @@
333  nm2def.py              Create a template for PC/python_nt.def (Marc Lemburg)
334  objgraph.py            Print object graph from nm output on a library
335  parseentities.py       Utility for parsing HTML entity definitions
336 -pathfix.py             Change #!/usr/local/bin/python into something else
337 +pathfix.py             Change #!/usr/bin/python into something else
338  pdeps.py               Print dependencies between Python modules
339  pickle2db.py           Load a pickle generated by db2pickle.py to a database
340  pindent.py             Indent Python code, giving block-closing comments
This page took 0.073158 seconds and 4 git commands to generate.