summaryrefslogtreecommitdiffstats
path: root/scripts/contrib/python/generate-manifest-3.5.py
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2017-08-01 09:51:12 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-03 11:14:13 +0100
commitc760d99466c270d18294f5a07ccd91185fa0ef83 (patch)
tree0b1ec5fbb6a7cfde044e0bdc840d7f7f21b8db5b /scripts/contrib/python/generate-manifest-3.5.py
parent843a74d708a91b392f3293cf857495069bd14a13 (diff)
downloadpoky-c760d99466c270d18294f5a07ccd91185fa0ef83.tar.gz
python: don't include -tests with modules
Although 'test' is listed in the python module list (https://docs.python.org/3/py-modindex.html) it is meant only to be used 'internally' by folks developing python itself. Per the documentation: Note The test package is meant for internal use by Python only. It is documented for the benefit of the core developers of Python. Any use of this package outside of Python’s standard library is discouraged as code mentioned here can change or be removed without notice between releases of Python. Per the above it is best not to include this module to discourage folks who might not head the above warnings. Additionally this module is one of the largest py modules going, by dropping this unneeded module from the 'modules' package we can reduce overall image size, something which is important for many embedded deployments. The generator scripts as well as the manifests have thus been modified accordingly, providing a generic mechanism to exclude modules from the 'all modules' package. (From OE-Core rev: a5bb13a5d7d7a668ca61da6b17884e3b05b95355) Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/contrib/python/generate-manifest-3.5.py')
-rwxr-xr-xscripts/contrib/python/generate-manifest-3.5.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/contrib/python/generate-manifest-3.5.py b/scripts/contrib/python/generate-manifest-3.5.py
index 2975e109c9..6352f8f120 100755
--- a/scripts/contrib/python/generate-manifest-3.5.py
+++ b/scripts/contrib/python/generate-manifest-3.5.py
@@ -31,6 +31,7 @@ class MakefileMaker:
31 def __init__( self, outfile, isNative ): 31 def __init__( self, outfile, isNative ):
32 """initialize""" 32 """initialize"""
33 self.packages = {} 33 self.packages = {}
34 self.excluded_pkgs = []
34 self.targetPrefix = "${libdir}/python%s/" % VERSION[:3] 35 self.targetPrefix = "${libdir}/python%s/" % VERSION[:3]
35 self.isNative = isNative 36 self.isNative = isNative
36 self.output = outfile 37 self.output = outfile
@@ -55,7 +56,7 @@ class MakefileMaker:
55 self.out( """ """ ) 56 self.out( """ """ )
56 self.out( "" ) 57 self.out( "" )
57 58
58 def addPackage( self, name, description, dependencies, filenames ): 59 def addPackage( self, name, description, dependencies, filenames, mod_exclude = False ):
59 """add a package to the Makefile""" 60 """add a package to the Makefile"""
60 if type( filenames ) == type( "" ): 61 if type( filenames ) == type( "" ):
61 filenames = filenames.split() 62 filenames = filenames.split()
@@ -67,6 +68,8 @@ class MakefileMaker:
67 self.pycachePath( filename ) ) ) 68 self.pycachePath( filename ) ) )
68 else: 69 else:
69 fullFilenames.append( filename ) 70 fullFilenames.append( filename )
71 if mod_exclude:
72 self.excluded_pkgs.append( name )
70 self.packages[name] = description, dependencies, fullFilenames 73 self.packages[name] = description, dependencies, fullFilenames
71 74
72 def pycachePath( self, filename ): 75 def pycachePath( self, filename ):
@@ -160,7 +163,7 @@ class MakefileMaker:
160 line = 'RDEPENDS_${PN}-modules="' 163 line = 'RDEPENDS_${PN}-modules="'
161 164
162 for name, data in sorted(self.packages.items()): 165 for name, data in sorted(self.packages.items()):
163 if name not in ['${PN}-dev', '${PN}-distutils-staticdev']: 166 if name not in ['${PN}-dev', '${PN}-distutils-staticdev'] and name not in self.excluded_pkgs:
164 line += "%s " % name 167 line += "%s " % name
165 168
166 self.out( "%s \"" % line ) 169 self.out( "%s \"" % line )
@@ -401,7 +404,7 @@ if __name__ == "__main__":
401 "pty.* tty.*" ) 404 "pty.* tty.*" )
402 405
403 m.addPackage( "${PN}-tests", "Python tests", "${PN}-core ${PN}-compression", 406 m.addPackage( "${PN}-tests", "Python tests", "${PN}-core ${PN}-compression",
404 "test" ) # package 407 "test", True ) # package
405 408
406 m.addPackage( "${PN}-threading", "Python threading & synchronization support", "${PN}-core ${PN}-lang", 409 m.addPackage( "${PN}-threading", "Python threading & synchronization support", "${PN}-core ${PN}-lang",
407 "_threading_local.* dummy_thread.* dummy_threading.* mutex.* threading.* queue.*" ) 410 "_threading_local.* dummy_thread.* dummy_threading.* mutex.* threading.* queue.*" )