summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAlejandro Hernandez <alejandro.hernandez@linux.intel.com>2017-06-20 14:11:44 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-20 22:31:04 +0000
commit6959e2e4dba5bbfa6ffd49c44e738cc1c38bc280 (patch)
treeec0fe766238ac87e56fa76bf7fc82f33044792d3 /scripts
parent77144bc808be02deb3351c9c1bf5b4f2b8c3a6ec (diff)
downloadopenembedded-core-6959e2e4dba5bbfa6ffd49c44e738cc1c38bc280.tar.gz
python: Restructure python packaging and replace it with autopackaging
The reason we have a manifest file for python is that our goal is to keep python-core as small as posible and add other python packages only when the user needs them, hence why we split upstream python into several packages. Although our manifest file has several issues: - Its unorganized and hard to read and understand it for an average human being. - When a new package needs to be added, the user actually has to modify the script that creates the manifest, then call the script to create a new manifest, and then submit a patch for both the script and the manifest, so its a little convoluted. - Git complains every single time a patch is submitted to the manifest, since it violates some of its guidelines. - It changes or may change with every release of python, its impossible to know if the required files for a certain package have changed (it could have more or less dependencies), the only way of doing so would be to install and test them all one by one on separate individual images, and even then we wouldnt know if they require less dependencies, we would just know if an extra dependency is required since it would complain, lets face it, this isnt feasible. - The same thing happens for new packages, if someone wants to add a new package, its dependencies need to be checked manually one by one. This patch fixes those issues, while adding some additional features. Features/Fixes: - A new manifest format is used (JSON), easy to read and understand. This file is parsed by the python recipe and python packages read from here are passed directly to bitbake during parsing time. - It provides an automatic manifest creation task (explained below), which automagically checks for every package dependencies and adds them to the new manifest, hence we will have on each package exactly what that package needs to be run, providing finer granularity. - Dependencies are also checked automagically for new packages (explained below). - Fixes the manifest in the following ways: * python-core should be base and all packages should depend on it, fixes lang, string, codecs, etc. * Fixes packages with repeated files (e.g. bssdb and db, or netclient and mime, and many others). - Sitecustomize was fixed since encoding was deprecated. - The JSON manifest file invalidates bitbake's cache, so if it changes the python package will be rebuilt. - It creates a solution for users that want precompiled bytecode files (*.pyc) INCLUDE_PYCS = "1" can be set by the user on their local.conf to include such files, some argument they get faster boot time, even when the files would be created on their first run?, but they also sometimes give a magic number error and take up space, so we leave it to the user to decide if they want them or not. - Fixes python-core dependencies, e.g. When python is run on an image, it TRIES to import everything it needs, but it doesnt necessarily fails when it doesnt find something, so even if we didnt know, we had errors like (trimmed on purpose): # trying /usr/lib/python2.7/_locale.so # trying /usr/lib/python2.7/lib-dynload/_locale.so # trying /usr/lib/python2.7/_sysconfigdata.so while it didnt complain about _locale it should have imported it, after creating a new manifest with the automated script we get: # trying /usr/lib/python2.7/lib-dynload/_locale.so dlopen("/usr/lib/python2.7/lib-dynload/_locale.so", 2); import _locale # dynamically loaded from /usr/lib/python2.7/lib-dynload/_locale.so How to use (after a new release of python, or maybe before every OE release): - A new task called create_manifest was added to the python package, which may be invoked via: $ bitbake python -c create_manifest This task runs a script on native python on our HOST system, and since the python and python-native packages come from the same source, we can use it to know the dependencies of each module as if we were doing it on an image, this script is called create_manifest.py and in a very simplistic way it does the following: 1. Reads the JSON manifest file and creates a dictionary data structure with all of our python packages, their FILES, RDEPENDS and SUMMARY. 2. Loops through all of them and runs every module listed on them asynchronously, determining every dependency that they have. 3. These module dependencies are then handled, to be able to know which packages contain those files and which should RDEPEND on one another. 4. The data structure that comes out of this, is then used to create a new manifest file which is automatically copied onto the user's python directory replacing the old one. Create_manifest script features: - Handles modules which dont exist anymore (new release for example). - Handles modules that are builtin. - Deals with modules which were not compiled (e.g. bsddb or ossaudiodev) - Deals with packages which include folders. - Deals with packages which include FILES with a wildcard. - The manifest can be constructed on a multilib environment as well. - This method works for both python modules and shared libraries used by python. How to add a new package: - If a user wants to add a new package all that has to be done is modify the python2-manifest.json file, and add the required file(s) to the FILES list, the script should handle all the rest. Real example: We want to add a web browser package, including the file webbrowser.py which at the moment is on python-misc. "webbrowser": { "files": ["${libdir}/python2.7/lib-dynload/webbrowser.py"], "rdepends": [], "summary": "Python Web Browser support"} Run bitbake python -c create_manifest and the resulting manifest should be completed after a few seconds, showing something like: "webbrowser": { "files": ["${libdir}/python2.7/webbrowser.py"], "rdepends": ["core","fcntl","io","pickle","shell","subprocess"], "summary": "Python Web Browser support"} Known errors/issues: - Some special packages are handled differently: core, misc, modules,dev, staticdev. All these should be handled manually, because they either include binaries, static libraries, include files, etc. (something that we cant import). Specifically static libraries are not not supported by this method and have to be handled by the user. - The change should be transparent to the user, other than the fact that now we CANT build python-foo (it was pretty dumb anyway, since what building python-foo actually did was building the whole python package anyway), but doing IMAGE_INSTALL_append = " python-foo" would create an image with the requested package with no issues. [YOCTO #11510] [YOCTO #11694] [YOCTO #11695] Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/contrib/python/generate-manifest-2.7.py426
1 files changed, 0 insertions, 426 deletions
diff --git a/scripts/contrib/python/generate-manifest-2.7.py b/scripts/contrib/python/generate-manifest-2.7.py
deleted file mode 100755
index ee7540399f..0000000000
--- a/scripts/contrib/python/generate-manifest-2.7.py
+++ /dev/null
@@ -1,426 +0,0 @@
-#!/usr/bin/env python
-
-# generate Python Manifest for the OpenEmbedded build system
-# (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-# (C) 2007 Jeremy Laine
-# licensed under MIT, see COPYING.MIT
-#
-# June 22, 2011 -- Mark Hatle <mark.hatle@windriver.com>
-# * Updated to no longer generate special -dbg package, instead use the
-# single system -dbg
-# * Update version with ".1" to indicate this change
-#
-# February 26, 2017 -- Ming Liu <peter.x.liu@external.atlascopco.com>
-# * Updated to support generating manifest for native python
-
-import os
-import sys
-import time
-import argparse
-
-VERSION = "2.7.2"
-
-__author__ = "Michael 'Mickey' Lauer <mlauer@vanille-media.de>"
-__version__ = "20110222.2"
-
-class MakefileMaker:
-
- def __init__( self, outfile, isNative ):
- """initialize"""
- self.packages = {}
- self.excluded_pkgs = []
- self.targetPrefix = "${libdir}/python%s/" % VERSION[:3]
- self.isNative = isNative
- self.output = outfile
- self.out( """
-# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
-# Generator: '%s%s' Version %s (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-""" % ( sys.argv[0], ' --native' if isNative else '', __version__ ) )
-
- #
- # helper functions
- #
-
- def out( self, data ):
- """print a line to the output file"""
- self.output.write( "%s\n" % data )
-
- def setPrefix( self, targetPrefix ):
- """set a file prefix for addPackage files"""
- self.targetPrefix = targetPrefix
-
- def doProlog( self ):
- self.out( """ """ )
- self.out( "" )
-
- def addPackage( self, name, description, dependencies, filenames, mod_exclude = False ):
- """add a package to the Makefile"""
- if type( filenames ) == type( "" ):
- filenames = filenames.split()
- fullFilenames = []
- for filename in filenames:
- if filename[0] != "$":
- fullFilenames.append( "%s%s" % ( self.targetPrefix, filename ) )
- else:
- fullFilenames.append( filename )
- if mod_exclude:
- self.excluded_pkgs.append( name )
- self.packages[name] = description, dependencies, fullFilenames
-
- def doBody( self ):
- """generate body of Makefile"""
-
- global VERSION
-
- #
- # generate rprovides line for native
- #
-
- if self.isNative:
- pkglist = []
- for name in ['${PN}-modules'] + sorted(self.packages):
- pkglist.append('%s-native' % name.replace('${PN}', 'python'))
-
- self.out('RPROVIDES += "%s"' % " ".join(pkglist))
- return
-
- #
- # generate provides line
- #
-
- provideLine = 'PROVIDES+=" \\\n'
- for name in sorted(self.packages):
- provideLine += " %s \\\n" % name
- provideLine += '"'
-
- self.out( provideLine )
- self.out( "" )
-
- #
- # generate package line
- #
-
- packageLine = 'PACKAGES=" \\\n'
- packageLine += ' ${PN}-dbg \\\n'
- for name in sorted(self.packages):
- if name.startswith("${PN}-distutils"):
- if name == "${PN}-distutils":
- packageLine += " %s-staticdev %s \\\n" % (name, name)
- elif name != '${PN}-dbg':
- packageLine += " %s \\\n" % name
- packageLine += ' ${PN}-modules\\\n"'
-
- self.out( packageLine )
- self.out( "" )
-
- #
- # generate package variables
- #
-
- for name, data in sorted(self.packages.items()):
- desc, deps, files = data
-
- #
- # write out the description, revision and dependencies
- #
- self.out( 'SUMMARY_%s="%s"' % ( name, desc ) )
- self.out( 'RDEPENDS_%s="%s"' % ( name, deps ) )
-
- line = 'FILES_%s=" \\\n' % name
-
- #
- # check which directories to make in the temporary directory
- #
-
- dirset = {} # if python had a set-datatype this would be sufficient. for now, we're using a dict instead.
- for target in files:
- dirset[os.path.dirname( target )] = True
-
- #
- # generate which files to copy for the target (-dfR because whole directories are also allowed)
- #
-
- for target in files:
- line += " %s \\\n" % target
-
- line += '"'
- self.out( line )
- self.out( "" )
-
- self.out( 'SUMMARY_${PN}-modules="All Python modules"' )
- line = 'RDEPENDS_${PN}-modules=" \\\n'
-
- for name, data in sorted(self.packages.items()):
- if name not in ['${PN}-dev', '${PN}-distutils-staticdev'] and name not in self.excluded_pkgs:
- line += " %s \\\n" % name
-
- line += '"'
- self.out( line )
- self.out( 'ALLOW_EMPTY_${PN}-modules = "1"' )
-
- def doEpilog( self ):
- self.out( """""" )
- self.out( "" )
-
- def make( self ):
- self.doProlog()
- self.doBody()
- self.doEpilog()
-
-if __name__ == "__main__":
- parser = argparse.ArgumentParser( description='generate python manifest' )
- parser.add_argument( '-n', '--native', help='generate manifest for native python', action='store_true' )
- parser.add_argument( 'outfile', metavar='OUTPUT_FILE', nargs='?', default='', help='Output file (defaults to stdout)' )
- args = parser.parse_args()
-
- if args.outfile:
- try:
- os.unlink( args.outfile )
- except Exception:
- sys.exc_clear()
- outfile = open( args.outfile, "w" )
- else:
- outfile = sys.stdout
-
- m = MakefileMaker( outfile, args.native )
-
- # Add packages here. Only specify dlopen-style library dependencies here, no ldd-style dependencies!
- # Parameters: revision, name, description, dependencies, filenames
- #
-
- m.addPackage( "${PN}-core", "Python interpreter and core modules", "${PN}-lang ${PN}-re",
- "__future__.* _abcoll.* abc.* ast.* copy.* copy_reg.* ConfigParser.* " +
- "genericpath.* getopt.* linecache.* new.* " +
- "os.* posixpath.* struct.* " +
- "warnings.* site.* stat.* " +
- "UserDict.* UserList.* UserString.* " +
- "lib-dynload/binascii.so lib-dynload/_struct.so lib-dynload/time.so " +
- "lib-dynload/xreadlines.so types.* platform.* ${bindir}/python* " +
- "_weakrefset.* sysconfig.* _sysconfigdata.* " +
- "${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h " +
- "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py ")
-
- m.addPackage( "${PN}-dev", "Python development package", "${PN}-core",
- "${includedir} " +
- "${libdir}/lib*${SOLIBSDEV} " +
- "${libdir}/*.la " +
- "${libdir}/*.a " +
- "${libdir}/*.o " +
- "${libdir}/pkgconfig " +
- "${base_libdir}/*.a " +
- "${base_libdir}/*.o " +
- "${datadir}/aclocal " +
- "${datadir}/pkgconfig " +
- "config/Makefile ")
-
- m.addPackage( "${PN}-2to3", "Python automated Python 2 to 3 code translator", "${PN}-core",
- "${bindir}/2to3 lib2to3" ) # package
-
- m.addPackage( "${PN}-idle", "Python Integrated Development Environment", "${PN}-core ${PN}-tkinter",
- "${bindir}/idle idlelib" ) # package
-
- m.addPackage( "${PN}-pydoc", "Python interactive help support", "${PN}-core ${PN}-lang ${PN}-stringold ${PN}-re",
- "${bindir}/pydoc pydoc.* pydoc_data" )
-
- m.addPackage( "${PN}-smtpd", "Python Simple Mail Transport Daemon", "${PN}-core ${PN}-netserver ${PN}-email ${PN}-mime",
- "${bindir}/smtpd.* smtpd.*" )
-
- m.addPackage( "${PN}-audio", "Python Audio Handling", "${PN}-core",
- "wave.* chunk.* sndhdr.* lib-dynload/ossaudiodev.so lib-dynload/audioop.so audiodev.* sunaudio.* sunau.* toaiff.*" )
-
- m.addPackage( "${PN}-bsddb", "Python bindings for the Berkeley Database", "${PN}-core",
- "bsddb lib-dynload/_bsddb.so" ) # package
-
- m.addPackage( "${PN}-codecs", "Python codecs, encodings & i18n support", "${PN}-core ${PN}-lang",
- "codecs.* encodings gettext.* locale.* lib-dynload/_locale.so lib-dynload/_codecs* lib-dynload/_multibytecodec.so lib-dynload/unicodedata.so stringprep.* xdrlib.*" )
-
- m.addPackage( "${PN}-compile", "Python bytecode compilation support", "${PN}-core",
- "py_compile.* compileall.*" )
-
- m.addPackage( "${PN}-compiler", "Python compiler support", "${PN}-core",
- "compiler" ) # package
-
- m.addPackage( "${PN}-compression", "Python high-level compression support", "${PN}-core ${PN}-zlib",
- "gzip.* zipfile.* tarfile.* lib-dynload/bz2.so" )
-
- m.addPackage( "${PN}-crypt", "Python basic cryptographic and hashing support", "${PN}-core",
- "hashlib.* md5.* sha.* lib-dynload/crypt.so lib-dynload/_hashlib.so lib-dynload/_sha256.so lib-dynload/_sha512.so" )
-
- m.addPackage( "${PN}-textutils", "Python option parsing, text wrapping and CSV support", "${PN}-core ${PN}-io ${PN}-re ${PN}-stringold",
- "lib-dynload/_csv.so csv.* optparse.* textwrap.*" )
-
- m.addPackage( "${PN}-curses", "Python curses support", "${PN}-core",
- "curses lib-dynload/_curses.so lib-dynload/_curses_panel.so" ) # directory + low level module
-
- m.addPackage( "${PN}-ctypes", "Python C types support", "${PN}-core",
- "ctypes lib-dynload/_ctypes.so lib-dynload/_ctypes_test.so" ) # directory + low level module
-
- m.addPackage( "${PN}-datetime", "Python calendar and time support", "${PN}-core ${PN}-codecs",
- "_strptime.* calendar.* lib-dynload/datetime.so" )
-
- m.addPackage( "${PN}-db", "Python file-based database support", "${PN}-core",
- "anydbm.* dumbdbm.* whichdb.* " )
-
- m.addPackage( "${PN}-debugger", "Python debugger", "${PN}-core ${PN}-io ${PN}-lang ${PN}-re ${PN}-stringold ${PN}-shell ${PN}-pprint",
- "bdb.* pdb.*" )
-
- m.addPackage( "${PN}-difflib", "Python helpers for computing deltas between objects", "${PN}-lang ${PN}-re",
- "difflib.*" )
-
- m.addPackage( "${PN}-distutils-staticdev", "Python distribution utilities (static libraries)", "${PN}-distutils",
- "config/lib*.a" ) # package
-
- m.addPackage( "${PN}-distutils", "Python Distribution Utilities", "${PN}-core ${PN}-email",
- "config distutils" ) # package
-
- m.addPackage( "${PN}-doctest", "Python framework for running examples in docstrings", "${PN}-core ${PN}-lang ${PN}-io ${PN}-re ${PN}-unittest ${PN}-debugger ${PN}-difflib",
- "doctest.*" )
-
- m.addPackage( "${PN}-email", "Python email support", "${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio ${PN}-image ${PN}-netclient",
- "imaplib.* email" ) # package
-
- m.addPackage( "${PN}-fcntl", "Python's fcntl interface", "${PN}-core",
- "lib-dynload/fcntl.so" )
-
- m.addPackage( "${PN}-hotshot", "Python hotshot performance profiler", "${PN}-core",
- "hotshot lib-dynload/_hotshot.so" )
-
- m.addPackage( "${PN}-html", "Python HTML processing support", "${PN}-core",
- "formatter.* htmlentitydefs.* htmllib.* markupbase.* sgmllib.* HTMLParser.* " )
-
- m.addPackage( "${PN}-importlib", "Python import implementation library", "${PN}-core",
- "importlib" )
-
- m.addPackage( "${PN}-gdbm", "Python GNU database support", "${PN}-core",
- "lib-dynload/gdbm.so" )
-
- m.addPackage( "${PN}-image", "Python graphical image handling", "${PN}-core",
- "colorsys.* imghdr.* lib-dynload/imageop.so lib-dynload/rgbimg.so" )
-
- m.addPackage( "${PN}-io", "Python low-level I/O", "${PN}-core ${PN}-math ${PN}-textutils ${PN}-netclient ${PN}-contextlib",
- "lib-dynload/_socket.so lib-dynload/_io.so lib-dynload/_ssl.so lib-dynload/select.so lib-dynload/termios.so lib-dynload/cStringIO.so " +
- "pipes.* socket.* ssl.* tempfile.* StringIO.* io.* _pyio.*" )
-
- m.addPackage( "${PN}-json", "Python JSON support", "${PN}-core ${PN}-math ${PN}-re ${PN}-codecs",
- "json lib-dynload/_json.so" ) # package
-
- m.addPackage( "${PN}-lang", "Python low-level language support", "${PN}-core",
- "lib-dynload/_bisect.so lib-dynload/_collections.so lib-dynload/_heapq.so lib-dynload/_weakref.so lib-dynload/_functools.so " +
- "lib-dynload/array.so lib-dynload/itertools.so lib-dynload/operator.so lib-dynload/parser.so " +
- "atexit.* bisect.* code.* codeop.* collections.* dis.* functools.* heapq.* inspect.* keyword.* opcode.* symbol.* repr.* token.* " +
- "tokenize.* traceback.* weakref.*" )
-
- m.addPackage( "${PN}-logging", "Python logging support", "${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold",
- "logging" ) # package
-
- m.addPackage( "${PN}-mailbox", "Python mailbox format support", "${PN}-core ${PN}-mime",
- "mailbox.*" )
-
- m.addPackage( "${PN}-math", "Python math support", "${PN}-core ${PN}-crypt",
- "lib-dynload/cmath.so lib-dynload/math.so lib-dynload/_random.so random.* sets.*" )
-
- m.addPackage( "${PN}-mime", "Python MIME handling APIs", "${PN}-core ${PN}-io",
- "mimetools.* uu.* quopri.* rfc822.* MimeWriter.*" )
-
- m.addPackage( "${PN}-mmap", "Python memory-mapped file support", "${PN}-core ${PN}-io",
- "lib-dynload/mmap.so " )
-
- m.addPackage( "${PN}-multiprocessing", "Python multiprocessing support", "${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-threading ${PN}-ctypes ${PN}-mmap",
- "lib-dynload/_multiprocessing.so multiprocessing" ) # package
-
- m.addPackage( "${PN}-netclient", "Python Internet Protocol clients", "${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang ${PN}-logging ${PN}-mime",
- "*Cookie*.* " +
- "base64.* cookielib.* ftplib.* gopherlib.* hmac.* httplib.* mimetypes.* nntplib.* poplib.* smtplib.* telnetlib.* urllib.* urllib2.* urlparse.* uuid.* rfc822.* mimetools.*" )
-
- m.addPackage( "${PN}-netserver", "Python Internet Protocol servers", "${PN}-core ${PN}-netclient ${PN}-shell ${PN}-threading",
- "cgi.* *HTTPServer.* SocketServer.*" )
-
- m.addPackage( "${PN}-numbers", "Python number APIs", "${PN}-core ${PN}-lang ${PN}-re",
- "decimal.* fractions.* numbers.*" )
-
- m.addPackage( "${PN}-pickle", "Python serialisation/persistence support", "${PN}-core ${PN}-codecs ${PN}-io ${PN}-re",
- "pickle.* shelve.* lib-dynload/cPickle.so pickletools.*" )
-
- m.addPackage( "${PN}-pkgutil", "Python package extension utility support", "${PN}-core",
- "pkgutil.*")
-
- m.addPackage( "${PN}-plistlib", "Generate and parse Mac OS X .plist files", "${PN}-core ${PN}-datetime ${PN}-io",
- "plistlib.*")
-
- m.addPackage( "${PN}-pprint", "Python pretty-print support", "${PN}-core ${PN}-io",
- "pprint.*" )
-
- m.addPackage( "${PN}-profile", "Python basic performance profiling support", "${PN}-core ${PN}-textutils",
- "profile.* pstats.* cProfile.* lib-dynload/_lsprof.so" )
-
- m.addPackage( "${PN}-re", "Python Regular Expression APIs", "${PN}-core",
- "re.* sre.* sre_compile.* sre_constants* sre_parse.*" ) # _sre is builtin
-
- m.addPackage( "${PN}-readline", "Python readline support", "${PN}-core",
- "lib-dynload/readline.so rlcompleter.*" )
-
- m.addPackage( "${PN}-resource", "Python resource control interface", "${PN}-core",
- "lib-dynload/resource.so" )
-
- m.addPackage( "${PN}-shell", "Python shell-like functionality", "${PN}-core ${PN}-re",
- "cmd.* commands.* dircache.* fnmatch.* glob.* popen2.* shlex.* shutil.*" )
-
- m.addPackage( "${PN}-robotparser", "Python robots.txt parser", "${PN}-core ${PN}-netclient",
- "robotparser.*")
-
- m.addPackage( "${PN}-runpy", "Python script for locating/executing scripts in module namespace", "${PN}-core ${PN}-pkgutil",
- "runpy.*")
-
- m.addPackage( "${PN}-subprocess", "Python subprocess support", "${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle",
- "subprocess.*" )
-
- m.addPackage( "${PN}-sqlite3", "Python Sqlite3 database support", "${PN}-core ${PN}-datetime ${PN}-lang ${PN}-crypt ${PN}-io ${PN}-threading ${PN}-zlib",
- "lib-dynload/_sqlite3.so sqlite3/dbapi2.* sqlite3/__init__.* sqlite3/dump.*" )
-
- m.addPackage( "${PN}-sqlite3-tests", "Python Sqlite3 database support tests", "${PN}-core ${PN}-sqlite3",
- "sqlite3/test" )
-
- m.addPackage( "${PN}-stringold", "Python string APIs [deprecated]", "${PN}-core ${PN}-re",
- "lib-dynload/strop.so string.* stringold.*" )
-
- m.addPackage( "${PN}-syslog", "Python syslog interface", "${PN}-core",
- "lib-dynload/syslog.so" )
-
- m.addPackage( "${PN}-terminal", "Python terminal controlling support", "${PN}-core ${PN}-io",
- "pty.* tty.*" )
-
- m.addPackage( "${PN}-tests", "Python tests", "${PN}-core ${PN}-modules",
- "test", True ) # package
-
- m.addPackage( "${PN}-threading", "Python threading & synchronization support", "${PN}-core ${PN}-lang",
- "_threading_local.* dummy_thread.* dummy_threading.* mutex.* threading.* Queue.*" )
-
- m.addPackage( "${PN}-tkinter", "Python Tcl/Tk bindings", "${PN}-core",
- "lib-dynload/_tkinter.so lib-tk" ) # package
-
- m.addPackage( "${PN}-unittest", "Python unit testing framework", "${PN}-core ${PN}-stringold ${PN}-lang ${PN}-io ${PN}-difflib ${PN}-pprint ${PN}-shell",
- "unittest/" )
-
- m.addPackage( "${PN}-unixadmin", "Python Unix administration support", "${PN}-core",
- "lib-dynload/nis.so lib-dynload/grp.so lib-dynload/pwd.so getpass.*" )
-
- m.addPackage( "${PN}-xml", "Python basic XML support", "${PN}-core ${PN}-re",
- "lib-dynload/_elementtree.so lib-dynload/pyexpat.so xml xmllib.*" ) # package
-
- m.addPackage( "${PN}-xmlrpc", "Python XML-RPC support", "${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang",
- "xmlrpclib.* SimpleXMLRPCServer.* DocXMLRPCServer.*" )
-
- m.addPackage( "${PN}-zlib", "Python zlib compression support", "${PN}-core",
- "lib-dynload/zlib.so" )
-
- m.addPackage( "${PN}-mailbox", "Python mailbox format support", "${PN}-core ${PN}-mime",
- "mailbox.*" )
-
- m.addPackage( "${PN}-argparse", "Python command line argument parser", "${PN}-core ${PN}-codecs ${PN}-textutils",
- "argparse.*" )
-
- m.addPackage( "${PN}-contextlib", "Python utilities for with-statement" +
- "contexts.", "${PN}-core",
- "${libdir}/python${PYTHON_MAJMIN}/contextlib.*" )
-
- m.make()