Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | #!/usr/bin/env python |
| 2 | |
| 3 | # generate Python Manifest for the OpenEmbedded build system |
| 4 | # (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de> |
| 5 | # (C) 2007 Jeremy Laine |
| 6 | # licensed under MIT, see COPYING.MIT |
| 7 | # |
| 8 | # June 22, 2011 -- Mark Hatle <mark.hatle@windriver.com> |
| 9 | # * Updated to no longer generate special -dbg package, instead use the |
| 10 | # single system -dbg |
| 11 | # * Update version with ".1" to indicate this change |
| 12 | # |
| 13 | # 2014 Khem Raj <raj.khem@gmail.com> |
| 14 | # Added python3 support |
| 15 | # |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 16 | # February 26, 2017 -- Ming Liu <peter.x.liu@external.atlascopco.com> |
| 17 | # * Updated to support generating manifest for native python3 |
| 18 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 19 | import os |
| 20 | import sys |
| 21 | import time |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 22 | import argparse |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 23 | |
| 24 | VERSION = "3.5.0" |
| 25 | |
| 26 | __author__ = "Michael 'Mickey' Lauer <mlauer@vanille-media.de>" |
| 27 | __version__ = "20140131" |
| 28 | |
| 29 | class MakefileMaker: |
| 30 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 31 | def __init__( self, outfile, isNative ): |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 32 | """initialize""" |
| 33 | self.packages = {} |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 34 | self.excluded_pkgs = [] |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 35 | self.targetPrefix = "${libdir}/python%s/" % VERSION[:3] |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 36 | self.isNative = isNative |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 37 | self.output = outfile |
| 38 | self.out( """ |
| 39 | # WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file. |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 40 | # Generator: '%s%s' Version %s (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de> |
| 41 | """ % ( sys.argv[0], ' --native' if isNative else '', __version__ ) ) |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 42 | |
| 43 | # |
| 44 | # helper functions |
| 45 | # |
| 46 | |
| 47 | def out( self, data ): |
| 48 | """print a line to the output file""" |
| 49 | self.output.write( "%s\n" % data ) |
| 50 | |
| 51 | def setPrefix( self, targetPrefix ): |
| 52 | """set a file prefix for addPackage files""" |
| 53 | self.targetPrefix = targetPrefix |
| 54 | |
| 55 | def doProlog( self ): |
| 56 | self.out( """ """ ) |
| 57 | self.out( "" ) |
| 58 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 59 | def addPackage( self, name, description, dependencies, filenames, mod_exclude = False ): |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 60 | """add a package to the Makefile""" |
| 61 | if type( filenames ) == type( "" ): |
| 62 | filenames = filenames.split() |
| 63 | fullFilenames = [] |
| 64 | for filename in filenames: |
| 65 | if filename[0] != "$": |
| 66 | fullFilenames.append( "%s%s" % ( self.targetPrefix, filename ) ) |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 67 | fullFilenames.append( "%s%s" % ( self.targetPrefix, |
| 68 | self.pycachePath( filename ) ) ) |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 69 | else: |
| 70 | fullFilenames.append( filename ) |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 71 | if mod_exclude: |
| 72 | self.excluded_pkgs.append( name ) |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 73 | self.packages[name] = description, dependencies, fullFilenames |
| 74 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 75 | def pycachePath( self, filename ): |
| 76 | dirname = os.path.dirname( filename ) |
| 77 | basename = os.path.basename( filename ) |
| 78 | if '.' in basename: |
| 79 | return os.path.join( dirname, '__pycache__', basename ) |
| 80 | else: |
| 81 | return os.path.join( dirname, basename, '__pycache__' ) |
| 82 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 83 | def doBody( self ): |
| 84 | """generate body of Makefile""" |
| 85 | |
| 86 | global VERSION |
| 87 | |
| 88 | # |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 89 | # generate rprovides line for native |
| 90 | # |
| 91 | |
| 92 | if self.isNative: |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 93 | pkglist = [] |
| 94 | for name in ['${PN}-modules'] + sorted(self.packages): |
| 95 | pkglist.append('%s-native' % name.replace('${PN}', 'python3')) |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 96 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 97 | self.out('RPROVIDES += "%s"' % " ".join(pkglist)) |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 98 | return |
| 99 | |
| 100 | # |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 101 | # generate provides line |
| 102 | # |
| 103 | |
| 104 | provideLine = 'PROVIDES+="' |
| 105 | for name in sorted(self.packages): |
| 106 | provideLine += "%s " % name |
| 107 | provideLine += '"' |
| 108 | |
| 109 | self.out( provideLine ) |
| 110 | self.out( "" ) |
| 111 | |
| 112 | # |
| 113 | # generate package line |
| 114 | # |
| 115 | |
| 116 | packageLine = 'PACKAGES="${PN}-dbg ' |
| 117 | for name in sorted(self.packages): |
| 118 | if name.startswith("${PN}-distutils"): |
| 119 | if name == "${PN}-distutils": |
| 120 | packageLine += "%s-staticdev %s " % (name, name) |
| 121 | elif name != '${PN}-dbg': |
| 122 | packageLine += "%s " % name |
| 123 | packageLine += '${PN}-modules"' |
| 124 | |
| 125 | self.out( packageLine ) |
| 126 | self.out( "" ) |
| 127 | |
| 128 | # |
| 129 | # generate package variables |
| 130 | # |
| 131 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 132 | for name, data in sorted(self.packages.items()): |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 133 | desc, deps, files = data |
| 134 | |
| 135 | # |
| 136 | # write out the description, revision and dependencies |
| 137 | # |
| 138 | self.out( 'SUMMARY_%s="%s"' % ( name, desc ) ) |
| 139 | self.out( 'RDEPENDS_%s="%s"' % ( name, deps ) ) |
| 140 | |
| 141 | line = 'FILES_%s="' % name |
| 142 | |
| 143 | # |
| 144 | # check which directories to make in the temporary directory |
| 145 | # |
| 146 | |
| 147 | dirset = {} # if python had a set-datatype this would be sufficient. for now, we're using a dict instead. |
| 148 | for target in files: |
| 149 | dirset[os.path.dirname( target )] = True |
| 150 | |
| 151 | # |
| 152 | # generate which files to copy for the target (-dfR because whole directories are also allowed) |
| 153 | # |
| 154 | |
| 155 | for target in files: |
| 156 | line += "%s " % target |
| 157 | |
| 158 | line += '"' |
| 159 | self.out( line ) |
| 160 | self.out( "" ) |
| 161 | |
| 162 | self.out( 'SUMMARY_${PN}-modules="All Python modules"' ) |
| 163 | line = 'RDEPENDS_${PN}-modules="' |
| 164 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 165 | for name, data in sorted(self.packages.items()): |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 166 | if name not in ['${PN}-dev', '${PN}-distutils-staticdev'] and name not in self.excluded_pkgs: |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 167 | line += "%s " % name |
| 168 | |
| 169 | self.out( "%s \"" % line ) |
| 170 | self.out( 'ALLOW_EMPTY_${PN}-modules = "1"' ) |
| 171 | |
| 172 | def doEpilog( self ): |
| 173 | self.out( """""" ) |
| 174 | self.out( "" ) |
| 175 | |
| 176 | def make( self ): |
| 177 | self.doProlog() |
| 178 | self.doBody() |
| 179 | self.doEpilog() |
| 180 | |
| 181 | if __name__ == "__main__": |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 182 | parser = argparse.ArgumentParser( description='generate python3 manifest' ) |
| 183 | parser.add_argument( '-n', '--native', help='generate manifest for native python3', action='store_true' ) |
| 184 | parser.add_argument( 'outfile', metavar='OUTPUT_FILE', nargs='?', default='', help='Output file (defaults to stdout)' ) |
| 185 | args = parser.parse_args() |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 186 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 187 | if args.outfile: |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 188 | try: |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 189 | os.unlink( args.outfile ) |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 190 | except Exception: |
| 191 | sys.exc_clear() |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 192 | outfile = open( args.outfile, "w" ) |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 193 | else: |
| 194 | outfile = sys.stdout |
| 195 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 196 | m = MakefileMaker( outfile, args.native ) |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 197 | |
| 198 | # Add packages here. Only specify dlopen-style library dependencies here, no ldd-style dependencies! |
| 199 | # Parameters: revision, name, description, dependencies, filenames |
| 200 | # |
| 201 | |
| 202 | m.addPackage( "${PN}-core", "Python interpreter and core modules", "${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io ${PN}-math", |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 203 | "__future__.* _abcoll.* abc.* ast.* copy.* copyreg.* configparser.* " + |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 204 | "genericpath.* getopt.* linecache.* new.* " + |
| 205 | "os.* posixpath.* struct.* " + |
| 206 | "warnings.* site.* stat.* " + |
| 207 | "UserDict.* UserList.* UserString.* " + |
| 208 | "lib-dynload/binascii.*.so lib-dynload/_struct.*.so lib-dynload/time.*.so " + |
| 209 | "lib-dynload/xreadlines.*.so types.* platform.* ${bindir}/python* " + |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 210 | "_weakrefset.* sysconfig.* _sysconfigdata.* " + |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 211 | "${includedir}/python${PYTHON_BINABI}/pyconfig*.h " + |
| 212 | "${libdir}/python${PYTHON_MAJMIN}/collections " + |
| 213 | "${libdir}/python${PYTHON_MAJMIN}/_collections_abc.* " + |
| 214 | "${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.* " + |
| 215 | "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py ") |
| 216 | |
| 217 | m.addPackage( "${PN}-dev", "Python development package", "${PN}-core", |
| 218 | "${includedir} " + |
| 219 | "${libdir}/lib*${SOLIBSDEV} " + |
| 220 | "${libdir}/*.la " + |
| 221 | "${libdir}/*.a " + |
| 222 | "${libdir}/*.o " + |
| 223 | "${libdir}/pkgconfig " + |
| 224 | "${base_libdir}/*.a " + |
| 225 | "${base_libdir}/*.o " + |
| 226 | "${datadir}/aclocal " + |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 227 | "${datadir}/pkgconfig " + |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 228 | "config*/Makefile ") |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 229 | |
| 230 | m.addPackage( "${PN}-2to3", "Python automated Python 2 to 3 code translator", "${PN}-core", |
| 231 | "lib2to3" ) # package |
| 232 | |
| 233 | m.addPackage( "${PN}-idle", "Python Integrated Development Environment", "${PN}-core ${PN}-tkinter", |
| 234 | "${bindir}/idle idlelib" ) # package |
| 235 | |
| 236 | m.addPackage( "${PN}-pydoc", "Python interactive help support", "${PN}-core ${PN}-lang ${PN}-stringold ${PN}-re", |
| 237 | "${bindir}/pydoc pydoc.* pydoc_data" ) |
| 238 | |
| 239 | m.addPackage( "${PN}-smtpd", "Python Simple Mail Transport Daemon", "${PN}-core ${PN}-netserver ${PN}-email ${PN}-mime", |
| 240 | "${bindir}/smtpd.* smtpd.*" ) |
| 241 | |
| 242 | m.addPackage( "${PN}-audio", "Python Audio Handling", "${PN}-core", |
| 243 | "wave.* chunk.* sndhdr.* lib-dynload/ossaudiodev.*.so lib-dynload/audioop.*.so audiodev.* sunaudio.* sunau.* toaiff.*" ) |
| 244 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 245 | m.addPackage( "${PN}-argparse", "Python command line argument parser", "${PN}-core ${PN}-codecs ${PN}-textutils", |
| 246 | "argparse.*" ) |
| 247 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 248 | m.addPackage( "${PN}-asyncio", "Python Asynchronous I/O, event loop, coroutines and tasks", "${PN}-core", |
| 249 | "asyncio" ) |
| 250 | |
| 251 | m.addPackage( "${PN}-codecs", "Python codecs, encodings & i18n support", "${PN}-core ${PN}-lang", |
| 252 | "codecs.* encodings gettext.* locale.* lib-dynload/_locale.*.so lib-dynload/_codecs* lib-dynload/_multibytecodec.*.so lib-dynload/unicodedata.*.so stringprep.* xdrlib.*" ) |
| 253 | |
| 254 | m.addPackage( "${PN}-compile", "Python bytecode compilation support", "${PN}-core", |
| 255 | "py_compile.* compileall.*" ) |
| 256 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 257 | m.addPackage( "${PN}-compression", "Python high-level compression support", "${PN}-core ${PN}-codecs ${PN}-importlib ${PN}-threading ${PN}-shell", |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 258 | "gzip.* zipfile.* tarfile.* lib-dynload/bz2.*.so lib-dynload/zlib.*.so bz2.py lzma.py _compression.py" ) |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 259 | |
| 260 | m.addPackage( "${PN}-crypt", "Python basic cryptographic and hashing support", "${PN}-core", |
| 261 | "hashlib.* md5.* sha.* lib-dynload/crypt.*.so lib-dynload/_hashlib.*.so lib-dynload/_sha256.*.so lib-dynload/_sha512.*.so" ) |
| 262 | |
| 263 | m.addPackage( "${PN}-textutils", "Python option parsing, text wrapping and CSV support", "${PN}-core ${PN}-io ${PN}-re ${PN}-stringold", |
| 264 | "lib-dynload/_csv.*.so csv.* optparse.* textwrap.*" ) |
| 265 | |
| 266 | m.addPackage( "${PN}-curses", "Python curses support", "${PN}-core", |
| 267 | "curses lib-dynload/_curses.*.so lib-dynload/_curses_panel.*.so" ) # directory + low level module |
| 268 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 269 | m.addPackage( "${PN}-ctypes", "Python C types support", "${PN}-core ${PN}-subprocess", |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 270 | "ctypes lib-dynload/_ctypes.*.so lib-dynload/_ctypes_test.*.so" ) # directory + low level module |
| 271 | |
| 272 | m.addPackage( "${PN}-datetime", "Python calendar and time support", "${PN}-core ${PN}-codecs", |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 273 | "_strptime.* calendar.* datetime.* lib-dynload/_datetime.*.so" ) |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 274 | |
| 275 | m.addPackage( "${PN}-db", "Python file-based database support", "${PN}-core", |
| 276 | "anydbm.* dumbdbm.* whichdb.* dbm lib-dynload/_dbm.*.so" ) |
| 277 | |
| 278 | m.addPackage( "${PN}-debugger", "Python debugger", "${PN}-core ${PN}-io ${PN}-lang ${PN}-re ${PN}-stringold ${PN}-shell ${PN}-pprint ${PN}-importlib ${PN}-pkgutil", |
| 279 | "bdb.* pdb.*" ) |
| 280 | |
| 281 | m.addPackage( "${PN}-difflib", "Python helpers for computing deltas between objects", "${PN}-lang ${PN}-re", |
| 282 | "difflib.*" ) |
| 283 | |
| 284 | m.addPackage( "${PN}-distutils-staticdev", "Python distribution utilities (static libraries)", "${PN}-distutils", |
| 285 | "config/lib*.a" ) # package |
| 286 | |
| 287 | m.addPackage( "${PN}-distutils", "Python Distribution Utilities", "${PN}-core ${PN}-email", |
| 288 | "config distutils" ) # package |
| 289 | |
| 290 | 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", |
| 291 | "doctest.*" ) |
| 292 | |
| 293 | m.addPackage( "${PN}-email", "Python email support", "${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio ${PN}-image ${PN}-netclient", |
| 294 | "imaplib.* email" ) # package |
| 295 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 296 | m.addPackage( "${PN}-enum", "Python support for enumerations", "${PN}-core", |
| 297 | "enum.*" ) |
| 298 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 299 | m.addPackage( "${PN}-fcntl", "Python's fcntl interface", "${PN}-core", |
| 300 | "lib-dynload/fcntl.*.so" ) |
| 301 | |
| 302 | m.addPackage( "${PN}-html", "Python HTML processing support", "${PN}-core", |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 303 | "formatter.* htmlentitydefs.* html htmllib.* markupbase.* sgmllib.* HTMLParser.* " ) |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 304 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 305 | m.addPackage( "${PN}-importlib", "Python import implementation library", "${PN}-core ${PN}-lang", |
Brad Bishop | 37a0e4d | 2017-12-04 01:01:44 -0500 | [diff] [blame] | 306 | "importlib imp.*" ) |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 307 | |
| 308 | m.addPackage( "${PN}-gdbm", "Python GNU database support", "${PN}-core", |
| 309 | "lib-dynload/_gdbm.*.so" ) |
| 310 | |
| 311 | m.addPackage( "${PN}-image", "Python graphical image handling", "${PN}-core", |
| 312 | "colorsys.* imghdr.* lib-dynload/imageop.*.so lib-dynload/rgbimg.*.so" ) |
| 313 | |
| 314 | m.addPackage( "${PN}-io", "Python low-level I/O", "${PN}-core ${PN}-math", |
| 315 | "lib-dynload/_socket.*.so lib-dynload/_io.*.so lib-dynload/_ssl.*.so lib-dynload/select.*.so lib-dynload/termios.*.so lib-dynload/cStringIO.*.so " + |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 316 | "ipaddress.* pipes.* socket.* ssl.* tempfile.* StringIO.* io.* _pyio.*" ) |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 317 | |
| 318 | m.addPackage( "${PN}-json", "Python JSON support", "${PN}-core ${PN}-math ${PN}-re", |
| 319 | "json lib-dynload/_json.*.so" ) # package |
| 320 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 321 | m.addPackage( "${PN}-lang", "Python low-level language support", "${PN}-core ${PN}-importlib", |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 322 | "lib-dynload/_bisect.*.so lib-dynload/_collections.*.so lib-dynload/_heapq.*.so lib-dynload/_weakref.*.so lib-dynload/_functools.*.so " + |
| 323 | "lib-dynload/array.*.so lib-dynload/itertools.*.so lib-dynload/operator.*.so lib-dynload/parser.*.so " + |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 324 | "atexit.* bisect.* code.* codeop.* collections.* _collections_abc.* contextlib.* dis.* functools.* heapq.* inspect.* keyword.* opcode.* operator.* symbol.* repr.* token.* " + |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 325 | "tokenize.* traceback.* weakref.*" ) |
| 326 | |
| 327 | m.addPackage( "${PN}-logging", "Python logging support", "${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold", |
| 328 | "logging" ) # package |
| 329 | |
| 330 | m.addPackage( "${PN}-mailbox", "Python mailbox format support", "${PN}-core ${PN}-mime", |
| 331 | "mailbox.*" ) |
| 332 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 333 | m.addPackage( "${PN}-math", "Python math support", "${PN}-core ${PN}-crypt", |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 334 | "lib-dynload/cmath.*.so lib-dynload/math.*.so lib-dynload/_random.*.so random.* sets.*" ) |
| 335 | |
| 336 | m.addPackage( "${PN}-mime", "Python MIME handling APIs", "${PN}-core ${PN}-io", |
| 337 | "mimetools.* uu.* quopri.* rfc822.* MimeWriter.*" ) |
| 338 | |
| 339 | m.addPackage( "${PN}-mmap", "Python memory-mapped file support", "${PN}-core ${PN}-io", |
| 340 | "lib-dynload/mmap.*.so " ) |
| 341 | |
| 342 | m.addPackage( "${PN}-multiprocessing", "Python multiprocessing support", "${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-threading ${PN}-ctypes ${PN}-mmap", |
| 343 | "lib-dynload/_multiprocessing.*.so multiprocessing" ) # package |
| 344 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 345 | m.addPackage( "${PN}-netclient", "Python Internet Protocol clients", "${PN}-argparse ${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang ${PN}-logging ${PN}-mime ${PN}-html", |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 346 | "*Cookie*.* " + |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 347 | "base64.* cookielib.* ftplib.* gopherlib.* hmac.* http* httplib.* mimetypes.* nntplib.* poplib.* smtplib.* telnetlib.* urllib uuid.* rfc822.* mimetools.*" ) |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 348 | |
| 349 | m.addPackage( "${PN}-netserver", "Python Internet Protocol servers", "${PN}-core ${PN}-netclient ${PN}-shell ${PN}-threading", |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 350 | "cgi.* socketserver.* *HTTPServer.* SocketServer.*" ) |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 351 | |
| 352 | m.addPackage( "${PN}-numbers", "Python number APIs", "${PN}-core ${PN}-lang ${PN}-re", |
| 353 | "decimal.* fractions.* numbers.*" ) |
| 354 | |
| 355 | m.addPackage( "${PN}-pickle", "Python serialisation/persistence support", "${PN}-core ${PN}-codecs ${PN}-io ${PN}-re", |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 356 | "_compat_pickle.* pickle.* shelve.* lib-dynload/cPickle.*.so pickletools.*" ) |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 357 | |
| 358 | m.addPackage( "${PN}-pkgutil", "Python package extension utility support", "${PN}-core", |
| 359 | "pkgutil.*") |
| 360 | |
| 361 | m.addPackage( "${PN}-pprint", "Python pretty-print support", "${PN}-core ${PN}-io", |
| 362 | "pprint.*" ) |
| 363 | |
| 364 | m.addPackage( "${PN}-profile", "Python basic performance profiling support", "${PN}-core ${PN}-textutils", |
| 365 | "profile.* pstats.* cProfile.* lib-dynload/_lsprof.*.so" ) |
| 366 | |
| 367 | m.addPackage( "${PN}-re", "Python Regular Expression APIs", "${PN}-core", |
| 368 | "re.* sre.* sre_compile.* sre_constants* sre_parse.*" ) # _sre is builtin |
| 369 | |
| 370 | m.addPackage( "${PN}-readline", "Python readline support", "${PN}-core", |
| 371 | "lib-dynload/readline.*.so rlcompleter.*" ) |
| 372 | |
| 373 | m.addPackage( "${PN}-reprlib", "Python alternate repr() implementation", "${PN}-core", |
| 374 | "reprlib.py" ) |
| 375 | |
| 376 | m.addPackage( "${PN}-resource", "Python resource control interface", "${PN}-core", |
| 377 | "lib-dynload/resource.*.so" ) |
| 378 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 379 | m.addPackage( "${PN}-selectors", "Python High-level I/O multiplexing", "${PN}-core", |
| 380 | "selectors.*" ) |
| 381 | |
| 382 | m.addPackage( "${PN}-shell", "Python shell-like functionality", "${PN}-core ${PN}-re ${PN}-compression", |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 383 | "cmd.* commands.* dircache.* fnmatch.* glob.* popen2.* shlex.* shutil.*" ) |
| 384 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 385 | m.addPackage( "${PN}-signal", "Python set handlers for asynchronous events support", "${PN}-core ${PN}-enum", |
| 386 | "signal.*" ) |
| 387 | |
| 388 | m.addPackage( "${PN}-subprocess", "Python subprocess support", "${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle ${PN}-threading ${PN}-signal ${PN}-selectors", |
| 389 | "subprocess.* lib-dynload/_posixsubprocess.*.so" ) |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 390 | |
| 391 | m.addPackage( "${PN}-sqlite3", "Python Sqlite3 database support", "${PN}-core ${PN}-datetime ${PN}-lang ${PN}-crypt ${PN}-io ${PN}-threading", |
| 392 | "lib-dynload/_sqlite3.*.so sqlite3/dbapi2.* sqlite3/__init__.* sqlite3/dump.*" ) |
| 393 | |
| 394 | m.addPackage( "${PN}-sqlite3-tests", "Python Sqlite3 database support tests", "${PN}-core ${PN}-sqlite3", |
| 395 | "sqlite3/test" ) |
| 396 | |
| 397 | m.addPackage( "${PN}-stringold", "Python string APIs [deprecated]", "${PN}-core ${PN}-re", |
| 398 | "lib-dynload/strop.*.so string.* stringold.*" ) |
| 399 | |
| 400 | m.addPackage( "${PN}-syslog", "Python syslog interface", "${PN}-core", |
| 401 | "lib-dynload/syslog.*.so" ) |
| 402 | |
| 403 | m.addPackage( "${PN}-terminal", "Python terminal controlling support", "${PN}-core ${PN}-io", |
| 404 | "pty.* tty.*" ) |
| 405 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 406 | m.addPackage( "${PN}-tests", "Python tests", "${PN}-core ${PN}-compression", |
| 407 | "test", True ) # package |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 408 | |
| 409 | m.addPackage( "${PN}-threading", "Python threading & synchronization support", "${PN}-core ${PN}-lang", |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 410 | "_threading_local.* dummy_thread.* dummy_threading.* mutex.* threading.* queue.*" ) |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 411 | |
| 412 | m.addPackage( "${PN}-tkinter", "Python Tcl/Tk bindings", "${PN}-core", |
| 413 | "lib-dynload/_tkinter.*.so lib-tk tkinter" ) # package |
| 414 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 415 | m.addPackage( "${PN}-typing", "Python typing support", "${PN}-core", |
| 416 | "typing.*" ) |
| 417 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 418 | m.addPackage( "${PN}-unittest", "Python unit testing framework", "${PN}-core ${PN}-stringold ${PN}-lang ${PN}-io ${PN}-difflib ${PN}-pprint ${PN}-shell", |
| 419 | "unittest/" ) |
| 420 | |
| 421 | m.addPackage( "${PN}-unixadmin", "Python Unix administration support", "${PN}-core", |
| 422 | "lib-dynload/nis.*.so lib-dynload/grp.*.so lib-dynload/pwd.*.so getpass.*" ) |
| 423 | |
| 424 | m.addPackage( "${PN}-xml", "Python basic XML support", "${PN}-core ${PN}-re", |
| 425 | "lib-dynload/_elementtree.*.so lib-dynload/pyexpat.*.so xml xmllib.*" ) # package |
| 426 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 427 | m.addPackage( "${PN}-xmlrpc", "Python XML-RPC support", "${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang ${PN}-pydoc", |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 428 | "xmlrpclib.* SimpleXMLRPCServer.* DocXMLRPCServer.* xmlrpc" ) |
| 429 | |
| 430 | m.addPackage( "${PN}-mailbox", "Python mailbox format support", "${PN}-core ${PN}-mime", |
| 431 | "mailbox.*" ) |
| 432 | |
| 433 | m.make() |