]> git.pld-linux.org Git - packages/python.git/blob - python-noarch_to_datadir.patch
- rel 2; keep python2.6 hardlink (we will have to deal with python3.0 soon)
[packages/python.git] / python-noarch_to_datadir.patch
1 diff -Nur Python-2.5.orig/Lib/distutils/command/install.py Python-2.5/Lib/distutils/command/install.py
2 --- Python-2.5.orig/Lib/distutils/command/install.py    2007-03-17 16:26:13.803357750 +0000
3 +++ Python-2.5/Lib/distutils/command/install.py 2007-03-17 16:26:50.821671250 +0000
4 @@ -40,14 +40,14 @@
5  
6  INSTALL_SCHEMES = {
7      'unix_prefix': {
8 -        'purelib': '$base/lib/python$py_version_short/site-packages',
9 +        'purelib': '$base/share/python$py_version_short/site-packages',
10          'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages',
11          'headers': '$base/include/python$py_version_short/$dist_name',
12          'scripts': '$base/bin',
13          'data'   : '$base',
14          },
15      'unix_home': {
16 -        'purelib': '$base/lib/python',
17 +        'purelib': '$base/share/python',
18          'platlib': '$base/'+libname+'/python',
19          'headers': '$base/include/python/$dist_name',
20          'scripts': '$base/bin',
21 diff -Nur Python-2.5.orig/Lib/distutils/sysconfig.py Python-2.5/Lib/distutils/sysconfig.py
22 --- Python-2.5.orig/Lib/distutils/sysconfig.py  2007-03-17 16:26:13.803357750 +0000
23 +++ Python-2.5/Lib/distutils/sysconfig.py       2007-03-17 16:26:50.821671250 +0000
24 @@ -99,12 +99,12 @@
25          prefix = plat_specific and EXEC_PREFIX or PREFIX
26  
27      if os.name == "posix":
28 -        if plat_specific:
29 -            lib = sys.lib
30 +        if plat_specific: 
31 +            libpython = os.path.join(prefix,
32 +                                 sys.lib, "python" + get_python_version())
33          else:
34 -            lib = 'lib'
35 -        libpython = os.path.join(prefix,
36 -                                 lib, "python" + get_python_version())
37 +            libpython = os.path.join(prefix,
38 +                                 "share", "python" + get_python_version())
39          if standard_lib:
40              return libpython
41          else:
42 diff -Nur Python-2.5.orig/Lib/site.py Python-2.5/Lib/site.py
43 --- Python-2.5.orig/Lib/site.py 2007-03-17 16:26:13.803357750 +0000
44 +++ Python-2.5/Lib/site.py      2007-03-17 16:26:50.825671500 +0000
45 @@ -269,13 +269,10 @@
46                                          "python" + sys.version[:3],
47                                          "site-packages"))
48              sitedirs.append(os.path.join(prefix, sys.lib, "site-python"))
49 -            if sys.lib != 'lib':
50 -                sitedirs.append(os.path.join(prefix,
51 -                    'lib',
52 -                    "python" + sys.version[:3],
53 -                    "site-packages"))
54 -                sitedirs.append(os.path.join(prefix, 'lib', "site-python"))
55 -
56 +            sitedirs.append(os.path.join(prefix, "share",
57 +                "python" + sys.version[:3],
58 +                "site-packages"))
59 +            sitedirs.append(os.path.join(prefix, "share", "site-python"))
60          else:
61              sitedirs.append(prefix)
62              sitedirs.append(os.path.join(prefix, sys.lib, "site-packages"))
63 diff -Nur Python-2.5.orig/Makefile.pre.in Python-2.5/Makefile.pre.in
64 --- Python-2.5.orig/Makefile.pre.in     2007-03-17 16:26:13.807358000 +0000
65 +++ Python-2.5/Makefile.pre.in  2007-03-17 16:26:50.821671250 +0000
66 @@ -90,7 +90,7 @@
67  MANDIR=                @mandir@
68  INCLUDEDIR=    @includedir@
69  CONFINCLUDEDIR=        $(exec_prefix)/include
70 -SCRIPTDIR=     $(prefix)/$(LIB)
71 +SCRIPTDIR=     $(prefix)/share
72  
73  # Detailed destination directories
74  BINLIBDEST=    $(LIBDIR)/python$(VERSION)
75 diff -Nur Python-2.5.orig/Modules/getpath.c Python-2.5/Modules/getpath.c
76 --- Python-2.5.orig/Modules/getpath.c   2007-03-17 16:26:13.807358000 +0000
77 +++ Python-2.5/Modules/getpath.c        2007-03-17 16:26:50.825671500 +0000
78 @@ -126,7 +126,8 @@
79  
80  #ifndef PYTHONPATH
81  #define PYTHONPATH PREFIX "/" LIB_PYTHON VERSION ":" \
82 -              EXEC_PREFIX "/" LIB_PYTHON VERSION "/lib-dynload:"
83 +              EXEC_PREFIX "/" LIB_PYTHON VERSION "/lib-dynload:" \
84 +              PREFIX "/share/python" VERSION
85  #endif
86  
87  #ifndef LANDMARK
88 @@ -137,7 +138,8 @@
89  static char exec_prefix[MAXPATHLEN+1];
90  static char progpath[MAXPATHLEN+1];
91  static char *module_search_path = NULL;
92  static char lib_python[] = LIB_PYTHON VERSION;
93 +static char share_python[] = "share/python" VERSION;
94  
95  static void
96  reduce(char *dir)
97 @@ -275,7 +277,7 @@
98          delim = strchr(prefix, DELIM);
99          if (delim)
100              *delim = '\0';
101 -        joinpath(prefix, lib_python);
102 +        joinpath(prefix, share_python);
103          joinpath(prefix, LANDMARK);
104          return 1;
105      }
106 @@ -298,7 +300,7 @@
107      copy_absolute(prefix, argv0_path);
108      do {
109          n = strlen(prefix);
110 -        joinpath(prefix, lib_python);
111 +        joinpath(prefix, share_python);
112          joinpath(prefix, LANDMARK);
113          if (ismodule(prefix))
114              return 1;
115 @@ -308,7 +310,7 @@
116  
117      /* Look at configure's PREFIX */
118      strncpy(prefix, PREFIX, MAXPATHLEN);
119 -    joinpath(prefix, lib_python);
120 +    joinpath(prefix, share_python);
121      joinpath(prefix, LANDMARK);
122      if (ismodule(prefix))
123          return 1;
124 @@ -519,7 +521,7 @@
125              fprintf(stderr,
126                  "Could not find platform independent libraries <prefix>\n");
127          strncpy(prefix, PREFIX, MAXPATHLEN);
128 -        joinpath(prefix, lib_python);
129 +        joinpath(prefix, share_python);
130      }
131      else
132          reduce(prefix);
133 @@ -532,7 +534,7 @@
134      }
135      else
136          strncpy(zip_path, PREFIX, MAXPATHLEN);
137 -    joinpath(zip_path, "lib/python00.zip");
138 +    joinpath(zip_path, LIB_PYTHON "00.zip");
139      bufsz = strlen(zip_path);  /* Replace "00" with version */
140      zip_path[bufsz - 6] = VERSION[0];
141      zip_path[bufsz - 5] = VERSION[2];
This page took 0.087926 seconds and 3 git commands to generate.