File: distutils-exec-prefix.dpatch

package info (click to toggle)
python2.5 2.5-5%2Betch2
  • links: PTS
  • area: main
  • in suites: etch
  • size: 52,452 kB
  • ctags: 96,908
  • sloc: ansic: 352,790; python: 317,047; sh: 17,465; asm: 6,564; makefile: 4,300; lisp: 3,678; perl: 3,674; xml: 894; objc: 756; sed: 2
file content (36 lines) | stat: -rw-r--r-- 1,252 bytes parent folder | download | duplicates (2)
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
#! /bin/sh -e

# DP: Fix building the source within exec_prefix.

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
        ;;
    -unpatch)
        patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
        ;;
    *)
	echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
        exit 1
esac
exit 0

--- Lib/distutils/command/build_ext.py.orig	2006-05-23 13:47:16.000000000 +0200
+++ Lib/distutils/command/build_ext.py	2006-10-03 10:31:32.757986500 +0200
@@ -188,7 +188,7 @@
         if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos' or \
                (sys.platform.startswith('linux') and
                 sysconfig.get_config_var('Py_ENABLE_SHARED')):
-            if string.find(sys.executable, sys.exec_prefix) != -1:
+            if sys.executable.startswith(os.path.join(sys.exec_prefix, 'bin')):
                 # building third party extensions
                 self.library_dirs.append(os.path.join(sys.prefix, "lib",
                                                       "python" + get_python_version(),