]> git.pld-linux.org Git - packages/python3.git/blob - python3-noarch_to_datadir.patch
- updated noarch_to_datadir patch to install config to arch-dependent dir and libpyth...
[packages/python3.git] / python3-noarch_to_datadir.patch
1 --- Python-3.2/Modules/getpath.c.orig   2011-04-02 08:25:12.289739787 +0200
2 +++ Python-3.2/Modules/getpath.c        2011-04-02 08:31:24.349729730 +0200
3 @@ -131,7 +131,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 @@ -143,6 +144,7 @@
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  static void
20  reduce(wchar_t *dir)
21 @@ -283,7 +285,7 @@
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 @@ -309,7 +311,7 @@
31      copy_absolute(prefix, argv0_path, MAXPATHLEN+1);
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 @@ -319,7 +321,7 @@
40  
41      /* Look at configure's PREFIX */
42      wcsncpy(prefix, _prefix, MAXPATHLEN);
43 -    joinpath(prefix, lib_python);
44 +    joinpath(prefix, share_python);
45      joinpath(prefix, LANDMARK);
46      if (ismodule(prefix))
47          return 1;
48 @@ -577,7 +579,7 @@
49              fprintf(stderr,
50                  "Could not find platform independent libraries <prefix>\n");
51          wcsncpy(prefix, _prefix, MAXPATHLEN);
52 -        joinpath(prefix, lib_python);
53 +        joinpath(prefix, share_python);
54      }
55      else
56          reduce(prefix);
57 @@ -590,7 +592,7 @@
58      }
59      else
60          wcsncpy(zip_path, _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.2/Lib/site.py.orig 2011-04-02 08:25:12.000000000 +0200
67 +++ Python-3.2/Lib/site.py      2011-04-02 08:32:32.061730568 +0200
68 @@ -289,9 +289,8 @@
69                                          "python" + sys.version[:3],
70                                          "site-packages"))
71              sitepackages.append(os.path.join(prefix, sys.lib, "site-python"))
72 -            if sys.lib != 'lib':
73 -                sitepackages.append(os.path.join(prefix, "lib", "python" + sys.version[:3], "site-packages"))
74 -                sitepackages.append(os.path.join(prefix, "lib", "site-python"))
75 +            sitepackages.append(os.path.join(prefix, "share", "python" + sys.version[:3], "site-packages"))
76 +            sitepackages.append(os.path.join(prefix, "share", "site-python"))
77          else:
78              sitepackages.append(prefix)
79              sitepackages.append(os.path.join(prefix, sys.lib, "site-packages"))
80 --- Python-3.0.1/Lib/distutils/sysconfig.py.wiget       2009-02-25 10:58:09.000000000 +0100
81 +++ Python-3.0.1/Lib/distutils/sysconfig.py     2009-02-25 10:58:09.000000000 +0100
82 @@ -114,12 +114,12 @@ def get_python_lib(plat_specific=0, stan
83          prefix = plat_specific and EXEC_PREFIX or PREFIX
84  
85      if os.name == "posix":
86 -        if plat_specific:
87 -            lib = sys.lib
88 +        if plat_specific: 
89 +            libpython = os.path.join(prefix,
90 +                                 sys.lib, "python" + get_python_version())
91          else:
92 -            lib = 'lib'
93 -        libpython = os.path.join(prefix,
94 -                                 lib, "python" + get_python_version())
95 +            libpython = os.path.join(prefix,
96 +                                 "share", "python" + get_python_version())
97          if standard_lib:
98              return libpython
99          else:
100 --- Python-3.2/Lib/distutils/command/install.py.orig    2011-04-02 08:25:12.000000000 +0200
101 +++ Python-3.2/Lib/distutils/command/install.py 2011-04-02 08:33:35.957734759 +0200
102 @@ -48,14 +48,14 @@
103  
104  INSTALL_SCHEMES = {
105      'unix_prefix': {
106 -        'purelib': '$base/lib/python$py_version_short/site-packages',
107 +        'purelib': '$base/share/python$py_version_short/site-packages',
108          'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages',
109          'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
110          'scripts': '$base/bin',
111          'data'   : '$base',
112          },
113      'unix_home': {
114 -        'purelib': '$base/lib/python',
115 +        'purelib': '$base/share/python',
116          'platlib': '$base/'+libname+'/python',
117          'headers': '$base/include/python/$dist_name',
118          'scripts': '$base/bin',
119 --- Python-3.2/Makefile.pre.in.orig     2011-04-02 08:25:12.000000000 +0200
120 +++ Python-3.2/Makefile.pre.in  2011-04-02 08:34:06.809736435 +0200
121 @@ -104,7 +104,7 @@
122  MANDIR=                @mandir@
123  INCLUDEDIR=    @includedir@
124  CONFINCLUDEDIR=        $(exec_prefix)/include
125 -SCRIPTDIR=     $(prefix)/$(LIB)
126 +SCRIPTDIR=     $(prefix)/share
127  ABIFLAGS=      @ABIFLAGS@
128  
129  # Detailed destination directories
130 @@ -1036,7 +1036,7 @@
131  
132  # Install the library and miscellaneous stuff needed for extending/embedding
133  # This goes into $(exec_prefix)
134 -LIBPL=         $(LIBDEST)/config-$(LDVERSION)
135 +LIBPL=         $(BINLIBDEST)/config-$(LDVERSION)
136  
137  # pkgconfig directory
138  LIBPC=         $(LIBDIR)/pkgconfig
139 @@ -1055,8 +1055,8 @@
140                         if test "$(SO)" = .dll; then \
141                                 $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
142                         else \
143 -                               $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
144 -                               $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
145 +                               $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBDIR)/$(LIBRARY) ; \
146 +                               $(RANLIB) $(DESTDIR)$(LIBDIR)/$(LIBRARY) ; \
147                         fi; \
148                 else \
149                         echo Skip install of $(LIBRARY) - use make frameworkinstall; \
150 --- Python-3.0.1/Lib/distutils/tests/test_install.py.wig        2009-02-25 11:42:38.000000000 +0100
151 +++ Python-3.0.1/Lib/distutils/tests/test_install.py    2009-02-25 11:51:23.000000000 +0100
152 @@ -38,7 +38,7 @@ class InstallTestCase(support.TempdirMan
153              expected = os.path.normpath(expected)
154              self.assertEqual(got, expected)
155  
156 -        libdir = os.path.join(destination, "lib", "python")
157 +        libdir = os.path.join(destination, "share", "python")
158          platlibdir =  os.path.join(destination, sys.lib, "python")
159          check_path(cmd.install_lib, libdir)
160          check_path(cmd.install_platlib, platlibdir)
This page took 0.034114 seconds and 3 git commands to generate.