]> git.pld-linux.org Git - packages/python3.git/blobdiff - python3-noarch_to_datadir.patch
- rel 4; our Makefile is always in libdir
[packages/python3.git] / python3-noarch_to_datadir.patch
index 0198a306694eca3da10e2997b23149f4a641afc0..8520db69eca46acb93faa643fd427680f5bc7b20 100644 (file)
@@ -1,14 +1,14 @@
-diff -Nur Python-2.5.orig/Lib/distutils/command/install.py Python-2.5/Lib/distutils/command/install.py
---- Python-2.5.orig/Lib/distutils/command/install.py   2007-03-17 16:26:13.803357750 +0000
-+++ Python-2.5/Lib/distutils/command/install.py        2007-03-17 16:26:50.821671250 +0000
-@@ -40,14 +40,14 @@
+diff -dur Python-3.2.1.orig/Lib/distutils/command/install.py Python-3.2.1/Lib/distutils/command/install.py
+--- Python-3.2.1.orig/Lib/distutils/command/install.py 2011-07-15 20:16:35.526223992 +0200
++++ Python-3.2.1/Lib/distutils/command/install.py      2011-07-15 20:17:09.131071575 +0200
+@@ -48,14 +48,14 @@
  
  INSTALL_SCHEMES = {
      'unix_prefix': {
 -        'purelib': '$base/lib/python$py_version_short/site-packages',
 +        'purelib': '$base/share/python$py_version_short/site-packages',
          'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages',
-         'headers': '$base/include/python$py_version_short/$dist_name',
+         'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
          'scripts': '$base/bin',
          'data'   : '$base',
          },
@@ -18,10 +18,10 @@ diff -Nur Python-2.5.orig/Lib/distutils/command/install.py Python-2.5/Lib/distut
          'platlib': '$base/'+libname+'/python',
          'headers': '$base/include/python/$dist_name',
          'scripts': '$base/bin',
-diff -Nur Python-2.5.orig/Lib/distutils/sysconfig.py Python-2.5/Lib/distutils/sysconfig.py
---- Python-2.5.orig/Lib/distutils/sysconfig.py 2007-03-17 16:26:13.803357750 +0000
-+++ Python-2.5/Lib/distutils/sysconfig.py      2007-03-17 16:26:50.821671250 +0000
-@@ -99,12 +99,12 @@
+diff -dur Python-3.2.1.orig/Lib/distutils/sysconfig.py Python-3.2.1/Lib/distutils/sysconfig.py
+--- Python-3.2.1.orig/Lib/distutils/sysconfig.py       2011-07-15 20:16:35.526223992 +0200
++++ Python-3.2.1/Lib/distutils/sysconfig.py    2011-07-15 20:17:09.131071575 +0200
+@@ -124,12 +124,12 @@
          prefix = plat_specific and EXEC_PREFIX or PREFIX
  
      if os.name == "posix":
@@ -39,45 +39,81 @@ diff -Nur Python-2.5.orig/Lib/distutils/sysconfig.py Python-2.5/Lib/distutils/sy
          if standard_lib:
              return libpython
          else:
-diff -Nur Python-2.5.orig/Lib/site.py Python-2.5/Lib/site.py
---- Python-2.5.orig/Lib/site.py        2007-03-17 16:26:13.803357750 +0000
-+++ Python-2.5/Lib/site.py     2007-03-17 16:26:50.825671500 +0000
-@@ -185,13 +185,12 @@
-                                          sys.lib,
-                                          "python" + sys.version[:3],
-                                          "site-packages"),
--                            os.path.join(prefix, sys.lib, "site-python")]
--                if sys.lib != 'lib':
--                    sitedirs.append(os.path.join(prefix,
--                                                 'lib',
--                                                 "python" + sys.version[:3],
--                                                 "site-packages"))
--                    sitedirs.append(os.path.join(prefix, 'lib', "site-python"))
-+                            os.path.join(prefix, sys.lib, "site-python"),
-+                            os.path.join(prefix,
-+                                         "share",
-+                                         "python" + sys.version[:3],
-+                                         "site-packages"),
-+                            os.path.join(prefix, "share", "site-python")]
-             else:
-                 sitedirs = [prefix, os.path.join(prefix, sys.lib, "site-packages")]
-             if sys.platform == 'darwin':
-diff -Nur Python-2.5.orig/Makefile.pre.in Python-2.5/Makefile.pre.in
---- Python-2.5.orig/Makefile.pre.in    2007-03-17 16:26:13.807358000 +0000
-+++ Python-2.5/Makefile.pre.in 2007-03-17 16:26:50.821671250 +0000
-@@ -90,7 +90,7 @@
+diff -dur Python-3.2.1.orig/Lib/distutils/tests/test_install.py Python-3.2.1/Lib/distutils/tests/test_install.py
+--- Python-3.2.1.orig/Lib/distutils/tests/test_install.py      2011-07-15 20:16:35.529557475 +0200
++++ Python-3.2.1/Lib/distutils/tests/test_install.py   2011-07-15 20:17:09.131071575 +0200
+@@ -48,7 +48,7 @@
+             expected = os.path.normpath(expected)
+             self.assertEqual(got, expected)
+-        libdir = os.path.join(destination, "lib", "python")
++        libdir = os.path.join(destination, "share", "python")
+         platlibdir =  os.path.join(destination, sys.lib, "python")
+         check_path(cmd.install_lib, libdir)
+         check_path(cmd.install_platlib, platlibdir)
+diff -dur Python-3.2.1.orig/Lib/site.py Python-3.2.1/Lib/site.py
+--- Python-3.2.1.orig/Lib/site.py      2011-07-15 20:16:35.529557475 +0200
++++ Python-3.2.1/Lib/site.py   2011-07-15 20:17:09.134405059 +0200
+@@ -289,9 +289,8 @@
+                                         "python" + sys.version[:3],
+                                         "site-packages"))
+             sitepackages.append(os.path.join(prefix, sys.lib, "site-python"))
+-            if sys.lib != 'lib':
+-                sitepackages.append(os.path.join(prefix, "lib", "python" + sys.version[:3], "site-packages"))
+-                sitepackages.append(os.path.join(prefix, "lib", "site-python"))
++            sitepackages.append(os.path.join(prefix, "share", "python" + sys.version[:3], "site-packages"))
++            sitepackages.append(os.path.join(prefix, "share", "site-python"))
+         else:
+             sitepackages.append(prefix)
+             sitepackages.append(os.path.join(prefix, sys.lib, "site-packages"))
+diff -dur Python-3.2.1.orig/Lib/sysconfig.py Python-3.2.1/Lib/sysconfig.py
+--- Python-3.2.1.orig/Lib/sysconfig.py 2011-07-15 20:16:35.532890958 +0200
++++ Python-3.2.1/Lib/sysconfig.py      2011-07-15 20:18:27.267925241 +0200
+@@ -23,7 +23,7 @@
+     'posix_prefix': {
+         'stdlib': '{base}/' + sys.lib + '/python{py_version_short}',
+         'platstdlib': '{platbase}/' + sys.lib + '/python{py_version_short}',
+-        'purelib': '{base}/lib/python{py_version_short}/site-packages',
++        'purelib': '{base}/share/python{py_version_short}/site-packages',
+         'platlib': '{platbase}/' + sys.lib + '/python{py_version_short}/site-packages',
+         'include':
+             '{base}/include/python{py_version_short}{abiflags}',
+diff -dur Python-3.2.1.orig/Makefile.pre.in Python-3.2.1/Makefile.pre.in
+--- Python-3.2.1.orig/Makefile.pre.in  2011-07-15 20:16:35.532890958 +0200
++++ Python-3.2.1/Makefile.pre.in       2011-07-15 20:17:09.134405059 +0200
+@@ -108,7 +108,7 @@
  MANDIR=               @mandir@
  INCLUDEDIR=   @includedir@
  CONFINCLUDEDIR=       $(exec_prefix)/include
 -SCRIPTDIR=    $(prefix)/$(LIB)
 +SCRIPTDIR=    $(prefix)/share
+ ABIFLAGS=     @ABIFLAGS@
  
  # Detailed destination directories
- BINLIBDEST=   $(LIBDIR)/python$(VERSION)
-diff -Nur Python-2.5.orig/Modules/getpath.c Python-2.5/Modules/getpath.c
---- Python-2.5.orig/Modules/getpath.c  2007-03-17 16:26:13.807358000 +0000
-+++ Python-2.5/Modules/getpath.c       2007-03-17 16:26:50.825671500 +0000
-@@ -126,7 +126,8 @@
+@@ -1046,7 +1046,7 @@
+ # Install the library and miscellaneous stuff needed for extending/embedding
+ # This goes into $(exec_prefix)
+-LIBPL=                $(LIBDEST)/config-$(LDVERSION)
++LIBPL=                $(BINLIBDEST)/config-$(LDVERSION)
+ # pkgconfig directory
+ LIBPC=                $(LIBDIR)/pkgconfig
+@@ -1065,8 +1065,8 @@
+                       if test "$(SO)" = .dll; then \
+                               $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
+                       else \
+-                              $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
+-                              $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
++                              $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBDIR)/$(LIBRARY) ; \
++                              $(RANLIB) $(DESTDIR)$(LIBDIR)/$(LIBRARY) ; \
+                       fi; \
+               else \
+                       echo Skip install of $(LIBRARY) - use make frameworkinstall; \
+diff -dur Python-3.2.1.orig/Modules/getpath.c Python-3.2.1/Modules/getpath.c
+--- Python-3.2.1.orig/Modules/getpath.c        2011-07-15 20:16:35.536224442 +0200
++++ Python-3.2.1/Modules/getpath.c     2011-07-15 20:17:09.137738543 +0200
+@@ -131,7 +131,8 @@
  
  #ifndef PYTHONPATH
  #define PYTHONPATH PREFIX "/" LIB_PYTHON VERSION ":" \
@@ -87,57 +123,58 @@ diff -Nur Python-2.5.orig/Modules/getpath.c Python-2.5/Modules/getpath.c
  #endif
  
  #ifndef LANDMARK
-@@ -137,7 +138,8 @@
- static char exec_prefix[MAXPATHLEN+1];
- static char progpath[MAXPATHLEN+1];
- static char *module_search_path = NULL;
- static char lib_python[] = LIB_PYTHON VERSION;
-+static char share_python[] = "share/python" VERSION;
+@@ -143,7 +144,8 @@
+ static wchar_t progpath[MAXPATHLEN+1];
+ static wchar_t *module_search_path = NULL;
+ static int module_search_path_malloced = 0;
+-+static wchar_t *lib_python = LIB_PYTHON VERSION;
++static wchar_t *lib_python = LIB_PYTHON VERSION;
++static wchar_t share_python[] = L"share/python" VERSION;
  
  static void
- reduce(char *dir)
-@@ -275,7 +277,7 @@
-         delim = strchr(prefix, DELIM);
+ reduce(wchar_t *dir)
+@@ -284,7 +286,7 @@
+         delim = wcschr(prefix, DELIM);
          if (delim)
-             *delim = '\0';
+             *delim = L'\0';
 -        joinpath(prefix, lib_python);
 +        joinpath(prefix, share_python);
          joinpath(prefix, LANDMARK);
          return 1;
      }
-@@ -298,7 +300,7 @@
-     copy_absolute(prefix, argv0_path);
+@@ -310,7 +312,7 @@
+     copy_absolute(prefix, argv0_path, MAXPATHLEN+1);
      do {
-         n = strlen(prefix);
+         n = wcslen(prefix);
 -        joinpath(prefix, lib_python);
 +        joinpath(prefix, share_python);
          joinpath(prefix, LANDMARK);
          if (ismodule(prefix))
              return 1;
-@@ -308,7 +310,7 @@
+@@ -320,7 +322,7 @@
  
      /* Look at configure's PREFIX */
-     strncpy(prefix, PREFIX, MAXPATHLEN);
+     wcsncpy(prefix, _prefix, MAXPATHLEN);
 -    joinpath(prefix, lib_python);
 +    joinpath(prefix, share_python);
      joinpath(prefix, LANDMARK);
      if (ismodule(prefix))
          return 1;
-@@ -519,7 +521,7 @@
+@@ -578,7 +580,7 @@
              fprintf(stderr,
                  "Could not find platform independent libraries <prefix>\n");
-         strncpy(prefix, PREFIX, MAXPATHLEN);
+         wcsncpy(prefix, _prefix, MAXPATHLEN);
 -        joinpath(prefix, lib_python);
 +        joinpath(prefix, share_python);
      }
      else
          reduce(prefix);
-@@ -532,7 +534,7 @@
+@@ -591,7 +593,7 @@
      }
      else
-         strncpy(zip_path, PREFIX, MAXPATHLEN);
--    joinpath(zip_path, "lib/python00.zip");
+         wcsncpy(zip_path, _prefix, MAXPATHLEN);
+-    joinpath(zip_path, L"lib/python00.zip");
 +    joinpath(zip_path, LIB_PYTHON "00.zip");
-     bufsz = strlen(zip_path); /* Replace "00" with version */
+     bufsz = wcslen(zip_path);   /* Replace "00" with version */
      zip_path[bufsz - 6] = VERSION[0];
      zip_path[bufsz - 5] = VERSION[2];
This page took 0.066502 seconds and 4 git commands to generate.