]> git.pld-linux.org Git - packages/python.git/blame - python-noarch_to_datadir.patch
- up to 2.7.3; include py files
[packages/python.git] / python-noarch_to_datadir.patch
CommitLineData
5c3dbe28 1diff -Nur Python-2.5.orig/Lib/distutils/command/install.py Python-2.5/Lib/distutils/command/install.py
2--- Python-2.5.orig/Lib/distutils/command/install.py 2007-03-17 16:26:13.803357750 +0000
3+++ Python-2.5/Lib/distutils/command/install.py 2007-03-17 16:26:50.821671250 +0000
a7667dd8 4@@ -40,14 +40,14 @@
35445076
JK
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',
a7667dd8 10 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages',
35445076
JK
11 'headers': '$base/include/python$py_version_short/$dist_name',
12 'scripts': '$base/bin',
13 'data' : '$base',
14 },
15 'unix_home': {
16- 'purelib': '$base/lib/python',
17+ 'purelib': '$base/share/python',
a7667dd8 18 'platlib': '$base/'+libname+'/python',
35445076
JK
19 'headers': '$base/include/python/$dist_name',
20 'scripts': '$base/bin',
5c3dbe28 21diff -Nur Python-2.5.orig/Lib/distutils/sysconfig.py Python-2.5/Lib/distutils/sysconfig.py
22--- Python-2.5.orig/Lib/distutils/sysconfig.py 2007-03-17 16:26:13.803357750 +0000
23+++ Python-2.5/Lib/distutils/sysconfig.py 2007-03-17 16:26:50.821671250 +0000
a7667dd8 24@@ -99,12 +99,12 @@
806f921a
JK
25 prefix = plat_specific and EXEC_PREFIX or PREFIX
26
27 if os.name == "posix":
a7667dd8
ER
28- if plat_specific:
29- lib = sys.lib
02c5a01a 30+ if plat_specific:
806f921a 31+ libpython = os.path.join(prefix,
a7667dd8
ER
32+ sys.lib, "python" + get_python_version())
33 else:
34- lib = 'lib'
35- libpython = os.path.join(prefix,
36- lib, "python" + get_python_version())
806f921a
JK
37+ libpython = os.path.join(prefix,
38+ "share", "python" + get_python_version())
39 if standard_lib:
40 return libpython
41 else:
5c3dbe28 42diff -Nur Python-2.5.orig/Lib/site.py Python-2.5/Lib/site.py
43--- Python-2.5.orig/Lib/site.py 2007-03-17 16:26:13.803357750 +0000
44+++ Python-2.5/Lib/site.py 2007-03-17 16:26:50.825671500 +0000
c9c8df30
AM
45@@ -269,13 +269,10 @@
46 "python" + sys.version[:3],
47 "site-packages"))
21748cff 48 sitepackages.append(os.path.join(prefix, sys.lib, "site-python"))
c9c8df30 49- if sys.lib != 'lib':
21748cff 50- sitepackages.append(os.path.join(prefix,
c9c8df30
AM
51- 'lib',
52- "python" + sys.version[:3],
53- "site-packages"))
21748cff 54- sitepackages.append(os.path.join(prefix, 'lib', "site-python"))
c9c8df30 55-
21748cff 56+ sitepackages.append(os.path.join(prefix, "share",
c9c8df30
AM
57+ "python" + sys.version[:3],
58+ "site-packages"))
21748cff 59+ sitepackages.append(os.path.join(prefix, "share", "site-python"))
c9c8df30 60 else:
21748cff
AM
61 sitepackages.append(prefix)
62 sitepackages.append(os.path.join(prefix, sys.lib, "site-packages"))
5c3dbe28 63diff -Nur Python-2.5.orig/Makefile.pre.in Python-2.5/Makefile.pre.in
64--- Python-2.5.orig/Makefile.pre.in 2007-03-17 16:26:13.807358000 +0000
65+++ Python-2.5/Makefile.pre.in 2007-03-17 16:26:50.821671250 +0000
66@@ -90,7 +90,7 @@
5d2233b0
JK
67 MANDIR= @mandir@
68 INCLUDEDIR= @includedir@
69 CONFINCLUDEDIR= $(exec_prefix)/include
a7667dd8 70-SCRIPTDIR= $(prefix)/$(LIB)
5d2233b0
JK
71+SCRIPTDIR= $(prefix)/share
72
73 # Detailed destination directories
74 BINLIBDEST= $(LIBDIR)/python$(VERSION)
5c3dbe28 75diff -Nur Python-2.5.orig/Modules/getpath.c Python-2.5/Modules/getpath.c
76--- Python-2.5.orig/Modules/getpath.c 2007-03-17 16:26:13.807358000 +0000
77+++ Python-2.5/Modules/getpath.c 2007-03-17 16:26:50.825671500 +0000
b6ecd72f 78@@ -126,7 +126,8 @@
5d2233b0
JK
79
80 #ifndef PYTHONPATH
b6ecd72f 81 #define PYTHONPATH PREFIX "/" LIB_PYTHON VERSION ":" \
82- EXEC_PREFIX "/" LIB_PYTHON VERSION "/lib-dynload:"
5c3dbe28 83+ EXEC_PREFIX "/" LIB_PYTHON VERSION "/lib-dynload:" \
a7667dd8 84+ PREFIX "/share/python" VERSION
5d2233b0
JK
85 #endif
86
a7667dd8 87 #ifndef LANDMARK
5c3dbe28 88@@ -137,7 +138,8 @@
89 static char exec_prefix[MAXPATHLEN+1];
2db2a190
JK
90 static char progpath[MAXPATHLEN+1];
91 static char *module_search_path = NULL;
b6ecd72f 92 static char lib_python[] = LIB_PYTHON VERSION;
2db2a190
JK
93+static char share_python[] = "share/python" VERSION;
94
95 static void
96 reduce(char *dir)
5c3dbe28 97@@ -275,7 +277,7 @@
2db2a190
JK
98 delim = strchr(prefix, DELIM);
99 if (delim)
100 *delim = '\0';
101- joinpath(prefix, lib_python);
102+ joinpath(prefix, share_python);
103 joinpath(prefix, LANDMARK);
104 return 1;
105 }
5c3dbe28 106@@ -298,7 +300,7 @@
2db2a190
JK
107 copy_absolute(prefix, argv0_path);
108 do {
109 n = strlen(prefix);
110- joinpath(prefix, lib_python);
111+ joinpath(prefix, share_python);
112 joinpath(prefix, LANDMARK);
113 if (ismodule(prefix))
114 return 1;
5c3dbe28 115@@ -308,7 +310,7 @@
2db2a190
JK
116
117 /* Look at configure's PREFIX */
118 strncpy(prefix, PREFIX, MAXPATHLEN);
119- joinpath(prefix, lib_python);
120+ joinpath(prefix, share_python);
121 joinpath(prefix, LANDMARK);
122 if (ismodule(prefix))
123 return 1;
5c3dbe28 124@@ -519,7 +521,7 @@
2db2a190
JK
125 fprintf(stderr,
126 "Could not find platform independent libraries <prefix>\n");
127 strncpy(prefix, PREFIX, MAXPATHLEN);
128- joinpath(prefix, lib_python);
129+ joinpath(prefix, share_python);
130 }
131 else
132 reduce(prefix);
5c3dbe28 133@@ -532,7 +534,7 @@
a7667dd8
ER
134 }
135 else
136 strncpy(zip_path, PREFIX, MAXPATHLEN);
137- joinpath(zip_path, "lib/python00.zip");
138+ joinpath(zip_path, LIB_PYTHON "00.zip");
21748cff 139 bufsz = strlen(zip_path); /* Replace "00" with version */
a7667dd8
ER
140 zip_path[bufsz - 6] = VERSION[0];
141 zip_path[bufsz - 5] = VERSION[2];
317eb744
AM
142
143--- p/Lib/test/test_site.py~ 2012-05-10 18:02:09.000000000 +0200
144+++ p/Lib/test/test_site.py 2012-05-10 18:09:38.776569290 +0200
145@@ -241,7 +241,7 @@
146 self.assertEqual(dirs[2], wanted)
31ded88f 147 elif os.sep == '/':
317eb744 148 # OS X non-framwework builds, Linux, FreeBSD, etc
31ded88f 149- self.assertEqual(len(dirs), 2)
150+ self.assertEqual(len(dirs), 4)
151 wanted = os.path.join('xoxo', sys.lib, 'python' + sys.version[:3],
152 'site-packages')
153 self.assertEqual(dirs[0], wanted)
This page took 0.077526 seconds and 4 git commands to generate.