]> git.pld-linux.org Git - packages/python3.git/blob - python3-noarch_to_datadir.patch
Suggests: pip
[packages/python3.git] / python3-noarch_to_datadir.patch
1 diff -dur 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 20:16:35.526223992 +0200
3 +++ Python-3.2.1/Lib/distutils/command/install.py       2011-07-15 20:17:09.131071575 +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 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 20:16:35.526223992 +0200
23 +++ Python-3.2.1/Lib/distutils/sysconfig.py     2011-07-15 20:17:09.131071575 +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 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 20:16:35.529557475 +0200
44 +++ Python-3.2.1/Lib/distutils/tests/test_install.py    2011-07-15 20:17:09.131071575 +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 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 20:16:35.529557475 +0200
56 +++ Python-3.2.1/Lib/site.py    2011-07-15 20:17:09.134405059 +0200
57 @@ -289,8 +289,7 @@
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, "share", "python" + sys.version[:3], "site-packages"))
64          else:
65              sitepackages.append(prefix)
66              sitepackages.append(os.path.join(prefix, sys.lib, "site-packages"))
67 diff -dur Python-3.2.1.orig/Lib/sysconfig.py Python-3.2.1/Lib/sysconfig.py
68 --- Python-3.2.1.orig/Lib/sysconfig.py  2011-07-15 20:16:35.532890958 +0200
69 +++ Python-3.2.1/Lib/sysconfig.py       2011-07-15 20:18:27.267925241 +0200
70 @@ -23,7 +23,7 @@
71      'posix_prefix': {
72          'stdlib': '{base}/' + sys.lib + '/python{py_version_short}',
73          'platstdlib': '{platbase}/' + sys.lib + '/python{py_version_short}',
74 -        'purelib': '{base}/lib/python{py_version_short}/site-packages',
75 +        'purelib': '{base}/share/python{py_version_short}/site-packages',
76          'platlib': '{platbase}/' + sys.lib + '/python{py_version_short}/site-packages',
77          'include':
78              '{base}/include/python{py_version_short}{abiflags}',
79 --- Python-3.5.0/configure.ac~  2015-09-13 20:18:04.000000000 +0200
80 +++ Python-3.5.0/configure.ac   2015-09-13 20:21:35.887422670 +0200
81 @@ -4370,7 +4370,7 @@ AC_MSG_RESULT($LDVERSION)
82  
83  dnl define LIBPL after ABIFLAGS and LDVERSION is defined.
84  AC_SUBST(PY_ENABLE_SHARED)
85 -LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
86 +LIBPL='$(LIBDIR)/python'"${VERSION}/config-${LDVERSION}"
87  AC_SUBST(LIBPL)
88  
89  # Check whether right shifting a negative integer extends the sign bit
90 diff -dur Python-3.2.1.orig/Makefile.pre.in Python-3.2.1/Makefile.pre.in
91 --- Python-3.2.1.orig/Makefile.pre.in   2011-07-15 20:16:35.532890958 +0200
92 +++ Python-3.2.1/Makefile.pre.in        2011-07-15 20:17:09.134405059 +0200
93 @@ -108,7 +108,7 @@
94  MANDIR=                @mandir@
95  INCLUDEDIR=    @includedir@
96  CONFINCLUDEDIR=        $(exec_prefix)/include
97 -SCRIPTDIR=     $(prefix)/$(LIB)
98 +SCRIPTDIR=     $(prefix)/share
99  ABIFLAGS=      @ABIFLAGS@
100  
101  # Detailed destination directories
102 @@ -1065,8 +1065,8 @@
103                         if test "$(SO)" = .dll; then \
104                                 $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
105                         else \
106 -                               $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
107 -                               $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
108 +                               $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBDIR)/$(LIBRARY) ; \
109 +                               $(RANLIB) $(DESTDIR)$(LIBDIR)/$(LIBRARY) ; \
110                         fi; \
111                 else \
112                         echo Skip install of $(LIBRARY) - use make frameworkinstall; \
113 diff -dur Python-3.2.1.orig/Modules/getpath.c Python-3.2.1/Modules/getpath.c
114 --- Python-3.2.1.orig/Modules/getpath.c 2011-07-15 20:16:35.536224442 +0200
115 +++ Python-3.2.1/Modules/getpath.c      2011-07-15 20:17:09.137738543 +0200
116 @@ -131,7 +131,8 @@
117  
118  #ifndef PYTHONPATH
119  #define PYTHONPATH PREFIX "/" LIB_PYTHON VERSION ":" \
120 -              EXEC_PREFIX "/" LIB_PYTHON VERSION "/lib-dynload:"
121 +              EXEC_PREFIX "/" LIB_PYTHON VERSION "/lib-dynload:" \
122 +              PREFIX "/share/python" VERSION
123  #endif
124  
125  #ifndef LANDMARK
126 @@ -673,13 +674,13 @@ calculate_path(void)
127          }
128      }
129  
130 -    pfound = search_for_prefix(argv0_path, home, _prefix, lib_python);
131 +    pfound = search_for_prefix(argv0_path, home, _prefix, L"share/python" VERSION);
132      if (!pfound) {
133          if (!Py_FrozenFlag)
134              fprintf(stderr,
135                  "Could not find platform independent libraries <prefix>\n");
136          wcsncpy(prefix, _prefix, MAXPATHLEN);
137 -        joinpath(prefix, lib_python);
138 +        joinpath(prefix, L"share/python");
139      }
140      else
141          reduce(prefix);
142 @@ -691,7 +692,7 @@
143      }
144      else
145          wcsncpy(zip_path, _prefix, MAXPATHLEN);
146 -    joinpath(zip_path, L"lib/python00.zip");
147 +    joinpath(zip_path, L"" LIB_PYTHON "00.zip");
148      bufsz = wcslen(zip_path);   /* Replace "00" with version */
149      zip_path[bufsz - 6] = VERSION[0];
150      zip_path[bufsz - 5] = VERSION[2];
This page took 0.047132 seconds and 3 git commands to generate.