]> git.pld-linux.org Git - packages/python.git/blob - python-noarch_to_datadir.patch
- adapterized (avoid macros with /usr/include/{ncurses,freetype}*)
[packages/python.git] / python-noarch_to_datadir.patch
1 diff -dur Python-2.3.4.orig/Lib/distutils/command/install.py Python-2.3.4/Lib/distutils/command/install.py
2 --- Python-2.3.4.orig/Lib/distutils/command/install.py  2002-11-19 14:12:28.000000000 +0100
3 +++ Python-2.3.4/Lib/distutils/command/install.py       2004-09-10 08:41:12.836021548 +0200
4 @@ -38,14 +38,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/lib/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/lib/python',
19          'headers': '$base/include/python/$dist_name',
20          'scripts': '$base/bin',
21 diff -dur Python-2.3.4.orig/Lib/distutils/sysconfig.py Python-2.3.4/Lib/distutils/sysconfig.py
22 --- Python-2.3.4.orig/Lib/distutils/sysconfig.py        2003-02-10 15:02:33.000000000 +0100
23 +++ Python-2.3.4/Lib/distutils/sysconfig.py     2004-09-10 08:44:08.196435115 +0200
24 @@ -99,8 +99,12 @@
25          prefix = plat_specific and EXEC_PREFIX or PREFIX
26  
27      if os.name == "posix":
28 -        libpython = os.path.join(prefix,
29 +        if plat_specific: 
30 +            libpython = os.path.join(prefix,
31                                   "lib", "python" + get_python_version())
32 +        else:
33 +            libpython = os.path.join(prefix,
34 +                                 "share", "python" + get_python_version())
35          if standard_lib:
36              return libpython
37          else:
38 diff -dur Python-2.3.4.orig/Makefile.pre.in Python-2.3.4/Makefile.pre.in
39 --- Python-2.3.4.orig/Makefile.pre.in   2003-11-18 20:54:00.000000000 +0100
40 +++ Python-2.3.4/Makefile.pre.in        2004-09-10 08:41:12.838021439 +0200
41 @@ -83,7 +83,7 @@
42  MANDIR=                @mandir@
43  INCLUDEDIR=    @includedir@
44  CONFINCLUDEDIR=        $(exec_prefix)/include
45 -SCRIPTDIR=     $(prefix)/lib
46 +SCRIPTDIR=     $(prefix)/share
47  
48  # Detailed destination directories
49  BINLIBDEST=    $(LIBDIR)/python$(VERSION)
50 diff -dur Python-2.3.4.orig/Modules/getpath.c Python-2.3.4/Modules/getpath.c
51 --- Python-2.3.4.orig/Modules/getpath.c 2002-12-31 13:45:12.000000000 +0100
52 +++ Python-2.3.4/Modules/getpath.c      2004-09-10 08:41:12.840021330 +0200
53 @@ -112,7 +112,7 @@
54  #endif
55  
56  #ifndef PYTHONPATH
57 -#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
58 +#define PYTHONPATH PREFIX "/share/python" VERSION ":" \
59                EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
60  #endif
61  
62 @@ -125,6 +125,7 @@
63  static char progpath[MAXPATHLEN+1];
64  static char *module_search_path = NULL;
65  static char lib_python[] = "lib/python" VERSION;
66 +static char share_python[] = "share/python" VERSION;
67  
68  static void
69  reduce(char *dir)
70 @@ -256,7 +257,7 @@
71          delim = strchr(prefix, DELIM);
72          if (delim)
73              *delim = '\0';
74 -        joinpath(prefix, lib_python);
75 +        joinpath(prefix, share_python);
76          joinpath(prefix, LANDMARK);
77          return 1;
78      }
79 @@ -279,7 +280,7 @@
80      copy_absolute(prefix, argv0_path);
81      do {
82          n = strlen(prefix);
83 -        joinpath(prefix, lib_python);
84 +        joinpath(prefix, share_python);
85          joinpath(prefix, LANDMARK);
86          if (ismodule(prefix))
87              return 1;
88 @@ -289,7 +290,7 @@
89  
90      /* Look at configure's PREFIX */
91      strncpy(prefix, PREFIX, MAXPATHLEN);
92 -    joinpath(prefix, lib_python);
93 +    joinpath(prefix, share_python);
94      joinpath(prefix, LANDMARK);
95      if (ismodule(prefix))
96          return 1;
97 @@ -479,7 +480,7 @@
98              fprintf(stderr,
99                  "Could not find platform independent libraries <prefix>\n");
100          strncpy(prefix, PREFIX, MAXPATHLEN);
101 -        joinpath(prefix, lib_python);
102 +        joinpath(prefix, share_python);
103      }
104      else
105          reduce(prefix);
106 --- Python-2.4a3/Lib/site.py~   2004-09-22 10:59:13.438619336 +0000
107 +++ Python-2.4a3/Lib/site.py    2004-09-22 11:01:46.976278064 +0000
108 @@ -182,7 +182,13 @@
109                                           "lib",
110                                           "python" + sys.version[:3],
111                                           "site-packages"),
112 -                            os.path.join(prefix, "lib", "site-python")]
113 +                           os.path.join(prefix, "lib", "site-python"),
114 +                           os.path.join(prefix,
115 +                                         "share",
116 +                                         "python" + sys.version[:3],
117 +                                         "site-packages"),
118 +                           os.path.join(prefix, "share", "site-python")]
119 +
120              else:
121                  sitedirs = [prefix, os.path.join(prefix, "lib", "site-packages")]
122              if sys.platform == 'darwin':
This page took 0.68455 seconds and 3 git commands to generate.