]> git.pld-linux.org Git - packages/python3.git/blob - python3-noarch_to_datadir.patch
- patch paths fixed
[packages/python3.git] / python3-noarch_to_datadir.patch
1 diff -dur -x '*~' -x '*.orig' -x '*.rej' Python-3.2.1.orig/Lib/distutils/command/install.py Python-3.2.1/Lib/distutils/command/install.py
2 --- Python-3.2.1.orig/Lib/distutils/command/install.py  2011-07-15 13:44:25.000000000 +0200
3 +++ Python-3.2.1/Lib/distutils/command/install.py       2011-07-15 13:45:43.000000000 +0200
4 @@ -48,14 +48,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$abiflags/$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 -dur -x '*~' -x '*.orig' -x '*.rej' Python-3.2.1.orig/Lib/distutils/sysconfig.py Python-3.2.1/Lib/distutils/sysconfig.py
22 --- Python-3.2.1.orig/Lib/distutils/sysconfig.py        2011-07-15 13:44:25.000000000 +0200
23 +++ Python-3.2.1/Lib/distutils/sysconfig.py     2011-07-15 13:45:43.000000000 +0200
24 @@ -124,12 +124,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 -dur -x '*~' -x '*.orig' -x '*.rej' Python-3.2.1.orig/Lib/distutils/tests/test_install.py Python-3.2.1/Lib/distutils/tests/test_install.py
43 --- Python-3.2.1.orig/Lib/distutils/tests/test_install.py       2011-07-15 13:44:25.000000000 +0200
44 +++ Python-3.2.1/Lib/distutils/tests/test_install.py    2011-07-15 13:45:43.000000000 +0200
45 @@ -48,7 +48,7 @@
46              expected = os.path.normpath(expected)
47              self.assertEqual(got, expected)
48  
49 -        libdir = os.path.join(destination, "lib", "python")
50 +        libdir = os.path.join(destination, "share", "python")
51          platlibdir =  os.path.join(destination, sys.lib, "python")
52          check_path(cmd.install_lib, libdir)
53          check_path(cmd.install_platlib, platlibdir)
54 diff -dur -x '*~' -x '*.orig' -x '*.rej' Python-3.2.1.orig/Lib/site.py Python-3.2.1/Lib/site.py
55 --- Python-3.2.1.orig/Lib/site.py       2011-07-15 13:44:25.000000000 +0200
56 +++ Python-3.2.1/Lib/site.py    2011-07-15 13:45:43.000000000 +0200
57 @@ -289,9 +289,8 @@
58                                          "python" + sys.version[:3],
59                                          "site-packages"))
60              sitepackages.append(os.path.join(prefix, sys.lib, "site-python"))
61 -            if sys.lib != 'lib':
62 -                sitepackages.append(os.path.join(prefix, "lib", "python" + sys.version[:3], "site-packages"))
63 -                sitepackages.append(os.path.join(prefix, "lib", "site-python"))
64 +            sitepackages.append(os.path.join(prefix, "share", "python" + sys.version[:3], "site-packages"))
65 +            sitepackages.append(os.path.join(prefix, "share", "site-python"))
66          else:
67              sitepackages.append(prefix)
68              sitepackages.append(os.path.join(prefix, sys.lib, "site-packages"))
69 diff -dur -x '*~' -x '*.orig' -x '*.rej' Python-3.2.1.orig/Makefile.pre.in Python-3.2.1/Makefile.pre.in
70 --- Python-3.2.1.orig/Makefile.pre.in   2011-07-15 13:44:25.000000000 +0200
71 +++ Python-3.2.1/Makefile.pre.in        2011-07-15 13:45:43.000000000 +0200
72 @@ -108,7 +108,7 @@
73  MANDIR=                @mandir@
74  INCLUDEDIR=    @includedir@
75  CONFINCLUDEDIR=        $(exec_prefix)/include
76 -SCRIPTDIR=     $(prefix)/$(LIB)
77 +SCRIPTDIR=     $(prefix)/share
78  ABIFLAGS=      @ABIFLAGS@
79  
80  # Detailed destination directories
81 @@ -1046,7 +1046,7 @@
82  
83  # Install the library and miscellaneous stuff needed for extending/embedding
84  # This goes into $(exec_prefix)
85 -LIBPL=         $(LIBDEST)/config-$(LDVERSION)
86 +LIBPL=         $(BINLIBDEST)/config-$(LDVERSION)
87  
88  # pkgconfig directory
89  LIBPC=         $(LIBDIR)/pkgconfig
90 @@ -1065,8 +1065,8 @@
91                         if test "$(SO)" = .dll; then \
92                                 $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
93                         else \
94 -                               $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
95 -                               $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
96 +                               $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBDIR)/$(LIBRARY) ; \
97 +                               $(RANLIB) $(DESTDIR)$(LIBDIR)/$(LIBRARY) ; \
98                         fi; \
99                 else \
100                         echo Skip install of $(LIBRARY) - use make frameworkinstall; \
101 diff -dur -x '*~' -x '*.orig' -x '*.rej' Python-3.2.1.orig/Modules/getpath.c Python-3.2.1/Modules/getpath.c
102 --- Python-3.2.1.orig/Modules/getpath.c 2011-07-15 13:44:25.000000000 +0200
103 +++ Python-3.2.1/Modules/getpath.c      2011-07-15 13:47:22.000000000 +0200
104 @@ -131,7 +131,8 @@
105  
106  #ifndef PYTHONPATH
107  #define PYTHONPATH PREFIX "/" LIB_PYTHON VERSION ":" \
108 -              EXEC_PREFIX "/" LIB_PYTHON VERSION "/lib-dynload:"
109 +              EXEC_PREFIX "/" LIB_PYTHON VERSION "/lib-dynload:" \
110 +              PREFIX "/share/python" VERSION
111  #endif
112  
113  #ifndef LANDMARK
114 @@ -143,7 +144,8 @@
115  static wchar_t progpath[MAXPATHLEN+1];
116  static wchar_t *module_search_path = NULL;
117  static int module_search_path_malloced = 0;
118 -+static wchar_t *lib_python = LIB_PYTHON VERSION;
119 +static wchar_t *lib_python = LIB_PYTHON VERSION;
120 +static wchar_t share_python[] = L"share/python" VERSION;
121  
122  static void
123  reduce(wchar_t *dir)
124 @@ -284,7 +286,7 @@
125          delim = wcschr(prefix, DELIM);
126          if (delim)
127              *delim = L'\0';
128 -        joinpath(prefix, lib_python);
129 +        joinpath(prefix, share_python);
130          joinpath(prefix, LANDMARK);
131          return 1;
132      }
133 @@ -310,7 +312,7 @@
134      copy_absolute(prefix, argv0_path, MAXPATHLEN+1);
135      do {
136          n = wcslen(prefix);
137 -        joinpath(prefix, lib_python);
138 +        joinpath(prefix, share_python);
139          joinpath(prefix, LANDMARK);
140          if (ismodule(prefix))
141              return 1;
142 @@ -320,7 +322,7 @@
143  
144      /* Look at configure's PREFIX */
145      wcsncpy(prefix, _prefix, MAXPATHLEN);
146 -    joinpath(prefix, lib_python);
147 +    joinpath(prefix, share_python);
148      joinpath(prefix, LANDMARK);
149      if (ismodule(prefix))
150          return 1;
151 @@ -578,7 +580,7 @@
152              fprintf(stderr,
153                  "Could not find platform independent libraries <prefix>\n");
154          wcsncpy(prefix, _prefix, MAXPATHLEN);
155 -        joinpath(prefix, lib_python);
156 +        joinpath(prefix, share_python);
157      }
158      else
159          reduce(prefix);
160 @@ -591,7 +593,7 @@
161      }
162      else
163          wcsncpy(zip_path, _prefix, MAXPATHLEN);
164 -    joinpath(zip_path, L"lib/python00.zip");
165 +    joinpath(zip_path, LIB_PYTHON "00.zip");
166      bufsz = wcslen(zip_path);   /* Replace "00" with version */
167      zip_path[bufsz - 6] = VERSION[0];
168      zip_path[bufsz - 5] = VERSION[2];
This page took 0.10198 seconds and 3 git commands to generate.