summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2020-01-17 14:16:32 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-19 13:24:38 +0000
commit2ed5d927ca9b88d3964ada990ef46cdd38ec4b1e (patch)
tree2110d3e9381867553c69ae5c743887e1caa97926 /meta/recipes-devtools
parent2b5cf2a067cb6d9ca32d851dacdc1aff0cbfe904 (diff)
downloadpoky-2ed5d927ca9b88d3964ada990ef46cdd38ec4b1e.tar.gz
python: remove Python 2 and all supporting classes
Python 2 ceased being maintained on the 1st January 2020. We've already removed all users of it from oe-core so the final step is to move the recipe and supporting classes to meta-python2. The following are removed in this commit: - python and python-native 2.7.17 - python-setuptools - The classes pythonnative, pythondir, distutils, setuptools (From OE-Core rev: 390f3edabfb1f68ed9766245291c5f44ea00cc38) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/python/python-native/0001-python-native-fix-one-do_populate_sysroot-warning.patch40
-rw-r--r--meta/recipes-devtools/python/python-native/10-distutils-fix-swig-parameter.patch18
-rw-r--r--meta/recipes-devtools/python/python-native/11-distutils-never-modify-shebang-line.patch20
-rw-r--r--meta/recipes-devtools/python/python-native/multilib.patch235
-rw-r--r--meta/recipes-devtools/python/python-native/nohostlibs.patch54
-rw-r--r--meta/recipes-devtools/python/python-native/revert_use_of_sysconfigdata.patch86
-rw-r--r--meta/recipes-devtools/python/python-native/unixccompiler.patch20
-rw-r--r--meta/recipes-devtools/python/python-native_2.7.17.bb90
-rw-r--r--meta/recipes-devtools/python/python-setuptools_42.0.2.bb9
-rw-r--r--meta/recipes-devtools/python/python/0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch51
-rw-r--r--meta/recipes-devtools/python/python/0001-python-Resolve-intermediate-staging-issues.patch59
-rw-r--r--meta/recipes-devtools/python/python/0001-python2-use-cc_basename-to-replace-CC-for-checking-c.patch114
-rw-r--r--meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch49
-rw-r--r--meta/recipes-devtools/python/python/03-fix-tkinter-detection.patch46
-rw-r--r--meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch27
-rw-r--r--meta/recipes-devtools/python/python/06-avoid_usr_lib_termcap_path_in_linking.patch35
-rw-r--r--meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch28
-rw-r--r--meta/recipes-devtools/python/python/add-md5module-support.patch18
-rw-r--r--meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch29
-rw-r--r--meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch23
-rw-r--r--meta/recipes-devtools/python/python/cgi_py.patch23
-rw-r--r--meta/recipes-devtools/python/python/check-if-target-is-64b-not-host.patch57
-rw-r--r--meta/recipes-devtools/python/python/create_manifest2.py298
-rw-r--r--meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch77
-rw-r--r--meta/recipes-devtools/python/python/float-endian.patch216
-rw-r--r--meta/recipes-devtools/python/python/get_module_deps2.py112
-rw-r--r--meta/recipes-devtools/python/python/host_include_contamination.patch28
-rw-r--r--meta/recipes-devtools/python/python/multilib.patch298
-rw-r--r--meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch19
-rw-r--r--meta/recipes-devtools/python/python/pass-missing-libraries-to-Extension-for-mul.patch82
-rw-r--r--meta/recipes-devtools/python/python/python-2.7.3-remove-bsdb-rpath.patch28
-rw-r--r--meta/recipes-devtools/python/python/python2-manifest.json1138
-rw-r--r--meta/recipes-devtools/python/python/run-ptest3
-rw-r--r--meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch35
-rw-r--r--meta/recipes-devtools/python/python/setup_py_skip_cross_import_check.patch27
-rw-r--r--meta/recipes-devtools/python/python/setuptweaks.patch57
-rw-r--r--meta/recipes-devtools/python/python/sitecustomize.py37
-rw-r--r--meta/recipes-devtools/python/python/support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch34
-rw-r--r--meta/recipes-devtools/python/python/use_sysroot_ncurses_instead_of_host.patch21
-rw-r--r--meta/recipes-devtools/python/python_2.7.17.bb260
40 files changed, 0 insertions, 3901 deletions
diff --git a/meta/recipes-devtools/python/python-native/0001-python-native-fix-one-do_populate_sysroot-warning.patch b/meta/recipes-devtools/python/python-native/0001-python-native-fix-one-do_populate_sysroot-warning.patch
deleted file mode 100644
index 707ee596fa..0000000000
--- a/meta/recipes-devtools/python/python-native/0001-python-native-fix-one-do_populate_sysroot-warning.patch
+++ /dev/null
@@ -1,40 +0,0 @@
1From 6cbb7529cf7ff0da3ca649fb3486facd9620d625 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Thu, 25 Oct 2018 07:32:14 +0000
4Subject: [PATCH] python-native: fix one do_populate_sysroot warning
5
6Fix below warning:
7WARNING: Skipping RPATH /usr/lib64 as is a standard search path for
8work/x86_64-linux/python-native/2.7.15-r1.1/recipe-sysroot-native/
9usr/lib/python2.7/lib-dynload/_bsddb.so
10
11setup.py will check db.h under include_dirs, for native build,
12/usr/lib64 will be insert to postion 0 of include_dirs, so
13it's priority is higher then our sysroot, cause db.h sysroot
14is ignored, and rpath set to /usr/lib64. and this cause warning
15when do_populate_sysroot. use append to fix it.
16
17Upstream-Status: Inappropriate [oe-specific]
18
19Signed-off-by: Changqing Li <changqing.li@windriver.com>
20
21---
22 setup.py | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
24
25diff --git a/setup.py b/setup.py
26index a2c8127..22f9e23 100644
27--- a/setup.py
28+++ b/setup.py
29@@ -47,7 +47,7 @@ def add_dir_to_list(dirlist, dir):
30 else:
31 dir_exists = os.path.isdir(dir)
32 if dir_exists:
33- dirlist.insert(0, dir)
34+ dirlist.append(dir)
35
36 MACOS_SDK_ROOT = None
37
38--
392.17.1
40
diff --git a/meta/recipes-devtools/python/python-native/10-distutils-fix-swig-parameter.patch b/meta/recipes-devtools/python/python-native/10-distutils-fix-swig-parameter.patch
deleted file mode 100644
index a39247ce70..0000000000
--- a/meta/recipes-devtools/python/python-native/10-distutils-fix-swig-parameter.patch
+++ /dev/null
@@ -1,18 +0,0 @@
1Upstream-Status: Pending
2
3# Some versions of SWIG do not use the extension parameter.
4# Make it optional.
5# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
6Index: Python-2.6.1/Lib/distutils/command/build_ext.py
7===================================================================
8--- Python-2.6.1.orig/Lib/distutils/command/build_ext.py
9+++ Python-2.6.1/Lib/distutils/command/build_ext.py
10@@ -566,7 +566,7 @@ class build_ext (Command):
11 target_lang=language)
12
13
14- def swig_sources (self, sources, extension):
15+ def swig_sources (self, sources, extension=None):
16
17 """Walk the list of source files in 'sources', looking for SWIG
18 interface (.i) files. Run SWIG on all that are found, and
diff --git a/meta/recipes-devtools/python/python-native/11-distutils-never-modify-shebang-line.patch b/meta/recipes-devtools/python/python-native/11-distutils-never-modify-shebang-line.patch
deleted file mode 100644
index c92469b9b6..0000000000
--- a/meta/recipes-devtools/python/python-native/11-distutils-never-modify-shebang-line.patch
+++ /dev/null
@@ -1,20 +0,0 @@
1Upstream-Status: Pending
2
3# Don't modify the she-bang line for a cross-build.
4# Otherwise it points to our hostpython (which we do not want)
5#
6# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
7
8Index: Python-2.6.1/Lib/distutils/command/build_scripts.py
9===================================================================
10--- Python-2.6.1.orig/Lib/distutils/command/build_scripts.py
11+++ Python-2.6.1/Lib/distutils/command/build_scripts.py
12@@ -87,7 +87,7 @@ class build_scripts (Command):
13 continue
14
15 match = first_line_re.match(first_line)
16- if match:
17+ if False: #match:
18 adjust = 1
19 post_interp = match.group(1) or ''
20
diff --git a/meta/recipes-devtools/python/python-native/multilib.patch b/meta/recipes-devtools/python/python-native/multilib.patch
deleted file mode 100644
index af0f173c6d..0000000000
--- a/meta/recipes-devtools/python/python-native/multilib.patch
+++ /dev/null
@@ -1,235 +0,0 @@
1Rebased for Python 2.7.9
2
3Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
4
52011/09/29
6The python recipe building was failing because python-native
7could not handle sys.lib var. sys.lib var is defined in the
8multilib patch hence added this multilib.patch for python-native
9recipe.
10
11Upstream-Status: Inappropriate [oe-specific]
12
13Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
14
15Index: Python-2.7.14/Include/pythonrun.h
16===================================================================
17--- Python-2.7.14.orig/Include/pythonrun.h
18+++ Python-2.7.14/Include/pythonrun.h
19@@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void);
20 /* In their own files */
21 PyAPI_FUNC(const char *) Py_GetVersion(void);
22 PyAPI_FUNC(const char *) Py_GetPlatform(void);
23+PyAPI_FUNC(const char *) Py_GetLib(void);
24 PyAPI_FUNC(const char *) Py_GetCopyright(void);
25 PyAPI_FUNC(const char *) Py_GetCompiler(void);
26 PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
27Index: Python-2.7.14/Lib/distutils/command/install.py
28===================================================================
29--- Python-2.7.14.orig/Lib/distutils/command/install.py
30+++ Python-2.7.14/Lib/distutils/command/install.py
31@@ -22,6 +22,8 @@ from site import USER_BASE
32 from site import USER_SITE
33
34
35+libname = sys.lib
36+
37 if sys.version < "2.2":
38 WINDOWS_SCHEME = {
39 'purelib': '$base',
40@@ -42,7 +44,7 @@ else:
41 INSTALL_SCHEMES = {
42 'unix_prefix': {
43 'purelib': '$base/lib/python$py_version_short/site-packages',
44- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
45+ 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages',
46 'headers': '$base/include/python$py_version_short/$dist_name',
47 'scripts': '$base/bin',
48 'data' : '$base',
49Index: Python-2.7.14/Lib/pydoc.py
50===================================================================
51--- Python-2.7.14.orig/Lib/pydoc.py
52+++ Python-2.7.14/Lib/pydoc.py
53@@ -375,7 +375,7 @@ class Doc:
54 docmodule = docclass = docroutine = docother = docproperty = docdata = fail
55
56 def getdocloc(self, object,
57- basedir=os.path.join(sys.exec_prefix, "lib",
58+ basedir=os.path.join(sys.exec_prefix, "sys.lib",
59 "python"+sys.version[0:3])):
60 """Return the location of module docs or None"""
61
62Index: Python-2.7.14/Lib/site.py
63===================================================================
64--- Python-2.7.14.orig/Lib/site.py
65+++ Python-2.7.14/Lib/site.py
66@@ -288,13 +288,19 @@ def getsitepackages():
67 if sys.platform in ('os2emx', 'riscos'):
68 sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
69 elif os.sep == '/':
70- sitepackages.append(os.path.join(prefix, "lib",
71+ sitepackages.append(os.path.join(prefix, sys.lib,
72 "python" + sys.version[:3],
73 "site-packages"))
74- sitepackages.append(os.path.join(prefix, "lib", "site-python"))
75+ if sys.lib != "lib":
76+ sitepackages.append(os.path.join(prefix, "lib",
77+ "python" + sys.version[:3],
78+ "site-packages"))
79+ sitepackages.append(os.path.join(prefix, sys.lib, "site-python"))
80+ if sys.lib != "lib":
81+ sitepackages.append(os.path.join(prefix, "lib", "site-python"))
82 else:
83 sitepackages.append(prefix)
84- sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
85+ sitepackages.append(os.path.join(prefix, sys.lib, "site-packages"))
86 return sitepackages
87
88 def addsitepackages(known_paths):
89Index: Python-2.7.14/Lib/test/test_dl.py
90===================================================================
91--- Python-2.7.14.orig/Lib/test/test_dl.py
92+++ Python-2.7.14/Lib/test/test_dl.py
93@@ -4,10 +4,11 @@
94 import unittest
95 from test.test_support import verbose, import_module
96 dl = import_module('dl', deprecated=True)
97+import sys
98
99 sharedlibs = [
100- ('/usr/lib/libc.so', 'getpid'),
101- ('/lib/libc.so.6', 'getpid'),
102+ ('/usr/'+sys.lib+'/libc.so', 'getpid'),
103+ ('/'+sys.lib+'/libc.so.6', 'getpid'),
104 ('/usr/bin/cygwin1.dll', 'getpid'),
105 ('/usr/lib/libc.dylib', 'getpid'),
106 ]
107Index: Python-2.7.14/Lib/trace.py
108===================================================================
109--- Python-2.7.14.orig/Lib/trace.py
110+++ Python-2.7.14/Lib/trace.py
111@@ -754,10 +754,10 @@ def main(argv=None):
112 # should I also call expanduser? (after all, could use $HOME)
113
114 s = s.replace("$prefix",
115- os.path.join(sys.prefix, "lib",
116+ os.path.join(sys.prefix, sys.lib,
117 "python" + sys.version[:3]))
118 s = s.replace("$exec_prefix",
119- os.path.join(sys.exec_prefix, "lib",
120+ os.path.join(sys.exec_prefix, sys.lib,
121 "python" + sys.version[:3]))
122 s = os.path.normpath(s)
123 ignore_dirs.append(s)
124Index: Python-2.7.14/Makefile.pre.in
125===================================================================
126--- Python-2.7.14.orig/Makefile.pre.in
127+++ Python-2.7.14/Makefile.pre.in
128@@ -91,6 +91,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG
129
130 # Machine-dependent subdirectories
131 MACHDEP= @MACHDEP@
132+LIB= @LIB@
133
134 # Multiarch directory (may be empty)
135 MULTIARCH= @MULTIARCH@
136@@ -110,7 +111,7 @@ LIBDIR= @libdir@
137 MANDIR= @mandir@
138 INCLUDEDIR= @includedir@
139 CONFINCLUDEDIR= $(exec_prefix)/include
140-SCRIPTDIR= $(prefix)/lib
141+SCRIPTDIR= $(prefix)/@LIB@
142
143 # Detailed destination directories
144 BINLIBDEST= $(LIBDIR)/python$(VERSION)
145@@ -644,6 +645,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
146 -DEXEC_PREFIX='"$(exec_prefix)"' \
147 -DVERSION='"$(VERSION)"' \
148 -DVPATH='"$(VPATH)"' \
149+ -DLIB='"$(LIB)"' \
150 -o $@ $(srcdir)/Modules/getpath.c
151
152 Modules/python.o: $(srcdir)/Modules/python.c
153@@ -692,7 +694,7 @@ regen-ast:
154 Python/compile.o Python/symtable.o Python/ast.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h
155
156 Python/getplatform.o: $(srcdir)/Python/getplatform.c
157- $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
158+ $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -DLIB='"$(LIB)"' -o $@ $(srcdir)/Python/getplatform.c
159
160 Python/importdl.o: $(srcdir)/Python/importdl.c
161 $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
162Index: Python-2.7.14/Modules/getpath.c
163===================================================================
164--- Python-2.7.14.orig/Modules/getpath.c
165+++ Python-2.7.14/Modules/getpath.c
166@@ -100,6 +100,13 @@
167 #error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined"
168 #endif
169
170+#define LIB_PYTHON LIB "/python" VERSION
171+
172+#ifndef PYTHONPATH
173+#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \
174+ EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload"
175+#endif
176+
177 #ifndef LANDMARK
178 #define LANDMARK "os.py"
179 #endif
180@@ -108,7 +115,7 @@ static char prefix[MAXPATHLEN+1];
181 static char exec_prefix[MAXPATHLEN+1];
182 static char progpath[MAXPATHLEN+1];
183 static char *module_search_path = NULL;
184-static char lib_python[] = "lib/python" VERSION;
185+static char lib_python[] = LIB_PYTHON;
186
187 static void
188 reduce(char *dir)
189Index: Python-2.7.14/Python/getplatform.c
190===================================================================
191--- Python-2.7.14.orig/Python/getplatform.c
192+++ Python-2.7.14/Python/getplatform.c
193@@ -10,3 +10,13 @@ Py_GetPlatform(void)
194 {
195 return PLATFORM;
196 }
197+
198+#ifndef LIB
199+#define LIB "lib"
200+#endif
201+
202+const char *
203+Py_GetLib(void)
204+{
205+ return LIB;
206+}
207Index: Python-2.7.14/Python/sysmodule.c
208===================================================================
209--- Python-2.7.14.orig/Python/sysmodule.c
210+++ Python-2.7.14/Python/sysmodule.c
211@@ -1437,6 +1437,8 @@ _PySys_Init(void)
212 PyString_FromString(Py_GetCopyright()));
213 SET_SYS_FROM_STRING("platform",
214 PyString_FromString(Py_GetPlatform()));
215+ SET_SYS_FROM_STRING("lib",
216+ PyString_FromString(Py_GetLib()));
217 SET_SYS_FROM_STRING("executable",
218 PyString_FromString(Py_GetProgramFullPath()));
219 SET_SYS_FROM_STRING("prefix",
220Index: Python-2.7.14/configure.ac
221===================================================================
222--- Python-2.7.14.orig/configure.ac
223+++ Python-2.7.14/configure.ac
224@@ -758,6 +758,11 @@ SunOS*)
225 ;;
226 esac
227
228+AC_SUBST(LIB)
229+AC_MSG_CHECKING(LIB)
230+LIB=`basename ${libdir}`
231+AC_MSG_RESULT($LIB)
232+
233
234 AC_SUBST(LIBRARY)
235 AC_MSG_CHECKING(LIBRARY)
diff --git a/meta/recipes-devtools/python/python-native/nohostlibs.patch b/meta/recipes-devtools/python/python-native/nohostlibs.patch
deleted file mode 100644
index 078060b49e..0000000000
--- a/meta/recipes-devtools/python/python-native/nohostlibs.patch
+++ /dev/null
@@ -1,54 +0,0 @@
1Upstream-Status: Inappropriate [embedded specific]
2
32014/12/15
4Rebased for python-2.7.9
5Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
6Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
7
8Index: Python-2.7.9/setup.py
9===================================================================
10--- Python-2.7.9.orig/setup.py
11+++ Python-2.7.9/setup.py
12@@ -439,9 +439,9 @@ class PyBuildExt(build_ext):
13
14 def detect_modules(self):
15 # Ensure that /usr/local is always used
16- if not cross_compiling:
17- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
18- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
19+ # if not cross_compiling:
20+ # add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
21+ # add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
22 if cross_compiling:
23 self.add_gcc_paths()
24 self.add_multiarch_paths()
25@@ -480,15 +480,15 @@ class PyBuildExt(build_ext):
26 for directory in reversed(options.dirs):
27 add_dir_to_list(dir_list, directory)
28
29- if os.path.normpath(sys.prefix) != '/usr' \
30- and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
31+ #if os.path.normpath(sys.prefix) != '/usr' \
32+ #and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
33 # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
34 # (PYTHONFRAMEWORK is set) to avoid # linking problems when
35 # building a framework with different architectures than
36 # the one that is currently installed (issue #7473)
37- add_dir_to_list(self.compiler.library_dirs,
38+ add_dir_to_list(self.compiler.library_dirs,
39 sysconfig.get_config_var("LIBDIR"))
40- add_dir_to_list(self.compiler.include_dirs,
41+ add_dir_to_list(self.compiler.include_dirs,
42 sysconfig.get_config_var("INCLUDEDIR"))
43
44 try:
45@@ -761,8 +761,7 @@ class PyBuildExt(build_ext):
46 pass # Issue 7384: Already linked against curses or tinfo.
47 elif curses_library:
48 readline_libs.append(curses_library)
49- elif self.compiler.find_library_file(lib_dirs +
50- ['/usr/lib/termcap'],
51+ elif self.compiler.find_library_file(lib_dirs,
52 'termcap'):
53 readline_libs.append('termcap')
54 exts.append( Extension('readline', ['readline.c'],
diff --git a/meta/recipes-devtools/python/python-native/revert_use_of_sysconfigdata.patch b/meta/recipes-devtools/python/python-native/revert_use_of_sysconfigdata.patch
deleted file mode 100644
index 202aaf1069..0000000000
--- a/meta/recipes-devtools/python/python-native/revert_use_of_sysconfigdata.patch
+++ /dev/null
@@ -1,86 +0,0 @@
1On older versions of Python, sysconfig read the data from both the Makefile and
2the Python.h file generated at build time, created dictionaries with their variables
3and used those when using get_config_var(), now it uses _sysconfigdata.build_time_vars[]
4which contains information from the HOST, erroneous in our case, this patch reverts this
5behavior and uses Python.h and Makefile to get information.
6
7Upstream-Status: Inappropriate [oe-specific]
8
9Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
10
11Index: Python-2.7.9/Lib/distutils/sysconfig.py
12===================================================================
13--- Python-2.7.9.orig/Lib/distutils/sysconfig.py
14+++ Python-2.7.9/Lib/distutils/sysconfig.py
15@@ -401,12 +401,66 @@ _config_vars = None
16
17 def _init_posix():
18 """Initialize the module as appropriate for POSIX systems."""
19- # _sysconfigdata is generated at build time, see the sysconfig module
20- from _sysconfigdata import build_time_vars
21- global _config_vars
22- _config_vars = {}
23- _config_vars.update(build_time_vars)
24+ g = {}
25+ # load the installed Makefile:
26+ try:
27+ filename = get_makefile_filename()
28+ parse_makefile(filename, g)
29+ except IOError, msg:
30+ my_msg = "invalid Python installation: unable to open %s" % filename
31+ if hasattr(msg, "strerror"):
32+ my_msg = my_msg + " (%s)" % msg.strerror
33+
34+ raise DistutilsPlatformError(my_msg)
35+
36+ # load the installed pyconfig.h:
37+ try:
38+ filename = get_config_h_filename()
39+ parse_config_h(file(filename), g)
40+ except IOError, msg:
41+ my_msg = "invalid Python installation: unable to open %s" % filename
42+ if hasattr(msg, "strerror"):
43+ my_msg = my_msg + " (%s)" % msg.strerror
44+
45+ raise DistutilsPlatformError(my_msg)
46+
47+ # On AIX, there are wrong paths to the linker scripts in the Makefile
48+ # -- these paths are relative to the Python source, but when installed
49+ # the scripts are in another directory.
50+ if python_build:
51+ g['LDSHARED'] = g['BLDSHARED']
52
53+ elif get_python_version() < '2.1':
54+ # The following two branches are for 1.5.2 compatibility.
55+ if sys.platform == 'aix4': # what about AIX 3.x ?
56+ # Linker script is in the config directory, not in Modules as the
57+ # Makefile says.
58+ python_lib = get_python_lib(standard_lib=1)
59+ ld_so_aix = os.path.join(python_lib, 'config', 'ld_so_aix')
60+ python_exp = os.path.join(python_lib, 'config', 'python.exp')
61+
62+ g['LDSHARED'] = "%s %s -bI:%s" % (ld_so_aix, g['CC'], python_exp)
63+
64+ elif sys.platform == 'beos':
65+ # Linker script is in the config directory. In the Makefile it is
66+ # relative to the srcdir, which after installation no longer makes
67+ # sense.
68+ python_lib = get_python_lib(standard_lib=1)
69+ linkerscript_path = string.split(g['LDSHARED'])[0]
70+ linkerscript_name = os.path.basename(linkerscript_path)
71+ linkerscript = os.path.join(python_lib, 'config',
72+ linkerscript_name)
73+
74+ # XXX this isn't the right place to do this: adding the Python
75+ # library to the link, if needed, should be in the "build_ext"
76+ # command. (It's also needed for non-MS compilers on Windows, and
77+ # it's taken care of for them by the 'build_ext.get_libraries()'
78+ # method.)
79+ g['LDSHARED'] = ("%s -L%s/lib -lpython%s" %
80+ (linkerscript, PREFIX, get_python_version()))
81+
82+ global _config_vars
83+ _config_vars = g
84
85 def _init_nt():
86 """Initialize the module as appropriate for NT"""
diff --git a/meta/recipes-devtools/python/python-native/unixccompiler.patch b/meta/recipes-devtools/python/python-native/unixccompiler.patch
deleted file mode 100644
index 4502829129..0000000000
--- a/meta/recipes-devtools/python/python-native/unixccompiler.patch
+++ /dev/null
@@ -1,20 +0,0 @@
1Upstream-Status: Pending
2
3The CC variable,sometimes like:"x86_64-poky-linux-gcc -m64 --sysroot=/${TMPDIR}/sysroots/qemux86-64", contains option information.
4This will lead to wrong compiler name "qemux86-64" rather than "x86_64-poky-linux-gcc" when python finding the compiler name.
5
6Signed-off-by: Mei Lei <lei.mei@intel.com>
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8Index: Python-2.7.2/Lib/distutils/unixccompiler.py
9===================================================================
10--- Python-2.7.2.orig/Lib/distutils/unixccompiler.py 2011-11-24 13:51:10.539998722 -0800
11+++ Python-2.7.2/Lib/distutils/unixccompiler.py 2011-11-24 15:54:36.872137766 -0800
12@@ -282,7 +282,7 @@
13 # this time, there's no way to determine this information from
14 # the configuration data stored in the Python installation, so
15 # we use this hack.
16- compiler = os.path.basename(sysconfig.get_config_var("CC"))
17+ compiler = sysconfig.get_config_var("CC")
18 if sys.platform[:6] == "darwin":
19 # MacOSX's linker doesn't understand the -R flag at all
20 return "-L" + dir
diff --git a/meta/recipes-devtools/python/python-native_2.7.17.bb b/meta/recipes-devtools/python/python-native_2.7.17.bb
deleted file mode 100644
index 72aa34c234..0000000000
--- a/meta/recipes-devtools/python/python-native_2.7.17.bb
+++ /dev/null
@@ -1,90 +0,0 @@
1require python.inc
2EXTRANATIVEPATH += "bzip2-native"
3DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native expat-native gdbm-native db-native"
4
5SRC_URI += "\
6 file://05-enable-ctypes-cross-build.patch \
7 file://10-distutils-fix-swig-parameter.patch \
8 file://11-distutils-never-modify-shebang-line.patch \
9 file://0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch \
10 file://unixccompiler.patch \
11 file://nohostlibs.patch \
12 file://multilib.patch \
13 file://add-md5module-support.patch \
14 file://0001-python-Resolve-intermediate-staging-issues.patch \
15 file://parallel-makeinst-create-bindir.patch \
16 file://revert_use_of_sysconfigdata.patch \
17 file://0001-python-native-fix-one-do_populate_sysroot-warning.patch \
18 "
19
20S = "${WORKDIR}/Python-${PV}"
21
22FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:"
23
24inherit native
25
26EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --with-system-expat=${STAGING_DIR_HOST}"
27
28EXTRA_OEMAKE = '\
29 LIBC="" \
30 STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
31 STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
32'
33
34do_configure_append() {
35 autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
36}
37
38# Cross-compiling Python needs a native pgen, build it here for use later.
39do_compile_append() {
40 oe_runmake Parser/pgen
41}
42
43do_install() {
44 oe_runmake 'DESTDIR=${D}' install
45 install -d ${D}${bindir}/${PN}
46 install -m 0755 Parser/pgen ${D}${bindir}/${PN}
47
48 # Make sure we use /usr/bin/env python
49 for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
50 sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT
51 done
52
53 # Add a symlink to the native Python so that scripts can just invoke
54 # "nativepython" and get the right one without needing absolute paths
55 # (these often end up too long for the #! parser in the kernel as the
56 # buffer is 128 bytes long).
57 ln -s python-native/python ${D}${bindir}/nativepython
58
59 # We don't want modules in ~/.local being used in preference to those
60 # installed in the native sysroot, so disable user site support.
61 sed -i -e 's,^\(ENABLE_USER_SITE = \).*,\1False,' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py
62}
63
64python(){
65
66 # Read JSON manifest
67 import json
68 pythondir = d.getVar('THISDIR')
69 with open(pythondir+'/python/python2-manifest.json') as manifest_file:
70 manifest_str = manifest_file.read()
71 json_start = manifest_str.find('# EOC') + 6
72 manifest_file.seek(json_start)
73 manifest_str = manifest_file.read()
74 python_manifest = json.loads(manifest_str)
75
76 rprovides = d.getVar('RPROVIDES').split()
77
78 # Hardcoded since it cant be python-native-foo, should be python-foo-native
79 pn = 'python'
80
81 # ${PN}-misc-native is not in the manifest
82 rprovides.append(pn + '-misc-native')
83
84 for key in python_manifest:
85 pypackage = pn + '-' + key + '-native'
86 if pypackage not in rprovides:
87 rprovides.append(pypackage)
88
89 d.setVar('RPROVIDES', ' '.join(rprovides))
90}
diff --git a/meta/recipes-devtools/python/python-setuptools_42.0.2.bb b/meta/recipes-devtools/python/python-setuptools_42.0.2.bb
deleted file mode 100644
index cf9440495b..0000000000
--- a/meta/recipes-devtools/python/python-setuptools_42.0.2.bb
+++ /dev/null
@@ -1,9 +0,0 @@
1require python-setuptools.inc
2
3PROVIDES = "python-distribute"
4
5inherit setuptools
6
7RREPLACES_${PN} = "python-distribute"
8RPROVIDES_${PN} = "python-distribute"
9RCONFLICTS_${PN} = "python-distribute"
diff --git a/meta/recipes-devtools/python/python/0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch b/meta/recipes-devtools/python/python/0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch
deleted file mode 100644
index 502f849804..0000000000
--- a/meta/recipes-devtools/python/python/0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch
+++ /dev/null
@@ -1,51 +0,0 @@
1From 4cdf2e9df13c6327fcc94d53e4953005543aef3d Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 6 Apr 2016 17:43:02 +0300
4Subject: [PATCH 01/10] distutils: set the prefix to be inside staging
5 directory
6
7The proper prefix is inside our staging area.
8
9Upstream-Status: Inappropriate [embedded specific]
10Signed-off-by: Michael 'Mickey' Lauer <mickey@vanille-media.de>
11Signed-off-by: Phil Blundell <philb@gnu.org>
12Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
13---
14 Lib/distutils/sysconfig.py | 10 +++++++---
15 1 file changed, 7 insertions(+), 3 deletions(-)
16
17diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
18index de7da1d..f3aacf7 100644
19--- a/Lib/distutils/sysconfig.py
20+++ b/Lib/distutils/sysconfig.py
21@@ -75,7 +75,7 @@ def get_python_inc(plat_specific=0, prefix=None):
22 sys.exec_prefix -- i.e., ignore 'plat_specific'.
23 """
24 if prefix is None:
25- prefix = plat_specific and EXEC_PREFIX or PREFIX
26+ prefix = os.environ['STAGING_INCDIR'].rstrip('include')
27
28 if os.name == "posix":
29 if python_build:
30@@ -115,12 +115,16 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
31 If 'prefix' is supplied, use it instead of sys.prefix or
32 sys.exec_prefix -- i.e., ignore 'plat_specific'.
33 """
34+ lib_basename = os.environ['STAGING_LIBDIR'].split('/')[-1]
35 if prefix is None:
36- prefix = plat_specific and EXEC_PREFIX or PREFIX
37+ if plat_specific:
38+ prefix = os.environ['STAGING_LIBDIR'].rstrip(lib_basename)
39+ else:
40+ prefix = PREFIX
41
42 if os.name == "posix":
43 libpython = os.path.join(prefix,
44- "lib", "python" + get_python_version())
45+ lib_basename, "python" + get_python_version())
46 if standard_lib:
47 return libpython
48 else:
49--
502.8.0.rc3
51
diff --git a/meta/recipes-devtools/python/python/0001-python-Resolve-intermediate-staging-issues.patch b/meta/recipes-devtools/python/python/0001-python-Resolve-intermediate-staging-issues.patch
deleted file mode 100644
index 2ff2ccc43d..0000000000
--- a/meta/recipes-devtools/python/python/0001-python-Resolve-intermediate-staging-issues.patch
+++ /dev/null
@@ -1,59 +0,0 @@
1From 77bcb3238b2853d511714544e0f84a37be6c79bf Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Wed, 14 Nov 2012 14:31:24 +0000
4Subject: [PATCH] python: Resolve intermediate staging issues
5
6When cross compiling python, we used to need to install the Makefile, pyconfig.h
7and the python library to their final location before being able to compile the
8rest of python. This change allows us to point python at its own source when
9building, avoiding a variety of sysroot staging issues and simplifying the main
10python recipe.
11
12Upstream-Status: Inappropriate
13RP 2012/11/13
14
15---
16 Lib/distutils/sysconfig.py | 3 +++
17 Lib/sysconfig.py | 5 ++++-
18 2 files changed, 7 insertions(+), 1 deletion(-)
19
20diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
21index 2f4b8ca..15bceb5 100644
22--- a/Lib/distutils/sysconfig.py
23+++ b/Lib/distutils/sysconfig.py
24@@ -31,6 +31,9 @@ else:
25 # sys.executable can be empty if argv[0] has been changed and Python is
26 # unable to retrieve the real program name
27 project_base = os.getcwd()
28+_PYTHONBUILDDIR = os.environ.get("PYTHONBUILDDIR", None)
29+if _PYTHONBUILDDIR:
30+ project_base = _PYTHONBUILDDIR
31 if os.name == "nt" and "pcbuild" in project_base[-8:].lower():
32 project_base = os.path.abspath(os.path.join(project_base, os.path.pardir))
33 # PC/VS7.1
34diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
35index 9c8350d..bddbe2e 100644
36--- a/Lib/sysconfig.py
37+++ b/Lib/sysconfig.py
38@@ -93,6 +93,7 @@ _PREFIX = os.path.normpath(sys.prefix)
39 _EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
40 _CONFIG_VARS = None
41 _USER_BASE = None
42+_PYTHONBUILDDIR = os.environ.get("PYTHONBUILDDIR", None)
43
44 def _safe_realpath(path):
45 try:
46@@ -100,7 +101,9 @@ def _safe_realpath(path):
47 except OSError:
48 return path
49
50-if sys.executable:
51+if _PYTHONBUILDDIR:
52+ _PROJECT_BASE = _PYTHONBUILDDIR
53+elif sys.executable:
54 _PROJECT_BASE = os.path.dirname(_safe_realpath(sys.executable))
55 else:
56 # sys.executable can be empty if argv[0] has been changed and Python is
57--
582.17.1
59
diff --git a/meta/recipes-devtools/python/python/0001-python2-use-cc_basename-to-replace-CC-for-checking-c.patch b/meta/recipes-devtools/python/python/0001-python2-use-cc_basename-to-replace-CC-for-checking-c.patch
deleted file mode 100644
index 6e4f820913..0000000000
--- a/meta/recipes-devtools/python/python/0001-python2-use-cc_basename-to-replace-CC-for-checking-c.patch
+++ /dev/null
@@ -1,114 +0,0 @@
1From 3f49be81e31c164654aeb10b65ebade982ca2ed8 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Mon, 22 Oct 2018 15:24:48 +0800
4Subject: [PATCH] python2: use cc_basename to replace CC for checking compiler
5
6When working path contains "clang"/"gcc"/"icc", it might be part of $CC
7because of the "--sysroot" parameter. That could cause judgement error
8about clang/gcc/icc compilers. e.g.
9When "icc" is containded in working path, below errors are reported when
10compiling python:
11x86_64-wrs-linux-gcc: error: strict: No such file or directory
12x86_64-wrs-linux-gcc: error: unrecognized command line option '-fp-model'
13
14Here use cc_basename to replace CC for checking compiler to avoid such
15kind of issue.
16
17Upstream-Status: Pending
18
19Signed-off-by: Li Zhou <li.zhou@windriver.com>
20
21Patch orignally from Li Zhou, I just rework it to new version
22
23Signed-off-by: Changqing Li <changqing.li@windriver.com>
24---
25 configure.ac | 18 +++++++++---------
26 1 file changed, 9 insertions(+), 9 deletions(-)
27
28diff --git a/configure.ac b/configure.ac
29index db1c940..dfcd89a 100644
30--- a/configure.ac
31+++ b/configure.ac
32@@ -684,7 +684,7 @@ AC_MSG_RESULT($with_cxx_main)
33 preset_cxx="$CXX"
34 if test -z "$CXX"
35 then
36- case "$CC" in
37+ case "$cc_basename" in
38 gcc) AC_PATH_TOOL(CXX, [g++], [g++], [notfound]) ;;
39 cc) AC_PATH_TOOL(CXX, [c++], [c++], [notfound]) ;;
40 esac
41@@ -757,14 +757,14 @@ rmdir CaseSensitiveTestDir
42
43 case $MACHDEP in
44 bsdos*)
45- case $CC in
46+ case $cc_basename in
47 gcc) CC="$CC -D_HAVE_BSDI";;
48 esac;;
49 esac
50
51 case $ac_sys_system in
52 hp*|HP*)
53- case $CC in
54+ case $cc_basename in
55 cc|*/cc) CC="$CC -Ae";;
56 esac;;
57 SunOS*)
58@@ -1084,7 +1084,7 @@ then
59 fi
60
61 # Clang also needs -fwrapv
62- case $CC in
63+ case $cc_basename in
64 *clang*) WRAP="-fwrapv"
65 ;;
66 esac
67@@ -1304,7 +1304,7 @@ yes)
68 esac
69
70 # ICC needs -fp-model strict or floats behave badly
71-case "$CC" in
72+case "$cc_basename" in
73 *icc*)
74 BASECFLAGS="$BASECFLAGS -fp-model strict"
75 ;;
76@@ -1443,7 +1443,7 @@ else
77 fi],
78 [AC_MSG_RESULT(no)])
79 if test "$Py_LTO" = 'true' ; then
80- case $CC in
81+ case $cc_basename in
82 *clang*)
83 # Any changes made here should be reflected in the GCC+Darwin case below
84 LTOFLAGS="-flto"
85@@ -1508,7 +1508,7 @@ then
86 fi
87 fi
88 LLVM_PROF_ERR=no
89-case $CC in
90+case $cc_basename in
91 *clang*)
92 # Any changes made here should be reflected in the GCC+Darwin case below
93 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
94@@ -2322,7 +2322,7 @@ then
95 then CCSHARED="-fPIC"
96 else CCSHARED="-Kpic -belf"
97 fi;;
98- IRIX*/6*) case $CC in
99+ IRIX*/6*) case $cc_basename in
100 *gcc*) CCSHARED="-shared";;
101 *) CCSHARED="";;
102 esac;;
103@@ -2366,7 +2366,7 @@ then
104 then
105 LINKFORSHARED="-Wl,--export-dynamic"
106 fi;;
107- SunOS/5*) case $CC in
108+ SunOS/5*) case $cc_basename in
109 *gcc*)
110 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
111 then
112--
1132.7.4
114
diff --git a/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch b/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
deleted file mode 100644
index b02c09458f..0000000000
--- a/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
+++ /dev/null
@@ -1,49 +0,0 @@
1We need to ensure our host tools get run during build, not the freshly
2built cross-tools (this will not work), so we introduce HOSTPYTHON and HOSTPGEN.
3
4Upstream-Status: Inappropriate [embedded specific]
5
6Signed-off-by: Michael 'Mickey' Lauer <mickey@vanille-media.de>
7Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
8
9Rebased for python-2.7.9
10Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
11
12Rebased for python-2.7.14
13Signed-off-by: Derek Straka <derek@asterius.io>
14
15Index: Python-2.7.13/Makefile.pre.in
16===================================================================
17--- Python-2.7.13.orig/Makefile.pre.in
18+++ Python-2.7.13/Makefile.pre.in
19@@ -512,7 +513,7 @@ $(BUILDPYTHON): Modules/python.o $(LIBRA
20 $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
21
22 platform: $(BUILDPYTHON) pybuilddir.txt
23- $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
24+ $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
25
26 # Create build directory and generate the sysconfig build-time data there.
27 # pybuilddir.txt contains the name of the build dir and is used for
28Index: Python-2.7.13/setup.py
29===================================================================
30--- Python-2.7.13.orig/setup.py
31+++ Python-2.7.13/setup.py
32@@ -350,6 +350,7 @@ class PyBuildExt(build_ext):
33 self.failed.append(ext.name)
34 self.announce('*** WARNING: renaming "%s" since importing it'
35 ' failed: %s' % (ext.name, why), level=3)
36+ return
37 assert not self.inplace
38 basename, tail = os.path.splitext(ext_filename)
39 newname = basename + "_failed" + tail
40@@ -574,6 +575,9 @@ class PyBuildExt(build_ext):
41
42 # XXX Omitted modules: gl, pure, dl, SGI-specific modules
43
44+ lib_dirs = [ os.getenv("STAGING_LIBDIR"), os.getenv("STAGING_BASELIBDIR") ]
45+ inc_dirs = [ os.getenv("STAGING_INCDIR") ]
46+
47 #
48 # The following modules are all pretty straightforward, and compile
49 # on pretty much any POSIXish platform.
diff --git a/meta/recipes-devtools/python/python/03-fix-tkinter-detection.patch b/meta/recipes-devtools/python/python/03-fix-tkinter-detection.patch
deleted file mode 100644
index 650ceb5951..0000000000
--- a/meta/recipes-devtools/python/python/03-fix-tkinter-detection.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3We need to supply STAGING_INCDIR here, otherwise the Tk headers
4will not be found.
5
6Signed-off-by: Michael 'Mickey' Lauer <mickey@vanille.de>
7Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
8
9Rebased for python-2.7.9
10
11diff --git a/setup.py b/setup.py
12index 8fe1fb8..67eda74 100644
13--- a/setup.py
14+++ b/setup.py
15@@ -1892,7 +1892,7 @@ class PyBuildExt(build_ext):
16 dotversion = dotversion[:-1] + '.' + dotversion[-1]
17 tcl_include_sub = []
18 tk_include_sub = []
19- for dir in inc_dirs:
20+ for dir in [os.getenv("STAGING_INCDIR")]:
21 tcl_include_sub += [dir + os.sep + "tcl" + dotversion]
22 tk_include_sub += [dir + os.sep + "tk" + dotversion]
23 tk_include_sub += tcl_include_sub
24@@ -1911,22 +1911,6 @@ class PyBuildExt(build_ext):
25 if dir not in include_dirs:
26 include_dirs.append(dir)
27
28- # Check for various platform-specific directories
29- if host_platform == 'sunos5':
30- include_dirs.append('/usr/openwin/include')
31- added_lib_dirs.append('/usr/openwin/lib')
32- elif os.path.exists('/usr/X11R6/include'):
33- include_dirs.append('/usr/X11R6/include')
34- added_lib_dirs.append('/usr/X11R6/lib64')
35- added_lib_dirs.append('/usr/X11R6/lib')
36- elif os.path.exists('/usr/X11R5/include'):
37- include_dirs.append('/usr/X11R5/include')
38- added_lib_dirs.append('/usr/X11R5/lib')
39- else:
40- # Assume default location for X11
41- include_dirs.append('/usr/X11/include')
42- added_lib_dirs.append('/usr/X11/lib')
43-
44 # If Cygwin, then verify that X is installed before proceeding
45 if host_platform == 'cygwin':
46 x11_inc = find_file('X11/Xlib.h', [], include_dirs)
diff --git a/meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch b/meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch
deleted file mode 100644
index 5cc8742462..0000000000
--- a/meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch
+++ /dev/null
@@ -1,27 +0,0 @@
1Rebased for python 2.7.9
2
3Upstream-Status: Inappropriate [embedded specific]
4
5# CTypes need to know the actual host we are building on.
6# Signed-Off: Michael Dietrich <mdt@emdete.de>
7
8Index: Python-2.7.9/setup.py
9===================================================================
10--- Python-2.7.9.orig/setup.py
11+++ Python-2.7.9/setup.py
12@@ -2028,12 +2028,12 @@ class PyBuildExt(build_ext):
13
14 # Pass empty CFLAGS because we'll just append the resulting
15 # CFLAGS to Python's; -g or -O2 is to be avoided.
16- cmd = "cd %s && env CFLAGS='' '%s/configure' %s" \
17- % (ffi_builddir, ffi_srcdir, " ".join(config_args))
18+ cmd = "(cd %s && autoconf -W cross) && (cd %s && env CFLAGS='' '%s/configure' %s)" \
19+ % (ffi_srcdir, ffi_builddir, ffi_srcdir, " ".join(config_args))
20
21 res = os.system(cmd)
22 if res or not os.path.exists(ffi_configfile):
23- print "Failed to configure _ctypes module"
24+ print "Failed to configure _ctypes module (res=%d) or missing conffile=%s" % ( res, ffi_configfile )
25 return False
26
27 fficonfig = {}
diff --git a/meta/recipes-devtools/python/python/06-avoid_usr_lib_termcap_path_in_linking.patch b/meta/recipes-devtools/python/python/06-avoid_usr_lib_termcap_path_in_linking.patch
deleted file mode 100644
index 435b319013..0000000000
--- a/meta/recipes-devtools/python/python/06-avoid_usr_lib_termcap_path_in_linking.patch
+++ /dev/null
@@ -1,35 +0,0 @@
1Upstream-Status: Pending
2
3The poison directories patch has detected library path issue while
4compiling the python in cross environment, as seen bellow.
5
6warning: library search path "/usr/lib/termcap" is unsafe for cross-compilation
7
8This Patch fixes this issue in the python build environment.
911 Oct 2010
10Nitin A Kamble <nitin.a.kamble@intel.com>
11
122011/09/29
13Rebased for python 2.7.2
14Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
15
16Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
17
18diff --git a/setup.py b/setup.py
19index 67eda74..59c537e 100644
20--- a/setup.py
21+++ b/setup.py
22@@ -761,12 +761,10 @@ class PyBuildExt(build_ext):
23 pass # Issue 7384: Already linked against curses or tinfo.
24 elif curses_library:
25 readline_libs.append(curses_library)
26- elif self.compiler.find_library_file(lib_dirs +
27- ['/usr/lib/termcap'],
28+ elif self.compiler.find_library_file(lib_dirs,
29 'termcap'):
30 readline_libs.append('termcap')
31 exts.append( Extension('readline', ['readline.c'],
32- library_dirs=['/usr/lib/termcap'],
33 extra_link_args=readline_extra_link_args,
34 libraries=readline_libs) )
35 else:
diff --git a/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch b/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
deleted file mode 100644
index 329734064b..0000000000
--- a/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1configure.ac: add CROSSPYTHONPATH into PYTHONPATH for PYTHON_FOR_BUILD
2
3When building x86->x86 the system will try to execute .so and related items
4from the default PYTHONPATH. This will fail if the target CPU contains
5instructions that the host CPU does not have, add CROSSPYTHONPATH
6into PYTHONPATH so we can prepend the list to find correct libs.
7
8Upstream-Status: Inappropriate [OE-Core integration specific]
9
10Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
11Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
12---
13 configure.ac | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16Index: Python-2.7.14/configure.ac
17===================================================================
18--- Python-2.7.14.orig/configure.ac
19+++ Python-2.7.14/configure.ac
20@@ -36,7 +36,7 @@ if test "$cross_compiling" = yes; then
21 AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
22 fi
23 AC_MSG_RESULT($interp)
24- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
25+ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(CROSSPYTHONPATH):$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
26 fi
27 elif test "$cross_compiling" = maybe; then
28 AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
diff --git a/meta/recipes-devtools/python/python/add-md5module-support.patch b/meta/recipes-devtools/python/python/add-md5module-support.patch
deleted file mode 100644
index 33fea77554..0000000000
--- a/meta/recipes-devtools/python/python/add-md5module-support.patch
+++ /dev/null
@@ -1,18 +0,0 @@
1
2Upstream-Status: Inappropriate [configuration]
3
4Signed-off-by: Saul Wold <sgw@linux.intel.com>
5
6Index: Python-2.7.2/Modules/Setup.dist
7===================================================================
8--- Python-2.7.2.orig/Modules/Setup.dist 2011-06-11 08:46:26.000000000 -0700
9+++ Python-2.7.2/Modules/Setup.dist 2011-12-27 15:51:41.244623219 -0800
10@@ -248,7 +248,7 @@
11 # Message-Digest Algorithm, described in RFC 1321. The necessary files
12 # md5.c and md5.h are included here.
13
14-#_md5 md5module.c md5.c
15+_md5 md5module.c md5.c
16
17
18 # The _sha module implements the SHA checksum algorithms.
diff --git a/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch b/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch
deleted file mode 100644
index 287095f615..0000000000
--- a/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1_tkinter module needs tk module along with tcl. tk is not yet integrated
2in yocto so we skip the check for this module.
3Avoid a warning by not adding this module to missing variable.
4
5Upstream-Status: Inappropriate [distribution]
6
7Also simply disable the tk module since its not in DEPENDS.
8Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
9
10Index: Python-2.7.13/setup.py
11===================================================================
12--- Python-2.7.13.orig/setup.py
13+++ Python-2.7.13/setup.py
14@@ -1783,10 +1783,12 @@ class PyBuildExt(build_ext):
15 self.extensions.extend(exts)
16
17 # Call the method for detecting whether _tkinter can be compiled
18- self.detect_tkinter(inc_dirs, lib_dirs)
19+ # self.detect_tkinter(inc_dirs, lib_dirs)
20
21- if '_tkinter' not in [e.name for e in self.extensions]:
22- missing.append('_tkinter')
23+ # tkinter module will not be avalaible as yocto
24+ # doesn't have tk integrated (yet)
25+ #if '_tkinter' not in [e.name for e in self.extensions]:
26+ # missing.append('_tkinter')
27
28 ## # Uncomment these lines if you want to play with xxmodule.c
29 ## ext = Extension('xx', ['xxmodule.c'])
diff --git a/meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch b/meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch
deleted file mode 100644
index 8ba5823014..0000000000
--- a/meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch
+++ /dev/null
@@ -1,23 +0,0 @@
1sunaudiodev module is sunos specific so we avoid a warning by not
2adding this module to missing variable.
3
4Upstream-Status: Inappropriate [distribution]
5
6Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
7
8Index: Python-2.7.13/setup.py
9===================================================================
10--- Python-2.7.13.orig/setup.py
11+++ Python-2.7.13/setup.py
12@@ -1671,8 +1671,9 @@ class PyBuildExt(build_ext):
13 if host_platform == 'sunos5':
14 # SunOS specific modules
15 exts.append( Extension('sunaudiodev', ['sunaudiodev.c']) )
16- else:
17- missing.append('sunaudiodev')
18+ # If platform is not sunos warning is useless
19+ #else:
20+ # missing.append('sunaudiodev')
21
22 if host_platform == 'darwin':
23 # _scproxy
diff --git a/meta/recipes-devtools/python/python/cgi_py.patch b/meta/recipes-devtools/python/python/cgi_py.patch
deleted file mode 100644
index de504f9dcf..0000000000
--- a/meta/recipes-devtools/python/python/cgi_py.patch
+++ /dev/null
@@ -1,23 +0,0 @@
1Lib/cgi.py: Update the script as mentioned in the comment
2
3Upstream-Status: Inappropriate [distribution]
4
5Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
6
7--- Python-2.6.6/Lib/cgi.py.orig 2010-08-01 22:14:27.000000000 -0500
8+++ Python-2.6.6/Lib/cgi.py 2011-09-21 15:28:40.478208631 -0500
9@@ -1,13 +1,4 @@
10-#! /usr/local/bin/python
11-
12-# NOTE: the above "/usr/local/bin/python" is NOT a mistake. It is
13-# intentionally NOT "/usr/bin/env python". On many systems
14-# (e.g. Solaris), /usr/local/bin is not in $PATH as passed to CGI
15-# scripts, and /usr/local/bin is the default directory where Python is
16-# installed, so /usr/bin/env would be unable to find python. Granted,
17-# binary installations by Linux vendors often install Python in
18-# /usr/bin. So let those vendors patch cgi.py to match their choice
19-# of installation.
20+#! /usr/bin/env python
21
22 """Support module for CGI (Common Gateway Interface) scripts.
23
diff --git a/meta/recipes-devtools/python/python/check-if-target-is-64b-not-host.patch b/meta/recipes-devtools/python/python/check-if-target-is-64b-not-host.patch
deleted file mode 100644
index e6d6c65bbe..0000000000
--- a/meta/recipes-devtools/python/python/check-if-target-is-64b-not-host.patch
+++ /dev/null
@@ -1,57 +0,0 @@
1Author: Andrei Gherzan <andrei@gherzan.ro>
2Date: Sun Mar 25 02:02:27 2012 +0200
3
4This patch was added for 64bit host machines. In the compile process python
5is checking if platform is a 64bit platform using sys.maxint which is the host's
6value. The patch fixes this issue so that python would check if TARGET machine
7is 64bit not the HOST machine. In this way will have "dl" and "imageop" modules
8built if HOST machine is 64bit but the target machine is 32bit.
9
10Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
11
12Upstream-Status: Pending
13
14Index: Python-2.7.11/setup.py
15===================================================================
16--- Python-2.7.11.orig/setup.py
17+++ Python-2.7.11/setup.py
18@@ -35,6 +35,21 @@ COMPILED_WITH_PYDEBUG = ('--with-pydebug
19 # This global variable is used to hold the list of modules to be disabled.
20 disabled_module_list = []
21
22+def target_is_64bit_platform ():
23+ """
24+ In case of cross-compile, some modules are not build as setup checks if HOST
25+ is 64bit and not TARGET.
26+ As python was built for TARGET we can check this in pyconfig.h in this way:
27+ Sizeof LONG on a 32 bit platform is 4 bytes
28+ Sizeof LONG on a 64 bit platform is 8 bytes
29+ """
30+ pyconf = open("pyconfig.h").read()
31+ aux = re.search(r"#s*define\s+SIZEOF_LONG\s+8\s*", pyconf)
32+ if aux is not None:
33+ return True
34+ else:
35+ return False
36+
37 def add_dir_to_list(dirlist, dir):
38 """Add the directory 'dir' to the list 'dirlist' (at the front) if
39 1) 'dir' is not already in 'dirlist'
40@@ -716,7 +731,7 @@ class PyBuildExt(build_ext):
41 exts.append( Extension('audioop', ['audioop.c']) )
42
43 # Disabled on 64-bit platforms
44- if sys.maxsize != 9223372036854775807L:
45+ if not target_is_64bit_platform():
46 # Operations on images
47 exts.append( Extension('imageop', ['imageop.c']) )
48 else:
49@@ -1545,7 +1560,7 @@ class PyBuildExt(build_ext):
50 missing.append('_codecs_%s' % loc)
51
52 # Dynamic loading module
53- if sys.maxint == 0x7fffffff:
54+ if not target_is_64bit_platform():
55 # This requires sizeof(int) == sizeof(long) == sizeof(char*)
56 dl_inc = find_file('dlfcn.h', [], inc_dirs)
57 if (dl_inc is not None) and (host_platform not in ['atheos']):
diff --git a/meta/recipes-devtools/python/python/create_manifest2.py b/meta/recipes-devtools/python/python/create_manifest2.py
deleted file mode 100644
index 34659515cb..0000000000
--- a/meta/recipes-devtools/python/python/create_manifest2.py
+++ /dev/null
@@ -1,298 +0,0 @@
1# This script is used as a bitbake task to create a new python manifest
2# $ bitbake python -c create_manifest
3#
4# Our goal is to keep python-core as small as posible and add other python
5# packages only when the user needs them, hence why we split upstream python
6# into several packages.
7#
8# In a very simplistic way what this does is:
9# Launch python and see specifically what is required for it to run at a minimum
10#
11# Go through the python-manifest file and launch a separate task for every single
12# one of the files on each package, this task will check what was required for that
13# specific module to run, these modules will be called dependencies.
14# The output of such task will be a list of the modules or dependencies that were
15# found for that file.
16#
17# Such output will be parsed by this script, we will look for each dependency on the
18# manifest and if we find that another package already includes it, then we will add
19# that package as an RDEPENDS to the package we are currently checking; in case we dont
20# find the current dependency on any other package we will add it to the current package
21# as part of FILES.
22#
23#
24# This way we will create a new manifest from the data structure that was built during
25# this process, on this new manifest each package will contain specifically only
26# what it needs to run.
27#
28# There are some caveats which we try to deal with, such as repeated files on different
29# packages, packages that include folders, wildcards, and special packages.
30# Its also important to note that this method only works for python files, and shared
31# libraries. Static libraries, header files and binaries need to be dealt with manually.
32#
33# Author: Alejandro Enedino Hernandez Samaniego "aehs29" <aehs29 at gmail dot com>
34
35
36import sys
37import subprocess
38import json
39import os
40import collections
41
42# Hack to get native python search path (for folders), not fond of it but it works for now
43pivot='recipe-sysroot-native'
44for p in sys.path:
45 if pivot in p:
46 nativelibfolder=p[:p.find(pivot)+len(pivot)]
47
48# Empty dict to hold the whole manifest
49new_manifest = collections.OrderedDict()
50
51# Check for repeated files, folders and wildcards
52allfiles=[]
53repeated=[]
54wildcards=[]
55
56hasfolders=[]
57allfolders=[]
58
59def isFolder(value):
60 if os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib')) or os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib64')) or os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib32')):
61 return True
62 else:
63 return False
64
65def prepend_comments(comments, json_manifest):
66 with open(json_manifest, 'r+') as manifest:
67 json_contents = manifest.read()
68 manifest.seek(0, 0)
69 manifest.write(comments + json_contents)
70
71# Read existing JSON manifest
72with open('python2-manifest.json') as manifest:
73 # The JSON format doesn't allow comments so we hack the call to keep the comments using a marker
74 manifest_str = manifest.read()
75 json_start = manifest_str.find('# EOC') + 6 # EOC + \n
76 manifest.seek(0)
77 comments = manifest.read(json_start)
78 manifest_str = manifest.read()
79 old_manifest = json.loads(manifest_str, object_pairs_hook=collections.OrderedDict)
80
81# First pass to get core-package functionality, because we base everything on the fact that core is actually working
82# Not exactly the same so it should not be a function
83print ("Getting dependencies for core package:")
84
85# Special call to check for core package
86output = subprocess.check_output([sys.executable, 'get_module_deps2.py', 'python-core-package'])
87for item in output.split():
88 # We append it so it doesnt hurt what we currently have:
89 if item not in old_manifest['core']['files']:
90 # We use the same data structure since its the one which will be used to check
91 # dependencies for other packages
92 old_manifest['core']['files'].append(item)
93
94for value in old_manifest['core']['files']:
95 # Ignore folders, since we don't import those, difficult to handle multilib
96 if isFolder(value):
97 # Pass it directly
98 if value not in old_manifest['core']['files']:
99 old_manifest['core']['files'].append(value)
100 # Ignore binaries, since we don't import those, assume it was added correctly (manually)
101 if '${bindir}' in value:
102 # Pass it directly
103 if value not in old_manifest['core']['files']:
104 old_manifest['core']['files'].append(value)
105 continue
106 # Ignore empty values
107 if value == '':
108 continue
109 if '${includedir}' in value:
110 if value not in old_manifest['core']['files']:
111 old_manifest['core']['files'].append(value)
112 continue
113 # Get module name , shouldnt be affected by libdir/bindir
114 value = os.path.splitext(os.path.basename(os.path.normpath(value)))[0]
115
116
117 # Launch separate task for each module for deterministic behavior
118 # Each module will only import what is necessary for it to work in specific
119 print ('Getting dependencies for module: %s' % value)
120 output = subprocess.check_output([sys.executable, 'get_module_deps2.py', '%s' % value])
121 for item in output.split():
122 # We append it so it doesnt hurt what we currently have:
123 if item not in old_manifest['core']['files']:
124 old_manifest['core']['files'].append(item)
125
126# We check which packages include folders
127for key in old_manifest:
128 for value in old_manifest[key]['files']:
129 # Ignore folders, since we don't import those, difficult to handle multilib
130 if isFolder(value):
131 print ('%s is a folder' % value)
132 if key not in hasfolders:
133 hasfolders.append(key)
134 if value not in allfolders:
135 allfolders.append(value)
136
137for key in old_manifest:
138 # Use an empty dict as data structure to hold data for each package and fill it up
139 new_manifest[key] = collections.OrderedDict()
140 new_manifest[key]['summary'] = old_manifest[key]['summary']
141 new_manifest[key]['rdepends']=[]
142 new_manifest[key]['files'] = []
143
144 # All packages should depend on core
145 if key != 'core':
146 new_manifest[key]['rdepends'].append('core')
147
148 # Handle special cases, we assume that when they were manually added
149 # to the manifest we knew what we were doing.
150 print ('Handling package %s' % key)
151 special_packages=['misc', 'modules', 'tests', 'dev']
152 if key in special_packages or 'staticdev' in key:
153 print('Passing %s package directly' % key)
154 new_manifest[key]=old_manifest[key]
155 continue
156
157 for value in old_manifest[key]['files']:
158 # We already handled core on the first pass
159 if key == 'core':
160 new_manifest[key]['files'].append(value)
161 continue
162 # Ignore folders, since we don't import those, difficult to handle multilib
163 if isFolder(value):
164 # Pass folders directly
165 new_manifest[key]['files'].append(value)
166 # Ignore binaries, since we don't import those
167 if '${bindir}' in value:
168 # Pass it directly to the new manifest data structure
169 if value not in new_manifest[key]['files']:
170 new_manifest[key]['files'].append(value)
171 continue
172 # Ignore empty values
173 if value == '':
174 continue
175 if '${includedir}' in value:
176 if value not in new_manifest[key]['files']:
177 new_manifest[key]['files'].append(value)
178 continue
179 # Get module name , shouldnt be affected by libdir/bindir
180 value = os.path.splitext(os.path.basename(os.path.normpath(value)))[0]
181
182 # Launch separate task for each module for deterministic behavior
183 # Each module will only import what is necessary for it to work in specific
184 print ('Getting dependencies for module: %s' % value)
185 output = subprocess.check_output([sys.executable, 'get_module_deps2.py', '%s' % value])
186
187 # We can print dependencies for debugging purposes
188 #print (output)
189 # Output will have all dependencies
190 for item in output.split():
191
192 # Warning: This first part is ugly
193 # One of the dependencies that was found, could be inside of one of the folders included by another package
194 # We need to check if this happens so we can add the package containing the folder as an RDEPENDS
195 # e.g. Folder encodings contained in codecs
196 # This would be solved if no packages included any folders
197
198 # This can be done in two ways:
199 # 1 - We assume that if we take out the filename from the path we would get
200 # the folder string, then we would check if folder string is in the list of folders
201 # This would not work if a package contains a folder which contains another folder
202 # e.g. path/folder1/folder2/filename folder_string= path/folder1/folder2
203 # folder_string would not match any value contained in the list of folders
204 #
205 # 2 - We do it the other way around, checking if the folder is contained in the path
206 # e.g. path/folder1/folder2/filename folder_string= path/folder1/folder2
207 # is folder_string inside path/folder1/folder2/filename?,
208 # Yes, it works, but we waste a couple of milliseconds.
209
210 inFolders=False
211 for folder in allfolders:
212 # The module could have a directory named after it, e.g. xml, if we take out the filename from the path
213 # we'll end up with ${libdir}, and we want ${libdir}/xml
214 if isFolder(item):
215 check_path = item
216 else:
217 check_path = os.path.dirname(item)
218 if folder in check_path :
219 inFolders = True # Did we find a folder?
220 folderFound = False # Second flag to break inner for
221 # Loop only through packages which contain folders
222 for keyfolder in hasfolders:
223 if (folderFound == False):
224 #print("Checking folder %s on package %s" % (item,keyfolder))
225 for file_folder in old_manifest[keyfolder]['files']:
226 if file_folder==folder:
227 print ('%s found in %s' % (folder, keyfolder))
228 folderFound = True
229 if keyfolder not in new_manifest[key]['rdepends'] and keyfolder != key:
230 new_manifest[key]['rdepends'].append(keyfolder)
231 else:
232 break
233
234 # A folder was found so we're done with this item, we can go on
235 if inFolders:
236 continue
237
238 # We might already have it on the dictionary since it could depend on a (previously checked) module
239 if item not in new_manifest[key]['files']:
240 # Handle core as a special package, we already did it so we pass it to NEW data structure directly
241 if key=='core':
242 print('Adding %s to %s FILES' % (item, key))
243 if item.endswith('*'):
244 wildcards.append(item)
245 new_manifest[key]['files'].append(item)
246
247 # Check for repeated files
248 if item not in allfiles:
249 allfiles.append(item)
250 else:
251 repeated.append(item)
252
253 else:
254
255 # Check if this dependency is already contained on another package, so we add it
256 # as an RDEPENDS, or if its not, it means it should be contained on the current
257 # package, so we should add it to FILES
258 for newkey in old_manifest:
259 # Debug
260 #print("Checking %s " % item + " in %s" % newkey)
261 if item in old_manifest[newkey]['files']:
262 # Since were nesting, we need to check its not the same key
263 if(newkey!=key):
264 if newkey not in new_manifest[key]['rdepends']:
265 # Add it to the new manifest data struct
266 # Debug
267 print('Adding %s to %s RDEPENDS, because it contains %s' % (newkey, key, item))
268 new_manifest[key]['rdepends'].append(newkey)
269 break
270 else:
271 # Debug
272 print('Adding %s to %s FILES' % (item, key))
273 # Since it wasnt found on another package, its not an RDEP, so add it to FILES for this package
274 new_manifest[key]['files'].append(item)
275 if item.endswith('*'):
276 wildcards.append(item)
277 if item not in allfiles:
278 allfiles.append(item)
279 else:
280 repeated.append(item)
281
282print ('The following files are repeated (contained in more than one package), please check which package should get it:')
283print (repeated)
284print('The following files contain wildcards, please check they are necessary')
285print(wildcards)
286print('The following files contain folders, please check they are necessary')
287print(hasfolders)
288
289# Sort it just so it looks nice
290for key in new_manifest:
291 new_manifest[key]['files'].sort()
292 new_manifest[key]['rdepends'].sort()
293
294# Create the manifest from the data structure that was built
295with open('python2-manifest.json.new','w') as outfile:
296 json.dump(new_manifest,outfile, indent=4)
297
298prepend_comments(comments,'python2-manifest.json.new')
diff --git a/meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch b/meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch
deleted file mode 100644
index d41b6cfc74..0000000000
--- a/meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch
+++ /dev/null
@@ -1,77 +0,0 @@
1Upstream-Status: Inappropriate [Embedded specific]
2
3This patch fixes issuing with different libdir like lib64.
4This patch makes the native python binary modules findable
5in the install process of the host python.
6
7Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
8Date: 2012/03/14
9
10Updated for python 2.7.3
11Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
12Date: 2012/05/01
13
14Rebased for python-2.7.9
15Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
16
17
18Index: Python-2.7.9/Lib/sysconfig.py
19===================================================================
20--- Python-2.7.9.orig/Lib/sysconfig.py
21+++ Python-2.7.9/Lib/sysconfig.py
22@@ -9,7 +9,7 @@ _INSTALL_SCHEMES = {
23 'posix_prefix': {
24 'stdlib': '{base}/'+sys.lib+'/python{py_version_short}',
25 'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}',
26- 'purelib': '{base}/lib/python{py_version_short}/site-packages',
27+ 'purelib': '{base}/'+sys.lib+'/python{py_version_short}/site-packages',
28 'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages',
29 'include': '{base}/include/python{py_version_short}',
30 'platinclude': '{platbase}/include/python{py_version_short}',
31@@ -67,7 +67,7 @@ _INSTALL_SCHEMES = {
32 'posix_user': {
33 'stdlib': '{userbase}/'+sys.lib+'/python{py_version_short}',
34 'platstdlib': '{userbase}/'+sys.lib+'/python{py_version_short}',
35- 'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
36+ 'purelib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages',
37 'platlib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages',
38 'include': '{userbase}/include/python{py_version_short}',
39 'scripts': '{userbase}/bin',
40Index: Python-2.7.9/Makefile.pre.in
41===================================================================
42--- Python-2.7.9.orig/Makefile.pre.in
43+++ Python-2.7.9/Makefile.pre.in
44@@ -1037,27 +1037,27 @@ libinstall: build_all $(srcdir)/Lib/$(PL
45 $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
46 $(DESTDIR)$(LIBDEST)/distutils/tests ; \
47 fi
48- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
49+ PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \
50 $(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
51 -d $(LIBDEST) -f \
52 -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
53 $(DESTDIR)$(LIBDEST)
54- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
55+ PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \
56 $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
57 -d $(LIBDEST) -f \
58 -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
59 $(DESTDIR)$(LIBDEST)
60- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
61+ -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \
62 $(PYTHON_FOR_BUILD) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
63 -d $(LIBDEST)/site-packages -f \
64 -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
65- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
66+ -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \
67 $(PYTHON_FOR_BUILD) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
68 -d $(LIBDEST)/site-packages -f \
69 -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
70- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
71+ -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \
72 $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
73- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
74+ -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \
75 $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
76
77 # Create the PLATDIR source directory, if one wasn't distributed..
diff --git a/meta/recipes-devtools/python/python/float-endian.patch b/meta/recipes-devtools/python/python/float-endian.patch
deleted file mode 100644
index 8a5c90aec4..0000000000
--- a/meta/recipes-devtools/python/python/float-endian.patch
+++ /dev/null
@@ -1,216 +0,0 @@
1Python uses AC_RUN_IFELSE to determine the byte order for floats and doubles,
2and falls back onto "I don't know" if it can't run code. This results in
3crippled floating point numbers in Python, and the regression tests fail.
4
5Instead of running code, take a macro from autoconf-archive which compiles C
6with a special double in which has an ASCII representation, and then greps the
7binary to identify the format.
8
9Upstream-Status: Backport
10Signed-off-by: Ross Burton <ross.burton@intel.com>
11
12From 253f47b28120c42cfe53a4e2f5ed0ab0ed469deb Mon Sep 17 00:00:00 2001
13From: Ross Burton <ross@burtonini.com>
14Date: Wed, 19 Sep 2018 07:25:48 +0100
15Subject: [PATCH] closes bpo-34585: Don't do runtime test to get float byte
16 order. (GH-9085)
17
18Currently configure.ac uses AC_RUN_IFELSE to determine the byte order of doubles, but this silently fails under cross compilation and Python doesn't do floats properly.
19
20Instead, steal a macro from autoconf-archive which compiles code using magic doubles (which encode to ASCII) and grep for the representation in the binary.
21
22RFC because this doesn't yet handle the weird ancient ARMv4 OABI 'mixed-endian' encoding properly. This encoding is ancient and I don't believe the union of "Python 3.8 users" and "OABI users" has anything in. Should the support for this just be dropped too? Alternatively, someone will need to find an OABI toolchain to verify the encoding of the magic double.
23
24Signed-off-by: Ross Burton <ross.burton@intel.com>
25---
26 .../Build/2018-09-18-16-28-31.bpo-34585.CGMu0h.rst | 3 +
27 configure.ac | 76 ++++----------------
28 m4/ax_c_float_words_bigendian.m4 | 83 ++++++++++++++++++++++
29 3 files changed, 99 insertions(+), 63 deletions(-)
30 create mode 100644 Misc/NEWS.d/next/Build/2018-09-18-16-28-31.bpo-34585.CGMu0h.rst
31 create mode 100644 m4/ax_c_float_words_bigendian.m4
32
33diff --git a/configure.ac b/configure.ac
34index 913d5469d0..7672735396 100644
35--- a/configure.ac
36+++ b/configure.ac
37@@ -3835,74 +3835,24 @@ fi],
38 # * Check for various properties of floating point *
39 # **************************************************
40
41-AC_MSG_CHECKING(whether C doubles are little-endian IEEE 754 binary64)
42-AC_CACHE_VAL(ac_cv_little_endian_double, [
43-AC_RUN_IFELSE([AC_LANG_SOURCE([[
44-#include <string.h>
45-int main() {
46- double x = 9006104071832581.0;
47- if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
48- return 0;
49- else
50- return 1;
51-}
52-]])],
53-[ac_cv_little_endian_double=yes],
54-[ac_cv_little_endian_double=no],
55-[ac_cv_little_endian_double=no])])
56-AC_MSG_RESULT($ac_cv_little_endian_double)
57-if test "$ac_cv_little_endian_double" = yes
58-then
59- AC_DEFINE(DOUBLE_IS_LITTLE_ENDIAN_IEEE754, 1,
60- [Define if C doubles are 64-bit IEEE 754 binary format, stored
61- with the least significant byte first])
62-fi
63-
64-AC_MSG_CHECKING(whether C doubles are big-endian IEEE 754 binary64)
65-AC_CACHE_VAL(ac_cv_big_endian_double, [
66-AC_RUN_IFELSE([AC_LANG_SOURCE([[
67-#include <string.h>
68-int main() {
69- double x = 9006104071832581.0;
70- if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
71- return 0;
72- else
73- return 1;
74-}
75-]])],
76-[ac_cv_big_endian_double=yes],
77-[ac_cv_big_endian_double=no],
78-[ac_cv_big_endian_double=no])])
79-AC_MSG_RESULT($ac_cv_big_endian_double)
80-if test "$ac_cv_big_endian_double" = yes
81+AX_C_FLOAT_WORDS_BIGENDIAN
82+if test "$ax_cv_c_float_words_bigendian" = "yes"
83 then
84 AC_DEFINE(DOUBLE_IS_BIG_ENDIAN_IEEE754, 1,
85 [Define if C doubles are 64-bit IEEE 754 binary format, stored
86 with the most significant byte first])
87-fi
88-
89-# Some ARM platforms use a mixed-endian representation for doubles.
90-# While Python doesn't currently have full support for these platforms
91-# (see e.g., issue 1762561), we can at least make sure that float <-> string
92-# conversions work.
93-AC_MSG_CHECKING(whether C doubles are ARM mixed-endian IEEE 754 binary64)
94-AC_CACHE_VAL(ac_cv_mixed_endian_double, [
95-AC_RUN_IFELSE([AC_LANG_SOURCE([[
96-#include <string.h>
97-int main() {
98- double x = 9006104071832581.0;
99- if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
100- return 0;
101- else
102- return 1;
103-}
104-]])],
105-[ac_cv_mixed_endian_double=yes],
106-[ac_cv_mixed_endian_double=no],
107-[ac_cv_mixed_endian_double=no])])
108-AC_MSG_RESULT($ac_cv_mixed_endian_double)
109-if test "$ac_cv_mixed_endian_double" = yes
110+elif test "$ax_cv_c_float_words_bigendian" = "no"
111 then
112+ AC_DEFINE(DOUBLE_IS_LITTLE_ENDIAN_IEEE754, 1,
113+ [Define if C doubles are 64-bit IEEE 754 binary format, stored
114+ with the least significant byte first])
115+else
116+ # Some ARM platforms use a mixed-endian representation for doubles.
117+ # While Python doesn't currently have full support for these platforms
118+ # (see e.g., issue 1762561), we can at least make sure that float <-> string
119+ # conversions work.
120+ # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
121+ # or little, then it must be this?
122 AC_DEFINE(DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754, 1,
123 [Define if C doubles are 64-bit IEEE 754 binary format, stored
124 in ARM mixed-endian order (byte order 45670123)])
125diff --git a/m4/ax_c_float_words_bigendian.m4 b/m4/ax_c_float_words_bigendian.m4
126new file mode 100644
127index 0000000000..216b90d803
128--- /dev/null
129+++ b/m4/ax_c_float_words_bigendian.m4
130@@ -0,0 +1,83 @@
131+# ===============================================================================
132+# https://www.gnu.org/software/autoconf-archive/ax_c_float_words_bigendian.html
133+# ===============================================================================
134+#
135+# SYNOPSIS
136+#
137+# AX_C_FLOAT_WORDS_BIGENDIAN([ACTION-IF-TRUE], [ACTION-IF-FALSE], [ACTION-IF-UNKNOWN])
138+#
139+# DESCRIPTION
140+#
141+# Checks the ordering of words within a multi-word float. This check is
142+# necessary because on some systems (e.g. certain ARM systems), the float
143+# word ordering can be different from the byte ordering. In a multi-word
144+# float context, "big-endian" implies that the word containing the sign
145+# bit is found in the memory location with the lowest address. This
146+# implementation was inspired by the AC_C_BIGENDIAN macro in autoconf.
147+#
148+# The endianness is detected by first compiling C code that contains a
149+# special double float value, then grepping the resulting object file for
150+# certain strings of ASCII values. The double is specially crafted to have
151+# a binary representation that corresponds with a simple string. In this
152+# implementation, the string "noonsees" was selected because the
153+# individual word values ("noon" and "sees") are palindromes, thus making
154+# this test byte-order agnostic. If grep finds the string "noonsees" in
155+# the object file, the target platform stores float words in big-endian
156+# order. If grep finds "seesnoon", float words are in little-endian order.
157+# If neither value is found, the user is instructed to specify the
158+# ordering.
159+#
160+# LICENSE
161+#
162+# Copyright (c) 2008 Daniel Amelang <dan@amelang.net>
163+#
164+# Copying and distribution of this file, with or without modification, are
165+# permitted in any medium without royalty provided the copyright notice
166+# and this notice are preserved. This file is offered as-is, without any
167+# warranty.
168+
169+#serial 11
170+
171+AC_DEFUN([AX_C_FLOAT_WORDS_BIGENDIAN],
172+ [AC_CACHE_CHECK(whether float word ordering is bigendian,
173+ ax_cv_c_float_words_bigendian, [
174+
175+ax_cv_c_float_words_bigendian=unknown
176+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
177+
178+double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
179+
180+]])], [
181+
182+if grep noonsees conftest.$ac_objext >/dev/null ; then
183+ ax_cv_c_float_words_bigendian=yes
184+fi
185+if grep seesnoon conftest.$ac_objext >/dev/null ; then
186+ if test "$ax_cv_c_float_words_bigendian" = unknown; then
187+ ax_cv_c_float_words_bigendian=no
188+ else
189+ ax_cv_c_float_words_bigendian=unknown
190+ fi
191+fi
192+
193+])])
194+
195+case $ax_cv_c_float_words_bigendian in
196+ yes)
197+ m4_default([$1],
198+ [AC_DEFINE([FLOAT_WORDS_BIGENDIAN], 1,
199+ [Define to 1 if your system stores words within floats
200+ with the most significant word first])]) ;;
201+ no)
202+ $2 ;;
203+ *)
204+ m4_default([$3],
205+ [AC_MSG_ERROR([
206+
207+Unknown float word ordering. You need to manually preset
208+ax_cv_c_float_words_bigendian=no (or yes) according to your system.
209+
210+ ])]) ;;
211+esac
212+
213+])# AX_C_FLOAT_WORDS_BIGENDIAN
214--
2152.11.0
216
diff --git a/meta/recipes-devtools/python/python/get_module_deps2.py b/meta/recipes-devtools/python/python/get_module_deps2.py
deleted file mode 100644
index 73e7c6f6dc..0000000000
--- a/meta/recipes-devtools/python/python/get_module_deps2.py
+++ /dev/null
@@ -1,112 +0,0 @@
1# This script is launched on separate task for each python module
2# It checks for dependencies for that specific module and prints
3# them out, the output of this execution will have all dependencies
4# for a specific module, which will be parsed an dealt on create_manifest.py
5#
6# Author: Alejandro Enedino Hernandez Samaniego "aehs29" <aehs29@gmail.com>
7
8
9# We can get a log per module, for all the dependencies that were found, but its messy.
10debug=False
11
12import sys
13
14# We can get a list of the modules which are currently required to run python
15# so we run python-core and get its modules, we then import what we need
16# and check what modules are currently running, if we substract them from the
17# modules we had initially, we get the dependencies for the module we imported.
18
19# We use importlib to achieve this, so we also need to know what modules importlib needs
20import importlib
21
22core_deps=set(sys.modules)
23
24def fix_path(dep_path):
25 import os
26 # We DONT want the path on our HOST system
27 pivot='recipe-sysroot-native'
28 dep_path=dep_path[dep_path.find(pivot)+len(pivot):]
29
30 if '/usr/bin' in dep_path:
31 dep_path = dep_path.replace('/usr/bin''${bindir}')
32
33 # Handle multilib, is there a better way?
34 if '/usr/lib32' in dep_path:
35 dep_path = dep_path.replace('/usr/lib32','${libdir}')
36 if '/usr/lib64' in dep_path:
37 dep_path = dep_path.replace('/usr/lib64','${libdir}')
38 if '/usr/lib' in dep_path:
39 dep_path = dep_path.replace('/usr/lib','${libdir}')
40 if '/usr/include' in dep_path:
41 dep_path = dep_path.replace('/usr/include','${includedir}')
42 if '__init__.' in dep_path:
43 dep_path = os.path.split(dep_path)[0]
44
45 # If a *.pyc file was imported, we replace it with *.py (since we deal with PYCs on create_manifest)
46 if '.pyc' in dep_path:
47 dep_path = dep_path.replace('.pyc','.py')
48
49 return dep_path
50
51# Module to import was passed as an argument
52current_module = str(sys.argv[1]).rstrip()
53if(debug==True):
54 log = open('log_%s' % current_module,'w')
55 log.write('Module %s generated the following dependencies:\n' % current_module)
56try:
57 importlib.import_module('%s' % current_module)
58except ImportError as e:
59 if (debug==True):
60 log.write('Module was not found')
61 pass
62
63
64# Get current module dependencies, dif will contain a list of specific deps for this module
65module_deps=set(sys.modules)
66
67# We handle the core package (1st pass on create_manifest.py) as a special case
68if current_module == 'python-core-package':
69 dif = core_deps
70else:
71 dif = module_deps-core_deps
72
73
74# Check where each dependency came from
75for item in dif:
76 dep_path=''
77 try:
78 if (debug==True):
79 log.write('Calling: sys.modules[' + '%s' % item + '].__file__\n')
80 dep_path = sys.modules['%s' % item].__file__
81 except AttributeError as e:
82 # Deals with thread (builtin module) not having __file__ attribute
83 if debug==True:
84 log.write(item + ' ')
85 log.write(str(e))
86 log.write('\n')
87 pass
88 except NameError as e:
89 # Deals with NameError: name 'dep_path' is not defined
90 # because module is not found (wasn't compiled?), e.g. bddsm
91 if (debug==True):
92 log.write(item+' ')
93 log.write(str(e))
94 pass
95
96 # Site-customize is a special case since we (OpenEmbedded) put it there manually
97 if 'sitecustomize' in dep_path:
98 dep_path = '${libdir}/python2.7/sitecustomize.py'
99 # Prints out result, which is what will be used by create_manifest
100 print (dep_path)
101 continue
102
103 dep_path = fix_path(dep_path)
104
105 if (debug==True):
106 log.write(dep_path+'\n')
107
108 # Prints out result, which is what will be used by create_manifest
109 print (dep_path)
110
111if debug==True:
112 log.close()
diff --git a/meta/recipes-devtools/python/python/host_include_contamination.patch b/meta/recipes-devtools/python/python/host_include_contamination.patch
deleted file mode 100644
index e0aafb218b..0000000000
--- a/meta/recipes-devtools/python/python/host_include_contamination.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1when building python for qemux86-64 on ubuntu 11.10/64bit
2it gropes into host includes and then mixes them with cross
3includes and as a result some modules fail to compile and link
4one of the modules is python-elementtree which is then not
5found during image creation
6
7Proble is that setup.py tries to add native includes that newer
8ubuntu has introduced for multiarch support. But that should
9only happen for native builds and not cross building python
10so we add a check here.
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13Upstream-Status: Pending
14
15
16diff --git a/setup.py b/setup.py
17index ba2d242..bf859be 100644
18--- a/setup.py
19+++ b/setup.py
20@@ -393,6 +393,8 @@ class PyBuildExt(build_ext):
21
22 if not find_executable('dpkg-architecture'):
23 return
24+ if os.environ.get('CROSS_COMPILE') is not None:
25+ return
26 opt = ''
27 if cross_compiling:
28 opt = '-t' + sysconfig.get_config_var('HOST_GNU_TYPE')
diff --git a/meta/recipes-devtools/python/python/multilib.patch b/meta/recipes-devtools/python/python/multilib.patch
deleted file mode 100644
index d24bc15f01..0000000000
--- a/meta/recipes-devtools/python/python/multilib.patch
+++ /dev/null
@@ -1,298 +0,0 @@
1Rebased for python-2.7.9
2Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
3Upstream-Status: Pending
4Index: Python-2.7.14/configure.ac
5===================================================================
6--- Python-2.7.14.orig/configure.ac
7+++ Python-2.7.14/configure.ac
8@@ -758,6 +758,10 @@ SunOS*)
9 ;;
10 esac
11
12+AC_SUBST(LIB)
13+AC_MSG_CHECKING(LIB)
14+LIB="SEDMELIBLEAF"
15+AC_MSG_RESULT($LIB)
16
17 AC_SUBST(LIBRARY)
18 AC_MSG_CHECKING(LIBRARY)
19Index: Python-2.7.14/Include/pythonrun.h
20===================================================================
21--- Python-2.7.14.orig/Include/pythonrun.h
22+++ Python-2.7.14/Include/pythonrun.h
23@@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void);
24 /* In their own files */
25 PyAPI_FUNC(const char *) Py_GetVersion(void);
26 PyAPI_FUNC(const char *) Py_GetPlatform(void);
27+PyAPI_FUNC(const char *) Py_GetLib(void);
28 PyAPI_FUNC(const char *) Py_GetCopyright(void);
29 PyAPI_FUNC(const char *) Py_GetCompiler(void);
30 PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
31Index: Python-2.7.14/Lib/distutils/command/install.py
32===================================================================
33--- Python-2.7.14.orig/Lib/distutils/command/install.py
34+++ Python-2.7.14/Lib/distutils/command/install.py
35@@ -22,6 +22,8 @@ from site import USER_BASE
36 from site import USER_SITE
37
38
39+libname = sys.lib
40+
41 if sys.version < "2.2":
42 WINDOWS_SCHEME = {
43 'purelib': '$base',
44@@ -41,8 +43,8 @@ else:
45
46 INSTALL_SCHEMES = {
47 'unix_prefix': {
48- 'purelib': '$base/lib/python$py_version_short/site-packages',
49- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
50+ 'purelib': '$platbase/'+libname+'/python$py_version_short/site-packages',
51+ 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages',
52 'headers': '$base/include/python$py_version_short/$dist_name',
53 'scripts': '$base/bin',
54 'data' : '$base',
55Index: Python-2.7.14/Lib/distutils/sysconfig.py
56===================================================================
57--- Python-2.7.14.orig/Lib/distutils/sysconfig.py
58+++ Python-2.7.14/Lib/distutils/sysconfig.py
59@@ -119,8 +119,11 @@ def get_python_lib(plat_specific=0, stan
60 prefix = plat_specific and EXEC_PREFIX or PREFIX
61
62 if os.name == "posix":
63- libpython = os.path.join(prefix,
64- "lib", "python" + get_python_version())
65+ if plat_specific or standard_lib:
66+ lib = sys.lib
67+ else:
68+ lib = "lib"
69+ libpython = os.path.join(prefix, lib, "python" + get_python_version())
70 if standard_lib:
71 return libpython
72 else:
73Index: Python-2.7.14/Lib/pydoc.py
74===================================================================
75--- Python-2.7.14.orig/Lib/pydoc.py
76+++ Python-2.7.14/Lib/pydoc.py
77@@ -375,7 +375,7 @@ class Doc:
78 docmodule = docclass = docroutine = docother = docproperty = docdata = fail
79
80 def getdocloc(self, object,
81- basedir=os.path.join(sys.exec_prefix, "lib",
82+ basedir=os.path.join(sys.exec_prefix, "sys.lib",
83 "python"+sys.version[0:3])):
84 """Return the location of module docs or None"""
85
86Index: Python-2.7.14/Lib/site.py
87===================================================================
88--- Python-2.7.14.orig/Lib/site.py
89+++ Python-2.7.14/Lib/site.py
90@@ -288,13 +288,18 @@ def getsitepackages():
91 if sys.platform in ('os2emx', 'riscos'):
92 sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
93 elif os.sep == '/':
94- sitepackages.append(os.path.join(prefix, "lib",
95+ sitepackages.append(os.path.join(prefix, sys.lib,
96 "python" + sys.version[:3],
97 "site-packages"))
98- sitepackages.append(os.path.join(prefix, "lib", "site-python"))
99+ sitepackages.append(os.path.join(prefix, sys.lib, "site-python"))
100+ if sys.lib != "lib":
101+ sitepackages.append(os.path.join(prefix, "lib",
102+ "python" + sys.version[:3],
103+ "site-packages"))
104+ sitepackages.append(os.path.join(prefix, "lib", "site-python"))
105 else:
106 sitepackages.append(prefix)
107- sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
108+ sitepackages.append(os.path.join(prefix, sys.lib, "site-packages"))
109 return sitepackages
110
111 def addsitepackages(known_paths):
112Index: Python-2.7.14/Lib/sysconfig.py
113===================================================================
114--- Python-2.7.14.orig/Lib/sysconfig.py
115+++ Python-2.7.14/Lib/sysconfig.py
116@@ -7,10 +7,10 @@ from os.path import pardir, realpath
117
118 _INSTALL_SCHEMES = {
119 'posix_prefix': {
120- 'stdlib': '{base}/lib/python{py_version_short}',
121- 'platstdlib': '{platbase}/lib/python{py_version_short}',
122+ 'stdlib': '{base}/'+sys.lib+'/python{py_version_short}',
123+ 'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}',
124 'purelib': '{base}/lib/python{py_version_short}/site-packages',
125- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
126+ 'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages',
127 'include': '{base}/include/python{py_version_short}',
128 'platinclude': '{platbase}/include/python{py_version_short}',
129 'scripts': '{base}/bin',
130@@ -65,10 +65,10 @@ _INSTALL_SCHEMES = {
131 'data' : '{userbase}',
132 },
133 'posix_user': {
134- 'stdlib': '{userbase}/lib/python{py_version_short}',
135- 'platstdlib': '{userbase}/lib/python{py_version_short}',
136+ 'stdlib': '{userbase}/'+sys.lib+'/python{py_version_short}',
137+ 'platstdlib': '{userbase}/'+sys.lib+'/python{py_version_short}',
138 'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
139- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
140+ 'platlib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages',
141 'include': '{userbase}/include/python{py_version_short}',
142 'scripts': '{userbase}/bin',
143 'data' : '{userbase}',
144Index: Python-2.7.14/Lib/test/test_dl.py
145===================================================================
146--- Python-2.7.14.orig/Lib/test/test_dl.py
147+++ Python-2.7.14/Lib/test/test_dl.py
148@@ -4,10 +4,11 @@
149 import unittest
150 from test.test_support import verbose, import_module
151 dl = import_module('dl', deprecated=True)
152+import sys
153
154 sharedlibs = [
155- ('/usr/lib/libc.so', 'getpid'),
156- ('/lib/libc.so.6', 'getpid'),
157+ ('/usr/'+sys.lib+'/libc.so', 'getpid'),
158+ ('/'+sys.lib+'/libc.so.6', 'getpid'),
159 ('/usr/bin/cygwin1.dll', 'getpid'),
160 ('/usr/lib/libc.dylib', 'getpid'),
161 ]
162Index: Python-2.7.14/Lib/test/test_site.py
163===================================================================
164--- Python-2.7.14.orig/Lib/test/test_site.py
165+++ Python-2.7.14/Lib/test/test_site.py
166@@ -252,12 +252,16 @@ class HelperFunctionsTests(unittest.Test
167 self.assertEqual(dirs[0], wanted)
168 elif os.sep == '/':
169 # OS X, Linux, FreeBSD, etc
170- self.assertEqual(len(dirs), 2)
171 wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
172 'site-packages')
173- self.assertEqual(dirs[0], wanted)
174+ self.assertTrue(wanted in dirs)
175 wanted = os.path.join('xoxo', 'lib', 'site-python')
176- self.assertEqual(dirs[1], wanted)
177+ self.assertTrue(wanted in dirs)
178+ wanted = os.path.join('xoxo', sys.lib, 'python' + sys.version[:3],
179+ 'site-packages')
180+ self.assertTrue(wanted in dirs)
181+ wanted = os.path.join('xoxo', sys.lib, 'site-python')
182+ self.assertTrue(wanted in dirs)
183 else:
184 # other platforms
185 self.assertEqual(len(dirs), 2)
186Index: Python-2.7.14/Lib/trace.py
187===================================================================
188--- Python-2.7.14.orig/Lib/trace.py
189+++ Python-2.7.14/Lib/trace.py
190@@ -754,10 +754,10 @@ def main(argv=None):
191 # should I also call expanduser? (after all, could use $HOME)
192
193 s = s.replace("$prefix",
194- os.path.join(sys.prefix, "lib",
195+ os.path.join(sys.prefix, sys.lib,
196 "python" + sys.version[:3]))
197 s = s.replace("$exec_prefix",
198- os.path.join(sys.exec_prefix, "lib",
199+ os.path.join(sys.exec_prefix, sys.lib,
200 "python" + sys.version[:3]))
201 s = os.path.normpath(s)
202 ignore_dirs.append(s)
203Index: Python-2.7.14/Makefile.pre.in
204===================================================================
205--- Python-2.7.14.orig/Makefile.pre.in
206+++ Python-2.7.14/Makefile.pre.in
207@@ -91,6 +91,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG
208
209 # Machine-dependent subdirectories
210 MACHDEP= @MACHDEP@
211+LIB= @LIB@
212
213 # Multiarch directory (may be empty)
214 MULTIARCH= @MULTIARCH@
215@@ -110,7 +111,7 @@ LIBDIR= @libdir@
216 MANDIR= @mandir@
217 INCLUDEDIR= @includedir@
218 CONFINCLUDEDIR= $(exec_prefix)/include
219-SCRIPTDIR= $(prefix)/lib
220+SCRIPTDIR= $(prefix)/@LIB@
221
222 # Detailed destination directories
223 BINLIBDEST= $(LIBDIR)/python$(VERSION)
224@@ -645,6 +646,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
225 -DEXEC_PREFIX='"$(exec_prefix)"' \
226 -DVERSION='"$(VERSION)"' \
227 -DVPATH='"$(VPATH)"' \
228+ -DLIB='"$(LIB)"' \
229 -o $@ $(srcdir)/Modules/getpath.c
230
231 Modules/python.o: $(srcdir)/Modules/python.c
232@@ -693,7 +695,7 @@ regen-ast:
233 Python/compile.o Python/symtable.o Python/ast.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h
234
235 Python/getplatform.o: $(srcdir)/Python/getplatform.c
236- $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
237+ $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -DLIB='"$(LIB)"' -o $@ $(srcdir)/Python/getplatform.c
238
239 Python/importdl.o: $(srcdir)/Python/importdl.c
240 $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
241Index: Python-2.7.14/Modules/getpath.c
242===================================================================
243--- Python-2.7.14.orig/Modules/getpath.c
244+++ Python-2.7.14/Modules/getpath.c
245@@ -100,6 +100,13 @@
246 #error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined"
247 #endif
248
249+#define LIB_PYTHON LIB "/python" VERSION
250+
251+#ifndef PYTHONPATH
252+#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \
253+ EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload"
254+#endif
255+
256 #ifndef LANDMARK
257 #define LANDMARK "os.py"
258 #endif
259@@ -108,7 +115,7 @@ static char prefix[MAXPATHLEN+1];
260 static char exec_prefix[MAXPATHLEN+1];
261 static char progpath[MAXPATHLEN+1];
262 static char *module_search_path = NULL;
263-static char lib_python[] = "lib/python" VERSION;
264+static char lib_python[] = LIB_PYTHON;
265
266 static void
267 reduce(char *dir)
268Index: Python-2.7.14/Python/getplatform.c
269===================================================================
270--- Python-2.7.14.orig/Python/getplatform.c
271+++ Python-2.7.14/Python/getplatform.c
272@@ -10,3 +10,13 @@ Py_GetPlatform(void)
273 {
274 return PLATFORM;
275 }
276+
277+#ifndef LIB
278+#define LIB "lib"
279+#endif
280+
281+const char *
282+Py_GetLib(void)
283+{
284+ return LIB;
285+}
286Index: Python-2.7.14/Python/sysmodule.c
287===================================================================
288--- Python-2.7.14.orig/Python/sysmodule.c
289+++ Python-2.7.14/Python/sysmodule.c
290@@ -1437,6 +1437,8 @@ _PySys_Init(void)
291 PyString_FromString(Py_GetCopyright()));
292 SET_SYS_FROM_STRING("platform",
293 PyString_FromString(Py_GetPlatform()));
294+ SET_SYS_FROM_STRING("lib",
295+ PyString_FromString(Py_GetLib()));
296 SET_SYS_FROM_STRING("executable",
297 PyString_FromString(Py_GetProgramFullPath()));
298 SET_SYS_FROM_STRING("prefix",
diff --git a/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch b/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch
deleted file mode 100644
index abab41e957..0000000000
--- a/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch
+++ /dev/null
@@ -1,19 +0,0 @@
1When using make -j with the 'install' target, it's possible for altbininstall
2(which normally creates BINDIR) and libainstall (which doesn't, though it
3installs python-config there) to race, resulting in a failure due to
4attempting to install python-config into a nonexistent BINDIR. Ensure it also
5exists in the libainstall target.
6
7Upstream-Status: Pending
8
9--- Python-2.7.3.orig/Makefile.pre.in
10+++ Python-2.7.3/Makefile.pre.in
11@@ -1187,7 +1187,7 @@
12 LIBPC= $(LIBDIR)/pkgconfig
13
14 libainstall: @DEF_MAKE_RULE@ python-config
15- @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC); \
16+ @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC) $(BINDIR); \
17 do \
18 if test ! -d $(DESTDIR)$$i; then \
19 echo "Creating directory $$i"; \
diff --git a/meta/recipes-devtools/python/python/pass-missing-libraries-to-Extension-for-mul.patch b/meta/recipes-devtools/python/python/pass-missing-libraries-to-Extension-for-mul.patch
deleted file mode 100644
index 44fcaacf30..0000000000
--- a/meta/recipes-devtools/python/python/pass-missing-libraries-to-Extension-for-mul.patch
+++ /dev/null
@@ -1,82 +0,0 @@
1From 71447f04979b267f8866573b67a4340b2719d799 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Fri, 4 Aug 2017 14:10:43 +0800
4Subject: [PATCH] setup.py: pass missing libraries to Extension for multiprocessing module
5
6In the following commit:
7...
8commit e711cafab13efc9c1fe6c5cd75826401445eb585
9Author: Benjamin Peterson <benjamin@python.org>
10Date: Wed Jun 11 16:44:04 2008 +0000
11
12 Merged revisions 64104,64117 via svnmerge from
13 svn+ssh://pythondev@svn.python.org/python/trunk
14...
15(see diff in setup.py)
16It assigned libraries for multiprocessing module according
17the host_platform, but not pass it to Extension.
18
19In glibc, the following commit caused two definition of
20sem_getvalue are different.
21https://sourceware.org/git/?p=glibc.git;a=commit;h=042e1521c794a945edc43b5bfa7e69ad70420524
22(see diff in nptl/sem_getvalue.c for detail)
23`__new_sem_getvalue' is the latest sem_getvalue@@GLIBC_2.1
24and `__old_sem_getvalue' is to compat the old version
25sem_getvalue@GLIBC_2.0.
26
27To build python for embedded Linux systems:
28http://www.yoctoproject.org/docs/2.3.1/yocto-project-qs/yocto-project-qs.html
29If not explicitly link to library pthread (-lpthread), it will
30load glibc's sem_getvalue randomly at runtime.
31
32Such as build python on linux x86_64 host and run the python
33on linux x86_32 target. If not link library pthread, it caused
34multiprocessing bounded semaphore could not work correctly.
35...
36>>> import multiprocessing
37>>> pool_sema = multiprocessing.BoundedSemaphore(value=1)
38>>> pool_sema.acquire()
39True
40>>> pool_sema.release()
41Traceback (most recent call last):
42 File "<stdin>", line 1, in <module>
43ValueError: semaphore or lock released too many times
44...
45
46And the semaphore issue also caused multiprocessing.Queue().put() hung.
47
48Upstream-Status: Submitted [https://github.com/python/cpython/pull/2999]
49
50Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
51---
52 setup.py | 7 +++++--
53 1 file changed, 5 insertions(+), 2 deletions(-)
54
55diff --git a/setup.py b/setup.py
56index 54054c2..9646bfc 100644
57--- a/setup.py
58+++ b/setup.py
59@@ -1586,8 +1586,10 @@ class PyBuildExt(build_ext):
60 elif host_platform.startswith('netbsd'):
61 macros = dict()
62 libraries = []
63-
64- else: # Linux and other unices
65+ elif host_platform.startswith(('linux')):
66+ macros = dict()
67+ libraries = ['pthread']
68+ else: # Other unices
69 macros = dict()
70 libraries = ['rt']
71
72@@ -1610,6 +1612,7 @@ class PyBuildExt(build_ext):
73 if sysconfig.get_config_var('WITH_THREAD'):
74 exts.append ( Extension('_multiprocessing', multiprocessing_srcs,
75 define_macros=macros.items(),
76+ libraries=libraries,
77 include_dirs=["Modules/_multiprocessing"]))
78 else:
79 missing.append('_multiprocessing')
80--
812.7.4
82
diff --git a/meta/recipes-devtools/python/python/python-2.7.3-remove-bsdb-rpath.patch b/meta/recipes-devtools/python/python/python-2.7.3-remove-bsdb-rpath.patch
deleted file mode 100644
index 216be0a448..0000000000
--- a/meta/recipes-devtools/python/python/python-2.7.3-remove-bsdb-rpath.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3Remove the RPATH to avoid QA issue warning.
4
5RP: Added secondary unnecessary rpath to the list 2012/8/7
6Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
7
8
9Index: Python-2.7.3/setup.py
10===================================================================
11--- Python-2.7.3.orig/setup.py 2012-08-07 10:41:58.560132529 +0000
12+++ Python-2.7.3/setup.py 2012-08-07 11:09:47.852094515 +0000
13@@ -1042,7 +1042,6 @@
14 exts.append(Extension('_bsddb', ['_bsddb.c'],
15 depends = ['bsddb.h'],
16 library_dirs=dblib_dir,
17- runtime_library_dirs=dblib_dir,
18 include_dirs=db_incs,
19 libraries=dblibs))
20 else:
21@@ -1252,7 +1251,6 @@
22 print "building dbm using bdb"
23 dbmext = Extension('dbm', ['dbmmodule.c'],
24 library_dirs=dblib_dir,
25- runtime_library_dirs=dblib_dir,
26 include_dirs=db_incs,
27 define_macros=[
28 ('HAVE_BERKDB_H', None),
diff --git a/meta/recipes-devtools/python/python/python2-manifest.json b/meta/recipes-devtools/python/python/python2-manifest.json
deleted file mode 100644
index eb52e862ab..0000000000
--- a/meta/recipes-devtools/python/python/python2-manifest.json
+++ /dev/null
@@ -1,1138 +0,0 @@
1# DO NOT (entirely) modify this file manually, please read.
2#
3# IMPORTANT NOTE:
4# Please keep in mind that the create_manifest task relies on the fact the the
5# target and native Python packages are the same, and it also needs to be executed
6# with a fully working native package (with all the PACKAGECONFIGs enabled and all
7# and all the modules should be working, check log.do_compile), otherwise the script
8# will fail to find dependencies correctly, this note is valid either if you are
9# upgrading to a new Python version or adding a new package.
10#
11#
12# If you are adding a new package please follow the next steps:
13# How to add a new package:
14# - If a user wants to add a new package all that has to be done is:
15# Modify the python2-manifest.json file, and add the required file(s) to the FILES list,
16# fill up the SUMMARY section as well, the script should handle all the rest.
17#
18# Real example:
19# We want to add a web browser package, including the file webbrowser.py
20# which at the moment is on python-misc.
21# "webbrowser": {
22# "files": ["${libdir}/python2.7/lib-dynload/webbrowser.py"],
23# "rdepends": [],
24# "summary": "Python Web Browser support"}
25#
26# * Note that the rdepends field was left empty
27#
28# We run $ bitbake python -c create_manifest and the resulting manifest
29# should be completed after a few seconds, showing something like:
30# "webbrowser": {
31# "files": ["${libdir}/python2.7/webbrowser.py"],
32# "rdepends": ["core","fcntl","io","pickle","shell","subprocess"],
33# "summary": "Python Web Browser support"}
34#
35#
36# If you are upgrading Python to a new version please follow the next steps:
37# After each Python upgrade, the create_manifest task should be executed, because we
38# don't control what changes on upstream Python, so, some module dependency
39# might have changed without us realizing it, a certain module can either have
40# more or less dependencies, or could be depending on a new file that was just
41# created on the new release and for obvious reasons we wouldn't have it on our
42# old manifest, all of these issues would cause runtime errors on our system.
43#
44# - Upgrade both the native and target Python packages to a new version
45# - Run the create_manifest task for the target Python package as its shown below:
46#
47# $ bitbake python -c create_manifest
48#
49# This will automatically replace your manifest file located under the Python directory
50# with an new one, which contains the new dependencies (if any).
51#
52# Several things could have gone wrong here, I will try to explain a few:
53#
54# a) A new file was introduced on this release, e.g. sha3*.so:
55# The task will check what its needed to import every module, more than one module would
56# would probably depend on sha3*.so, although only one module should contain it.
57#
58# After running the task, the new manifest will have the sha3*.so file on more than one
59# module, you need to manually decide which one of them should get it and delete it from
60# the others, for example sha3*.so should likely be on ${PN}-crypt.
61# Once you have deleted from the others you need to run the create_manifest task again,
62# this will populate the other module's rdepends fields, with ${PN}-crypt and you should be
63# good to go.
64#
65# b) The native package wasn't built correctly and its missing a certain module:
66# As mentioned before, you need to make sure the native package was built with all the modules
67# because it is used as base to build the manifest file, you need to manually check log.do_compile
68# since it won't error out the compile function if its only missing a couple of modules.
69#
70# e.g. missing the _uuid module, log.do_compile would show the following:
71# Python build finished successfully!
72# The necessary bits to build these optional modules were not found:
73# _uuid
74#
75# What will happen here is that the new manifest would not be aware that the _uuid module exists, so
76# not only we won't know of any dependencies to it, but also, the _uuid* files will be packaged on
77# the misc package (which is where any file that doesn't belong anywhere else ends up).
78#
79# This will eventually cause runtime errors on our system if we don't include the misc package on
80# on our image, because the _uuid files will be missing.
81# If we build the _uuid module correctly and run the create_manifest task the _uuid files will be
82# detected correctly along with its dependencies, and we will get a working manifest.
83#
84# This is the reason why it is important to make sure we have a fully working native build,
85# so we can avoid these errors.
86#
87#
88#
89# DO NOT MODIFY THE NEXT LINE!, IT IS USED AS A MARKER FOR THE ACTUAL JSON MANIFEST
90# EOC
91{
92 "tests": {
93 "summary": "Python test suite",
94 "rdepends": [
95 "core",
96 "modules"
97 ],
98 "files": [
99 "${libdir}/python2.7/*/test",
100 "${libdir}/python2.7/*/tests",
101 "${libdir}/python2.7/idlelib/idle_test/",
102 "${libdir}/python2.7/test"
103 ],
104 "cached": []
105 },
106 "2to3": {
107 "summary": "Python automated Python 2 to 3 code translator",
108 "rdepends": [
109 "core"
110 ],
111 "files": [
112 "${bindir}/2to3*",
113 "${libdir}/python2.7/lib2to3"
114 ]
115 },
116 "argparse": {
117 "summary": "Python command line argument parser",
118 "rdepends": [
119 "codecs",
120 "core",
121 "lang",
122 "textutils"
123 ],
124 "files": [
125 "${libdir}/python2.7/argparse.py"
126 ]
127 },
128 "audio": {
129 "summary": "Python Audio Handling",
130 "rdepends": [
131 "core",
132 "crypt",
133 "fcntl",
134 "io",
135 "math"
136 ],
137 "files": [
138 "${libdir}/python2.7/audiodev.py",
139 "${libdir}/python2.7/chunk.py",
140 "${libdir}/python2.7/lib-dynload/audioop.so",
141 "${libdir}/python2.7/lib-dynload/ossaudiodev.so",
142 "${libdir}/python2.7/sndhdr.py",
143 "${libdir}/python2.7/sunau.py",
144 "${libdir}/python2.7/sunaudio.py",
145 "${libdir}/python2.7/toaiff.py",
146 "${libdir}/python2.7/wave.py"
147 ]
148 },
149 "bsddb": {
150 "summary": "Python bindings for the Berkeley Database",
151 "rdepends": [
152 "core"
153 ],
154 "files": [
155 "${libdir}/python2.7/bsddb",
156 "${libdir}/python2.7/lib-dynload/_bsddb.so"
157 ]
158 },
159 "codecs": {
160 "summary": "Python codec",
161 "rdepends": [
162 "core",
163 "io",
164 "lang"
165 ],
166 "files": [
167 "${libdir}/python2.7/gettext.py",
168 "${libdir}/python2.7/lib-dynload/_codecs_cn.so",
169 "${libdir}/python2.7/lib-dynload/_codecs_hk.so",
170 "${libdir}/python2.7/lib-dynload/_codecs_iso2022.so",
171 "${libdir}/python2.7/lib-dynload/_codecs_jp.so",
172 "${libdir}/python2.7/lib-dynload/_codecs_kr.so",
173 "${libdir}/python2.7/lib-dynload/_codecs_tw.so",
174 "${libdir}/python2.7/lib-dynload/_multibytecodec.so",
175 "${libdir}/python2.7/lib-dynload/unicodedata.so",
176 "${libdir}/python2.7/locale.py",
177 "${libdir}/python2.7/stringprep.py",
178 "${libdir}/python2.7/xdrlib.py"
179 ]
180 },
181 "compile": {
182 "summary": "Python bytecode compilation support",
183 "rdepends": [
184 "core"
185 ],
186 "files": [
187 "${libdir}/python2.7/compileall.py",
188 "${libdir}/python2.7/py_compile.py"
189 ]
190 },
191 "compiler": {
192 "summary": "Python compiler support",
193 "rdepends": [
194 "core",
195 "io",
196 "lang"
197 ],
198 "files": [
199 "${libdir}/python2.7/compiler"
200 ]
201 },
202 "compression": {
203 "summary": "Python high-level compression support",
204 "rdepends": [
205 "core",
206 "io",
207 "shell",
208 "unixadmin",
209 "zlib"
210 ],
211 "files": [
212 "${libdir}/python2.7/gzip.py",
213 "${libdir}/python2.7/lib-dynload/bz2.so",
214 "${libdir}/python2.7/tarfile.py",
215 "${libdir}/python2.7/zipfile.py"
216 ]
217 },
218 "contextlib": {
219 "summary": "Python utilities for with-statementcontexts.",
220 "rdepends": [
221 "core",
222 "lang"
223 ],
224 "files": [
225 "${libdir}/python2.7/contextlib.py"
226 ]
227 },
228 "core": {
229 "summary": "Python interpreter and core modules",
230 "rdepends": [],
231 "files": [
232 "${bindir}/python*",
233 "${includedir}/python2.7/pyconfig*.h",
234 "${libdir}/python2.7/ConfigParser.py",
235 "${libdir}/python2.7/UserDict.py",
236 "${libdir}/python2.7/UserList.py",
237 "${libdir}/python2.7/UserString.py",
238 "${libdir}/python2.7/__future__.py",
239 "${libdir}/python2.7/_abcoll.py",
240 "${libdir}/python2.7/_sysconfigdata.py",
241 "${libdir}/python2.7/_weakrefset.py",
242 "${libdir}/python2.7/abc.py",
243 "${libdir}/python2.7/ast.py",
244 "${libdir}/python2.7/atexit.py",
245 "${libdir}/python2.7/codecs.py",
246 "${libdir}/python2.7/collections.py",
247 "${libdir}/python2.7/copy.py",
248 "${libdir}/python2.7/copy_reg.py",
249 "${libdir}/python2.7/encodings",
250 "${libdir}/python2.7/encodings/aliases.py",
251 "${libdir}/python2.7/encodings/utf_8.py",
252 "${libdir}/python2.7/genericpath.py",
253 "${libdir}/python2.7/getopt.py",
254 "${libdir}/python2.7/heapq.py",
255 "${libdir}/python2.7/importlib",
256 "${libdir}/python2.7/keyword.py",
257 "${libdir}/python2.7/lib-dynload/_collections.so",
258 "${libdir}/python2.7/lib-dynload/_heapq.so",
259 "${libdir}/python2.7/lib-dynload/_locale.so",
260 "${libdir}/python2.7/lib-dynload/_struct.so",
261 "${libdir}/python2.7/lib-dynload/binascii.so",
262 "${libdir}/python2.7/lib-dynload/itertools.so",
263 "${libdir}/python2.7/lib-dynload/operator.so",
264 "${libdir}/python2.7/lib-dynload/readline.so",
265 "${libdir}/python2.7/lib-dynload/strop.so",
266 "${libdir}/python2.7/lib-dynload/time.so",
267 "${libdir}/python2.7/lib-dynload/xreadlines.so",
268 "${libdir}/python2.7/linecache.py",
269 "${libdir}/python2.7/new.py",
270 "${libdir}/python2.7/os.py",
271 "${libdir}/python2.7/platform.py",
272 "${libdir}/python2.7/posixpath.py",
273 "${libdir}/python2.7/re.py",
274 "${libdir}/python2.7/rlcompleter.py",
275 "${libdir}/python2.7/site.py",
276 "${libdir}/python2.7/sitecustomize.py",
277 "${libdir}/python2.7/sre_compile.py",
278 "${libdir}/python2.7/sre_constants.py",
279 "${libdir}/python2.7/sre_parse.py",
280 "${libdir}/python2.7/stat.py",
281 "${libdir}/python2.7/string.py",
282 "${libdir}/python2.7/struct.py",
283 "${libdir}/python2.7/sysconfig.py",
284 "${libdir}/python2.7/traceback.py",
285 "${libdir}/python2.7/types.py",
286 "${libdir}/python2.7/warnings.py",
287 "${libdir}/python2.7/weakref.py"
288 ]
289 },
290 "crypt": {
291 "summary": "Python basic cryptographic and hashing support",
292 "rdepends": [
293 "core"
294 ],
295 "files": [
296 "${libdir}/python2.7/hashlib.py",
297 "${libdir}/python2.7/lib-dynload/_hashlib.so",
298 "${libdir}/python2.7/lib-dynload/crypt.so",
299 "${libdir}/python2.7/md5.py",
300 "${libdir}/python2.7/sha.py"
301 ]
302 },
303 "ctypes": {
304 "summary": "Python C types support",
305 "rdepends": [
306 "core"
307 ],
308 "files": [
309 "${libdir}/python2.7/ctypes",
310 "${libdir}/python2.7/lib-dynload/_ctypes.so",
311 "${libdir}/python2.7/lib-dynload/_ctypes_test.so"
312 ]
313 },
314 "curses": {
315 "summary": "Python curses support",
316 "rdepends": [
317 "core"
318 ],
319 "files": [
320 "${libdir}/python2.7/curses",
321 "${libdir}/python2.7/lib-dynload/_curses.so",
322 "${libdir}/python2.7/lib-dynload/_curses_panel.so"
323 ]
324 },
325 "datetime": {
326 "summary": "Python calendar and time support",
327 "rdepends": [
328 "codecs",
329 "core",
330 "lang"
331 ],
332 "files": [
333 "${libdir}/python2.7/_strptime.py",
334 "${libdir}/python2.7/calendar.py",
335 "${libdir}/python2.7/lib-dynload/datetime.so"
336 ]
337 },
338 "db": {
339 "summary": "Python file-based database support",
340 "rdepends": [
341 "bsddb",
342 "core",
343 "gdbm"
344 ],
345 "files": [
346 "${libdir}/python2.7/anydbm.py",
347 "${libdir}/python2.7/dbhash.py",
348 "${libdir}/python2.7/dumbdbm.py",
349 "${libdir}/python2.7/lib-dynload/dbm.so",
350 "${libdir}/python2.7/whichdb.py"
351 ]
352 },
353 "debugger": {
354 "summary": "Python debugger",
355 "rdepends": [
356 "core",
357 "io",
358 "lang",
359 "pprint",
360 "shell"
361 ],
362 "files": [
363 "${libdir}/python2.7/bdb.py",
364 "${libdir}/python2.7/pdb.py"
365 ]
366 },
367 "dev": {
368 "files": [
369 "${base_libdir}/*.a",
370 "${base_libdir}/*.o",
371 "${datadir}/aclocal",
372 "${datadir}/pkgconfig",
373 "${includedir}",
374 "${libdir}/*.a",
375 "${libdir}/*.la",
376 "${libdir}/*.o",
377 "${libdir}/lib*${SOLIBSDEV}",
378 "${libdir}/pkgconfig",
379 "${libdir}/python2.7/config/Makefile"
380 ],
381 "rdepends": [
382 "core"
383 ],
384 "summary": "Python development package"
385 },
386 "difflib": {
387 "summary": "Python helpers for computing deltas between objects",
388 "rdepends": [
389 "core",
390 "lang"
391 ],
392 "files": [
393 "${libdir}/python2.7/difflib.py"
394 ]
395 },
396 "distutils-staticdev": {
397 "files": [
398 "${libdir}/python2.7/config/lib*.a"
399 ],
400 "rdepends": [
401 "distutils"
402 ],
403 "summary": "Python distribution utilities (static libraries)"
404 },
405 "distutils": {
406 "summary": "Python Distribution Utilities",
407 "rdepends": [
408 "core"
409 ],
410 "files": [
411 "${libdir}/python2.7/config",
412 "${libdir}/python2.7/distutils"
413 ]
414 },
415 "doctest": {
416 "summary": "Python framework for running examples in docstrings",
417 "rdepends": [
418 "core",
419 "crypt",
420 "debugger",
421 "difflib",
422 "fcntl",
423 "io",
424 "lang",
425 "math",
426 "pprint",
427 "shell",
428 "unittest"
429 ],
430 "files": [
431 "${libdir}/python2.7/doctest.py"
432 ]
433 },
434 "email": {
435 "summary": "Python email support",
436 "rdepends": [
437 "contextlib",
438 "core",
439 "crypt",
440 "fcntl",
441 "io",
442 "lang",
443 "math",
444 "netclient",
445 "pickle",
446 "subprocess",
447 "textutils",
448 "threading"
449 ],
450 "files": [
451 "${libdir}/python2.7/email",
452 "${libdir}/python2.7/imaplib.py"
453 ]
454 },
455 "fcntl": {
456 "summary": "Python's fcntl interface",
457 "rdepends": [
458 "core"
459 ],
460 "files": [
461 "${libdir}/python2.7/lib-dynload/fcntl.so"
462 ]
463 },
464 "gdbm": {
465 "summary": "Python GNU database support",
466 "rdepends": [
467 "core"
468 ],
469 "files": [
470 "${libdir}/python2.7/lib-dynload/gdbm.so"
471 ]
472 },
473 "hotshot": {
474 "summary": "Python hotshot performance profiler",
475 "rdepends": [
476 "core"
477 ],
478 "files": [
479 "${libdir}/python2.7/hotshot",
480 "${libdir}/python2.7/lib-dynload/_hotshot.so"
481 ]
482 },
483 "html": {
484 "summary": "Python HTML processing support",
485 "rdepends": [
486 "core"
487 ],
488 "files": [
489 "${libdir}/python2.7/HTMLParser.py",
490 "${libdir}/python2.7/formatter.py",
491 "${libdir}/python2.7/htmlentitydefs.py",
492 "${libdir}/python2.7/htmllib.py",
493 "${libdir}/python2.7/markupbase.py",
494 "${libdir}/python2.7/sgmllib.py"
495 ]
496 },
497 "idle": {
498 "summary": "Python Integrated Development Environment",
499 "rdepends": [
500 "core"
501 ],
502 "files": [
503 "${bindir}/idle",
504 "${libdir}/python2.7/idlelib"
505 ]
506 },
507 "image": {
508 "summary": "Python graphical image handling",
509 "rdepends": [
510 "core"
511 ],
512 "files": [
513 "${libdir}/python2.7/colorsys.py",
514 "${libdir}/python2.7/imghdr.py"
515 ]
516 },
517 "io": {
518 "summary": "Python low-level I/O",
519 "rdepends": [
520 "contextlib",
521 "core",
522 "crypt",
523 "fcntl",
524 "lang",
525 "math",
526 "netclient",
527 "textutils"
528 ],
529 "files": [
530 "${libdir}/python2.7/StringIO.py",
531 "${libdir}/python2.7/_pyio.py",
532 "${libdir}/python2.7/io.py",
533 "${libdir}/python2.7/lib-dynload/_io.so",
534 "${libdir}/python2.7/lib-dynload/_socket.so",
535 "${libdir}/python2.7/lib-dynload/_ssl.so",
536 "${libdir}/python2.7/lib-dynload/cStringIO.so",
537 "${libdir}/python2.7/lib-dynload/select.so",
538 "${libdir}/python2.7/lib-dynload/termios.so",
539 "${libdir}/python2.7/pipes.py",
540 "${libdir}/python2.7/socket.py",
541 "${libdir}/python2.7/ssl.py",
542 "${libdir}/python2.7/tempfile.py"
543 ]
544 },
545 "json": {
546 "summary": "Python JSON support",
547 "rdepends": [
548 "core"
549 ],
550 "files": [
551 "${libdir}/python2.7/json",
552 "${libdir}/python2.7/lib-dynload/_json.so"
553 ]
554 },
555 "lang": {
556 "summary": "Python low-level language support",
557 "rdepends": [
558 "core"
559 ],
560 "files": [
561 "${libdir}/python2.7/bisect.py",
562 "${libdir}/python2.7/code.py",
563 "${libdir}/python2.7/codeop.py",
564 "${libdir}/python2.7/dis.py",
565 "${libdir}/python2.7/functools.py",
566 "${libdir}/python2.7/inspect.py",
567 "${libdir}/python2.7/lib-dynload/_bisect.so",
568 "${libdir}/python2.7/lib-dynload/_functools.so",
569 "${libdir}/python2.7/lib-dynload/array.so",
570 "${libdir}/python2.7/lib-dynload/parser.so",
571 "${libdir}/python2.7/opcode.py",
572 "${libdir}/python2.7/repr.py",
573 "${libdir}/python2.7/symbol.py",
574 "${libdir}/python2.7/token.py",
575 "${libdir}/python2.7/tokenize.py"
576 ]
577 },
578 "logging": {
579 "summary": "Python logging support",
580 "rdepends": [
581 "core",
582 "io",
583 "threading"
584 ],
585 "files": [
586 "${libdir}/python2.7/logging"
587 ]
588 },
589 "mailbox": {
590 "summary": "Python mailbox format support",
591 "rdepends": [
592 "codecs",
593 "contextlib",
594 "core",
595 "crypt",
596 "datetime",
597 "email",
598 "fcntl",
599 "io",
600 "lang",
601 "math",
602 "mime",
603 "netclient",
604 "textutils"
605 ],
606 "files": [
607 "${libdir}/python2.7/mailbox.py"
608 ]
609 },
610 "math": {
611 "summary": "Python math support",
612 "rdepends": [
613 "core",
614 "crypt"
615 ],
616 "files": [
617 "${libdir}/python2.7/lib-dynload/_random.so",
618 "${libdir}/python2.7/lib-dynload/cmath.so",
619 "${libdir}/python2.7/lib-dynload/math.so",
620 "${libdir}/python2.7/random.py",
621 "${libdir}/python2.7/sets.py"
622 ]
623 },
624 "mime": {
625 "summary": "Python MIME handling APIs",
626 "rdepends": [
627 "contextlib",
628 "core",
629 "crypt",
630 "fcntl",
631 "io",
632 "lang",
633 "math",
634 "netclient",
635 "textutils"
636 ],
637 "files": [
638 "${libdir}/python2.7/MimeWriter.py",
639 "${libdir}/python2.7/mimetools.py",
640 "${libdir}/python2.7/mimetypes.py",
641 "${libdir}/python2.7/quopri.py",
642 "${libdir}/python2.7/rfc822.py",
643 "${libdir}/python2.7/uu.py"
644 ]
645 },
646 "mmap": {
647 "summary": "Python memory-mapped file support",
648 "rdepends": [
649 "core"
650 ],
651 "files": [
652 "${libdir}/python2.7/lib-dynload/mmap.so"
653 ]
654 },
655 "modules": {
656 "files": [],
657 "rdepends": [
658 "2to3",
659 "argparse",
660 "audio",
661 "bsddb",
662 "codecs",
663 "compile",
664 "compiler",
665 "compression",
666 "contextlib",
667 "core",
668 "crypt",
669 "ctypes",
670 "curses",
671 "datetime",
672 "db",
673 "debugger",
674 "difflib",
675 "distutils",
676 "doctest",
677 "email",
678 "fcntl",
679 "gdbm",
680 "hotshot",
681 "html",
682 "idle",
683 "image",
684 "io",
685 "json",
686 "lang",
687 "logging",
688 "mailbox",
689 "math",
690 "mime",
691 "mmap",
692 "multiprocessing",
693 "netclient",
694 "netserver",
695 "numbers",
696 "pickle",
697 "pkgutil",
698 "plistlib",
699 "pprint",
700 "profile",
701 "pydoc",
702 "re",
703 "resource",
704 "robotparser",
705 "runpy",
706 "shell",
707 "smtpd",
708 "sqlite3",
709 "sqlite3",
710 "stringold",
711 "subprocess",
712 "syslog",
713 "terminal",
714 "textutils",
715 "threading",
716 "tkinter",
717 "unittest",
718 "unixadmin",
719 "xml",
720 "xmlrpc",
721 "zlib"
722 ],
723 "summary": "All Python modules"
724 },
725 "multiprocessing": {
726 "summary": "Python multiprocessing support",
727 "rdepends": [
728 "core",
729 "fcntl",
730 "io",
731 "pickle",
732 "subprocess",
733 "threading"
734 ],
735 "files": [
736 "${libdir}/python2.7/lib-dynload/_multiprocessing.so",
737 "${libdir}/python2.7/multiprocessing"
738 ]
739 },
740 "netclient": {
741 "summary": "Python Internet Protocol clients",
742 "rdepends": [
743 "codecs",
744 "contextlib",
745 "core",
746 "crypt",
747 "ctypes",
748 "datetime",
749 "email",
750 "fcntl",
751 "io",
752 "lang",
753 "math",
754 "mime",
755 "pickle",
756 "subprocess",
757 "textutils",
758 "threading"
759 ],
760 "files": [
761 "${libdir}/python2.7/Cookie.py",
762 "${libdir}/python2.7/_LWPCookieJar.py",
763 "${libdir}/python2.7/_MozillaCookieJar.py",
764 "${libdir}/python2.7/base64.py",
765 "${libdir}/python2.7/cookielib.py",
766 "${libdir}/python2.7/ftplib.py",
767 "${libdir}/python2.7/hmac.py",
768 "${libdir}/python2.7/httplib.py",
769 "${libdir}/python2.7/nntplib.py",
770 "${libdir}/python2.7/poplib.py",
771 "${libdir}/python2.7/smtplib.py",
772 "${libdir}/python2.7/telnetlib.py",
773 "${libdir}/python2.7/urllib.py",
774 "${libdir}/python2.7/urllib2.py",
775 "${libdir}/python2.7/urlparse.py",
776 "${libdir}/python2.7/uuid.py"
777 ]
778 },
779 "netserver": {
780 "summary": "Python Internet Protocol servers",
781 "rdepends": [
782 "compression",
783 "contextlib",
784 "core",
785 "crypt",
786 "fcntl",
787 "io",
788 "lang",
789 "math",
790 "mime",
791 "netclient",
792 "shell",
793 "textutils",
794 "threading",
795 "unixadmin",
796 "zlib"
797 ],
798 "files": [
799 "${libdir}/python2.7/BaseHTTPServer.py",
800 "${libdir}/python2.7/CGIHTTPServer.py",
801 "${libdir}/python2.7/SimpleHTTPServer.py",
802 "${libdir}/python2.7/SocketServer.py",
803 "${libdir}/python2.7/cgi.py"
804 ]
805 },
806 "numbers": {
807 "summary": "Python number APIs",
808 "rdepends": [
809 "codecs",
810 "core",
811 "lang",
812 "math",
813 "threading"
814 ],
815 "files": [
816 "${libdir}/python2.7/decimal.py",
817 "${libdir}/python2.7/fractions.py",
818 "${libdir}/python2.7/numbers.py"
819 ]
820 },
821 "pickle": {
822 "summary": "Python serialisation/persistence support",
823 "rdepends": [
824 "core",
825 "io"
826 ],
827 "files": [
828 "${libdir}/python2.7/lib-dynload/cPickle.so",
829 "${libdir}/python2.7/pickle.py",
830 "${libdir}/python2.7/pickletools.py",
831 "${libdir}/python2.7/shelve.py"
832 ]
833 },
834 "pkgutil": {
835 "summary": "Python package extension utility support",
836 "rdepends": [
837 "core"
838 ],
839 "files": [
840 "${libdir}/python2.7/pkgutil.py"
841 ]
842 },
843 "plistlib": {
844 "summary": "Generate and parse Mac OS X .plist files",
845 "rdepends": [
846 "core",
847 "datetime",
848 "io"
849 ],
850 "files": [
851 "${libdir}/python2.7/plistlib.py"
852 ]
853 },
854 "pprint": {
855 "summary": "Python pretty-print support",
856 "rdepends": [
857 "core",
858 "io"
859 ],
860 "files": [
861 "${libdir}/python2.7/pprint.py"
862 ]
863 },
864 "profile": {
865 "summary": "Python basic performance profiling support",
866 "rdepends": [
867 "codecs",
868 "core",
869 "lang",
870 "resource",
871 "textutils"
872 ],
873 "files": [
874 "${libdir}/python2.7/cProfile.py",
875 "${libdir}/python2.7/lib-dynload/_lsprof.so",
876 "${libdir}/python2.7/profile.py",
877 "${libdir}/python2.7/pstats.py"
878 ]
879 },
880 "pydoc": {
881 "summary": "Python interactive help support",
882 "rdepends": [
883 "codecs",
884 "core",
885 "lang",
886 "pkgutil"
887 ],
888 "files": [
889 "${bindir}/pydoc",
890 "${libdir}/python2.7/pydoc.py",
891 "${libdir}/python2.7/pydoc_data"
892 ]
893 },
894 "re": {
895 "summary": "Python Regular Expression APIs",
896 "rdepends": [
897 "core"
898 ],
899 "files": [
900 "${libdir}/python2.7/sre.py"
901 ]
902 },
903 "resource": {
904 "summary": "Python resource control interface",
905 "rdepends": [
906 "core"
907 ],
908 "files": [
909 "${libdir}/python2.7/lib-dynload/resource.so"
910 ]
911 },
912 "robotparser": {
913 "summary": "Python robots.txt parser",
914 "rdepends": [
915 "contextlib",
916 "core",
917 "io",
918 "lang",
919 "netclient",
920 "textutils"
921 ],
922 "files": [
923 "${libdir}/python2.7/robotparser.py"
924 ]
925 },
926 "runpy": {
927 "summary": "Python helper for locating/executing scripts in module namespace",
928 "rdepends": [
929 "core",
930 "pkgutil"
931 ],
932 "files": [
933 "${libdir}/python2.7/runpy.py"
934 ]
935 },
936 "shell": {
937 "summary": "Python shell-like functionality",
938 "rdepends": [
939 "compression",
940 "core",
941 "io",
942 "unixadmin",
943 "zlib"
944 ],
945 "files": [
946 "${libdir}/python2.7/cmd.py",
947 "${libdir}/python2.7/commands.py",
948 "${libdir}/python2.7/dircache.py",
949 "${libdir}/python2.7/fnmatch.py",
950 "${libdir}/python2.7/glob.py",
951 "${libdir}/python2.7/popen2.py",
952 "${libdir}/python2.7/shlex.py",
953 "${libdir}/python2.7/shutil.py"
954 ]
955 },
956 "smtpd": {
957 "summary": "Python Simple Mail Transport Daemon",
958 "rdepends": [
959 "core",
960 "fcntl",
961 "io",
962 "lang"
963 ],
964 "files": [
965 "${bindir}/smtpd.py",
966 "${libdir}/python2.7/asynchat.py",
967 "${libdir}/python2.7/asyncore.py",
968 "${libdir}/python2.7/smtpd.py"
969 ]
970 },
971 "sqlite3": {
972 "summary": "Python Sqlite3 database support",
973 "rdepends": [
974 "core",
975 "datetime"
976 ],
977 "files": [
978 "${libdir}/python2.7/lib-dynload/_sqlite3.so",
979 "${libdir}/python2.7/sqlite3"
980 ]
981 },
982 "stringold": {
983 "summary": "Python string APIs [deprecated]",
984 "rdepends": [
985 "core"
986 ],
987 "files": [
988 "${libdir}/python2.7/stringold.py"
989 ]
990 },
991 "subprocess": {
992 "summary": "Python subprocess support",
993 "rdepends": [
994 "core",
995 "fcntl",
996 "io",
997 "pickle",
998 "threading"
999 ],
1000 "files": [
1001 "${libdir}/python2.7/subprocess.py"
1002 ]
1003 },
1004 "syslog": {
1005 "summary": "Python syslog interface",
1006 "rdepends": [
1007 "core"
1008 ],
1009 "files": [
1010 "${libdir}/python2.7/lib-dynload/syslog.so"
1011 ]
1012 },
1013 "terminal": {
1014 "summary": "Python terminal controlling support",
1015 "rdepends": [
1016 "core",
1017 "io"
1018 ],
1019 "files": [
1020 "${libdir}/python2.7/pty.py",
1021 "${libdir}/python2.7/tty.py"
1022 ]
1023 },
1024 "textutils": {
1025 "summary": "Python option parsin",
1026 "rdepends": [
1027 "codecs",
1028 "core",
1029 "io",
1030 "lang"
1031 ],
1032 "files": [
1033 "${libdir}/python2.7/csv.py",
1034 "${libdir}/python2.7/lib-dynload/_csv.so",
1035 "${libdir}/python2.7/optparse.py",
1036 "${libdir}/python2.7/textwrap.py"
1037 ]
1038 },
1039 "threading": {
1040 "summary": "Python threading & synchronization support",
1041 "rdepends": [
1042 "core"
1043 ],
1044 "files": [
1045 "${libdir}/python2.7/Queue.py",
1046 "${libdir}/python2.7/_threading_local.py",
1047 "${libdir}/python2.7/dummy_thread.py",
1048 "${libdir}/python2.7/dummy_threading.py",
1049 "${libdir}/python2.7/mutex.py",
1050 "${libdir}/python2.7/threading.py"
1051 ]
1052 },
1053 "tkinter": {
1054 "summary": "Python Tcl/Tk bindings",
1055 "rdepends": [
1056 "core"
1057 ],
1058 "files": [
1059 "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_tkinter.so",
1060 "${libdir}/python2.7/lib-tk"
1061 ]
1062 },
1063 "unittest": {
1064 "summary": "Python unit testing framework",
1065 "rdepends": [
1066 "core",
1067 "difflib",
1068 "io",
1069 "lang",
1070 "pprint",
1071 "shell"
1072 ],
1073 "files": [
1074 "${libdir}/python2.7/unittest"
1075 ]
1076 },
1077 "unixadmin": {
1078 "summary": "Python Unix administration support",
1079 "rdepends": [
1080 "core",
1081 "io"
1082 ],
1083 "files": [
1084 "${libdir}/python2.7/getpass.py",
1085 "${libdir}/python2.7/lib-dynload/grp.so",
1086 "${libdir}/python2.7/lib-dynload/nis.so"
1087 ]
1088 },
1089 "xml": {
1090 "summary": "Python basic XML support",
1091 "rdepends": [
1092 "core"
1093 ],
1094 "files": [
1095 "${libdir}/python2.7/lib-dynload/_elementtree.so",
1096 "${libdir}/python2.7/lib-dynload/pyexpat.so",
1097 "${libdir}/python2.7/xml"
1098 ]
1099 },
1100 "xmlrpc": {
1101 "summary": "Python XML-RPC support",
1102 "rdepends": [
1103 "codecs",
1104 "compression",
1105 "contextlib",
1106 "core",
1107 "crypt",
1108 "datetime",
1109 "fcntl",
1110 "io",
1111 "lang",
1112 "math",
1113 "mime",
1114 "netclient",
1115 "netserver",
1116 "pkgutil",
1117 "pydoc",
1118 "textutils",
1119 "threading",
1120 "xml",
1121 "zlib"
1122 ],
1123 "files": [
1124 "${libdir}/python2.7/DocXMLRPCServer.py",
1125 "${libdir}/python2.7/SimpleXMLRPCServer.py",
1126 "${libdir}/python2.7/xmlrpclib.py"
1127 ]
1128 },
1129 "zlib": {
1130 "summary": "Python zlib compression support",
1131 "rdepends": [
1132 "core"
1133 ],
1134 "files": [
1135 "${libdir}/python2.7/lib-dynload/zlib.so"
1136 ]
1137 }
1138}
diff --git a/meta/recipes-devtools/python/python/run-ptest b/meta/recipes-devtools/python/python/run-ptest
deleted file mode 100644
index c7002a4560..0000000000
--- a/meta/recipes-devtools/python/python/run-ptest
+++ /dev/null
@@ -1,3 +0,0 @@
1#!/bin/sh
2
3python -mtest -W | sed -u -e '/\.\.\. ok/ s/^/PASS: /g' -e '/\.\.\. [ERROR|FAIL]/ s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g'
diff --git a/meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch b/meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch
deleted file mode 100644
index dacb552ec7..0000000000
--- a/meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch
+++ /dev/null
@@ -1,35 +0,0 @@
1python should search for db.h in inc_dirs and not in a hardcoded path.
2If db.h is found but HASHVERSION is not 2 we avoid a warning by not
3adding this module to missing variable.
4
5Upstream-Status: Inappropriate [distribution]
6
7Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
8
9
10diff --git a/setup.py b/setup.py
11index b887808..ae51607 100644
12--- a/setup.py
13+++ b/setup.py
14@@ -1237,6 +1237,8 @@ class PyBuildExt(build_ext):
15 # the more recent berkeleydb's db.h file first in the include path
16 # when attempting to compile and it will fail.
17 f = "/usr/include/db.h"
18+ if len(inc_dirs) != 0:
19+ f = os.path.join(inc_dirs[0], "db.h")
20
21 if host_platform == 'darwin':
22 if is_macosx_sdk_path(f):
23@@ -1257,8 +1259,10 @@ class PyBuildExt(build_ext):
24 libraries=libraries))
25 else:
26 exts.append(Extension('bsddb185', ['bsddbmodule.c']))
27- else:
28- missing.append('bsddb185')
29+ # If a newer version is detected don't report an useless
30+ # warning
31+ #else:
32+ # missing.append('bsddb185')
33 else:
34 missing.append('bsddb185')
35
diff --git a/meta/recipes-devtools/python/python/setup_py_skip_cross_import_check.patch b/meta/recipes-devtools/python/python/setup_py_skip_cross_import_check.patch
deleted file mode 100644
index 6ccdb948b9..0000000000
--- a/meta/recipes-devtools/python/python/setup_py_skip_cross_import_check.patch
+++ /dev/null
@@ -1,27 +0,0 @@
1This patch skips over the 'import check' setup.py does when building
2extensions. This generally won't work when cross-compiling.
3
4Upstream-Status: Inappropriate [embedded-specific]
5
6Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
7
8Index: Python-2.7.2/setup.py
9===================================================================
10--- Python-2.7.2.orig/setup.py 2011-11-04 16:46:34.553796410 -0500
11+++ Python-2.7.2/setup.py 2011-11-04 16:59:49.692802313 -0500
12@@ -287,6 +287,15 @@
13 (ext.name, sys.exc_info()[1]))
14 self.failed.append(ext.name)
15 return
16+
17+ # If we're cross-compiling, we want to skip the import check
18+ # i.e. we shouldn't be dynamically loading target shared libs
19+ if os.environ.get('CROSS_COMPILE') is not None:
20+ self.announce(
21+ 'WARNING: skipping import check for cross-compiled "%s"' %
22+ ext.name)
23+ return
24+
25 # Workaround for Mac OS X: The Carbon-based modules cannot be
26 # reliably imported into a command-line Python
27 if 'Carbon' in ext.extra_link_args:
diff --git a/meta/recipes-devtools/python/python/setuptweaks.patch b/meta/recipes-devtools/python/python/setuptweaks.patch
deleted file mode 100644
index 3a91b1916c..0000000000
--- a/meta/recipes-devtools/python/python/setuptweaks.patch
+++ /dev/null
@@ -1,57 +0,0 @@
1This patch removes various ways native system options can pass into the python
2compilation and somehow break C modules.
3
4Upstream-Status: Inappropriate [OE Specific]
5
6RP 2012/04/23
7
8Index: Python-2.7.2/setup.py
9===================================================================
10--- Python-2.7.2.orig/setup.py 2012-04-23 20:03:47.295582553 +0000
11+++ Python-2.7.2/setup.py 2012-04-23 20:03:15.000000000 +0000
12@@ -231,7 +231,13 @@
13 # compilers
14 if compiler is not None:
15 (ccshared,cflags) = sysconfig.get_config_vars('CCSHARED','CFLAGS')
16- args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags
17+ # Need to filter out -isysroot from the flags. Ideally should
18+ # figure out target flags here.
19+ flags = []
20+ for f in cflags.split():
21+ if not f.startswith("-isystem"):
22+ flags.append(f)
23+ args['compiler_so'] = compiler + ' ' + ccshared + ' ' + ' '.join(flags)
24 self.compiler.set_executables(**args)
25
26 build_ext.build_extensions(self)
27@@ -393,7 +399,6 @@
28 # into configure and stored in the Makefile (issue found on OS X 10.3).
29 for env_var, arg_name, dir_list in (
30 ('LDFLAGS', '-R', self.compiler.runtime_library_dirs),
31- ('LDFLAGS', '-L', self.compiler.library_dirs),
32 ('CPPFLAGS', '-I', self.compiler.include_dirs)):
33 env_val = sysconfig.get_config_var(env_var)
34 if env_val:
35@@ -419,16 +424,16 @@
36 for directory in reversed(options.dirs):
37 add_dir_to_list(dir_list, directory)
38
39- if os.path.normpath(sys.prefix) != '/usr' \
40- and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
41+# if os.path.normpath(sys.prefix) != '/usr' \
42+# and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
43 # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
44 # (PYTHONFRAMEWORK is set) to avoid # linking problems when
45 # building a framework with different architectures than
46 # the one that is currently installed (issue #7473)
47- add_dir_to_list(self.compiler.library_dirs,
48- sysconfig.get_config_var("LIBDIR"))
49- add_dir_to_list(self.compiler.include_dirs,
50- sysconfig.get_config_var("INCLUDEDIR"))
51+# add_dir_to_list(self.compiler.library_dirs,
52+# sysconfig.get_config_var("LIBDIR"))
53+# add_dir_to_list(self.compiler.include_dirs,
54+# sysconfig.get_config_var("INCLUDEDIR"))
55
56 try:
57 have_unicode = unicode
diff --git a/meta/recipes-devtools/python/python/sitecustomize.py b/meta/recipes-devtools/python/python/sitecustomize.py
deleted file mode 100644
index 4c8b5e2ba3..0000000000
--- a/meta/recipes-devtools/python/python/sitecustomize.py
+++ /dev/null
@@ -1,37 +0,0 @@
1# OpenEmbedded sitecustomize.py (C) 2002-2008 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
2# GPLv2 or later
3# Version: 20081123
4# Features:
5# * set proper default encoding
6# * enable readline completion in the interactive interpreter
7# * load command line history on startup
8# * save command line history on exit
9
10import os
11
12def __exithandler():
13 try:
14 readline.write_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) )
15 except IOError:
16 pass
17
18def __registerExitHandler():
19 import atexit
20 atexit.register( __exithandler )
21
22def __enableReadlineSupport():
23 readline.set_history_length( 1000 )
24 readline.parse_and_bind( "tab: complete" )
25 try:
26 readline.read_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) )
27 except IOError:
28 pass
29
30import sys
31try:
32 import rlcompleter, readline
33except ImportError:
34 pass
35else:
36 __registerExitHandler()
37 __enableReadlineSupport()
diff --git a/meta/recipes-devtools/python/python/support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch b/meta/recipes-devtools/python/python/support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch
deleted file mode 100644
index 12651798ee..0000000000
--- a/meta/recipes-devtools/python/python/support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1The compiled .pyc files contain time stamp corresponding to the compile time.
2This prevents binary reproducibility. This patch allows to achieve binary
3reproducibility by overriding the build time stamp by the value
4exported via SOURCE_DATE_EPOCH.
5
6Patch by Bernhard M. Wiedemann
7
8Upstream-Status: Backport
9
10Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
11
12Fri Feb 24 17:08:25 UTC 2017 - bwiedemann@suse.com
13
14- Add reproducible.patch to allow reproducible builds of various
15 python packages like python-amqp
16 Upstream: https://github.com/python/cpython/pull/296
17
18
19@@ -0,0 +1,15 @@
20Index: Python-2.7.13/Lib/py_compile.py
21===================================================================
22--- Python-2.7.13.orig/Lib/py_compile.py
23+++ Python-2.7.13/Lib/py_compile.py
24@@ -108,6 +108,10 @@ def compile(file, cfile=None, dfile=None
25 timestamp = long(os.fstat(f.fileno()).st_mtime)
26 except AttributeError:
27 timestamp = long(os.stat(file).st_mtime)
28+ sde = os.environ.get('SOURCE_DATE_EPOCH')
29+ if sde and timestamp > int(sde):
30+ timestamp = int(sde)
31+ os.utime(file, (timestamp, timestamp))
32 codestring = f.read()
33 try:
34 codeobject = __builtin__.compile(codestring, dfile or file,'exec')
diff --git a/meta/recipes-devtools/python/python/use_sysroot_ncurses_instead_of_host.patch b/meta/recipes-devtools/python/python/use_sysroot_ncurses_instead_of_host.patch
deleted file mode 100644
index fb4a3bcf95..0000000000
--- a/meta/recipes-devtools/python/python/use_sysroot_ncurses_instead_of_host.patch
+++ /dev/null
@@ -1,21 +0,0 @@
1Python tries to use ncursesw from the host,
2if it is not found causes an error on configure,
3we should use ncursesw from sysroot instead
4
5Upstream-Status: Pending
6
7Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
8
9Index: Python-2.7.9/configure.ac
10===================================================================
11--- Python-2.7.9.orig/configure.ac
12+++ Python-2.7.9/configure.ac
13@@ -4311,7 +4311,7 @@ fi
14
15 # first curses configure check
16 ac_save_cppflags="$CPPFLAGS"
17-CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
18+CPPFLAGS="$CPPFLAGS -I=/usr/include/ncursesw"
19
20 AC_CHECK_HEADERS(curses.h ncurses.h)
21
diff --git a/meta/recipes-devtools/python/python_2.7.17.bb b/meta/recipes-devtools/python/python_2.7.17.bb
deleted file mode 100644
index be7c6d2d2b..0000000000
--- a/meta/recipes-devtools/python/python_2.7.17.bb
+++ /dev/null
@@ -1,260 +0,0 @@
1require python.inc
2
3DEPENDS = "libffi bzip2 gdbm openssl \
4 readline sqlite3 zlib virtual/crypt"
5
6DISTRO_SRC_URI ?= "file://sitecustomize.py"
7DISTRO_SRC_URI_linuxstdbase = ""
8SRC_URI += " \
9 file://01-use-proper-tools-for-cross-build.patch \
10 file://03-fix-tkinter-detection.patch \
11 file://06-avoid_usr_lib_termcap_path_in_linking.patch \
12 ${DISTRO_SRC_URI} \
13 file://multilib.patch \
14 file://cgi_py.patch \
15 file://setup_py_skip_cross_import_check.patch \
16 file://add-md5module-support.patch \
17 file://host_include_contamination.patch \
18 file://fix_for_using_different_libdir.patch \
19 file://setuptweaks.patch \
20 file://check-if-target-is-64b-not-host.patch \
21 file://search_db_h_in_inc_dirs_and_avoid_warning.patch \
22 ${@bb.utils.contains('PACKAGECONFIG', 'tk', '', 'file://avoid_warning_about_tkinter.patch', d)} \
23 file://avoid_warning_for_sunos_specific_module.patch \
24 file://python-2.7.3-remove-bsdb-rpath.patch \
25 file://run-ptest \
26 file://parallel-makeinst-create-bindir.patch \
27 file://use_sysroot_ncurses_instead_of_host.patch \
28 file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
29 file://pass-missing-libraries-to-Extension-for-mul.patch \
30 file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \
31 file://float-endian.patch \
32 file://0001-python2-use-cc_basename-to-replace-CC-for-checking-c.patch \
33"
34
35S = "${WORKDIR}/Python-${PV}"
36
37inherit autotools multilib_header python-dir pythonnative ptest
38
39EXTRA_OECONF += "--with-system-ffi"
40
41CACHED_CONFIGUREVARS = "ac_cv_file__dev_ptmx=yes \
42 ac_cv_file__dev_ptc=no \
43 ac_cv_working_tzset=yes"
44
45PACKAGECONFIG ??= "bdb"
46PACKAGECONFIG[bdb] = ",,db"
47PACKAGECONFIG[tk] = ",,tk"
48
49# pgen isn't needed in the current build, but use the binary from python-native just in case.
50EXTRA_OEMAKE = "PGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
51 CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
52 STAGING_LIBDIR=${STAGING_LIBDIR} \
53 STAGING_INCDIR=${STAGING_INCDIR} \
54 STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
55 "
56
57do_configure_append() {
58 rm -f ${S}/Makefile.orig
59 autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
60}
61
62do_compile() {
63 # regenerate platform specific files, because they depend on system headers
64 cd ${S}/Lib/plat-linux2
65 include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python-native/python \
66 ${S}/Tools/scripts/h2py.py -i '(u_long)' \
67 ${STAGING_INCDIR}/dlfcn.h \
68 ${STAGING_INCDIR}/linux/cdrom.h \
69 ${STAGING_INCDIR}/netinet/in.h \
70 ${STAGING_INCDIR}/sys/types.h
71 sed -e 's,${STAGING_DIR_HOST},,g' -i *.py
72 cd -
73
74 # remove any bogus LD_LIBRARY_PATH
75 sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile
76
77 if [ ! -f Makefile.orig ]; then
78 install -m 0644 Makefile Makefile.orig
79 fi
80 sed -i -e 's#^LDFLAGS=.*#LDFLAGS=${LDFLAGS} -L. -L${STAGING_LIBDIR}#g' \
81 -e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \
82 -e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \
83 -e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \
84 -e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \
85 -e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \
86 -e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \
87 Makefile
88 # save copy of it now, because if we do it in do_install and
89 # then call do_install twice we get Makefile.orig == Makefile.sysroot
90 install -m 0644 Makefile Makefile.sysroot
91
92 export CROSS_COMPILE="${TARGET_PREFIX}"
93 export PYTHONBUILDDIR="${B}"
94
95 oe_runmake OPT="${CFLAGS}"
96}
97
98do_install() {
99 # make install needs the original Makefile, or otherwise the inclues would
100 # go to ${D}${STAGING...}/...
101 install -m 0644 Makefile.orig Makefile
102
103 export CROSS_COMPILE="${TARGET_PREFIX}"
104 export PYTHONBUILDDIR="${B}"
105
106 # After swizzling the makefile, we need to run the build again.
107 # install can race with the build so we have to run this first, then install
108 oe_runmake DESTDIR=${D} LIBDIR=${libdir}
109
110 oe_runmake DESTDIR=${D} LIBDIR=${libdir} install
111
112 install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
113
114 if [ -e ${WORKDIR}/sitecustomize.py ]; then
115 install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
116 fi
117
118 oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h
119
120 if [ -z "${@bb.utils.filter('PACKAGECONFIG', 'bdb', d)}" ]; then
121 rm -rf ${D}/${libdir}/python${PYTHON_MAJMIN}/bsddb
122 fi
123
124 # Python 3.x version of 2to3 is now the default
125 mv ${D}/${bindir}/2to3 ${D}/${bindir}/2to3-${PYTHON_MAJMIN}
126}
127
128do_install_append_class-nativesdk () {
129 create_wrapper ${D}${bindir}/python2.7 PYTHONHOME='${prefix}' TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' PYTHONNOUSERSITE='1'
130}
131
132SSTATE_SCAN_FILES += "Makefile"
133PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
134
135py_package_preprocess () {
136 # copy back the old Makefile to fix target package
137 install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
138
139 # Remove references to buildmachine paths in target Makefile and _sysconfigdata
140 sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
141 -e 's|${DEBUG_PREFIX_MAP}||g' \
142 -e 's:${HOSTTOOLS_DIR}/::g' \
143 -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
144 -e 's:${RECIPE_SYSROOT}::g' \
145 -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
146 ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \
147 ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
148 (cd ${PKGD}; python -m py_compile ./${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py)
149}
150
151PACKAGES_remove = "${PN}"
152
153# manual dependency additions
154RPROVIDES_${PN}-modules = "${PN}"
155RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python-modules"
156RRECOMMENDS_${PN}-crypt = "openssl"
157
158# package libpython2
159PACKAGES =+ "lib${BPN}2"
160FILES_lib${BPN}2 = "${libdir}/libpython*.so.*"
161
162# catch all the rest (unsorted)
163PACKAGES += "${PN}-misc"
164FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
165RDEPENDS_${PN}-modules += "${PN}-misc"
166
167# ptest
168RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests unzip tzdata-europe coreutils sed"
169RDEPENDS_${PN}-tkinter += "${@bb.utils.contains('PACKAGECONFIG', 'tk', 'tk tk-lib', '', d)}"
170# catch manpage
171PACKAGES += "${PN}-man"
172FILES_${PN}-man = "${datadir}/man"
173
174# Nasty but if bdb isn't enabled the package won't be generated
175RDEPENDS_${PN}-modules_remove = "${@bb.utils.contains('PACKAGECONFIG', 'bdb', '', '${PN}-bsddb', d)}"
176
177RDEPENDS_${PN}-dev = ""
178
179BBCLASSEXTEND = "nativesdk"
180
181# We want bytecode precompiled .py files (.pyc's) by default
182# but the user may set it on their own conf
183
184INCLUDE_PYCS ?= "1"
185
186python(){
187 import collections, json
188
189 filename = os.path.join(d.getVar('THISDIR'), 'python', 'python2-manifest.json')
190 # This python changes the datastore based on the contents of a file, so mark
191 # that dependency.
192 bb.parse.mark_dependency(d, filename)
193
194 with open(filename) as manifest_file:
195 manifest_str = manifest_file.read()
196 json_start = manifest_str.find('# EOC') + 6
197 manifest_file.seek(json_start)
198 manifest_str = manifest_file.read()
199 python_manifest = json.loads(manifest_str, object_pairs_hook=collections.OrderedDict)
200
201 include_pycs = d.getVar('INCLUDE_PYCS')
202
203 packages = d.getVar('PACKAGES').split()
204 pn = d.getVar('PN')
205
206 newpackages=[]
207
208 for key in python_manifest:
209 pypackage= pn + '-' + key
210
211 if pypackage not in packages:
212 # We need to prepend, otherwise python-misc gets everything
213 # so we use a new variable
214 newpackages.append(pypackage)
215
216 # "Build" python's manifest FILES, RDEPENDS and SUMMARY
217 d.setVar('FILES_' + pypackage, '')
218 for value in python_manifest[key]['files']:
219 d.appendVar('FILES_' + pypackage, ' ' + value)
220 if include_pycs == '1':
221 if value.endswith('.py'):
222 d.appendVar('FILES_' + pypackage, ' ' + value + '?')
223
224 for value in python_manifest[key]['rdepends']:
225 # Make it work with or without $PN
226 if '${PN}' in value:
227 value=value.split('-')[1]
228 d.appendVar('RDEPENDS_' + pypackage, ' ' + pn + '-' + value)
229 d.setVar('SUMMARY_' + pypackage, python_manifest[key]['summary'])
230
231 # Prepending so to avoid python-misc getting everything
232 packages = newpackages + packages
233 d.setVar('PACKAGES', ' '.join(packages))
234 d.setVar('ALLOW_EMPTY_${PN}-modules', '1')
235}
236
237# Files needed to create a new manifest
238SRC_URI += "file://create_manifest2.py file://get_module_deps2.py file://python2-manifest.json"
239
240do_create_manifest() {
241 # This task should be run with every new release of Python.
242 # We must ensure that PACKAGECONFIG enables everything when creating
243 # a new manifest, this is to base our new manifest on a complete
244 # native python build, containing all dependencies, otherwise the task
245 # wont be able to find the required files.
246 # e.g. BerkeleyDB is an optional build dependency so it may or may not
247 # be present, we must ensure it is.
248
249 cd ${WORKDIR}
250 # This needs to be executed by python-native and NOT by HOST's python
251 nativepython create_manifest2.py
252 cp python2-manifest.json.new ${THISDIR}/python/python2-manifest.json
253}
254
255# bitbake python -c create_manifest
256addtask do_create_manifest
257
258# Make sure we have native python ready when we create a new manifest
259do_create_manifest[depends] += "python:do_prepare_recipe_sysroot"
260do_create_manifest[depends] += "python:do_patch"