~ubuntu-branches/ubuntu/natty/python3.1/natty-security

« back to all changes in this revision

Viewing changes to debian/patches/site-locations.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-07-06 16:52:42 UTC
  • mfrom: (1.2.1 upstream) (2.1.11 sid)
  • Revision ID: james.westby@ubuntu.com-20100706165242-2xv4i019r3et6c0j
Tags: 3.1.2+20100706-1ubuntu1
* Merge with Debian; remaining changes:
  - Regenerate the control file.
  - Add debian/patches/overwrite-semaphore-check for Lucid buildds.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh -e
2
 
 
3
 
# DP: Set site-packages/dist-packages
4
 
 
5
 
dir=
6
 
if [ $# -eq 3 -a "$2" = '-d' ]; then
7
 
    pdir="-d $3"
8
 
    dir="$3/"
9
 
elif [ $# -ne 1 ]; then
10
 
    echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
11
 
    exit 1
12
 
fi
13
 
case "$1" in
14
 
    -patch)
15
 
        patch $pdir -f --no-backup-if-mismatch -p1 < $0
16
 
        ;;
17
 
    -unpatch)
18
 
        patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
19
 
        ;;
20
 
    *)
21
 
        echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
22
 
        exit 1
23
 
esac
24
 
exit 0
25
 
 
26
 
--- ./Lib/site.py.orig  2008-10-27 22:39:36.000000000 +0100
27
 
+++ ./Lib/site.py       2008-10-27 22:42:36.000000000 +0100
28
 
@@ -13,6 +13,12 @@
29
 
 resulting directories, if they exist, are appended to sys.path, and
30
 
 also inspected for path configuration files.
31
 
 
32
 
+For Debian and derivatives, this sys.path is augmented with directories
33
 
+for packages distributed within the distribution. Local addons go
34
 
+into /usr/local/lib/python<version>/dist-packages, Debian addons
35
 
+install into /usr/{lib,share}/python<version>/dist-packages.
36
 
+/usr/lib/python<version>/site-packages is not used.
37
 
+
38
 
 A path configuration file is a file whose name has the form
39
 
 <package>.pth; its contents are additional directories (one per line)
40
 
 to be added to sys.path.  Non-existing directories (or
41
 
@@ -260,8 +266,11 @@
42
 
         elif os.sep == '/':
43
 
             sitedirs.append(os.path.join(prefix, "lib",
44
 
                                         "python" + sys.version[:3],
45
 
-                                        "site-packages"))
46
 
-            sitedirs.append(os.path.join(prefix, "lib", "site-python"))
47
 
+                                        "dist-packages"))
48
 
+            sitedirs.append(os.path.join(prefix, "local/lib",
49
 
+                                        "python" + sys.version[:3],
50
 
+                                        "dist-packages"))
51
 
+            sitedirs.append(os.path.join(prefix, "lib", "dist-python"))
52
 
         else:
53
 
             sitedirs.append(prefix)
54
 
             sitedirs.append(os.path.join(prefix, "lib", "site-packages"))