-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython-pythonpath.patch
More file actions
285 lines (256 loc) · 14.8 KB
/
Copy pathpython-pythonpath.patch
File metadata and controls
285 lines (256 loc) · 14.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
diff -urNp -x '*.orig' Python-2.7.18.org/Demo/tix/INSTALL.txt Python-2.7.18/Demo/tix/INSTALL.txt
--- Python-2.7.18.org/Demo/tix/INSTALL.txt 2020-04-19 23:13:39.000000000 +0200
+++ Python-2.7.18/Demo/tix/INSTALL.txt 2021-09-26 12:34:26.157770111 +0200
@@ -71,7 +71,7 @@ _tkinter _tkinter.c tkappinit.c -DWITH_A
You should now have a working Tix implementation in Python. To see if all
is as it should be, run the 'tixwidgets.py' script in the Demo/tix directory.
Under X windows, do
- /usr/local/bin/python Demo/tix/tixwidgets.py
+ /usr/bin/python Demo/tix/tixwidgets.py
If this does not work, you may need to tell python where to find
the Tcl, Tk and Tix library files. This is done by setting the
@@ -80,7 +80,7 @@ TCL_LIBRARY, TK_LIBRARY and TIX_LIBRARY
env TCL_LIBRARY=/usr/local/lib/tcl8.3 \
TK_LIBRARY=/usr/local/lib/tk8.3 \
TIX_LIBRARY=/usr/local/lib/tix8.1 \
- /usr/local/bin/python Demo/tix/tixwidgets.py
+ /usr/bin/python Demo/tix/tixwidgets.py
If you find any bugs or have suggestions for improvement, please report them
diff -urNp -x '*.orig' Python-2.7.18.org/Doc/c-api/init.rst Python-2.7.18/Doc/c-api/init.rst
--- Python-2.7.18.org/Doc/c-api/init.rst 2020-04-19 23:13:39.000000000 +0200
+++ Python-2.7.18/Doc/c-api/init.rst 2021-09-26 12:34:26.157770111 +0200
@@ -123,7 +123,7 @@ Process-wide parameters
Return the *prefix* for installed platform-independent files. This is derived
through a number of complicated rules from the program name set with
:c:func:`Py_SetProgramName` and some environment variables; for example, if the
- program name is ``'/usr/local/bin/python'``, the prefix is ``'/usr/local'``. The
+ program name is ``'/usr/bin/python'``, the prefix is ``'/usr/local'``. The
returned string points into static storage; the caller should not modify its
value. This corresponds to the :makevar:`prefix` variable in the top-level
:file:`Makefile` and the ``--prefix`` argument to the :program:`configure`
@@ -136,7 +136,7 @@ Process-wide parameters
Return the *exec-prefix* for installed platform-*dependent* files. This is
derived through a number of complicated rules from the program name set with
:c:func:`Py_SetProgramName` and some environment variables; for example, if the
- program name is ``'/usr/local/bin/python'``, the exec-prefix is
+ program name is ``'/usr/bin/python'``, the exec-prefix is
``'/usr/local'``. The returned string points into static storage; the caller
should not modify its value. This corresponds to the :makevar:`exec_prefix`
variable in the top-level :file:`Makefile` and the ``--exec-prefix``
diff -urNp -x '*.orig' Python-2.7.18.org/Doc/c-api/intro.rst Python-2.7.18/Doc/c-api/intro.rst
--- Python-2.7.18.org/Doc/c-api/intro.rst 2020-04-19 23:13:39.000000000 +0200
+++ Python-2.7.18/Doc/c-api/intro.rst 2021-09-26 12:34:26.161103483 +0200
@@ -544,7 +544,7 @@ where the executable named :file:`python
path (the environment variable :envvar:`PATH`).
For instance, if the Python executable is found in
-:file:`/usr/local/bin/python`, it will assume that the libraries are in
+:file:`/usr/bin/python`, it will assume that the libraries are in
:file:`/usr/local/lib/python{X.Y}`. (In fact, this particular path is also
the "fallback" location, used when no executable file named :file:`python` is
found along :envvar:`PATH`.) The user can override this behavior by setting the
diff -urNp -x '*.orig' Python-2.7.18.org/Doc/faq/library.rst Python-2.7.18/Doc/faq/library.rst
--- Python-2.7.18.org/Doc/faq/library.rst 2020-04-19 23:13:39.000000000 +0200
+++ Python-2.7.18/Doc/faq/library.rst 2021-09-26 12:34:26.161103483 +0200
@@ -56,7 +56,7 @@ scriptfile``.
The second can be done in a number of ways. The most straightforward way is to
write ::
- #!/usr/local/bin/python
+ #!/usr/bin/python
as the very first line of your file, using the pathname for where the Python
interpreter is installed on your platform.
@@ -654,7 +654,7 @@ there existing code that would let me do
Yes. Here's a simple example that uses httplib::
- #!/usr/local/bin/python
+ #!/usr/bin/python
import httplib, sys, time
diff -urNp -x '*.orig' Python-2.7.18.org/Doc/install/index.rst Python-2.7.18/Doc/install/index.rst
--- Python-2.7.18.org/Doc/install/index.rst 2020-04-19 23:13:39.000000000 +0200
+++ Python-2.7.18/Doc/install/index.rst 2021-09-26 12:34:26.161103483 +0200
@@ -450,12 +450,12 @@ them to go in :file:`/usr/local/lib/pyth
Another possibility is a network filesystem where the name used to write to a
remote directory is different from the name used to read it: for example, the
-Python interpreter accessed as :file:`/usr/local/bin/python` might search for
+Python interpreter accessed as :file:`/usr/bin/python` might search for
modules in :file:`/usr/local/lib/python2.{X}`, but those modules would have to
be installed to, say, :file:`/mnt/{@server}/export/lib/python2.{X}`. This could
be done with ::
- /usr/local/bin/python setup.py install --prefix=/mnt/@server/export
+ /usr/bin/python setup.py install --prefix=/mnt/@server/export
In either case, the :option:`!--prefix` option defines the installation base, and
the :option:`!--exec-prefix` option defines the platform-specific installation
diff -urNp -x '*.orig' Python-2.7.18.org/Doc/library/cgi.rst Python-2.7.18/Doc/library/cgi.rst
--- Python-2.7.18.org/Doc/library/cgi.rst 2020-04-19 23:13:39.000000000 +0200
+++ Python-2.7.18/Doc/library/cgi.rst 2021-09-26 12:34:26.161103483 +0200
@@ -395,7 +395,7 @@ mode should be ``0755`` octal (use ``chm
first line of the script contains ``#!`` starting in column 1 followed by the
pathname of the Python interpreter, for instance::
- #!/usr/local/bin/python
+ #!/usr/bin/python
Make sure the Python interpreter exists and is executable by "others".
diff -urNp -x '*.orig' Python-2.7.18.org/Doc/library/pickle.rst Python-2.7.18/Doc/library/pickle.rst
--- Python-2.7.18.org/Doc/library/pickle.rst 2020-04-19 23:13:39.000000000 +0200
+++ Python-2.7.18/Doc/library/pickle.rst 2021-09-26 12:34:26.161103483 +0200
@@ -742,7 +742,7 @@ member are saved. When the instance is u
reading resumes from the last location. The :meth:`__setstate__` and
:meth:`__getstate__` methods are used to implement this behavior. ::
- #!/usr/local/bin/python
+ #!/usr/bin/python
class TextReader:
"""Print and number lines in a text file."""
@@ -779,7 +779,7 @@ A sample usage might be something like t
>>> import TextReader
>>> obj = TextReader.TextReader("TextReader.py")
>>> obj.readline()
- '1: #!/usr/local/bin/python'
+ '1: #!/usr/bin/python'
>>> obj.readline()
'2: '
>>> obj.readline()
diff -urNp -x '*.orig' Python-2.7.18.org/Doc/tutorial/interpreter.rst Python-2.7.18/Doc/tutorial/interpreter.rst
--- Python-2.7.18.org/Doc/tutorial/interpreter.rst 2020-04-19 23:13:39.000000000 +0200
+++ Python-2.7.18/Doc/tutorial/interpreter.rst 2021-09-26 12:34:26.161103483 +0200
@@ -10,7 +10,7 @@ Using the Python Interpreter
Invoking the Interpreter
========================
-The Python interpreter is usually installed as :file:`/usr/local/bin/python` on
+The Python interpreter is usually installed as :file:`/usr/bin/python` on
those machines where it is available; putting :file:`/usr/local/bin` in your
Unix shell's search path makes it possible to start it by typing the command ::
diff -urNp -x '*.orig' Python-2.7.18.org/Lib/cgi.py Python-2.7.18/Lib/cgi.py
--- Python-2.7.18.org/Lib/cgi.py 2020-04-19 23:13:39.000000000 +0200
+++ Python-2.7.18/Lib/cgi.py 2021-09-26 12:34:26.161103483 +0200
@@ -1,6 +1,6 @@
-#! /usr/local/bin/python
+#! /usr/bin/python
-# NOTE: the above "/usr/local/bin/python" is NOT a mistake. It is
+# NOTE: the above "/usr/bin/python" is NOT a mistake. It is
# intentionally NOT "/usr/bin/env python". On many systems
# (e.g. Solaris), /usr/local/bin is not in $PATH as passed to CGI
# scripts, and /usr/local/bin is the default directory where Python is
diff -urNp -x '*.orig' Python-2.7.18.org/Mac/PythonLauncher/factorySettings.plist Python-2.7.18/Mac/PythonLauncher/factorySettings.plist
--- Python-2.7.18.org/Mac/PythonLauncher/factorySettings.plist 2020-04-19 23:13:39.000000000 +0200
+++ Python-2.7.18/Mac/PythonLauncher/factorySettings.plist 2021-09-26 12:34:26.161103483 +0200
@@ -10,7 +10,7 @@
<false/>
<key>interpreter_list</key>
<array>
- <string>/usr/local/bin/pythonw</string>
+ <string>/usr/bin/pythonw</string>
<string>/usr/bin/pythonw</string>
<string>/sw/bin/pythonw</string>
</array>
@@ -35,8 +35,8 @@
<false/>
<key>interpreter_list</key>
<array>
- <string>/usr/local/bin/pythonw</string>
- <string>/usr/local/bin/python</string>
+ <string>/usr/bin/pythonw</string>
+ <string>/usr/bin/python</string>
<string>/usr/bin/pythonw</string>
<string>/usr/bin/python</string>
<string>/sw/bin/pythonw</string>
@@ -63,8 +63,8 @@
<false/>
<key>interpreter_list</key>
<array>
- <string>/usr/local/bin/pythonw</string>
- <string>/usr/local/bin/python</string>
+ <string>/usr/bin/pythonw</string>
+ <string>/usr/bin/python</string>
<string>/usr/bin/pythonw</string>
<string>/usr/bin/python</string>
<string>/sw/bin/pythonw</string>
diff -urNp -x '*.orig' Python-2.7.18.org/Misc/HISTORY Python-2.7.18/Misc/HISTORY
--- Python-2.7.18.org/Misc/HISTORY 2020-04-19 23:13:39.000000000 +0200
+++ Python-2.7.18/Misc/HISTORY 2021-09-26 12:34:26.161103483 +0200
@@ -13236,9 +13236,9 @@ but not in sys.argv[0], so you can still
were invoked.
- It is now recommended to use ``#!/usr/bin/env python'' instead of
-``#!/usr/local/bin/python'' at the start of executable scripts, except
+``#!/usr/bin/python'' at the start of executable scripts, except
for CGI scripts. It has been determined that the use of /usr/bin/env
-is more portable than that of /usr/local/bin/python -- scripts almost
+is more portable than that of /usr/bin/python -- scripts almost
never have to be edited when the Python interpreter lives in a
non-standard place. Note that this doesn't work for CGI scripts since
the python executable often doesn't live in the HTTP server's default
@@ -16523,7 +16523,7 @@ assign a function object to sys.exitfunc
Python exits or receives a SIGTERM or SIGHUP signal.
The interpreter is now generally assumed to live in
-/usr/local/bin/python (as opposed to /usr/local/python). The script
+/usr/bin/python (as opposed to /usr/local/python). The script
demo/scripts/fixps.py will update old scripts in place (you can easily
modify it to do other similar changes).
diff -urNp -x '*.orig' Python-2.7.18.org/README Python-2.7.18/README
--- Python-2.7.18.org/README 2020-04-19 23:13:39.000000000 +0200
+++ Python-2.7.18/README 2021-09-26 12:34:26.161103483 +0200
@@ -376,7 +376,7 @@ Red Hat Linux: Red Hat 9 built Python2.2
1.5.2 on most older Red Hat installations; several key Red Hat tools
require this version. Python 2.1.x may be installed as
/usr/bin/python2. The Makefile installs Python as
- /usr/local/bin/python, which may or may not take precedence
+ /usr/bin/python, which may or may not take precedence
over /usr/bin/python, depending on how you have set up $PATH.
FreeBSD 3.x and probably platforms with NCurses that use libmytinfo or
diff -urNp -x '*.orig' Python-2.7.18.org/Tools/faqwiz/faqw.py Python-2.7.18/Tools/faqwiz/faqw.py
--- Python-2.7.18.org/Tools/faqwiz/faqw.py 2020-04-19 23:13:39.000000000 +0200
+++ Python-2.7.18/Tools/faqwiz/faqw.py 2021-09-26 12:34:26.161103483 +0200
@@ -10,7 +10,7 @@
# executable.
# You need to edit the first line and the lines that define FAQDIR and
-# SRCDIR, below: change /usr/local/bin/python to where your Python
+# SRCDIR, below: change /usr/bin/python to where your Python
# interpreter lives, change the value for FAQDIR to where your FAQ
# lives, and change the value for SRCDIR to where your faqwiz.py
# module lives. The faqconf.py and faqcust.py files live there, too.
diff -urNp -x '*.orig' Python-2.7.18.org/Tools/pybench/README Python-2.7.18/Tools/pybench/README
--- Python-2.7.18.org/Tools/pybench/README 2020-04-19 23:13:39.000000000 +0200
+++ Python-2.7.18/Tools/pybench/README 2021-09-26 12:34:26.161103483 +0200
@@ -141,7 +141,7 @@ Benchmark: 2006-06-12 12:09:25
Processor: x86_64
Python:
- Executable: /usr/local/bin/python
+ Executable: /usr/bin/python
Version: 2.4.2
Compiler: GCC 3.3.4 (pre 3.3.5 20040809)
Bits: 64bit
diff -urNp -x '*.orig' Python-2.7.18.org/Tools/pybench/pybench.py Python-2.7.18/Tools/pybench/pybench.py
--- Python-2.7.18.org/Tools/pybench/pybench.py 2020-04-19 23:13:39.000000000 +0200
+++ Python-2.7.18/Tools/pybench/pybench.py 2021-09-26 12:34:26.161103483 +0200
@@ -1,4 +1,4 @@
-#!/usr/local/bin/python -O
+#!/usr/bin/python -O
""" A Python Benchmark Suite
diff -urNp -x '*.orig' Python-2.7.18.org/Tools/scripts/README Python-2.7.18/Tools/scripts/README
--- Python-2.7.18.org/Tools/scripts/README 2020-04-19 23:13:39.000000000 +0200
+++ Python-2.7.18/Tools/scripts/README 2021-09-26 12:34:26.161103483 +0200
@@ -47,7 +47,7 @@ ndiff.py Intelligent diff between text
nm2def.py Create a template for PC/python_nt.def (Marc Lemburg)
objgraph.py Print object graph from nm output on a library
parseentities.py Utility for parsing HTML entity definitions
-pathfix.py Change #!/usr/local/bin/python into something else
+pathfix.py Change #!/usr/bin/python into something else
pdeps.py Print dependencies between Python modules
pickle2db.py Load a pickle generated by db2pickle.py to a database
pindent.py Indent Python code, giving block-closing comments
diff -urNp -x '*.orig' Python-2.7.18.org/Tools/scripts/fixps.py Python-2.7.18/Tools/scripts/fixps.py
--- Python-2.7.18.org/Tools/scripts/fixps.py 2020-04-19 23:13:39.000000000 +0200
+++ Python-2.7.18/Tools/scripts/fixps.py 2021-09-26 12:34:26.161103483 +0200
@@ -15,13 +15,13 @@ def main():
print filename, ': can\'t open :', msg
continue
line = f.readline()
- if not re.match('^#! */usr/local/bin/python', line):
- print filename, ': not a /usr/local/bin/python script'
+ if not re.match('^#! */usr/bin/python', line):
+ print filename, ': not a /usr/bin/python script'
f.close()
continue
rest = f.read()
f.close()
- line = re.sub('/usr/local/bin/python',
+ line = re.sub('/usr/bin/python',
'/usr/bin/env python', line)
print filename, ':', repr(line)
f = open(filename, "w")