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
|
#! /bin/sh -e
# DP: adjust locations of directories to debian policy
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
#cd ${dir}gcc && autoconf
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
#rm ${dir}gcc/configure
;;
*)
echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
exit 1
esac
exit 0
--- Demo/tkinter/guido/tkman.py.orig 2007-01-11 19:13:18.000000000 +0000
+++ Demo/tkinter/guido/tkman.py 2007-01-11 19:13:42.000000000 +0000
@@ -9,8 +9,8 @@
from Tkinter import *
from ManPage import ManPage
-MANNDIRLIST = ['/depot/sundry/man/mann','/usr/local/man/mann']
-MAN3DIRLIST = ['/depot/sundry/man/man3','/usr/local/man/man3']
+MANNDIRLIST = ['/depot/sundry/man/mann','/usr/share/man/mann']
+MAN3DIRLIST = ['/depot/sundry/man/man3','/usr/share/man/man3']
foundmanndir = 0
for dir in MANNDIRLIST:
--- Demo/tkinter/guido/ManPage.py.orig 2007-01-11 19:13:18.000000000 +0000
+++ Demo/tkinter/guido/ManPage.py 2007-01-11 19:13:42.000000000 +0000
@@ -189,8 +189,9 @@
def test():
import os
import sys
- # XXX This directory may be different on your system
- MANDIR = '/usr/local/man/mann'
+ # XXX This directory may be different on your system,
+ # it is here set for Debian GNU/Linux.
+ MANDIR = '/usr/share/man'
DEFAULTPAGE = 'Tcl'
formatted = 0
if sys.argv[1:] and sys.argv[1] == '-f':
--- Demo/scripts/ftpstats.py.orig 2007-01-11 19:13:18.000000000 +0000
+++ Demo/scripts/ftpstats.py 2007-01-11 19:13:42.000000000 +0000
@@ -6,7 +6,8 @@
# ftpstats [-m maxitems] [-s search] [file]
# -m maxitems: restrict number of items in "top-N" lists, default 25.
# -s string: restrict statistics to lines containing this string.
-# Default file is /usr/adm/ftpd; a "-" means read standard input.
+# Default file for Debian GNU/Linux is /var/log/xferlog;
+# a "-" means read stdandard input.
# The script must be run on the host where the ftp daemon runs.
# (At CWI this is currently buizerd.)
@@ -34,7 +35,7 @@
maxitems = string.atoi(a)
if o == '-s':
search = a
- file = '/usr/adm/ftpd'
+ file = '/var/log/xferlog'
if args: file = args[0]
if file == '-':
f = sys.stdin
--- Misc/python.man.orig 2007-01-11 19:13:18.000000000 +0000
+++ Misc/python.man 2007-01-11 19:13:42.000000000 +0000
@@ -294,7 +294,7 @@
These are subject to difference depending on local installation
conventions; ${prefix} and ${exec_prefix} are installation-dependent
and should be interpreted as for GNU software; they may be the same.
-The default for both is \fI/usr/local\fP.
+On Debian GNU/{Hurd,Linux} the default for both is \fI/usr\fP.
.IP \fI${exec_prefix}/bin/python\fP
Recommended location of the interpreter.
.PP
--- Tools/faqwiz/faqconf.py.orig 2007-01-11 19:13:18.000000000 +0000
+++ Tools/faqwiz/faqconf.py 2007-01-11 19:13:42.000000000 +0000
@@ -21,7 +21,7 @@
OWNEREMAIL = "nobody@anywhere.org" # Email for feedback
HOMEURL = "http://www.python.org" # Related home page
HOMENAME = "Python home" # Name of related home page
-RCSBINDIR = "/usr/local/bin/" # Directory containing RCS commands
+RCSBINDIR = "/usr/bin/" # Directory containing RCS commands
# (must end in a slash)
# Parameters you can normally leave alone
--- Tools/webchecker/webchecker.py.orig 2007-01-11 19:13:18.000000000 +0000
+++ Tools/webchecker/webchecker.py 2007-01-11 19:13:42.000000000 +0000
@@ -19,7 +19,8 @@
a directory listing is returned. Now, you can point webchecker to the
document tree in the local file system of your HTTP daemon, and have
most of it checked. In fact the default works this way if your local
-web tree is located at /usr/local/etc/httpd/htdpcs (the default for
+web tree is located at /var/www, which is the default for Debian
+GNU/Linux. Other systems use /usr/local/etc/httpd/htdocs (the default for
the NCSA HTTP daemon and probably others).
Report printed:
--- Lib/pydoc.py.orig 2007-01-11 19:13:18.000000000 +0000
+++ Lib/pydoc.py 2007-01-11 19:14:56.000000000 +0000
@@ -1623,6 +1623,7 @@
for dir in [os.environ.get('PYTHONDOCS'),
homedir and os.path.join(homedir, 'doc'),
os.path.join(execdir, 'doc'),
+ '/usr/share/doc/python' + sys.version[:3] + '-doc/html',
'/usr/doc/python-docs-' + split(sys.version)[0],
'/usr/doc/python-' + split(sys.version)[0],
'/usr/doc/python-docs-' + sys.version[:3],
@@ -1738,8 +1739,8 @@
HTML documentation files could not be found. If you have installed them,
please set the environment variable PYTHONDOCS to indicate their location.
-On the Microsoft Windows operating system, the files can be built by
-running "hh -decompile . PythonNN.chm" in the C:\PythonNN\Doc> directory.
+On Debian GNU/{Linux,Hurd} systems you have to install the corresponding
+pythonX.Y-doc package, i.e. python2.5-doc.
''')
return
target = self.topics.get(topic, self.keywords.get(topic))
--- Lib/site.py~ 2008-03-08 16:08:49.000000000 +0100
+++ Lib/site.py 2008-03-08 17:02:41.000000000 +0100
@@ -19,6 +19,11 @@
resulting directories, if they exist, are appended to sys.path, and
also inspected for path configuration files.
+FOR DEBIAN, this sys.path is augmented with directories in /usr/local.
+Local addons go into /usr/local/lib/python<version>/site-packages
+(resp. /usr/local/lib/site-python), Debian addons install into
+/usr/lib/python<version>/site-packages.
+
A path configuration file is a file whose name has the form
<package>.pth; its contents are additional directories (one per line)
to be added to sys.path. Non-existing directories (or
@@ -176,6 +181,7 @@
prefixes = [sys.prefix]
if sys.exec_prefix != sys.prefix:
prefixes.append(sys.exec_prefix)
+ prefixes.insert(0, '/usr/local')
for prefix in prefixes:
if prefix:
if sys.platform in ('os2emx', 'riscos'):
|