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