]> git.pld-linux.org Git - packages/python3.git/blame - python3-noarch_to_datadir.patch
- s/%nil/%{nil}/
[packages/python3.git] / python3-noarch_to_datadir.patch
CommitLineData
e684db95
AM
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
4@@ -40,14 +40,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/$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',
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
24@@ -99,12 +99,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:
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
45@@ -185,13 +185,12 @@
46 sys.lib,
47 "python" + sys.version[:3],
48 "site-packages"),
49- os.path.join(prefix, sys.lib, "site-python")]
50- if sys.lib != 'lib':
51- sitedirs.append(os.path.join(prefix,
52- 'lib',
53- "python" + sys.version[:3],
54- "site-packages"))
55- sitedirs.append(os.path.join(prefix, 'lib', "site-python"))
56+ os.path.join(prefix, sys.lib, "site-python"),
57+ os.path.join(prefix,
58+ "share",
59+ "python" + sys.version[:3],
60+ "site-packages"),
61+ os.path.join(prefix, "share", "site-python")]
62 else:
63 sitedirs = [prefix, os.path.join(prefix, sys.lib, "site-packages")]
64 if sys.platform == 'darwin':
65diff -Nur Python-2.5.orig/Makefile.pre.in Python-2.5/Makefile.pre.in
66--- Python-2.5.orig/Makefile.pre.in 2007-03-17 16:26:13.807358000 +0000
67+++ Python-2.5/Makefile.pre.in 2007-03-17 16:26:50.821671250 +0000
68@@ -90,7 +90,7 @@
69 MANDIR= @mandir@
70 INCLUDEDIR= @includedir@
71 CONFINCLUDEDIR= $(exec_prefix)/include
72-SCRIPTDIR= $(prefix)/$(LIB)
73+SCRIPTDIR= $(prefix)/share
74
75 # Detailed destination directories
76 BINLIBDEST= $(LIBDIR)/python$(VERSION)
77diff -Nur Python-2.5.orig/Modules/getpath.c Python-2.5/Modules/getpath.c
78--- Python-2.5.orig/Modules/getpath.c 2007-03-17 16:26:13.807358000 +0000
79+++ Python-2.5/Modules/getpath.c 2007-03-17 16:26:50.825671500 +0000
80@@ -126,7 +126,8 @@
81
82 #ifndef PYTHONPATH
83 #define PYTHONPATH PREFIX "/" LIB_PYTHON VERSION ":" \
84- EXEC_PREFIX "/" LIB_PYTHON VERSION "/lib-dynload:"
85+ EXEC_PREFIX "/" LIB_PYTHON VERSION "/lib-dynload:" \
86+ PREFIX "/share/python" VERSION
87 #endif
88
89 #ifndef LANDMARK
90@@ -137,7 +138,8 @@
91 static char exec_prefix[MAXPATHLEN+1];
92 static char progpath[MAXPATHLEN+1];
93 static char *module_search_path = NULL;
94 static char lib_python[] = LIB_PYTHON VERSION;
95+static char share_python[] = "share/python" VERSION;
96
97 static void
98 reduce(char *dir)
99@@ -275,7 +277,7 @@
100 delim = strchr(prefix, DELIM);
101 if (delim)
102 *delim = '\0';
103- joinpath(prefix, lib_python);
104+ joinpath(prefix, share_python);
105 joinpath(prefix, LANDMARK);
106 return 1;
107 }
108@@ -298,7 +300,7 @@
109 copy_absolute(prefix, argv0_path);
110 do {
111 n = strlen(prefix);
112- joinpath(prefix, lib_python);
113+ joinpath(prefix, share_python);
114 joinpath(prefix, LANDMARK);
115 if (ismodule(prefix))
116 return 1;
117@@ -308,7 +310,7 @@
118
119 /* Look at configure's PREFIX */
120 strncpy(prefix, PREFIX, MAXPATHLEN);
121- joinpath(prefix, lib_python);
122+ joinpath(prefix, share_python);
123 joinpath(prefix, LANDMARK);
124 if (ismodule(prefix))
125 return 1;
126@@ -519,7 +521,7 @@
127 fprintf(stderr,
128 "Could not find platform independent libraries <prefix>\n");
129 strncpy(prefix, PREFIX, MAXPATHLEN);
130- joinpath(prefix, lib_python);
131+ joinpath(prefix, share_python);
132 }
133 else
134 reduce(prefix);
135@@ -532,7 +534,7 @@
136 }
137 else
138 strncpy(zip_path, PREFIX, MAXPATHLEN);
139- joinpath(zip_path, "lib/python00.zip");
140+ joinpath(zip_path, LIB_PYTHON "00.zip");
141 bufsz = strlen(zip_path); /* Replace "00" with version */
142 zip_path[bufsz - 6] = VERSION[0];
143 zip_path[bufsz - 5] = VERSION[2];
This page took 0.04011 seconds and 4 git commands to generate.