summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/python/python3')
-rw-r--r--meta/recipes-devtools/python/python3/04-default-is-optimized.patch39
-rw-r--r--meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch29
-rw-r--r--meta/recipes-devtools/python/python3/avoid-ncursesw-include-path.patch30
-rw-r--r--meta/recipes-devtools/python/python3/python-3.3-multilib.patch180
4 files changed, 138 insertions, 140 deletions
diff --git a/meta/recipes-devtools/python/python3/04-default-is-optimized.patch b/meta/recipes-devtools/python/python3/04-default-is-optimized.patch
index d5afd40025..3b8f264a58 100644
--- a/meta/recipes-devtools/python/python3/04-default-is-optimized.patch
+++ b/meta/recipes-devtools/python/python3/04-default-is-optimized.patch
@@ -1,20 +1,21 @@
1Upstream-Status: Inappropriate [embedded specific] 1Upstream-Status: Inappropriate [embedded specific]
2 2
3Updated original patch for python 2.7.3
4
5Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
62012/05/01
7
8
9# when compiling for an embedded system, we need every bit of 3# when compiling for an embedded system, we need every bit of
10# performance we can get. default to optimized with the option 4# performance we can get. default to optimized with the option
11# of opt-out. 5# of opt-out.
12# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de> 6# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
13 7
14Index: Python-3.2.3/Python/compile.c 8
92012/05/01
10Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
11
12Rebased for 3.4.2 02/2015
13Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
14
15Index: Python-3.4.2/Python/compile.c
15=================================================================== 16===================================================================
16--- Python-3.2.3.orig/Python/compile.c 2012-04-10 23:54:08.000000000 -0700 17--- Python-3.4.2.orig/Python/compile.c
17+++ Python-3.2.3/Python/compile.c 2012-09-19 15:58:46.649123998 -0700 18+++ Python-3.4.2/Python/compile.c
18@@ -30,7 +30,7 @@ 19@@ -30,7 +30,7 @@
19 #include "symtable.h" 20 #include "symtable.h"
20 #include "opcode.h" 21 #include "opcode.h"
@@ -24,28 +25,28 @@ Index: Python-3.2.3/Python/compile.c
24 25
25 #define DEFAULT_BLOCK_SIZE 16 26 #define DEFAULT_BLOCK_SIZE 16
26 #define DEFAULT_BLOCKS 8 27 #define DEFAULT_BLOCKS 8
27Index: Python-3.2.3/Modules/main.c 28Index: Python-3.4.2/Modules/main.c
28=================================================================== 29===================================================================
29--- Python-3.2.3.orig/Modules/main.c 2012-04-10 23:54:07.000000000 -0700 30--- Python-3.4.2.orig/Modules/main.c
30+++ Python-3.2.3/Modules/main.c 2012-09-19 16:00:32.153124053 -0700 31+++ Python-3.4.2/Modules/main.c
31@@ -46,7 +46,7 @@ 32@@ -38,7 +38,7 @@ static wchar_t **orig_argv;
32 static int orig_argc; 33 static int orig_argc;
33 34
34 /* command line options */ 35 /* command line options */
35-#define BASE_OPTS L"bBc:dEhiJm:OqRsStuvVW:xX:?" 36-#define BASE_OPTS L"bBc:dEhiIJm:OqRsStuvVW:xX:?"
36+#define BASE_OPTS L"bBc:dEhiJm:NOqRsStuvVW:xX:?" 37+#define BASE_OPTS L"bBc:dEhiIJm:NOqRsStuvVW:xX:?"
37 38
38 #define PROGRAM_OPTS BASE_OPTS 39 #define PROGRAM_OPTS BASE_OPTS
39 40
40@@ -71,6 +71,7 @@ 41@@ -64,6 +64,7 @@ static char *usage_2 = "\
41 -m mod : run library module as a script (terminates option list)\n\ 42 -m mod : run library module as a script (terminates option list)\n\
42 -O : optimize generated bytecode slightly; also PYTHONOPTIMIZE=x\n\ 43 -O : optimize generated bytecode slightly; also PYTHONOPTIMIZE=x\n\
43 -OO : remove doc-strings in addition to the -O optimizations\n\ 44 -OO : remove doc-strings in addition to the -O optimizations\n\
44+-N : do NOT optimize generated bytecode\n\ 45+-N : do NOT optimize generated bytecode\n\
45 -q : don't print version and copyright messages on interactive startup\n\ 46 -q : don't print version and copyright messages on interactive startup\n\
46 -R : use a pseudo-random salt to make hash() values of various types be\n\ 47 -s : don't add user site directory to sys.path; also PYTHONNOUSERSITE\n\
47 unpredictable between separate invocations of the interpreter, as\n\ 48 -S : don't imply 'import site' on initialization\n\
48@@ -407,8 +408,8 @@ 49@@ -418,8 +419,8 @@ Py_Main(int argc, wchar_t **argv)
49 50
50 /* case 'J': reserved for Jython */ 51 /* case 'J': reserved for Jython */
51 52
diff --git a/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch b/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch
index c5846a5af8..bf02df2025 100644
--- a/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch
+++ b/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch
@@ -1,15 +1,18 @@
1Upstream-Status: Inappropriate [embedded specific] 1Upstream-Status: Inappropriate [embedded specific]
2 2
302/2015 Rebased for Python 3.4.2
4
3# The proper prefix is inside our staging area. 5# The proper prefix is inside our staging area.
4# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de> 6# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
5# Signed-off-by: Phil Blundell <philb@gnu.org> 7# Signed-off-by: Phil Blundell <philb@gnu.org>
6# Signed-off-by: Khem Raj <raj.khem@gmail.com> 8# Signed-off-by: Khem Raj <raj.khem@gmail.com>
9# Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
7 10
8Index: Python-3.3.2/Lib/distutils/sysconfig.py 11Index: Python-3.4.2/Lib/distutils/sysconfig.py
9=================================================================== 12===================================================================
10--- Python-3.3.2.orig/Lib/distutils/sysconfig.py 2013-07-30 00:00:52.769749805 -0700 13--- Python-3.4.2.orig/Lib/distutils/sysconfig.py
11+++ Python-3.3.2/Lib/distutils/sysconfig.py 2013-07-30 00:16:22.545767248 -0700 14+++ Python-3.4.2/Lib/distutils/sysconfig.py
12@@ -16,10 +16,11 @@ 15@@ -16,10 +16,11 @@ import sys
13 from .errors import DistutilsPlatformError 16 from .errors import DistutilsPlatformError
14 17
15 # These are needed in a couple of spots, so just compute them once. 18 # These are needed in a couple of spots, so just compute them once.
@@ -25,7 +28,7 @@ Index: Python-3.3.2/Lib/distutils/sysconfig.py
25 28
26 # Path to the base directory of the project. On Windows the binary may 29 # Path to the base directory of the project. On Windows the binary may
27 # live in project/PCBuild9. If we're dealing with an x64 Windows build, 30 # live in project/PCBuild9. If we're dealing with an x64 Windows build,
28@@ -93,7 +94,9 @@ 31@@ -93,7 +94,9 @@ def get_python_inc(plat_specific=0, pref
29 If 'prefix' is supplied, use it instead of sys.base_prefix or 32 If 'prefix' is supplied, use it instead of sys.base_prefix or
30 sys.base_exec_prefix -- i.e., ignore 'plat_specific'. 33 sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
31 """ 34 """
@@ -36,7 +39,7 @@ Index: Python-3.3.2/Lib/distutils/sysconfig.py
36 prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX 39 prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
37 if os.name == "posix": 40 if os.name == "posix":
38 if python_build: 41 if python_build:
39@@ -136,6 +139,12 @@ 42@@ -134,6 +137,12 @@ def get_python_lib(plat_specific=0, stan
40 If 'prefix' is supplied, use it instead of sys.base_prefix or 43 If 'prefix' is supplied, use it instead of sys.base_prefix or
41 sys.base_exec_prefix -- i.e., ignore 'plat_specific'. 44 sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
42 """ 45 """
@@ -49,7 +52,7 @@ Index: Python-3.3.2/Lib/distutils/sysconfig.py
49 if prefix is None: 52 if prefix is None:
50 if standard_lib: 53 if standard_lib:
51 prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX 54 prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
52@@ -144,7 +153,7 @@ 55@@ -142,7 +151,7 @@ def get_python_lib(plat_specific=0, stan
53 56
54 if os.name == "posix": 57 if os.name == "posix":
55 libpython = os.path.join(prefix, 58 libpython = os.path.join(prefix,
@@ -58,16 +61,16 @@ Index: Python-3.3.2/Lib/distutils/sysconfig.py
58 if standard_lib: 61 if standard_lib:
59 return libpython 62 return libpython
60 else: 63 else:
61@@ -249,7 +258,7 @@ 64@@ -242,7 +251,7 @@ def get_config_h_filename():
62 else: 65 else:
63 # The name of the config.h file changed in 2.2 66 inc_dir = get_python_inc(plat_specific=1)
64 config_h = 'pyconfig.h' 67
65- return os.path.join(inc_dir, config_h) 68- return os.path.join(inc_dir, 'pyconfig.h')
66+ return os.path.join(inc_dir, config_h).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") ) 69+ return os.path.join(inc_dir, 'pyconfig.h'.replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") ))
67 70
68 71
69 def get_makefile_filename(): 72 def get_makefile_filename():
70@@ -258,7 +267,7 @@ 73@@ -251,7 +260,7 @@ def get_makefile_filename():
71 return os.path.join(_sys_home or project_base, "Makefile") 74 return os.path.join(_sys_home or project_base, "Makefile")
72 lib_dir = get_python_lib(plat_specific=0, standard_lib=1) 75 lib_dir = get_python_lib(plat_specific=0, standard_lib=1)
73 config_file = 'config-{}{}'.format(get_python_version(), build_flags) 76 config_file = 'config-{}{}'.format(get_python_version(), build_flags)
diff --git a/meta/recipes-devtools/python/python3/avoid-ncursesw-include-path.patch b/meta/recipes-devtools/python/python3/avoid-ncursesw-include-path.patch
index 054a13124c..f29ae53371 100644
--- a/meta/recipes-devtools/python/python3/avoid-ncursesw-include-path.patch
+++ b/meta/recipes-devtools/python/python3/avoid-ncursesw-include-path.patch
@@ -1,29 +1,21 @@
1Upstream-Status: Pending
2
1We should make sure that sysroot is used by gcc instead of assuming 3We should make sure that sysroot is used by gcc instead of assuming
2hardcoded locations for include paths 4hardcoded locations for include paths
3 5
4Upstream-Status: Pending
5 6
6Signed-off-by: Khem Raj <raj.khem@gmail.com> 7Signed-off-by: Khem Raj <raj.khem@gmail.com>
7: 8
8Index: Python-3.3.3/configure.ac 9Index: Python-3.4.2/configure.ac
9=================================================================== 10===================================================================
10--- Python-3.3.3.orig/configure.ac 2014-01-29 19:00:15.245312752 -0800 11--- Python-3.4.2.orig/configure.ac
11+++ Python-3.3.3/configure.ac 2014-01-29 23:27:22.938526262 -0800 12+++ Python-3.4.2/configure.ac
12@@ -1548,7 +1548,7 @@ 13@@ -4434,7 +4434,7 @@ fi
13 # checks for header files
14 AC_HEADER_STDC
15 ac_save_cppflags="$CPPFLAGS"
16-CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
17+CPPFLAGS="$CPPFLAGS -I=/usr/include/ncursesw"
18 AC_CHECK_HEADERS(asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
19 fcntl.h grp.h \
20 ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
21@@ -4308,7 +4308,7 @@
22 fi
23 14
15 # first curses header check
24 ac_save_cppflags="$CPPFLAGS" 16 ac_save_cppflags="$CPPFLAGS"
25-CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw" 17-CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
26+CPPFLAGS="$CPPFLAGS -I=/usr/include/ncursesw" 18+CPPFLAGS="$CPPFLAGS -I=/usr/include/ncursesw"
27 # On HP/UX 11.0, mvwdelch is a block with a return statement 19
28 AC_MSG_CHECKING(whether mvwdelch is an expression) 20 AC_CHECK_HEADERS(curses.h ncurses.h)
29 AC_CACHE_VAL(ac_cv_mvwdelch_is_expression, 21
diff --git a/meta/recipes-devtools/python/python3/python-3.3-multilib.patch b/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
index 7d66a0e00d..b3e986089e 100644
--- a/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
+++ b/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
@@ -1,14 +1,17 @@
1Upstream-Status: Pending
2
1get the sys.lib from python itself and do not use hardcoded value of 'lib' 3get the sys.lib from python itself and do not use hardcoded value of 'lib'
2 4
3-Khem 502/2015 Rebased for 3.4.2
4 6
5Upstream-Status: Pending 7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
6 9
7Index: Python-3.3.2/Include/pythonrun.h 10Index: Python-3.4.2/Include/pythonrun.h
8=================================================================== 11===================================================================
9--- Python-3.3.2.orig/Include/pythonrun.h 2013-05-15 09:32:54.000000000 -0700 12--- Python-3.4.2.orig/Include/pythonrun.h
10+++ Python-3.3.2/Include/pythonrun.h 2013-07-27 16:19:54.099877246 -0700 13+++ Python-3.4.2/Include/pythonrun.h
11@@ -181,6 +181,8 @@ 14@@ -220,6 +220,8 @@ int _Py_CheckPython3();
12 /* In their own files */ 15 /* In their own files */
13 PyAPI_FUNC(const char *) Py_GetVersion(void); 16 PyAPI_FUNC(const char *) Py_GetVersion(void);
14 PyAPI_FUNC(const char *) Py_GetPlatform(void); 17 PyAPI_FUNC(const char *) Py_GetPlatform(void);
@@ -17,20 +20,20 @@ Index: Python-3.3.2/Include/pythonrun.h
17 PyAPI_FUNC(const char *) Py_GetCopyright(void); 20 PyAPI_FUNC(const char *) Py_GetCopyright(void);
18 PyAPI_FUNC(const char *) Py_GetCompiler(void); 21 PyAPI_FUNC(const char *) Py_GetCompiler(void);
19 PyAPI_FUNC(const char *) Py_GetBuildInfo(void); 22 PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
20Index: Python-3.3.2/Lib/distutils/command/install.py 23Index: Python-3.4.2/Lib/distutils/command/install.py
21=================================================================== 24===================================================================
22--- Python-3.3.2.orig/Lib/distutils/command/install.py 2013-05-15 09:32:54.000000000 -0700 25--- Python-3.4.2.orig/Lib/distutils/command/install.py
23+++ Python-3.3.2/Lib/distutils/command/install.py 2013-07-27 16:19:54.099877246 -0700 26+++ Python-3.4.2/Lib/distutils/command/install.py
24@@ -25,6 +25,8 @@ 27@@ -19,6 +19,8 @@ from site import USER_BASE
25 from site import USER_SITE 28 from site import USER_SITE
26 HAS_USER_SITE = True 29 HAS_USER_SITE = True
27 30
28+libname = sys.lib 31+libname = sys.lib
29+ 32+
30 if sys.version < "2.2": 33 WINDOWS_SCHEME = {
31 WINDOWS_SCHEME = { 34 'purelib': '$base/Lib/site-packages',
32 'purelib': '$base', 35 'platlib': '$base/Lib/site-packages',
33@@ -45,7 +47,7 @@ 36@@ -30,7 +32,7 @@ WINDOWS_SCHEME = {
34 INSTALL_SCHEMES = { 37 INSTALL_SCHEMES = {
35 'unix_prefix': { 38 'unix_prefix': {
36 'purelib': '$base/lib/python$py_version_short/site-packages', 39 'purelib': '$base/lib/python$py_version_short/site-packages',
@@ -39,11 +42,11 @@ Index: Python-3.3.2/Lib/distutils/command/install.py
39 'headers': '$base/include/python$py_version_short$abiflags/$dist_name', 42 'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
40 'scripts': '$base/bin', 43 'scripts': '$base/bin',
41 'data' : '$base', 44 'data' : '$base',
42Index: Python-3.3.2/Lib/pydoc.py 45Index: Python-3.4.2/Lib/pydoc.py
43=================================================================== 46===================================================================
44--- Python-3.3.2.orig/Lib/pydoc.py 2013-05-15 09:32:55.000000000 -0700 47--- Python-3.4.2.orig/Lib/pydoc.py
45+++ Python-3.3.2/Lib/pydoc.py 2013-07-27 16:19:54.103877246 -0700 48+++ Python-3.4.2/Lib/pydoc.py
46@@ -372,7 +372,7 @@ 49@@ -394,7 +394,7 @@ class Doc:
47 50
48 docloc = os.environ.get("PYTHONDOCS", self.PYTHONDOCS) 51 docloc = os.environ.get("PYTHONDOCS", self.PYTHONDOCS)
49 52
@@ -52,38 +55,11 @@ Index: Python-3.3.2/Lib/pydoc.py
52 "python%d.%d" % sys.version_info[:2]) 55 "python%d.%d" % sys.version_info[:2])
53 if (isinstance(object, type(os)) and 56 if (isinstance(object, type(os)) and
54 (object.__name__ in ('errno', 'exceptions', 'gc', 'imp', 57 (object.__name__ in ('errno', 'exceptions', 'gc', 'imp',
55Index: Python-3.3.2/Lib/site.py 58Index: Python-3.4.2/Lib/trace.py
56===================================================================
57--- Python-3.3.2.orig/Lib/site.py 2013-05-15 09:32:55.000000000 -0700
58+++ Python-3.3.2/Lib/site.py 2013-07-27 16:19:54.103877246 -0700
59@@ -303,13 +303,19 @@
60 if sys.platform in ('os2emx', 'riscos'):
61 sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
62 elif os.sep == '/':
63- sitepackages.append(os.path.join(prefix, "lib",
64+ sitepackages.append(os.path.join(prefix, sys.lib,
65 "python" + sys.version[:3],
66 "site-packages"))
67- sitepackages.append(os.path.join(prefix, "lib", "site-python"))
68+ if sys.lib != "lib":
69+ sitepackages.append(os.path.join(prefix, "lib",
70+ "python" + sys.version[:3],
71+ "site-packages"))
72+ sitepackages.append(os.path.join(prefix, sys.lib, "site-python"))
73+ if sys.lib != "lib":
74+ sitepackages.append(os.path.join(prefix, "lib", "site-python"))
75 else:
76 sitepackages.append(prefix)
77- sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
78+ sitepackages.append(os.path.join(prefix, sys.lib, "site-packages"))
79 if sys.platform == "darwin":
80 # for framework builds *only* we add the standard Apple
81 # locations.
82Index: Python-3.3.2/Lib/trace.py
83=================================================================== 59===================================================================
84--- Python-3.3.2.orig/Lib/trace.py 2013-05-15 09:32:56.000000000 -0700 60--- Python-3.4.2.orig/Lib/trace.py
85+++ Python-3.3.2/Lib/trace.py 2013-07-27 16:19:54.103877246 -0700 61+++ Python-3.4.2/Lib/trace.py
86@@ -751,10 +751,10 @@ 62@@ -751,10 +751,10 @@ def main(argv=None):
87 # should I also call expanduser? (after all, could use $HOME) 63 # should I also call expanduser? (after all, could use $HOME)
88 64
89 s = s.replace("$prefix", 65 s = s.replace("$prefix",
@@ -96,11 +72,11 @@ Index: Python-3.3.2/Lib/trace.py
96 "python" + sys.version[:3])) 72 "python" + sys.version[:3]))
97 s = os.path.normpath(s) 73 s = os.path.normpath(s)
98 ignore_dirs.append(s) 74 ignore_dirs.append(s)
99Index: Python-3.3.2/Makefile.pre.in 75Index: Python-3.4.2/Makefile.pre.in
100=================================================================== 76===================================================================
101--- Python-3.3.2.orig/Makefile.pre.in 2013-07-27 16:19:16.000000000 -0700 77--- Python-3.4.2.orig/Makefile.pre.in
102+++ Python-3.3.2/Makefile.pre.in 2013-07-27 16:19:54.103877246 -0700 78+++ Python-3.4.2/Makefile.pre.in
103@@ -96,6 +96,8 @@ 79@@ -101,6 +101,8 @@ PY_CORE_CFLAGS= $(PY_CFLAGS) $(PY_CFLAGS
104 80
105 # Machine-dependent subdirectories 81 # Machine-dependent subdirectories
106 MACHDEP= @MACHDEP@ 82 MACHDEP= @MACHDEP@
@@ -109,7 +85,7 @@ Index: Python-3.3.2/Makefile.pre.in
109 85
110 # Multiarch directory (may be empty) 86 # Multiarch directory (may be empty)
111 MULTIARCH= @MULTIARCH@ 87 MULTIARCH= @MULTIARCH@
112@@ -115,7 +117,7 @@ 88@@ -120,7 +122,7 @@ LIBDIR= @libdir@
113 MANDIR= @mandir@ 89 MANDIR= @mandir@
114 INCLUDEDIR= @includedir@ 90 INCLUDEDIR= @includedir@
115 CONFINCLUDEDIR= $(exec_prefix)/include 91 CONFINCLUDEDIR= $(exec_prefix)/include
@@ -118,7 +94,7 @@ Index: Python-3.3.2/Makefile.pre.in
118 ABIFLAGS= @ABIFLAGS@ 94 ABIFLAGS= @ABIFLAGS@
119 95
120 # Detailed destination directories 96 # Detailed destination directories
121@@ -635,6 +637,7 @@ 97@@ -712,6 +714,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
122 -DEXEC_PREFIX='"$(exec_prefix)"' \ 98 -DEXEC_PREFIX='"$(exec_prefix)"' \
123 -DVERSION='"$(VERSION)"' \ 99 -DVERSION='"$(VERSION)"' \
124 -DVPATH='"$(VPATH)"' \ 100 -DVPATH='"$(VPATH)"' \
@@ -126,7 +102,7 @@ Index: Python-3.3.2/Makefile.pre.in
126 -o $@ $(srcdir)/Modules/getpath.c 102 -o $@ $(srcdir)/Modules/getpath.c
127 103
128 Modules/python.o: $(srcdir)/Modules/python.c 104 Modules/python.o: $(srcdir)/Modules/python.c
129@@ -701,7 +704,7 @@ 105@@ -780,7 +783,7 @@ $(AST_C): $(AST_H) $(AST_ASDL) $(ASDLGEN
130 Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H) 106 Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
131 107
132 Python/getplatform.o: $(srcdir)/Python/getplatform.c 108 Python/getplatform.o: $(srcdir)/Python/getplatform.c
@@ -135,11 +111,11 @@ Index: Python-3.3.2/Makefile.pre.in
135 111
136 Python/importdl.o: $(srcdir)/Python/importdl.c 112 Python/importdl.o: $(srcdir)/Python/importdl.c
137 $(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c 113 $(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
138Index: Python-3.3.2/Modules/getpath.c 114Index: Python-3.4.2/Modules/getpath.c
139=================================================================== 115===================================================================
140--- Python-3.3.2.orig/Modules/getpath.c 2013-05-15 09:32:59.000000000 -0700 116--- Python-3.4.2.orig/Modules/getpath.c
141+++ Python-3.3.2/Modules/getpath.c 2013-07-27 16:19:54.107877246 -0700 117+++ Python-3.4.2/Modules/getpath.c
142@@ -121,9 +121,11 @@ 118@@ -117,9 +117,11 @@
143 #define EXEC_PREFIX PREFIX 119 #define EXEC_PREFIX PREFIX
144 #endif 120 #endif
145 121
@@ -153,20 +129,19 @@ Index: Python-3.3.2/Modules/getpath.c
153 #endif 129 #endif
154 130
155 #ifndef LANDMARK 131 #ifndef LANDMARK
156@@ -135,7 +137,7 @@ 132@@ -130,6 +132,7 @@ static wchar_t prefix[MAXPATHLEN+1];
133 static wchar_t exec_prefix[MAXPATHLEN+1];
157 static wchar_t progpath[MAXPATHLEN+1]; 134 static wchar_t progpath[MAXPATHLEN+1];
158 static wchar_t *module_search_path = NULL; 135 static wchar_t *module_search_path = NULL;
159 static int module_search_path_malloced = 0;
160-static wchar_t *lib_python = L"lib/python" VERSION;
161+static wchar_t *lib_python = L"" LIB_PYTHON; 136+static wchar_t *lib_python = L"" LIB_PYTHON;
162 137
163 static void 138 static void
164 reduce(wchar_t *dir) 139 reduce(wchar_t *dir)
165Index: Python-3.3.2/Python/getplatform.c 140Index: Python-3.4.2/Python/getplatform.c
166=================================================================== 141===================================================================
167--- Python-3.3.2.orig/Python/getplatform.c 2013-05-15 09:33:00.000000000 -0700 142--- Python-3.4.2.orig/Python/getplatform.c
168+++ Python-3.3.2/Python/getplatform.c 2013-07-27 16:19:54.107877246 -0700 143+++ Python-3.4.2/Python/getplatform.c
169@@ -10,3 +10,23 @@ 144@@ -10,3 +10,23 @@ Py_GetPlatform(void)
170 { 145 {
171 return PLATFORM; 146 return PLATFORM;
172 } 147 }
@@ -190,11 +165,11 @@ Index: Python-3.3.2/Python/getplatform.c
190+{ 165+{
191+ return LIB; 166+ return LIB;
192+} 167+}
193Index: Python-3.3.2/Python/sysmodule.c 168Index: Python-3.4.2/Python/sysmodule.c
194=================================================================== 169===================================================================
195--- Python-3.3.2.orig/Python/sysmodule.c 2013-05-15 09:33:00.000000000 -0700 170--- Python-3.4.2.orig/Python/sysmodule.c
196+++ Python-3.3.2/Python/sysmodule.c 2013-07-27 16:19:54.107877246 -0700 171+++ Python-3.4.2/Python/sysmodule.c
197@@ -1612,6 +1612,10 @@ 172@@ -1697,6 +1697,10 @@ _PySys_Init(void)
198 PyUnicode_FromString(Py_GetCopyright())); 173 PyUnicode_FromString(Py_GetCopyright()));
199 SET_SYS_FROM_STRING("platform", 174 SET_SYS_FROM_STRING("platform",
200 PyUnicode_FromString(Py_GetPlatform())); 175 PyUnicode_FromString(Py_GetPlatform()));
@@ -205,11 +180,11 @@ Index: Python-3.3.2/Python/sysmodule.c
205 SET_SYS_FROM_STRING("executable", 180 SET_SYS_FROM_STRING("executable",
206 PyUnicode_FromWideChar( 181 PyUnicode_FromWideChar(
207 Py_GetProgramFullPath(), -1)); 182 Py_GetProgramFullPath(), -1));
208Index: Python-3.3.2/setup.py 183Index: Python-3.4.2/setup.py
209=================================================================== 184===================================================================
210--- Python-3.3.2.orig/setup.py 2013-07-27 16:19:17.000000000 -0700 185--- Python-3.4.2.orig/setup.py
211+++ Python-3.3.2/setup.py 2013-07-27 16:19:54.107877246 -0700 186+++ Python-3.4.2/setup.py
212@@ -439,7 +439,7 @@ 187@@ -454,7 +454,7 @@ class PyBuildExt(build_ext):
213 # directories (i.e. '.' and 'Include') must be first. See issue 188 # directories (i.e. '.' and 'Include') must be first. See issue
214 # 10520. 189 # 10520.
215 if not cross_compiling: 190 if not cross_compiling:
@@ -218,7 +193,7 @@ Index: Python-3.3.2/setup.py
218 add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') 193 add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
219 # only change this for cross builds for 3.3, issues on Mageia 194 # only change this for cross builds for 3.3, issues on Mageia
220 if cross_compiling: 195 if cross_compiling:
221@@ -497,8 +497,7 @@ 196@@ -512,8 +512,7 @@ class PyBuildExt(build_ext):
222 # be assumed that no additional -I,-L directives are needed. 197 # be assumed that no additional -I,-L directives are needed.
223 if not cross_compiling: 198 if not cross_compiling:
224 lib_dirs = self.compiler.library_dirs + [ 199 lib_dirs = self.compiler.library_dirs + [
@@ -228,7 +203,7 @@ Index: Python-3.3.2/setup.py
228 ] 203 ]
229 inc_dirs = self.compiler.include_dirs + ['/usr/include'] 204 inc_dirs = self.compiler.include_dirs + ['/usr/include']
230 else: 205 else:
231@@ -675,11 +674,11 @@ 206@@ -696,11 +695,11 @@ class PyBuildExt(build_ext):
232 elif curses_library: 207 elif curses_library:
233 readline_libs.append(curses_library) 208 readline_libs.append(curses_library)
234 elif self.compiler.find_library_file(lib_dirs + 209 elif self.compiler.find_library_file(lib_dirs +
@@ -242,11 +217,11 @@ Index: Python-3.3.2/setup.py
242 extra_link_args=readline_extra_link_args, 217 extra_link_args=readline_extra_link_args,
243 libraries=readline_libs) ) 218 libraries=readline_libs) )
244 else: 219 else:
245Index: Python-3.3.2/Lib/sysconfig.py 220Index: Python-3.4.2/Lib/sysconfig.py
246=================================================================== 221===================================================================
247--- Python-3.3.2.orig/Lib/sysconfig.py 2013-05-15 09:32:55.000000000 -0700 222--- Python-3.4.2.orig/Lib/sysconfig.py
248+++ Python-3.3.2/Lib/sysconfig.py 2013-07-27 16:19:54.111877246 -0700 223+++ Python-3.4.2/Lib/sysconfig.py
249@@ -21,10 +21,10 @@ 224@@ -20,10 +20,10 @@ __all__ = [
250 225
251 _INSTALL_SCHEMES = { 226 _INSTALL_SCHEMES = {
252 'posix_prefix': { 227 'posix_prefix': {
@@ -260,7 +235,7 @@ Index: Python-3.3.2/Lib/sysconfig.py
260 'include': 235 'include':
261 '{installed_base}/include/python{py_version_short}{abiflags}', 236 '{installed_base}/include/python{py_version_short}{abiflags}',
262 'platinclude': 237 'platinclude':
263@@ -33,10 +33,10 @@ 238@@ -32,10 +32,10 @@ _INSTALL_SCHEMES = {
264 'data': '{base}', 239 'data': '{base}',
265 }, 240 },
266 'posix_home': { 241 'posix_home': {
@@ -274,7 +249,7 @@ Index: Python-3.3.2/Lib/sysconfig.py
274 'include': '{installed_base}/include/python', 249 'include': '{installed_base}/include/python',
275 'platinclude': '{installed_base}/include/python', 250 'platinclude': '{installed_base}/include/python',
276 'scripts': '{base}/bin', 251 'scripts': '{base}/bin',
277@@ -81,10 +81,10 @@ 252@@ -61,10 +61,10 @@ _INSTALL_SCHEMES = {
278 'data': '{userbase}', 253 'data': '{userbase}',
279 }, 254 },
280 'posix_user': { 255 'posix_user': {
@@ -288,11 +263,11 @@ Index: Python-3.3.2/Lib/sysconfig.py
288 'include': '{userbase}/include/python{py_version_short}', 263 'include': '{userbase}/include/python{py_version_short}',
289 'scripts': '{userbase}/bin', 264 'scripts': '{userbase}/bin',
290 'data': '{userbase}', 265 'data': '{userbase}',
291Index: Python-3.3.2/configure.ac 266Index: Python-3.4.2/configure.ac
292=================================================================== 267===================================================================
293--- Python-3.3.2.orig/configure.ac 2013-05-15 09:33:00.000000000 -0700 268--- Python-3.4.2.orig/configure.ac
294+++ Python-3.3.2/configure.ac 2013-07-27 16:19:54.111877246 -0700 269+++ Python-3.4.2/configure.ac
295@@ -769,6 +769,41 @@ 270@@ -791,6 +791,41 @@ esac
296 MULTIARCH=$($CC --print-multiarch 2>/dev/null) 271 MULTIARCH=$($CC --print-multiarch 2>/dev/null)
297 AC_SUBST(MULTIARCH) 272 AC_SUBST(MULTIARCH)
298 273
@@ -334,3 +309,30 @@ Index: Python-3.3.2/configure.ac
334 309
335 AC_SUBST(LIBRARY) 310 AC_SUBST(LIBRARY)
336 AC_MSG_CHECKING(LIBRARY) 311 AC_MSG_CHECKING(LIBRARY)
312Index: Python-3.4.2/Lib/site.py
313===================================================================
314--- Python-3.4.2.orig/Lib/site.py
315+++ Python-3.4.2/Lib/site.py
316@@ -304,13 +304,19 @@ def getsitepackages(prefixes=None):
317 seen.add(prefix)
318
319 if os.sep == '/':
320- sitepackages.append(os.path.join(prefix, "lib",
321+ sitepackages.append(os.path.join(prefix, sys.lib,
322 "python" + sys.version[:3],
323 "site-packages"))
324- sitepackages.append(os.path.join(prefix, "lib", "site-python"))
325+ if sys.lib != "lib":
326+ sitepackages.append(os.path.join(prefix, "lib",
327+ "python" + sys.version[:3],
328+ "site-packages"))
329+ sitepackages.append(os.path.join(prefix, sys.lib, "site-python"))
330+ if sys.lib != "lib":
331+ sitepackages.append(os.path.join(prefix, sys.lib, "site-python"))
332 else:
333 sitepackages.append(prefix)
334- sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
335+ sitepackages.append(os.path.join(prefix, sys.lib, "site-packages"))
336 if sys.platform == "darwin":
337 # for framework builds *only* we add the standard Apple
338 # locations.