]> git.pld-linux.org Git - packages/python3.git/blob - python3-noarch_to_datadir.patch
- renamed from xxx30 to xxx3
[packages/python3.git] / python3-noarch_to_datadir.patch
1 --- Python-3.0.1/Modules/getpath.c.wiget        2009-02-25 10:58:09.000000000 +0100
2 +++ Python-3.0.1/Modules/getpath.c      2009-02-25 11:21:43.000000000 +0100
3 @@ -126,7 +126,8 @@
4  
5  #ifndef PYTHONPATH
6  #define PYTHONPATH PREFIX "/" LIB_PYTHON VERSION ":" \
7 -              EXEC_PREFIX "/" LIB_PYTHON VERSION "/lib-dynload:"
8 +              EXEC_PREFIX "/" LIB_PYTHON VERSION "/lib-dynload:" \
9 +              PREFIX "/share/python" VERSION
10  #endif
11  
12  #ifndef LANDMARK
13 @@ -138,6 +139,7 @@ static wchar_t exec_prefix[MAXPATHLEN+1]
14  static wchar_t progpath[MAXPATHLEN+1];
15  static wchar_t *module_search_path = NULL;
16  static wchar_t lib_python[] = LIB_PYTHON VERSION;
17 +static wchar_t share_python[] = L"share/python" VERSION;
18  
19  /* In principle, this should use HAVE__WSTAT, and _wstat
20     should be detected by autoconf. However, no current
21 @@ -338,7 +340,7 @@ search_for_prefix(wchar_t *argv0_path, w
22          delim = wcschr(prefix, DELIM);
23          if (delim)
24              *delim = L'\0';
25 -        joinpath(prefix, lib_python);
26 +        joinpath(prefix, share_python);
27          joinpath(prefix, LANDMARK);
28          return 1;
29      }
30 @@ -361,7 +363,7 @@ search_for_prefix(wchar_t *argv0_path, w
31      copy_absolute(prefix, argv0_path);
32      do {
33          n = wcslen(prefix);
34 -        joinpath(prefix, lib_python);
35 +        joinpath(prefix, share_python);
36          joinpath(prefix, LANDMARK);
37          if (ismodule(prefix))
38              return 1;
39 @@ -371,7 +373,7 @@ search_for_prefix(wchar_t *argv0_path, w
40  
41      /* Look at configure's PREFIX */
42      wcsncpy(prefix, L"" PREFIX, MAXPATHLEN);
43 -    joinpath(prefix, lib_python);
44 +    joinpath(prefix, share_python);
45      joinpath(prefix, LANDMARK);
46      if (ismodule(prefix))
47          return 1;
48 @@ -598,7 +600,7 @@ calculate_path(void)
49              fprintf(stderr,
50                  "Could not find platform independent libraries <prefix>\n");
51          wcsncpy(prefix, L"" PREFIX, MAXPATHLEN);
52 -        joinpath(prefix, lib_python);
53 +        joinpath(prefix, share_python);
54      }
55      else
56          reduce(prefix);
57 @@ -611,7 +613,7 @@ calculate_path(void)
58      }
59      else
60          wcsncpy(zip_path, L"" PREFIX, MAXPATHLEN);
61 -    joinpath(zip_path, L"lib/python00.zip");
62 +    joinpath(zip_path, LIB_PYTHON "00.zip");
63      bufsz = wcslen(zip_path);  /* Replace "00" with version */
64      zip_path[bufsz - 6] = VERSION[0];
65      zip_path[bufsz - 5] = VERSION[2];
66 --- Python-3.0.1/Lib/site.py.wiget      2009-02-25 10:58:09.000000000 +0100
67 +++ Python-3.0.1/Lib/site.py    2009-02-25 11:03:48.000000000 +0100
68 @@ -262,11 +262,10 @@ def addsitepackages(known_paths):
69                                          "python" + sys.version[:3],
70                                          "site-packages"))
71              sitedirs.append(os.path.join(prefix, sys.lib, "site-python"))
72 -            if sys.lib != 'lib':
73 -                sitedirs.append(os.path.join(prefix, 'lib',
74 -                                            "python" + sys.version[:3],
75 -                                            "site-packages"))
76 -                sitedirs.append(os.path.join(prefix, 'lib', "site-python"))
77 +            sitedirs.append(os.path.join(prefix, 'share',
78 +                                        "python" + sys.version[:3],
79 +                                        "site-packages"))
80 +            sitedirs.append(os.path.join(prefix, 'share', "site-python"))
81                 
82          else:
83              sitedirs.append(prefix)
84 --- Python-3.0.1/Lib/distutils/sysconfig.py.wiget       2009-02-25 10:58:09.000000000 +0100
85 +++ Python-3.0.1/Lib/distutils/sysconfig.py     2009-02-25 10:58:09.000000000 +0100
86 @@ -114,12 +114,12 @@ def get_python_lib(plat_specific=0, stan
87          prefix = plat_specific and EXEC_PREFIX or PREFIX
88  
89      if os.name == "posix":
90 -        if plat_specific:
91 -            lib = sys.lib
92 +        if plat_specific: 
93 +            libpython = os.path.join(prefix,
94 +                                 sys.lib, "python" + get_python_version())
95          else:
96 -            lib = 'lib'
97 -        libpython = os.path.join(prefix,
98 -                                 lib, "python" + get_python_version())
99 +            libpython = os.path.join(prefix,
100 +                                 "share", "python" + get_python_version())
101          if standard_lib:
102              return libpython
103          else:
104 --- Python-3.0.1/Lib/distutils/command/install.py.wiget 2009-02-25 10:58:09.000000000 +0100
105 +++ Python-3.0.1/Lib/distutils/command/install.py       2009-02-25 10:58:09.000000000 +0100
106 @@ -40,14 +40,14 @@ else:
107  
108  INSTALL_SCHEMES = {
109      'unix_prefix': {
110 -        'purelib': '$base/lib/python$py_version_short/site-packages',
111 +        'purelib': '$base/share/python$py_version_short/site-packages',
112          'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages',
113          'headers': '$base/include/python$py_version_short/$dist_name',
114          'scripts': '$base/bin',
115          'data'   : '$base',
116          },
117      'unix_home': {
118 -        'purelib': '$base/lib/python',
119 +        'purelib': '$base/share/python',
120          'platlib': '$base/'+libname+'/python',
121          'headers': '$base/include/python/$dist_name',
122          'scripts': '$base/bin',
123 --- Python-3.0.1/Makefile.pre.in.wiget  2009-02-25 10:58:09.000000000 +0100
124 +++ Python-3.0.1/Makefile.pre.in        2009-02-25 10:58:09.000000000 +0100
125 @@ -93,7 +93,7 @@ LIBDIR=               $(exec_prefix)/$(LIB)
126  MANDIR=                @mandir@
127  INCLUDEDIR=    @includedir@
128  CONFINCLUDEDIR=        $(exec_prefix)/include
129 -SCRIPTDIR=     $(prefix)/$(LIB)
130 +SCRIPTDIR=     $(prefix)/share
131  
132  # Detailed destination directories
133  BINLIBDEST=    $(LIBDIR)/python$(VERSION)
134 --- Python-3.0.1/Lib/distutils/tests/test_install.py.wig        2009-02-25 11:42:38.000000000 +0100
135 +++ Python-3.0.1/Lib/distutils/tests/test_install.py    2009-02-25 11:51:23.000000000 +0100
136 @@ -38,7 +38,7 @@ class InstallTestCase(support.TempdirMan
137              expected = os.path.normpath(expected)
138              self.assertEqual(got, expected)
139  
140 -        libdir = os.path.join(destination, "lib", "python")
141 +        libdir = os.path.join(destination, "share", "python")
142          platlibdir =  os.path.join(destination, sys.lib, "python")
143          check_path(cmd.install_lib, libdir)
144          check_path(cmd.install_platlib, platlibdir)
This page took 0.050845 seconds and 3 git commands to generate.