Add python 3 support
v4 cover Add python 3 support
This patchset adds python3 recipes on the same lines as python2 I have hopefully addressed all issues reported and review comments if not please let me know. One issue that I have not been able to reproduce is compiling python3 as 32bit package on x86_64 (multilib) that Saul reported.
We can mark python3 as multilib broken in meantime until the issue is reproduced and fixed.
The following changes since commit e4582a51a2500ad3b418e53170f5fb6b2cbd98a5:
gcc-4.8.inc: Allow lto to be configurable (2013-08-27 13:48:44 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib kraj/python3
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/python3
Khem Raj (20):
generate-manifest-3.3.py: Add script to generate python 3.3 manifests python-3.3-manifest: Add python3 manifest file python3native.bbclass: Add python3 abstraction class package_rpm.bbclass:Make the regexp less greedy classes/distutils: Introduce PYTHON_PN
classes: Add distutils for python3
distutils: Introduce PYTHON_ABI variable
distutils3: Do build_ext as separate step during compile
python3: Add recipes
python3: Add native recipe
python_2.7.3.bb: Inherit python-dir
python-distribute: Add recipes for python2 and python3
python3: Upgrade to 3.3.2
distutils3.bbclass: Fix typo and use proper values for target sysroot python3, python3-native: Consider OE staging installation
python3: Fix host include contamination issue distutils3.bbclass: Use MACHINE for sysroot when not building for
build host
python3: Fix the compiler invocation and linker flags when cross
compiling
python: Add Patch description and status information python3_3.3.2.bb: Add liblzma to RDEPENDS for python3-misc
meta/classes/distutils-base.bbclass | 5 +- meta/classes/distutils-native-base.bbclass | 4 +- meta/classes/distutils-tools.bbclass | 77 +++++ meta/classes/distutils.bbclass | 23 +- meta/classes/distutils3-base.bbclass | 8 + meta/classes/distutils3-native-base.bbclass | 4 + meta/classes/distutils3.bbclass | 98 ++++++ meta/classes/package_rpm.bbclass | 2 +- meta/classes/python-dir.bbclass | 2 + meta/classes/python3native.bbclass | 7 + meta/classes/pythonnative.bbclass | 9 +- meta/classes/setuptools.bbclass | 3 +- meta/classes/setuptools3.bbclass | 8 + .../python/python-3.3-manifest.inc | 260 ++++++++++++++ .../python/python-distribute_0.6.32.bb | 47 +++ .../python/python3-distribute_0.6.32.bb | 47 +++ .../python/python3-native_3.3.2.bb | 70 ++++ .../python/python3/000-cross-compile.patch | 83 +++++ ...sue-13032-where-it-fails-with-UnicodeDeco.patch | 37 ++ .../python3/020-dont-compile-python-files.patch | 37 ++ .../python/python3/03-fix-tkinter-detection.patch | 42 +++ .../python/python3/030-fixup-include-dirs.patch | 33 ++ .../python/python3/04-default-is-optimized.patch | 58 ++++ .../python3/06-ctypes-libffi-fix-configure.patch | 44 +++ .../python3/070-dont-clean-ipkg-install.patch | 36 ++ .../python3/080-distutils-dont_adjust_files.patch | 92 +++++ .../python/python3/110-enable-zlib.patch | 21 ++ ...2-distutils-prefix-is-inside-staging-area.patch | 78 +++++ .../python/python3/130-readline-setup.patch | 55 +++ .../python/python3/150-fix-setupterm.patch | 17 + .../python3/avoid_warning_about_tkinter.patch | 25 ++ meta/recipes-devtools/python/python3/cgi_py.patch | 23 ++ .../python3/fix_for_using_different_libdir.patch | 54 +++ .../python3/host_include_contamination.patch | 28 ++ .../python/python3/python-3.3-multilib.patch | 336 ++++++++++++++++++ .../python/python3/remove_sqlite_rpath.patch | 19 ++ .../python/python3/setuptweaks.patch | 57 ++++ .../python/python3/shutil-follow-symlink-fix.patch | 17 + .../python/python3/sitecustomize.py | 37 ++ .../sys_platform_is_now_always_linux2.patch | 29 ++ .../python/python3/sysroot-include-headers.patch | 35 ++ .../python/python3/unixccompiler.patch | 33 ++ meta/recipes-devtools/python/python3_3.3.2.bb | 206 +++++++++++ meta/recipes-devtools/python/python_2.7.3.bb | 2 +- scripts/contrib/python/generate-manifest-3.3.py | 376 +++++++++++++++++++++ 45 files changed, 2561 insertions(+), 23 deletions(-) create mode 100644 meta/classes/distutils-tools.bbclass create mode 100644 meta/classes/distutils3-base.bbclass create mode 100644 meta/classes/distutils3-native-base.bbclass create mode 100644 meta/classes/distutils3.bbclass create mode 100644 meta/classes/python3native.bbclass create mode 100644 meta/classes/setuptools3.bbclass create mode 100644 meta/recipes-devtools/python/python-3.3-manifest.inc create mode 100644 meta/recipes-devtools/python/python-distribute_0.6.32.bb create mode 100644 meta/recipes-devtools/python/python3-distribute_0.6.32.bb create mode 100644 meta/recipes-devtools/python/python3-native_3.3.2.bb create mode 100644 meta/recipes-devtools/python/python3/000-cross-compile.patch create mode 100644 meta/recipes-devtools/python/python3/0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch create mode 100644 meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch create mode 100644 meta/recipes-devtools/python/python3/03-fix-tkinter-detection.patch create mode 100644 meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch create mode 100644 meta/recipes-devtools/python/python3/04-default-is-optimized.patch create mode 100644 meta/recipes-devtools/python/python3/06-ctypes-libffi-fix-configure.patch create mode 100644 meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch create mode 100644 meta/recipes-devtools/python/python3/080-distutils-dont_adjust_files.patch create mode 100644 meta/recipes-devtools/python/python3/110-enable-zlib.patch create mode 100644 meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch create mode 100644 meta/recipes-devtools/python/python3/130-readline-setup.patch create mode 100644 meta/recipes-devtools/python/python3/150-fix-setupterm.patch create mode 100644 meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch create mode 100644 meta/recipes-devtools/python/python3/cgi_py.patch create mode 100644 meta/recipes-devtools/python/python3/fix_for_using_different_libdir.patch create mode 100644 meta/recipes-devtools/python/python3/host_include_contamination.patch create mode 100644 meta/recipes-devtools/python/python3/python-3.3-multilib.patch create mode 100644 meta/recipes-devtools/python/python3/remove_sqlite_rpath.patch create mode 100644 meta/recipes-devtools/python/python3/setuptweaks.patch create mode 100644 meta/recipes-devtools/python/python3/shutil-follow-symlink-fix.patch create mode 100644 meta/recipes-devtools/python/python3/sitecustomize.py create mode 100644 meta/recipes-devtools/python/python3/sys_platform_is_now_always_linux2.patch create mode 100644 meta/recipes-devtools/python/python3/sysroot-include-headers.patch create mode 100644 meta/recipes-devtools/python/python3/unixccompiler.patch create mode 100644 meta/recipes-devtools/python/python3_3.3.2.bb create mode 100755 scripts/contrib/python/generate-manifest-3.3.py
Signature · 1 line
1.8.3.4
PATCH v4 1/20 generate-manifest-3.3.py: Add script to generate python 3.3 manifests
Bases on python 2.7.x generator
--- scripts/contrib/python/generate-manifest-3.3.py | 376 ++++++++++++++++++++++++ 1 file changed, 376 insertions(+) create mode 100755 scripts/contrib/python/generate-manifest-3.3.py
scripts/contrib/python/generate-manifest-3.3.py new file +376 -0
@@ -0,0 +1,376 @@ +#!/usr/bin/env python + +# generate Python Manifest for the OpenEmbedded build system +# (C) 2002-2010 Michael 'Mickey' Lauer <[email protected]> +# (C) 2007 Jeremy Laine +# licensed under MIT, see COPYING.MIT +# +# June 22, 2011 -- Mark Hatle <[email protected]> +# * Updated to no longer generate special -dbg package, instead use the +# single system -dbg +# * Update version with ".1" to indicate this change + +import os +import sys +import time + +VERSION = "3.3.0" + +__author__ = "Michael 'Mickey' Lauer <[email protected]>" +__version__ = "20121010" + +class MakefileMaker: + + def __init__( self, outfile ): + """initialize""" + self.packages = {} + self.targetPrefix = "${libdir}/python%s/" % VERSION[:3] + self.output = outfile + self.out( """ +# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file. +# Generator: '%s' Version %s (C) 2002-2010 Michael 'Mickey' Lauer <[email protected]> +# Visit the Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy +""" % ( sys.argv[0], __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 ): + """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 ) + self.packages[name] = description, dependencies, fullFilenames + + def doBody( self ): + """generate body of Makefile""" + + global VERSION + + # + # generate provides line + # + + provideLine = 'PROVIDES+="' + for name in sorted(self.packages): + provideLine += "%s " % name + provideLine += '"' + + self.out( provideLine ) + self.out( "" ) + + # + # generate package line + # + + packageLine = 'PACKAGES="${PN}-dbg ' + for name in sorted(self.packages): + if name.startswith("${PN}-distutils"): + if name == "${PN}-distutils": + packageLine += "%s-staticdev %s " % (name, name) + elif name != '${PN}-dbg': + packageLine += "%s " % name + packageLine += '${PN}-modules"' + + self.out( packageLine ) + self.out( "" ) + + # + # generate package variables + # + + for name, data in sorted(self.packages.iteritems()): + desc, deps, files = data + + # + # write out the description, revision and dependencies + # + self.out( 'DESCRIPTION_%s="%s"' % ( name, desc ) ) + self.out( 'RDEPENDS_%s="%s"' % ( name, deps ) ) + + line = 'FILES_%s="' % 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 " % target + + line += '"' + self.out( line ) + self.out( "" ) + + self.out( 'DESCRIPTION_${PN}-modules="All Python modules"' ) + line = 'RDEPENDS_${PN}-modules="' + + for name, data in sorted(self.packages.iteritems()): + if name not in ['${PN}-dev', '${PN}-distutils-staticdev']: + line += "%s " % name + + self.out( "%s \"" % 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__": + + if len( sys.argv ) > 1: + try: + os.unlink(sys.argv[1]) + except Exception: + sys.exc_clear() + outfile = file( sys.argv[1], "w" ) + else: + outfile = sys.stdout + + m = MakefileMaker( outfile ) + + # 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 (needed!)", "${PN}-lang ${PN}-re", + "__future__.* _abcoll.* abc.* 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.* config/Makefile " + + "${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 " ) + + m.addPackage( "${PN}-2to3", "Python Automated Python 2 to 3 code translation", "${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}-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}-compression", "Python High Level Compression Support", "${PN}-core ${PN}-codecs", + "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 Comma-Separated-Value 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.* dbm lib-dynload/_dbm.*.so" ) + + 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", + "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.*" ) + + # FIXME consider adding to some higher level package + m.addPackage( "${PN}-elementtree", "Python elementree", "${PN}-core", + "lib-dynload/_elementtree.*.so" ) + + 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}-html", "Python HTML Processing", "${PN}-core", + "formatter.* htmlentitydefs.* htmllib.* markupbase.* sgmllib.* HTMLParser.* " ) + + 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", + "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", + "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", + "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", + "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", + "cgi.* *HTTPServer.* SocketServer.*" ) + + m.addPackage( "${PN}-numbers", "Python Number APIs", "${PN}-core ${PN}-lang ${PN}-re", + "decimal.* numbers.*" ) + + m.addPackage( "${PN}-pickle", "Python 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}-pprint", "Python Pretty-Print Support", "${PN}-core", + "pprint.*" ) + + m.addPackage( "${PN}-profile", "Python Basic 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", + "urllib/robotparser.*") + + 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", + "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", + "test" ) # 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 tkinter" ) # package + + m.addPackage( "${PN}-unittest", "Python Unit Testing Framework", "${PN}-core ${PN}-stringold ${PN}-lang", + "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}-elementtree ${PN}-re", + "lib-dynload/pyexpat.*.so xml xmllib.*" ) # package + + m.addPackage( "${PN}-xmlrpc", "Python XMLRPC Support", "${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang", + "xmlrpclib.* SimpleXMLRPCServer.* DocXMLRPCServer.* xmlrpc" ) + + m.addPackage( "${PN}-mailbox", "Python Mailbox Format Support", "${PN}-core ${PN}-mime", + "mailbox.*" ) + + m.make()
Signature · 1 line
1.8.3.4
PATCH v4 2/20 python-3.3-manifest: Add python3 manifest file
--- .../python/python-3.3-manifest.inc | 260 +++++++++++++++++++++ 1 file changed, 260 insertions(+) create mode 100644 meta/recipes-devtools/python/python-3.3-manifest.inc
meta/recipes-devtools/python/python-3.3-manifest.inc new file +260 -0
@@ -0,0 +1,260 @@ + +# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file. +# Generator: '../../../scripts/contrib/python/generate-manifest-3.3.py' Version 20121010 (C) 2002-2010 Michael 'Mickey' Lauer <[email protected]> +# Visit the Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy + + + +PROVIDES+="${PN}-2to3 ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils ${PN}-distutils-staticdev ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc " + +PACKAGES="${PN}-dbg ${PN}-2to3 ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils-staticdev ${PN}-distutils ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-modules" + +DESCRIPTION_${PN}-2to3="Python Automated Python 2 to 3 code translation" +RDEPENDS_${PN}-2to3="${PN}-core" +FILES_${PN}-2to3="${bindir}/2to3 ${libdir}/python3.3/lib2to3 " + +DESCRIPTION_${PN}-audio="Python Audio Handling" +RDEPENDS_${PN}-audio="${PN}-core" +FILES_${PN}-audio="${libdir}/python3.3/wave.* ${libdir}/python3.3/chunk.* ${libdir}/python3.3/sndhdr.* ${libdir}/python3.3/lib-dynload/ossaudiodev.*.so ${libdir}/python3.3/lib-dynload/audioop.*.so ${libdir}/python3.3/audiodev.* ${libdir}/python3.3/sunaudio.* ${libdir}/python3.3/sunau.* ${libdir}/python3.3/toaiff.* " + +DESCRIPTION_${PN}-codecs="Python Codecs, Encodings & i18n Support" +RDEPENDS_${PN}-codecs="${PN}-core ${PN}-lang" +FILES_${PN}-codecs="${libdir}/python3.3/codecs.* ${libdir}/python3.3/encodings ${libdir}/python3.3/gettext.* ${libdir}/python3.3/locale.* ${libdir}/python3.3/lib-dynload/_locale.*.so ${libdir}/python3.3/lib-dynload/_codecs* ${libdir}/python3.3/lib-dynload/_multibytecodec.*.so ${libdir}/python3.3/lib-dynload/unicodedata.*.so ${libdir}/python3.3/stringprep.* ${libdir}/python3.3/xdrlib.* " + +DESCRIPTION_${PN}-compile="Python Bytecode Compilation Support" +RDEPENDS_${PN}-compile="${PN}-core" +FILES_${PN}-compile="${libdir}/python3.3/py_compile.* ${libdir}/python3.3/compileall.* " + +DESCRIPTION_${PN}-compression="Python High Level Compression Support" +RDEPENDS_${PN}-compression="${PN}-core ${PN}-codecs" +FILES_${PN}-compression="${libdir}/python3.3/gzip.* ${libdir}/python3.3/zipfile.* ${libdir}/python3.3/tarfile.* ${libdir}/python3.3/lib-dynload/bz2.*.so " + +DESCRIPTION_${PN}-core="Python Interpreter and core modules (needed!)" +RDEPENDS_${PN}-core="${PN}-lang ${PN}-re" +FILES_${PN}-core="${libdir}/python3.3/__future__.* ${libdir}/python3.3/_abcoll.* ${libdir}/python3.3/abc.* ${libdir}/python3.3/copy.* ${libdir}/python3.3/copy_reg.* ${libdir}/python3.3/ConfigParser.* ${libdir}/python3.3/genericpath.* ${libdir}/python3.3/getopt.* ${libdir}/python3.3/linecache.* ${libdir}/python3.3/new.* ${libdir}/python3.3/os.* ${libdir}/python3.3/posixpath.* ${libdir}/python3.3/struct.* ${libdir}/python3.3/warnings.* ${libdir}/python3.3/site.* ${libdir}/python3.3/stat.* ${libdir}/python3.3/UserDict.* ${libdir}/python3.3/UserList.* ${libdir}/python3.3/UserString.* ${libdir}/python3.3/lib-dynload/binascii.*.so ${libdir}/python3.3/lib-dynload/_struct.*.so ${libdir}/python3.3/lib-dynload/time.*.so ${libdir}/python3.3/lib-dynload/xreadlines.*.so ${libdir}/python3.3/types.* ${libdir}/python3.3/platform.* ${bindir}/python* ${libdir}/python3.3/_weakrefset.* ${libdir}/python3.3/sysconfig.* ${libdir}/python3.3/config/Makefile ${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py " + +DESCRIPTION_${PN}-crypt="Python Basic Cryptographic and Hashing Support" +RDEPENDS_${PN}-crypt="${PN}-core" +FILES_${PN}-crypt="${libdir}/python3.3/hashlib.* ${libdir}/python3.3/md5.* ${libdir}/python3.3/sha.* ${libdir}/python3.3/lib-dynload/crypt.*.so ${libdir}/python3.3/lib-dynload/_hashlib.*.so ${libdir}/python3.3/lib-dynload/_sha256.*.so ${libdir}/python3.3/lib-dynload/_sha512.*.so " + +DESCRIPTION_${PN}-ctypes="Python C Types Support" +RDEPENDS_${PN}-ctypes="${PN}-core" +FILES_${PN}-ctypes="${libdir}/python3.3/ctypes ${libdir}/python3.3/lib-dynload/_ctypes.*.so ${libdir}/python3.3/lib-dynload/_ctypes_test.*.so " + +DESCRIPTION_${PN}-curses="Python Curses Support" +RDEPENDS_${PN}-curses="${PN}-core" +FILES_${PN}-curses="${libdir}/python3.3/curses ${libdir}/python3.3/lib-dynload/_curses.*.so ${libdir}/python3.3/lib-dynload/_curses_panel.*.so " + +DESCRIPTION_${PN}-datetime="Python Calendar and Time support" +RDEPENDS_${PN}-datetime="${PN}-core ${PN}-codecs" +FILES_${PN}-datetime="${libdir}/python3.3/_strptime.* ${libdir}/python3.3/calendar.* ${libdir}/python3.3/lib-dynload/datetime.*.so " + +DESCRIPTION_${PN}-db="Python File-Based Database Support" +RDEPENDS_${PN}-db="${PN}-core" +FILES_${PN}-db="${libdir}/python3.3/anydbm.* ${libdir}/python3.3/dumbdbm.* ${libdir}/python3.3/whichdb.* ${libdir}/python3.3/dbm ${libdir}/python3.3/lib-dynload/_dbm.*.so " + +DESCRIPTION_${PN}-debugger="Python Debugger" +RDEPENDS_${PN}-debugger="${PN}-core ${PN}-io ${PN}-lang ${PN}-re ${PN}-stringold ${PN}-shell ${PN}-pprint" +FILES_${PN}-debugger="${libdir}/python3.3/bdb.* ${libdir}/python3.3/pdb.* " + +DESCRIPTION_${PN}-dev="Python Development Package" +RDEPENDS_${PN}-dev="${PN}-core" +FILES_${PN}-dev="${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la ${libdir}/*.a ${libdir}/*.o ${libdir}/pkgconfig ${base_libdir}/*.a ${base_libdir}/*.o ${datadir}/aclocal ${datadir}/pkgconfig " + +DESCRIPTION_${PN}-difflib="Python helpers for computing deltas between objects." +RDEPENDS_${PN}-difflib="${PN}-lang ${PN}-re" +FILES_${PN}-difflib="${libdir}/python3.3/difflib.* " + +DESCRIPTION_${PN}-distutils="Python Distribution Utilities" +RDEPENDS_${PN}-distutils="${PN}-core" +FILES_${PN}-distutils="${libdir}/python3.3/config ${libdir}/python3.3/distutils " + +DESCRIPTION_${PN}-distutils-staticdev="Python Distribution Utilities (Static Libraries)" +RDEPENDS_${PN}-distutils-staticdev="${PN}-distutils" +FILES_${PN}-distutils-staticdev="${libdir}/python3.3/config/lib*.a " + +DESCRIPTION_${PN}-doctest="Python framework for running examples in docstrings." +RDEPENDS_${PN}-doctest="${PN}-core ${PN}-lang ${PN}-io ${PN}-re ${PN}-unittest ${PN}-debugger ${PN}-difflib" +FILES_${PN}-doctest="${libdir}/python3.3/doctest.* " + +DESCRIPTION_${PN}-elementtree="Python elementree" +RDEPENDS_${PN}-elementtree="${PN}-core" +FILES_${PN}-elementtree="${libdir}/python3.3/lib-dynload/_elementtree.*.so " + +DESCRIPTION_${PN}-email="Python Email Support" +RDEPENDS_${PN}-email="${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio ${PN}-image ${PN}-netclient" +FILES_${PN}-email="${libdir}/python3.3/imaplib.* ${libdir}/python3.3/email " + +DESCRIPTION_${PN}-fcntl="Python's fcntl Interface" +RDEPENDS_${PN}-fcntl="${PN}-core" +FILES_${PN}-fcntl="${libdir}/python3.3/lib-dynload/fcntl.*.so " + +DESCRIPTION_${PN}-gdbm="Python GNU Database Support" +RDEPENDS_${PN}-gdbm="${PN}-core" +FILES_${PN}-gdbm="${libdir}/python3.3/lib-dynload/_gdbm.*.so " + +DESCRIPTION_${PN}-html="Python HTML Processing" +RDEPENDS_${PN}-html="${PN}-core" +FILES_${PN}-html="${libdir}/python3.3/formatter.* ${libdir}/python3.3/htmlentitydefs.* ${libdir}/python3.3/htmllib.* ${libdir}/python3.3/markupbase.* ${libdir}/python3.3/sgmllib.* ${libdir}/python3.3/HTMLParser.* " + +DESCRIPTION_${PN}-idle="Python Integrated Development Environment" +RDEPENDS_${PN}-idle="${PN}-core ${PN}-tkinter" +FILES_${PN}-idle="${bindir}/idle ${libdir}/python3.3/idlelib " + +DESCRIPTION_${PN}-image="Python Graphical Image Handling" +RDEPENDS_${PN}-image="${PN}-core" +FILES_${PN}-image="${libdir}/python3.3/colorsys.* ${libdir}/python3.3/imghdr.* ${libdir}/python3.3/lib-dynload/imageop.*.so ${libdir}/python3.3/lib-dynload/rgbimg.*.so " + +DESCRIPTION_${PN}-io="Python Low-Level I/O" +RDEPENDS_${PN}-io="${PN}-core ${PN}-math" +FILES_${PN}-io="${libdir}/python3.3/lib-dynload/_socket.*.so ${libdir}/python3.3/lib-dynload/_io.*.so ${libdir}/python3.3/lib-dynload/_ssl.*.so ${libdir}/python3.3/lib-dynload/select.*.so ${libdir}/python3.3/lib-dynload/termios.*.so ${libdir}/python3.3/lib-dynload/cStringIO.*.so ${libdir}/python3.3/pipes.* ${libdir}/python3.3/socket.* ${libdir}/python3.3/ssl.* ${libdir}/python3.3/tempfile.* ${libdir}/python3.3/StringIO.* ${libdir}/python3.3/io.* ${libdir}/python3.3/_pyio.* " + +DESCRIPTION_${PN}-json="Python JSON Support" +RDEPENDS_${PN}-json="${PN}-core ${PN}-math ${PN}-re" +FILES_${PN}-json="${libdir}/python3.3/json ${libdir}/python3.3/lib-dynload/_json.*.so " + +DESCRIPTION_${PN}-lang="Python Low-Level Language Support" +RDEPENDS_${PN}-lang="${PN}-core" +FILES_${PN}-lang="${libdir}/python3.3/lib-dynload/_bisect.*.so ${libdir}/python3.3/lib-dynload/_collections.*.so ${libdir}/python3.3/lib-dynload/_heapq.*.so ${libdir}/python3.3/lib-dynload/_weakref.*.so ${libdir}/python3.3/lib-dynload/_functools.*.so ${libdir}/python3.3/lib-dynload/array.*.so ${libdir}/python3.3/lib-dynload/itertools.*.so ${libdir}/python3.3/lib-dynload/operator.*.so ${libdir}/python3.3/lib-dynload/parser.*.so ${libdir}/python3.3/atexit.* ${libdir}/python3.3/bisect.* ${libdir}/python3.3/code.* ${libdir}/python3.3/codeop.* ${libdir}/python3.3/collections.* ${libdir}/python3.3/dis.* ${libdir}/python3.3/functools.* ${libdir}/python3.3/heapq.* ${libdir}/python3.3/inspect.* ${libdir}/python3.3/keyword.* ${libdir}/python3.3/opcode.* ${libdir}/python3.3/symbol.* ${libdir}/python3.3/repr.* ${libdir}/python3.3/token.* ${libdir}/python3.3/tokenize.* ${libdir}/python3.3/traceback.* ${libdir}/python3.3/weakref.* " + +DESCRIPTION_${PN}-logging="Python Logging Support" +RDEPENDS_${PN}-logging="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold" +FILES_${PN}-logging="${libdir}/python3.3/logging " + +DESCRIPTION_${PN}-mailbox="Python Mailbox Format Support" +RDEPENDS_${PN}-mailbox="${PN}-core ${PN}-mime" +FILES_${PN}-mailbox="${libdir}/python3.3/mailbox.* " + +DESCRIPTION_${PN}-math="Python Math Support" +RDEPENDS_${PN}-math="${PN}-core" +FILES_${PN}-math="${libdir}/python3.3/lib-dynload/cmath.*.so ${libdir}/python3.3/lib-dynload/math.*.so ${libdir}/python3.3/lib-dynload/_random.*.so ${libdir}/python3.3/random.* ${libdir}/python3.3/sets.* " + +DESCRIPTION_${PN}-mime="Python MIME Handling APIs" +RDEPENDS_${PN}-mime="${PN}-core ${PN}-io" +FILES_${PN}-mime="${libdir}/python3.3/mimetools.* ${libdir}/python3.3/uu.* ${libdir}/python3.3/quopri.* ${libdir}/python3.3/rfc822.* ${libdir}/python3.3/MimeWriter.* " + +DESCRIPTION_${PN}-mmap="Python Memory-Mapped-File Support" +RDEPENDS_${PN}-mmap="${PN}-core ${PN}-io" +FILES_${PN}-mmap="${libdir}/python3.3/lib-dynload/mmap.*.so " + +DESCRIPTION_${PN}-multiprocessing="Python Multiprocessing Support" +RDEPENDS_${PN}-multiprocessing="${PN}-core ${PN}-io ${PN}-lang" +FILES_${PN}-multiprocessing="${libdir}/python3.3/lib-dynload/_multiprocessing.*.so ${libdir}/python3.3/multiprocessing " + +DESCRIPTION_${PN}-netclient="Python Internet Protocol Clients" +RDEPENDS_${PN}-netclient="${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang ${PN}-logging ${PN}-mime" +FILES_${PN}-netclient="${libdir}/python3.3/*Cookie*.* ${libdir}/python3.3/base64.* ${libdir}/python3.3/cookielib.* ${libdir}/python3.3/ftplib.* ${libdir}/python3.3/gopherlib.* ${libdir}/python3.3/hmac.* ${libdir}/python3.3/httplib.* ${libdir}/python3.3/mimetypes.* ${libdir}/python3.3/nntplib.* ${libdir}/python3.3/poplib.* ${libdir}/python3.3/smtplib.* ${libdir}/python3.3/telnetlib.* ${libdir}/python3.3/urllib.* ${libdir}/python3.3/urllib2.* ${libdir}/python3.3/urlparse.* ${libdir}/python3.3/uuid.* ${libdir}/python3.3/rfc822.* ${libdir}/python3.3/mimetools.* " + +DESCRIPTION_${PN}-netserver="Python Internet Protocol Servers" +RDEPENDS_${PN}-netserver="${PN}-core ${PN}-netclient" +FILES_${PN}-netserver="${libdir}/python3.3/cgi.* ${libdir}/python3.3/*HTTPServer.* ${libdir}/python3.3/SocketServer.* " + +DESCRIPTION_${PN}-numbers="Python Number APIs" +RDEPENDS_${PN}-numbers="${PN}-core ${PN}-lang ${PN}-re" +FILES_${PN}-numbers="${libdir}/python3.3/decimal.* ${libdir}/python3.3/numbers.* " + +DESCRIPTION_${PN}-pickle="Python Persistence Support" +RDEPENDS_${PN}-pickle="${PN}-core ${PN}-codecs ${PN}-io ${PN}-re" +FILES_${PN}-pickle="${libdir}/python3.3/pickle.* ${libdir}/python3.3/shelve.* ${libdir}/python3.3/lib-dynload/cPickle.*.so ${libdir}/python3.3/pickletools.* " + +DESCRIPTION_${PN}-pkgutil="Python Package Extension Utility Support" +RDEPENDS_${PN}-pkgutil="${PN}-core" +FILES_${PN}-pkgutil="${libdir}/python3.3/pkgutil.* " + +DESCRIPTION_${PN}-pprint="Python Pretty-Print Support" +RDEPENDS_${PN}-pprint="${PN}-core" +FILES_${PN}-pprint="${libdir}/python3.3/pprint.* " + +DESCRIPTION_${PN}-profile="Python Basic Profiling Support" +RDEPENDS_${PN}-profile="${PN}-core ${PN}-textutils" +FILES_${PN}-profile="${libdir}/python3.3/profile.* ${libdir}/python3.3/pstats.* ${libdir}/python3.3/cProfile.* ${libdir}/python3.3/lib-dynload/_lsprof.*.so " + +DESCRIPTION_${PN}-pydoc="Python Interactive Help Support" +RDEPENDS_${PN}-pydoc="${PN}-core ${PN}-lang ${PN}-stringold ${PN}-re" +FILES_${PN}-pydoc="${bindir}/pydoc ${libdir}/python3.3/pydoc.* ${libdir}/python3.3/pydoc_data " + +DESCRIPTION_${PN}-re="Python Regular Expression APIs" +RDEPENDS_${PN}-re="${PN}-core" +FILES_${PN}-re="${libdir}/python3.3/re.* ${libdir}/python3.3/sre.* ${libdir}/python3.3/sre_compile.* ${libdir}/python3.3/sre_constants* ${libdir}/python3.3/sre_parse.* " + +DESCRIPTION_${PN}-readline="Python Readline Support" +RDEPENDS_${PN}-readline="${PN}-core" +FILES_${PN}-readline="${libdir}/python3.3/lib-dynload/readline.*.so ${libdir}/python3.3/rlcompleter.* " + +DESCRIPTION_${PN}-resource="Python Resource Control Interface" +RDEPENDS_${PN}-resource="${PN}-core" +FILES_${PN}-resource="${libdir}/python3.3/lib-dynload/resource.*.so " + +DESCRIPTION_${PN}-robotparser="Python robots.txt parser" +RDEPENDS_${PN}-robotparser="${PN}-core ${PN}-netclient" +FILES_${PN}-robotparser="${libdir}/python3.3/urllib/robotparser.* " + +DESCRIPTION_${PN}-shell="Python Shell-Like Functionality" +RDEPENDS_${PN}-shell="${PN}-core ${PN}-re" +FILES_${PN}-shell="${libdir}/python3.3/cmd.* ${libdir}/python3.3/commands.* ${libdir}/python3.3/dircache.* ${libdir}/python3.3/fnmatch.* ${libdir}/python3.3/glob.* ${libdir}/python3.3/popen2.* ${libdir}/python3.3/shlex.* ${libdir}/python3.3/shutil.* " + +DESCRIPTION_${PN}-smtpd="Python Simple Mail Transport Daemon" +RDEPENDS_${PN}-smtpd="${PN}-core ${PN}-netserver ${PN}-email ${PN}-mime" +FILES_${PN}-smtpd="${bindir}/smtpd.* ${libdir}/python3.3/smtpd.* " + +DESCRIPTION_${PN}-sqlite3="Python Sqlite3 Database Support" +RDEPENDS_${PN}-sqlite3="${PN}-core ${PN}-datetime ${PN}-lang ${PN}-crypt ${PN}-io ${PN}-threading" +FILES_${PN}-sqlite3="${libdir}/python3.3/lib-dynload/_sqlite3.*.so ${libdir}/python3.3/sqlite3/dbapi2.* ${libdir}/python3.3/sqlite3/__init__.* ${libdir}/python3.3/sqlite3/dump.* " + +DESCRIPTION_${PN}-sqlite3-tests="Python Sqlite3 Database Support Tests" +RDEPENDS_${PN}-sqlite3-tests="${PN}-core ${PN}-sqlite3" +FILES_${PN}-sqlite3-tests="${libdir}/python3.3/sqlite3/test " + +DESCRIPTION_${PN}-stringold="Python String APIs [deprecated]" +RDEPENDS_${PN}-stringold="${PN}-core ${PN}-re" +FILES_${PN}-stringold="${libdir}/python3.3/lib-dynload/strop.*.so ${libdir}/python3.3/string.* ${libdir}/python3.3/stringold.* " + +DESCRIPTION_${PN}-subprocess="Python Subprocess Support" +RDEPENDS_${PN}-subprocess="${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle" +FILES_${PN}-subprocess="${libdir}/python3.3/subprocess.* " + +DESCRIPTION_${PN}-syslog="Python Syslog Interface" +RDEPENDS_${PN}-syslog="${PN}-core" +FILES_${PN}-syslog="${libdir}/python3.3/lib-dynload/syslog.*.so " + +DESCRIPTION_${PN}-terminal="Python Terminal Controlling Support" +RDEPENDS_${PN}-terminal="${PN}-core ${PN}-io" +FILES_${PN}-terminal="${libdir}/python3.3/pty.* ${libdir}/python3.3/tty.* " + +DESCRIPTION_${PN}-tests="Python Tests" +RDEPENDS_${PN}-tests="${PN}-core" +FILES_${PN}-tests="${libdir}/python3.3/test " + +DESCRIPTION_${PN}-textutils="Python Option Parsing, Text Wrapping and Comma-Separated-Value Support" +RDEPENDS_${PN}-textutils="${PN}-core ${PN}-io ${PN}-re ${PN}-stringold" +FILES_${PN}-textutils="${libdir}/python3.3/lib-dynload/_csv.*.so ${libdir}/python3.3/csv.* ${libdir}/python3.3/optparse.* ${libdir}/python3.3/textwrap.* " + +DESCRIPTION_${PN}-threading="Python Threading & Synchronization Support" +RDEPENDS_${PN}-threading="${PN}-core ${PN}-lang" +FILES_${PN}-threading="${libdir}/python3.3/_threading_local.* ${libdir}/python3.3/dummy_thread.* ${libdir}/python3.3/dummy_threading.* ${libdir}/python3.3/mutex.* ${libdir}/python3.3/threading.* ${libdir}/python3.3/Queue.* " + +DESCRIPTION_${PN}-tkinter="Python Tcl/Tk Bindings" +RDEPENDS_${PN}-tkinter="${PN}-core" +FILES_${PN}-tkinter="${libdir}/python3.3/lib-dynload/_tkinter.*.so ${libdir}/python3.3/lib-tk ${libdir}/python3.3/tkinter " + +DESCRIPTION_${PN}-unittest="Python Unit Testing Framework" +RDEPENDS_${PN}-unittest="${PN}-core ${PN}-stringold ${PN}-lang" +FILES_${PN}-unittest="${libdir}/python3.3/unittest/ " + +DESCRIPTION_${PN}-unixadmin="Python Unix Administration Support" +RDEPENDS_${PN}-unixadmin="${PN}-core" +FILES_${PN}-unixadmin="${libdir}/python3.3/lib-dynload/nis.*.so ${libdir}/python3.3/lib-dynload/grp.*.so ${libdir}/python3.3/lib-dynload/pwd.*.so ${libdir}/python3.3/getpass.* " + +DESCRIPTION_${PN}-xml="Python basic XML support." +RDEPENDS_${PN}-xml="${PN}-core ${PN}-elementtree ${PN}-re" +FILES_${PN}-xml="${libdir}/python3.3/lib-dynload/pyexpat.*.so ${libdir}/python3.3/xml ${libdir}/python3.3/xmllib.* " + +DESCRIPTION_${PN}-xmlrpc="Python XMLRPC Support" +RDEPENDS_${PN}-xmlrpc="${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang" +FILES_${PN}-xmlrpc="${libdir}/python3.3/xmlrpclib.* ${libdir}/python3.3/SimpleXMLRPCServer.* ${libdir}/python3.3/DocXMLRPCServer.* ${libdir}/python3.3/xmlrpc " + +DESCRIPTION_${PN}-modules="All Python modules" +RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc " +ALLOW_EMPTY_${PN}-modules = "1" + +
Signature · 1 line
1.8.3.4
PATCH v4 3/20 python3native.bbclass: Add python3 abstraction class
In reply to Khem Raj--- meta/classes/python3native.bbclass | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 meta/classes/python3native.bbclass
meta/classes/python3native.bbclass new file +7 -0
@@ -0,0 +1,7 @@ +PYTHON_BASEVERSION = "3.3" + +inherit python-dir + +PYTHON="${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}" +EXTRANATIVEPATH += "${PYTHON_PN}-native" +DEPENDS += " ${PYTHON_PN}-native "
Signature · 1 line
1.8.3.4
PATCH v4 4/20 package_rpm.bbclass:Make the regexp less greedy
In reply to Khem RajThis causes issues when postinstalls have ERROR keywords its interpreted as error and image build is cancelled
--- meta/classes/package_rpm.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/package_rpm.bbclass +1 -1
@@ -60,7 +60,7 @@ rpm_log_check() { lf_txt="`cat $lf_path`" for keyword_die in "unpacking of archive failed" "Cannot find package" "exit 1" ERR Fail do - if (echo "$lf_txt" | grep -v log_check | grep "$keyword_die") >/dev/null 2>&1 + if (echo "$lf_txt" | grep -v log_check | grep "\<$keyword_die\>") >/dev/null 2>&1 then echo "log_check: There were error messages in the logfile" printf "log_check: Matched keyword: [$keyword_die]\n\n"
Signature · 1 line
1.8.3.4
Re: [PATCH 04/20] package_rpm.bbclass:Make the regexp less greedy
Quoted 4 lines · Khem Raj
This causes issues when postinstalls have ERROR keywords its interpreted as error and image build is cancelled
Signed-off-by Khem Raj <[email protected]>
As I mentioned before, "the regexp" isn't a very satisfactory description of the locus for this change, given that the file contains many regexps. I'm also not entirely convinced that this patch really makes the regexp "less greedy" in any meaningful way: it makes it less prone to unintended matches, but that's a different issue to greediness.
p.
Re: [PATCH 04/20] package_rpm.bbclass:Make the regexp less greedy
Quoted 4 lines · Phil Blundell
Quoted 3 lines · Khem Raj
This causes issues when postinstalls have ERROR keywords its interpreted as error and image build is cancelled
Quoted 8 lines
Quoted 1 line
Signed-off-by Khem Raj <[email protected]>As I mentioned before, "the regexp" isn't a very satisfactory description of the locus for this change, given that the file contains many regexps. I'm also not entirely convinced that this patch really makes the regexp "less greedy" in any meaningful way: it makes it less prone to unintended matches, but that's a different issue to greediness.
Thanks Phil, I have reworded it to make it more clearer hopefully. The commit it pushed to the pull branch here
Quoted 3 lines
p.
PATCH v4 5/20 classes/distutils: Introduce PYTHON_PN
In reply to Khem RajThis is needed to accomodate python3 alongside
python2
--- meta/classes/distutils-base.bbclass | 5 ++--- meta/classes/distutils-native-base.bbclass | 4 ++-- meta/classes/distutils.bbclass | 23 ++++++++++++----------- meta/classes/python-dir.bbclass | 1 + meta/classes/pythonnative.bbclass | 9 ++++++--- 5 files changed, 23 insertions(+), 19 deletions(-)
meta/classes/distutils-base.bbclass +2 -3
@@ -1,5 +1,4 @@ -DEPENDS += "${@["python-native python", ""][(d.getVar('PACKAGES', True) == '')]}" -RDEPENDS_${PN} += "${@['', 'python-core']['${CLASSOVERRIDE}' == 'class-target']}" +DEPENDS += "${@["${PYTHON_PN}-native ${PYTHON_PN}", ""][(d.getVar('PACKAGES', True) == '')]}" +RDEPENDS_${PN} += "${@['', '${PYTHON_PN}-core']['${CLASSOVERRIDE}' == 'class-target']}" inherit distutils-common-base pythonnative -
meta/classes/distutils-native-base.bbclass +2 -2
@@ -1,3 +1,3 @@ -DEPENDS += "${@["python-native", ""][(d.getVar('PACKAGES', True) == '')]}" - inherit distutils-common-base + +DEPENDS += "${@["${PYTHON_PN}-native", ""][(d.getVar('PACKAGES', True) == '')]}"
meta/classes/distutils.bbclass +12 -11
@@ -11,15 +11,15 @@ distutils_do_compile() { STAGING_INCDIR=${STAGING_INCDIR} \ STAGING_LIBDIR=${STAGING_LIBDIR} \ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ - ${STAGING_BINDIR_NATIVE}/python-native/python setup.py build ${DISTUTILS_BUILD_ARGS} || \ - bbfatal "python setup.py build_ext execution failed." + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS} || \ + bbfatal "${PYTHON_PN} setup.py build_ext execution failed." } distutils_stage_headers() { install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ - ${STAGING_BINDIR_NATIVE}/python-native/python setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \ - bbfatal "python setup.py install_headers execution failed." + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \ + bbfatal "${PYTHON_PN} setup.py install_headers execution failed." } distutils_stage_all() {
@@ -28,21 +28,22 @@ distutils_stage_all() { install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ - ${STAGING_BINDIR_NATIVE}/python-native/python setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \ - bbfatal "python setup.py install (stage) execution failed." + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \ + bbfatal "${PYTHON_PN} setup.py install (stage) execution failed." } distutils_do_install() { install -d ${D}${PYTHON_SITEPACKAGES_DIR} STAGING_INCDIR=${STAGING_INCDIR} \ STAGING_LIBDIR=${STAGING_LIBDIR} \ - PYTHONPATH=${D}/${PYTHON_SITEPACKAGES_DIR} \ + PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ - ${STAGING_BINDIR_NATIVE}/python-native/python setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \ - bbfatal "python setup.py install execution failed." + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \ + bbfatal "${PYTHON_PN} setup.py install execution failed." - for i in `find ${D} -name "*.py"` ; do \ - sed -i -e s:${D}::g $i + # support filenames with *spaces* + find ${D} -name "*.py" -print0 | while read -d $'\0' i ; do \ + sed -i -e s:${D}::g "$i" done if test -e ${D}${bindir} ; then
meta/classes/python-dir.bbclass +1 -0
@@ -1,3 +1,4 @@ PYTHON_BASEVERSION ?= "2.7" PYTHON_DIR = "python${PYTHON_BASEVERSION}" +PYTHON_PN = "python${@'' if '${PYTHON_BASEVERSION}'.startswith('2') else '3'}" PYTHON_SITEPACKAGES_DIR = "${libdir}/${PYTHON_DIR}/site-packages"
meta/classes/pythonnative.bbclass +6 -3
@@ -1,3 +1,6 @@ -PYTHON="${STAGING_BINDIR_NATIVE}/python-native/python" -EXTRANATIVEPATH += "python-native" -DEPENDS += " python-native " + +inherit python-dir + +PYTHON="${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}" +EXTRANATIVEPATH += "${PYTHON_PN}-native" +DEPENDS += " ${PYTHON_PN}-native "
Signature · 1 line
1.8.3.4
PATCH v4 6/20 classes: Add distutils for python3
In reply to Khem RajIn line with python2 add distutils and setuptools
classes for handing python3
Use python-distribute instead of python-setuptools in setuptools bbclass
Remove --single-version-externally-managed since its setuptools specific and we dont use it anymore
--- meta/classes/distutils-tools.bbclass | 77 ++++++++++++++++++++++++ meta/classes/distutils3-base.bbclass | 5 ++ meta/classes/distutils3-native-base.bbclass | 3 + meta/classes/distutils3.bbclass | 90 +++++++++++++++++++++++++++++ meta/classes/setuptools.bbclass | 3 +- meta/classes/setuptools3.bbclass | 8 +++ 6 files changed, 184 insertions(+), 2 deletions(-) create mode 100644 meta/classes/distutils-tools.bbclass create mode 100644 meta/classes/distutils3-base.bbclass create mode 100644 meta/classes/distutils3-native-base.bbclass create mode 100644 meta/classes/distutils3.bbclass create mode 100644 meta/classes/setuptools3.bbclass
meta/classes/distutils-tools.bbclass new file +77 -0
@@ -0,0 +1,77 @@ +DISTUTILS_BUILD_ARGS ?= "" +DISTUTILS_STAGE_HEADERS_ARGS ?= "--install-dir=${STAGING_INCDIR}/${PYTHON_DIR}" +DISTUTILS_STAGE_ALL_ARGS ?= "--prefix=${STAGING_DIR_HOST}${prefix} \ + --install-data=${STAGING_DATADIR}" +DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \ + --install-data=${D}/${datadir}" + +distutils_do_compile() { + STAGING_INCDIR=${STAGING_INCDIR} \ + STAGING_LIBDIR=${STAGING_LIBDIR} \ + BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS} || \ + bbfatal "${PYTHON_PN} setup.py build_ext execution failed." +} + +distutils_stage_headers() { + install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} + BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \ + bbfatal "${PYTHON_PN} setup.py install_headers execution failed." +} + +distutils_stage_all() { + STAGING_INCDIR=${STAGING_INCDIR} \ + STAGING_LIBDIR=${STAGING_LIBDIR} \ + install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} + PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \ + BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \ + bbfatal "${PYTHON_PN} setup.py install (stage) execution failed." +} + +distutils_do_install() { + echo "Beginning ${PN} Install ..." + install -d ${D}${PYTHON_SITEPACKAGES_DIR} + echo "Step 2 of ${PN} Install ..." + STAGING_INCDIR=${STAGING_INCDIR} \ + STAGING_LIBDIR=${STAGING_LIBDIR} \ + PYTHONPATH=${D}/${PYTHON_SITEPACKAGES_DIR} \ + BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \ + bbfatal "${PYTHON_PN} setup.py install execution failed." + + echo "Step 3 of ${PN} Install ..." + # support filenames with *spaces* + find ${D} -name "*.py" -print0 | while read -d $'\0' i ; do \ + sed -i -e s:${D}::g $i + done + + echo "Step 4 of ${PN} Install ..." + if test -e ${D}${bindir} ; then + for i in ${D}${bindir}/* ; do \ + sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i + done + fi + + echo "Step 4 of ${PN} Install ..." + if test -e ${D}${sbindir}; then + for i in ${D}${sbindir}/* ; do \ + sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i + done + fi + + echo "Step 5 of ${PN} Install ..." + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/easy-install.pth + + # + # FIXME: Bandaid against wrong datadir computation + # + if test -e ${D}${datadir}/share; then + mv -f ${D}${datadir}/share/* ${D}${datadir}/ + fi +} + +#EXPORT_FUNCTIONS do_compile do_install + +export LDSHARED="${CCLD} -shared"
meta/classes/distutils3-base.bbclass new file +5 -0
@@ -0,0 +1,5 @@ +DEPENDS += "${@["${PYTHON_PN}-native ${PYTHON_PN}", ""][(d.getVar('PACKAGES', True) == '')]}" +RDEPENDS_${PN} += "${@['', '${PYTHON_PN}-core']['${CLASSOVERRIDE}' == 'class-target']}" + +inherit distutils-common-base python3native +
meta/classes/distutils3-native-base.bbclass new file +3 -0
@@ -0,0 +1,3 @@ +PYTHON_BASEVERSION = "3.3" + +inherit distutils-native-base
meta/classes/distutils3.bbclass new file +90 -0
90 lines not on this page · raw message
meta/classes/setuptools.bbclass +1 -2
@@ -1,9 +1,8 @@ inherit distutils -DEPENDS += "python-setuptools-native" +DEPENDS += "python-distribute-native" DISTUTILS_INSTALL_ARGS = "--root=${D} \ - --single-version-externally-managed \ --prefix=${prefix} \ --install-lib=${PYTHON_SITEPACKAGES_DIR} \ --install-data=${datadir}"
meta/classes/setuptools3.bbclass new file +8 -0
@@ -0,0 +1,8 @@ +inherit distutils3 + +DEPENDS += "python3-distribute-native" + +DISTUTILS_INSTALL_ARGS = "--root=${D} \ + --prefix=${prefix} \ + --install-lib=${PYTHON_SITEPACKAGES_DIR} \ + --install-data=${datadir}"
Signature · 1 line
1.8.3.4
PATCH v4 7/20 distutils: Introduce PYTHON_ABI variable
In reply to Khem RajIn python3 this has to be taken care of, it defines a variable to denote ABI currently its at 'm' and it uses this to construct the directory names for installing the python headers and library names in sysroot. e.g. it will be something like ../python3.3m/...
We need this information when we are using distutils to cross build python extentions and want to know the locations of python headers and libraries install locations
--- meta/classes/distutils3-base.bbclass | 3 +++ meta/classes/distutils3-native-base.bbclass | 1 + meta/classes/python-dir.bbclass | 1 + 3 files changed, 5 insertions(+)
meta/classes/distutils3-base.bbclass +3 -0
@@ -1,5 +1,8 @@ DEPENDS += "${@["${PYTHON_PN}-native ${PYTHON_PN}", ""][(d.getVar('PACKAGES', True) == '')]}" RDEPENDS_${PN} += "${@['', '${PYTHON_PN}-core']['${CLASSOVERRIDE}' == 'class-target']}" +PYTHON_BASEVERSION = "3.3" +PYTHON_ABI = "m" + inherit distutils-common-base python3native
meta/classes/distutils3-native-base.bbclass +1 -0
@@ -1,3 +1,4 @@ PYTHON_BASEVERSION = "3.3" +PYTHON_ABI = "m" inherit distutils-native-base
meta/classes/python-dir.bbclass +1 -0
@@ -1,4 +1,5 @@ PYTHON_BASEVERSION ?= "2.7" +PYTHON_ABI ?= "" PYTHON_DIR = "python${PYTHON_BASEVERSION}" PYTHON_PN = "python${@'' if '${PYTHON_BASEVERSION}'.startswith('2') else '3'}" PYTHON_SITEPACKAGES_DIR = "${libdir}/${PYTHON_DIR}/site-packages"
Signature · 1 line
1.8.3.4
PATCH v4 8/20 distutils3: Do build_ext as separate step during compile
In reply to Khem RajRemove PYTHON_BASEVERSION its moved to distutils3-base class
Add DISTUTILS_BUILD_EXT_ARGS for modules to pass flags to build_ext step in setup.py
Add build_ext as sepate step during compile and add the cross sysrooted library and headers since we are cross compiling
Use ${PYTHON_PN} in place of hardcoding python name
Remove the /etc/share if its empty
--- meta/classes/distutils3.bbclass | 36 ++++++++++++++---------------------- 1 file changed, 14 insertions(+), 22 deletions(-)
meta/classes/distutils3.bbclass +14 -22
@@ -1,10 +1,7 @@ - -PYTHON_BASEVERSION = "3.3" - -inherit distutils3-base -#distutils-tools +inherit distutils3-base DISTUTILS_BUILD_ARGS ?= "" +DISTUTILS_BUILD_EXT_ARGS ?= "" DISTUTILS_STAGE_HEADERS_ARGS ?= "--install-dir=${STAGING_INCDIR}/${PYTHON_DIR}" DISTUTILS_STAGE_ALL_ARGS ?= "--prefix=${STAGING_DIR_HOST}${prefix} \ --install-data=${STAGING_DATADIR}"
@@ -15,7 +12,12 @@ distutils3_do_compile() { STAGING_INCDIR=${STAGING_INCDIR} \ STAGING_LIBDIR=${STAGING_LIBDIR} \ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS} || \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \ + build_ext --include-dirs ${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI} \ + --library-dirs ${STAGING_LIBCDIR}/${PYTHON_DIR} \ + ${DISTUTILS_BUILD_EXT_ARGS} \ + build ${DISTUTILS_BUILD_ARGS} || \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py build_ext ${DISTUTILS_BUILD_ARGS} || \ bbfatal "${PYTHON_PN} setup.py build_ext execution failed." }
@@ -37,44 +39,33 @@ distutils3_stage_all() { } distutils3_do_install() { - echo "Beginning ${PN} Install ..." install -d ${D}${PYTHON_SITEPACKAGES_DIR} - - echo "Step 2 of ${PN} Install ..." STAGING_INCDIR=${STAGING_INCDIR} \ STAGING_LIBDIR=${STAGING_LIBDIR} \ PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \ bbfatal "${PYTHON_PN} setup.py install execution failed." - echo "Step 3 of ${PN} Install ..." # support filenames with *spaces* find ${D} -name "*.py" -print0 | while read -d $'\0' i ; do \ sed -i -e s:${D}::g "$i" done - echo "Step 4 of ${PN} Install ..." if test -e ${D}${bindir} ; then for i in ${D}${bindir}/* ; do \ - echo "Processing " $i; \ - sed -i \ - -e s:${STAGING_BINDIR_NATIVE}/python3-native:${bindir}:g \ - $i + sed -i -e s:${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}:${bindir}/env\ ${PYTHON_PN}:g $i + sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i done fi - echo "Step 4 of ${PN} Install ..." if test -e ${D}${sbindir}; then for i in ${D}${sbindir}/* ; do \ - echo "Processing " $i; \ - sed -i \ - -e s:${STAGING_BINDIR_NATIVE}/python3-native:${bindir}:g \ - $i + sed -i -e s:${STAGING_BINDIR_NATIVE}/python-${PYTHON_PN}/${PYTHON_PN}:${bindir}/env\ ${PYTHON_PN}:g $i + sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i done fi - echo "Step 5 of ${PN} Install ..." rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/easy-install.pth #
@@ -82,6 +73,7 @@ distutils3_do_install() { # if test -e ${D}${datadir}/share; then mv -f ${D}${datadir}/share/* ${D}${datadir}/ + rmdir ${D}${datadir}/share fi }
Signature · 1 line
1.8.3.4
PATCH v4 9/20 python3: Add recipes
In reply to Khem Raj--- .../python/python3/000-cross-compile.patch | 76 +++++ .../python3/020-dont-compile-python-files.patch | 31 ++ .../python/python3/03-fix-tkinter-detection.patch | 42 +++ .../python/python3/030-fixup-include-dirs.patch | 36 +++ .../python/python3/04-default-is-optimized.patch | 58 ++++ .../python3/06-ctypes-libffi-fix-configure.patch | 44 +++ .../python3/070-dont-clean-ipkg-install.patch | 30 ++ .../python3/080-distutils-dont_adjust_files.patch | 86 +++++ .../python/python3/110-enable-zlib.patch | 15 + .../python/python3/130-readline-setup.patch | 49 +++ .../python/python3/140-verbose-sharedmods.patch | 10 + .../python/python3/150-fix-setupterm.patch | 11 + .../python3/avoid_warning_about_tkinter.patch | 25 ++ meta/recipes-devtools/python/python3/cgi_py.patch | 23 ++ .../python3/fix_for_using_different_libdir.patch | 54 ++++ .../python/python3/h2py-pr13032.patch | 185 +++++++++++ .../python3/host_include_contamination.patch | 28 ++ .../python/python3/python-3.3-multilib.patch | 348 +++++++++++++++++++++ .../python/python3/remove_sqlite_rpath.patch | 19 ++ .../python/python3/setuptweaks.patch | 57 ++++ .../python/python3/shutil-follow-symlink-fix.patch | 11 + .../python/python3/sitecustomize.py | 37 +++ .../sys_platform_is_now_always_linux2.patch | 29 ++ meta/recipes-devtools/python/python3_3.3.0.bb | 203 ++++++++++++ 24 files changed, 1507 insertions(+) create mode 100644 meta/recipes-devtools/python/python3/000-cross-compile.patch create mode 100644 meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch create mode 100644 meta/recipes-devtools/python/python3/03-fix-tkinter-detection.patch create mode 100644 meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch create mode 100644 meta/recipes-devtools/python/python3/04-default-is-optimized.patch create mode 100644 meta/recipes-devtools/python/python3/06-ctypes-libffi-fix-configure.patch create mode 100644 meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch create mode 100644 meta/recipes-devtools/python/python3/080-distutils-dont_adjust_files.patch create mode 100644 meta/recipes-devtools/python/python3/110-enable-zlib.patch create mode 100644 meta/recipes-devtools/python/python3/130-readline-setup.patch create mode 100644 meta/recipes-devtools/python/python3/140-verbose-sharedmods.patch create mode 100644 meta/recipes-devtools/python/python3/150-fix-setupterm.patch create mode 100644 meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch create mode 100644 meta/recipes-devtools/python/python3/cgi_py.patch create mode 100644 meta/recipes-devtools/python/python3/fix_for_using_different_libdir.patch create mode 100644 meta/recipes-devtools/python/python3/h2py-pr13032.patch create mode 100644 meta/recipes-devtools/python/python3/host_include_contamination.patch create mode 100644 meta/recipes-devtools/python/python3/python-3.3-multilib.patch create mode 100644 meta/recipes-devtools/python/python3/remove_sqlite_rpath.patch create mode 100644 meta/recipes-devtools/python/python3/setuptweaks.patch create mode 100644 meta/recipes-devtools/python/python3/shutil-follow-symlink-fix.patch create mode 100644 meta/recipes-devtools/python/python3/sitecustomize.py create mode 100644 meta/recipes-devtools/python/python3/sys_platform_is_now_always_linux2.patch create mode 100644 meta/recipes-devtools/python/python3_3.3.0.bb
meta/recipes-devtools/python/python3/000-cross-compile.patch new file +76 -0
@@ -0,0 +1,76 @@ +--- + Makefile.pre.in | 25 +++++++++++++------------ + 1 file changed, 13 insertions(+), 12 deletions(-) + +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -193,6 +193,7 @@ LIBOBJS= @LIBOBJS@ + + PYTHON= python$(EXE) + BUILDPYTHON= python$(BUILDEXE) ++HOSTPYTHON= $(BUILDPYTHON) + + PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@ + _PYTHON_HOST_PLATFORM=@_PYTHON_HOST_PLATFORM@ +@@ -239,6 +240,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@ + ########################################################################## + # Parser + PGEN= Parser/pgen$(EXE) ++HOSTPGEN= $(PGEN)$(EXE) + + PSRCS= \ + Parser/acceler.c \ +@@ -451,7 +453,7 @@ build_all_generate_profile: + + run_profile_task: + : # FIXME: can't run for a cross build +- $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) ++ $(RUNSHARED) $(HOSTPYTHON) $(PROFILE_TASK) + + build_all_use_profile: + $(MAKE) all CFLAGS="$(CFLAGS) -fprofile-use -fprofile-correction" +@@ -640,7 +642,7 @@ $(IO_OBJS): $(IO_H) + $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS) + @$(MKDIR_P) Include + $(MAKE) $(PGEN) +- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) ++ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) + $(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS) + $(MAKE) $(GRAMMAR_H) + touch $(GRAMMAR_C) +@@ -820,7 +822,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Modules/pytho + ###################################################################### + + TESTOPTS= $(EXTRATESTOPTS) +-TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) $(TESTPYTHONOPTS) ++TESTPYTHON= $(RUNSHARED) $(HOSTPYTHON) $(TESTPYTHONOPTS) + TESTRUNNER= $(TESTPYTHON) $(srcdir)/Tools/scripts/run_tests.py + TESTTIMEOUT= 3600 + +@@ -1229,7 +1231,7 @@ frameworkinstallstructure: $(LDLIBRARY) + fi; \ + done + $(LN) -fsn include/python$(LDVERSION) $(DESTDIR)$(prefix)/Headers +- sed 's/%VERSION%/'"`$(RUNSHARED) ./$(BUILDPYTHON) -c 'import platform; print(platform.python_version())'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist ++ sed 's/%VERSION%/'"`$(RUNSHARED) $(HOSTPYTHON) -c 'import platform; print(platform.python_version())'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist + $(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current + $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK) + $(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers +@@ -1288,7 +1290,7 @@ config.status: $(srcdir)/configure + + # Run reindent on the library + reindent: +- ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib ++ $(HOSTPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib + + # Rerun configure with the same options as it was run last time, + # provided the config.status script exists +@@ -1414,7 +1416,7 @@ funny: + + # Perform some verification checks on any modified files. + patchcheck: +- $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py ++ $(RUNSHARED) $(HOSTPYTHON) $(srcdir)/Tools/scripts/patchcheck.py + + # Dependencies +
meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch new file +31 -0
@@ -0,0 +1,31 @@ +--- + Makefile.pre.in | 16 ---------------- + 1 file changed, 16 deletions(-) + +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1078,24 +1078,6 @@ libinstall: build_all $(srcdir)/Lib/$(PL + $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ + $(DESTDIR)$(LIBDEST)/distutils/tests ; \ + fi +- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ +- -d $(LIBDEST) -f \ +- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ +- $(DESTDIR)$(LIBDEST) +- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \ +- -d $(LIBDEST) -f \ +- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ +- $(DESTDIR)$(LIBDEST) +- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ +- -d $(LIBDEST)/site-packages -f \ +- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages +- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \ +- -d $(LIBDEST)/site-packages -f \ +- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
meta/recipes-devtools/python/python3/03-fix-tkinter-detection.patch new file +42 -0
42 lines not on this page · raw message
meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch new file +36 -0
@@ -0,0 +1,36 @@ +--- + setup.py | 15 ++------------- + 1 file changed, 2 insertions(+), 13 deletions(-) + +--- a/setup.py ++++ b/setup.py +@@ -464,7 +464,8 @@ class PyBuildExt(build_ext): + # only change this for cross builds for 3.3, issues on Mageia + if cross_compiling: + self.add_gcc_paths() +- self.add_multiarch_paths() ++ if not cross_compiling: ++ self.add_multiarch_paths() + + # Add paths specified in the environment variables LDFLAGS and + # CPPFLAGS for header and library files. +@@ -500,7 +501,7 @@ class PyBuildExt(build_ext): + for directory in reversed(options.dirs): + add_dir_to_list(dir_list, directory) + +- if os.path.normpath(sys.base_prefix) != '/usr' \ ++ if not cross_compiling and os.path.normpath(sys.base_prefix) != '/usr' \ + and not sysconfig.get_config_var('PYTHONFRAMEWORK'): + # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework + # (PYTHONFRAMEWORK is set) to avoid # linking problems when +@@ -520,6 +521,10 @@ class PyBuildExt(build_ext): + '/lib', '/usr/lib', + ] + inc_dirs = self.compiler.include_dirs + ['/usr/include'] ++ if cross_compiling: ++ lib_dirs = self.compiler.library_dirs ++ inc_dirs = self.compiler.include_dirs ++ + exts = [] + missing = [] +
meta/recipes-devtools/python/python3/04-default-is-optimized.patch new file +58 -0
58 lines not on this page · raw message
meta/recipes-devtools/python/python3/06-ctypes-libffi-fix-configure.patch new file +44 -0
44 lines not on this page · raw message
meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch new file +30 -0
@@ -0,0 +1,30 @@ +--- + Makefile.pre.in | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1306,8 +1306,8 @@ touch: + # Sanitation targets -- clean leaves libraries, executables and tags + # files, which clobber removes as well + pycremoval: +- -find $(srcdir) -depth -name '__pycache__' -exec rm -rf {} ';' +- -find $(srcdir) -name '*.py[co]' -exec rm -f {} ';' ++ -find $(srcdir) ! -path './ipkg-install/*' -depth -name '__pycache__' -exec rm -rf {} ';' ++ -find $(srcdir) ! -path './ipkg-install/*' -name '*.py[co]' -exec rm -f {} ';' + + rmtestturds: + -rm -f *BAD *GOOD *SKIPPED +@@ -1321,9 +1321,9 @@ docclean: + -rm -rf Doc/tools/sphinx Doc/tools/pygments Doc/tools/docutils + + clean: pycremoval +- find . -name '*.[oa]' -exec rm -f {} ';' +- find . -name '*.s[ol]' -exec rm -f {} ';' +- find . -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';' ++ find . ! -path './ipkg-install/*' -name '*.[oa]' -exec rm -f {} ';' ++ find . ! -path './ipkg-install/*' -name '*.s[ol]' -exec rm -f {} ';' ++ find . ! -path './ipkg-install/*' -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';' + find build -name 'fficonfig.h' -exec rm -f {} ';' || true + find build -name 'fficonfig.py' -exec rm -f {} ';' || true + -rm -f Lib/lib2to3/*Grammar*.pickle
meta/recipes-devtools/python/python3/080-distutils-dont_adjust_files.patch new file +86 -0
86 lines not on this page · raw message
meta/recipes-devtools/python/python3/110-enable-zlib.patch new file +15 -0
@@ -0,0 +1,15 @@ +--- + Modules/Setup.dist | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/Modules/Setup.dist ++++ b/Modules/Setup.dist +@@ -354,7 +354,7 @@ _symtable symtablemodule.c + # Andrew Kuchling's zlib module. + # This require zlib 1.1.3 (or later). + # See http://www.gzip.org/zlib/ +-#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz ++zlib zlibmodule.c -lz + + # Interface to the Expat XML parser + #
meta/recipes-devtools/python/python3/130-readline-setup.patch new file +49 -0
49 lines not on this page · raw message
meta/recipes-devtools/python/python3/140-verbose-sharedmods.patch new file +10 -0
@@ -0,0 +1,10 @@ +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -477,7 +477,6 @@ $(SYSCONFIGDATA): $(BUILDPYTHON) + + # Build the shared modules + sharedmods: $(BUILDPYTHON) $(SYSCONFIGDATA) +- case $$MAKEFLAGS in *s*) quiet=-q; esac; \ + $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ + $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build +
meta/recipes-devtools/python/python3/150-fix-setupterm.patch new file +11 -0
@@ -0,0 +1,11 @@ +--- a/Modules/_cursesmodule.c ++++ b/Modules/_cursesmodule.c +@@ -116,7 +116,7 @@ char *PyCursesVersion = "2.2"; + #defines many common symbols (such as "lines") which breaks the + curses module in other ways. So the code will just specify + explicit prototypes here. */ +-extern int setupterm(char *,int,int *); ++//extern int setupterm(char *,int,int *); + #ifdef __sgi + #include <term.h> + #endif
meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch new file +25 -0
@@ -0,0 +1,25 @@ +_tkinter module needs tk module along with tcl. tk is not yet integrated +in yocto so we skip the check for this module. +Avoid a warning by not adding this module to missing variable. + +Upstream-Status: Inappropriate [distribution] + +Signed-off-by: Andrei Gherzan <[email protected]> + +Index: Python-2.7.2/setup.py +=================================================================== +--- Python-2.7.2.orig/setup.py 2012-04-05 23:18:38.500136647 +0300 ++++ Python-2.7.2/setup.py 2012-04-05 23:19:35.888134969 +0300 +@@ -1634,8 +1634,10 @@ + # Call the method for detecting whether _tkinter can be compiled + self.detect_tkinter(inc_dirs, lib_dirs) + +- if '_tkinter' not in [e.name for e in self.extensions]: +- missing.append('_tkinter') ++ # tkinter module will not be avalaible as yocto ++ # doesn't have tk integrated (yet) ++ #if '_tkinter' not in [e.name for e in self.extensions]: ++ # missing.append('_tkinter') + + return missing +
meta/recipes-devtools/python/python3/cgi_py.patch new file +23 -0
@@ -0,0 +1,23 @@ +Lib/cgi.py: Update the script as mentioned in the comment + +Upstream-Status: Inappropriate [distribution] + +Signed-off-by: Mark Hatle <[email protected]> + +--- Python-2.6.6/Lib/cgi.py.orig 2010-08-01 22:14:27.000000000 -0500 ++++ Python-2.6.6/Lib/cgi.py 2011-09-21 15:28:40.478208631 -0500 +@@ -1,13 +1,4 @@ +-#! /usr/local/bin/python +- +-# NOTE: the above "/usr/local/bin/python" is NOT a mistake. It is +-# intentionally NOT "/usr/bin/env python". On many systems +-# (e.g. Solaris), /usr/local/bin is not in $PATH as passed to CGI +-# scripts, and /usr/local/bin is the default directory where Python is +-# installed, so /usr/bin/env would be unable to find python. Granted, +-# binary installations by Linux vendors often install Python in +-# /usr/bin. So let those vendors patch cgi.py to match their choice +-# of installation. ++#! /usr/bin/env python + + """Support module for CGI (Common Gateway Interface) scripts. +
meta/recipes-devtools/python/python3/fix_for_using_different_libdir.patch new file +54 -0
54 lines not on this page · raw message
meta/recipes-devtools/python/python3/h2py-pr13032.patch new file +185 -0
185 lines not on this page · raw message
meta/recipes-devtools/python/python3/host_include_contamination.patch new file +28 -0
@@ -0,0 +1,28 @@ +when building python for qemux86-64 on ubuntu 11.10/64bit +it gropes into host includes and then mixes them with cross +includes and as a result some modules fail to compile and link +one of the modules is python-elementtree which is then not +found during image creation + +Proble is that setup.py tries to add native includes that newer +ubuntu has introduced for multiarch support. But that should +only happen for native builds and not cross building python +so we add a check here. + +Signed-off-by: Khem Raj <[email protected]> +Upstream-Status: Pending + +Index: Python-3.3.0rc2/setup.py +=================================================================== +--- Python-3.3.0rc2.orig/setup.py 2012-09-20 21:54:50.000000000 -0700 ++++ Python-3.3.0rc2/setup.py 2012-09-20 21:57:35.029123858 -0700 +@@ -402,6 +402,9 @@ + + if not find_executable('dpkg-architecture'): + return ++ if cross_compiling: ++ return ++ + opt = '' + if cross_compiling: + opt = '-t' + sysconfig.get_config_var('HOST_GNU_TYPE')
meta/recipes-devtools/python/python3/python-3.3-multilib.patch new file +348 -0
348 lines not on this page · raw message
meta/recipes-devtools/python/python3/remove_sqlite_rpath.patch new file +19 -0
@@ -0,0 +1,19 @@ +This patch removes the RPATH setting which contains a pointer to +the target relocated sysroot, which is incorrect. + +Upstream-Status: Inappropriate [Embedded Specific] + +Signed-off-by: Saul Wold <[email protected]> + +Index: Python-2.6.6/setup.py +=================================================================== +--- Python-2.6.6.orig/setup.py 2011-09-28 14:22:57.000000000 -0700 ++++ Python-2.6.6/setup.py 2011-09-28 16:11:25.147279633 -0700 +@@ -1079,7 +1079,6 @@ + include_dirs=["Modules/_sqlite", + sqlite_incdir], + library_dirs=sqlite_libdir, +- runtime_library_dirs=sqlite_libdir, + extra_link_args=sqlite_extra_link_args, + libraries=["sqlite3",])) + else:
meta/recipes-devtools/python/python3/setuptweaks.patch new file +57 -0
57 lines not on this page · raw message
meta/recipes-devtools/python/python3/shutil-follow-symlink-fix.patch new file +11 -0
@@ -0,0 +1,11 @@ +--- a/Lib/shutil.py 2013-01-29 12:31:06.926555779 -0800 ++++ b/Lib/shutil.py 2013-01-29 16:31:39.097554182 -0800 +@@ -132,7 +132,7 @@ def copymode(src, dst, *, follow_symlink + st = stat_func(src) + chmod_func(dst, stat.S_IMODE(st.st_mode)) + +-if hasattr(os, 'listxattr'): ++if hasattr(os, 'listxattr') and os.listxattr in os.supports_follow_symlinks: + def _copyxattr(src, dst, *, follow_symlinks=True): + """Copy extended filesystem attributes from `src` to `dst`. +
meta/recipes-devtools/python/python3/sitecustomize.py new file +37 -0
@@ -0,0 +1,37 @@ +# OpenEmbedded sitecustomize.py (C) 2002-2008 Michael 'Mickey' Lauer <[email protected]> +# GPLv2 or later +# Version: 20081123 +# Features: +# * set proper default encoding +# * enable readline completion in the interactive interpreter +# * load command line history on startup +# * save command line history on exit + +import os + +def __exithandler(): + try: + readline.write_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) ) + except IOError: + pass + +def __registerExitHandler(): + import atexit + atexit.register( __exithandler ) + +def __enableReadlineSupport(): + readline.set_history_length( 1000 ) + readline.parse_and_bind( "tab: complete" ) + try: + readline.read_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) ) + except IOError: + pass + +import sys +try: + import rlcompleter, readline +except ImportError: + pass +else: + __registerExitHandler() + __enableReadlineSupport()
meta/recipes-devtools/python/python3/sys_platform_is_now_always_linux2.patch new file +29 -0
@@ -0,0 +1,29 @@ +Upstream-Status: Accepted [http://hg.python.org/cpython/rev/c816479f6aaf/] +Bugtracker: http://bugs.python.org/issue12326 + +[Removed "Misc/NEWS" hunk] + +Signed-off-by: Andreas Oberritter <[email protected]> + +# HG changeset patch +# User Victor Stinner <[email protected]> +# Date 1313841758 -7200 +# Node ID c816479f6aaf71dbd3f3fe4b239186d60c55ce48 +# Parent 3e093590ac57fdda428c7da3f72ddf0c475ecf2b +Issue #12326: sys.platform is now always 'linux2' on Linux + +Even if Python is compiled on Linux 3. + +Index: Python-3.3.0rc2/configure.ac +=================================================================== +--- Python-3.3.0rc2.orig/configure.ac 2012-09-09 02:11:14.000000000 -0700 ++++ Python-3.3.0rc2/configure.ac 2012-09-20 00:44:03.317124001 -0700 +@@ -366,7 +366,7 @@ + MACHDEP="$ac_md_system$ac_md_release" + + case $MACHDEP in +- linux*) MACHDEP="linux";; ++ linux*) MACHDEP="linux2";; + cygwin*) MACHDEP="cygwin";; + darwin*) MACHDEP="darwin";; + irix646) MACHDEP="irix6";;
meta/recipes-devtools/python/python3_3.3.0.bb new file +203 -0
203 lines not on this page · raw message
Signature · 1 line
1.8.3.4
PATCH v4 10/20 python3: Add native recipe
In reply to Khem Raj--- .../python/python3-native_3.3.0.bb | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 meta/recipes-devtools/python/python3-native_3.3.0.bb
meta/recipes-devtools/python/python3-native_3.3.0.bb new file +68 -0
@@ -0,0 +1,68 @@ +require recipes-devtools/python/python.inc + +PR = "${INC_PR}.0" +PYTHON_MAJMIN = "3.3" +DISTRO_SRC_URI ?= "file://sitecustomize.py" +DISTRO_SRC_URI_linuxstdbase = "" +SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \ +file://000-cross-compile.patch \ +file://020-dont-compile-python-files.patch \ +file://030-fixup-include-dirs.patch \ +file://070-dont-clean-ipkg-install.patch \ +file://080-distutils-dont_adjust_files.patch \ +file://110-enable-zlib.patch \ +file://130-readline-setup.patch \ +file://140-verbose-sharedmods.patch \ +file://150-fix-setupterm.patch \ +file://h2py-pr13032.patch \ +file://python-3.3-multilib.patch \ +file://03-fix-tkinter-detection.patch \ +file://avoid_warning_about_tkinter.patch \ +file://06-ctypes-libffi-fix-configure.patch \ +file://shutil-follow-symlink-fix.patch \ +${DISTRO_SRC_URI} \ +" +SRC_URI[md5sum] = "b3b2524f72409d919a4137826a870a8f" +SRC_URI[sha256sum] = "15c113fd6c058712f05d31b4eff149d4d823b8e39ef5e37228dc5dc4f8716df9" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=d214581529e343354f8e23025bdf582d" + +S = "${WORKDIR}/Python-${PV}" + +EXTRANATIVEPATH += "bzip2-native" +DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native" + +inherit native + +RPROVIDES += "python3-distutils-native python3-compression-native python3-textutils-native python3-core-native" + +EXTRA_OECONF_append = " --bindir=${bindir}/${PN}" + +EXTRA_OEMAKE = '\ + BUILD_SYS="" \ + HOST_SYS="" \ + LIBC="" \ + STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \ + STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \ + LIB=${baselib} \ + ARCH=${TARGET_ARCH} \ +' + +do_configure_prepend() { + autoreconf --verbose --install --force --exclude=autopoint Modules/_ctypes/libffi || bbnote "_ctypes failed to autoreconf" +} + +do_install() { + install -d ${D}${libdir}/pkgconfig + oe_runmake 'DESTDIR=${D}' install + if [ -e ${WORKDIR}/sitecustomize.py ]; then + install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN} + fi + install -d ${D}${bindir}/${PN} + install -m 0755 Parser/pgen ${D}${bindir}/${PN} + + # Make sure we use /usr/bin/env python + for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do + sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT + done +}
Signature · 1 line
1.8.3.4
PATCH v4 11/20 python_2.7.3.bb: Inherit python-dir
In reply to Khem RajSo it can get the correct python direcotries for python2
--- meta/recipes-devtools/python/python_2.7.3.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/python/python_2.7.3.bb +1 -1
@@ -34,7 +34,7 @@ SRC_URI += "\ S = "${WORKDIR}/Python-${PV}" -inherit autotools multilib_header pythonnative +inherit autotools multilib_header python-dir pythonnative # The 3 lines below are copied from the libffi recipe, ctypes ships its own copy of the libffi sources #Somehow gcc doesn't set __SOFTFP__ when passing -mfloatabi=softp :(
Signature · 1 line
1.8.3.4
PATCH v4 12/20 python-distribute: Add recipes for python2 and python3
In reply to Khem Rajin python3-distribute rename easy_install to easy3_install
--- .../python/python-distribute_0.6.32.bb | 47 ++++++++++++++++++++++ .../python/python3-distribute_0.6.32.bb | 47 ++++++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 meta/recipes-devtools/python/python-distribute_0.6.32.bb create mode 100644 meta/recipes-devtools/python/python3-distribute_0.6.32.bb
meta/recipes-devtools/python/python-distribute_0.6.32.bb new file +47 -0
@@ -0,0 +1,47 @@ +DESCRIPTION = "Download, build, install, upgrade, and uninstall Python packages" +HOMEPAGE = "http://packages.python.org/distribute" +SECTION = "devel/python" +LICENSE = "PSF" +LIC_FILES_CHKSUM = "file://setup.py;beginline=234;endline=234;md5=26f6b02022b737126d3c88838782dddb" + +SRCNAME = "distribute" +PR = "ml5" +DEPENDS += "python" +DEPENDS_virtclass-native += "python-native" + +SRC_URI = " \ + http://pypi.python.org/packages/source/d/distribute/${SRCNAME}-${PV}.tar.gz \ +" +S = "${WORKDIR}/${SRCNAME}-${PV}" + +# http://python-distribute.org/distribute_setup.py + +# force the selection of python3 +#PYTHON_BASEVERSION = "3.3" +#PYTHON_MAJMIN = "3.3" + +inherit distutils + +DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${libdir}/${PYTHON_DIR}/site-packages" + +do_install_prepend() { + install -d ${D}/${libdir}/${PYTHON_DIR}/site-packages +} + +# +# The installer puts the wrong path in the setuptools.pth file. Correct it. +# +do_install_append() { + rm ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth + echo "./${SRCNAME}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth +} + +RDEPENDS_${PN} = "\ + python-distutils \ + python-compression \ +" + +SRC_URI[md5sum] = "acb7a2da81e3612bfb1608abe4f0e568" +SRC_URI[sha256sum] = "8970cd1e148b5d1fea9430584aea66c45ea22d80e0933393ec49ebc388f718df" + +BBCLASSEXTEND = "native"
meta/recipes-devtools/python/python3-distribute_0.6.32.bb new file +47 -0
47 lines not on this page · raw message
Signature · 1 line
1.8.3.4
PATCH v4 13/20 python3: Upgrade to 3.3.2
In reply to Khem Raj3.3.2 is latest bugfix release in 3.3 series
License text is changed to reflect year and prev releases
+++ ../Python-3.3.2/LICENSE 2013-05-15 09:32:54.000000000 -0700
@@ -74,7 +74,9 @@
3.2.1 3.2 2011 PSF yes
3.2.2 3.2.1 2011 PSF yes
3.2.3 3.2.2 2012 PSF yes
+ 3.2.4 3.2.3 2013 PSF yes
3.3.0 3.2 2012 PSF yes
+ 3.3.1 3.3.0 2013 PSF yesFootnotes:
@@ -110,8 +112,8 @@
distribute, and otherwise use Python alone or in any derivative
version,
provided, however, that PSF's License Agreement and PSF's notice of
copyright,
i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
2009, 2010,
-2011, 2012 Python Software Foundation; All Rights Reserved" are retained in Python
-alone or in any derivative version prepared by Licensee. +2011, 2012, 2013 Python Software Foundation; All Rights Reserved" are retained
+in Python alone or in any derivative version prepared by Licensee.
---
...on3-native_3.3.0.bb => python3-native_3.3.2.bb} | 9 +-
...sue-13032-where-it-fails-with-UnicodeDeco.patch | 37 +++++
.../python/python3/030-fixup-include-dirs.patch | 21 +--
.../python/python3/140-verbose-sharedmods.patch | 10 --
.../python/python3/h2py-pr13032.patch | 185 ---------------------
.../python/{python3_3.3.0.bb => python3_3.3.2.bb} | 9 +-
6 files changed, 51 insertions(+), 220 deletions(-)
rename meta/recipes-devtools/python/{python3-native_3.3.0.bb => python3-native_3.3.2.bb} (87%)
create mode 100644 meta/recipes-devtools/python/python3/0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch
delete mode 100644 meta/recipes-devtools/python/python3/140-verbose-sharedmods.patch
delete mode 100644 meta/recipes-devtools/python/python3/h2py-pr13032.patch
rename meta/recipes-devtools/python/{python3_3.3.0.bb => python3_3.3.2.bb} (96%)meta/recipes-devtools/python/python3-native_3.3.2.bb renamed from meta/recipes-devtools/python/python3-native_3.3.0.bb +4 -5
@@ -12,20 +12,19 @@ file://070-dont-clean-ipkg-install.patch \ file://080-distutils-dont_adjust_files.patch \ file://110-enable-zlib.patch \ file://130-readline-setup.patch \ -file://140-verbose-sharedmods.patch \ file://150-fix-setupterm.patch \ -file://h2py-pr13032.patch \ file://python-3.3-multilib.patch \ file://03-fix-tkinter-detection.patch \ file://avoid_warning_about_tkinter.patch \ file://06-ctypes-libffi-fix-configure.patch \ file://shutil-follow-symlink-fix.patch \ +file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \ ${DISTRO_SRC_URI} \ " -SRC_URI[md5sum] = "b3b2524f72409d919a4137826a870a8f" -SRC_URI[sha256sum] = "15c113fd6c058712f05d31b4eff149d4d823b8e39ef5e37228dc5dc4f8716df9" +SRC_URI[md5sum] = "7dffe775f3bea68a44f762a3490e5e28" +SRC_URI[sha256sum] = "f77202fe2bbc203205d7bd6e8452567fa1d9bc97f6957c9ef753d9a36cdcbe9a" -LIC_FILES_CHKSUM = "file://LICENSE;md5=d214581529e343354f8e23025bdf582d" +LIC_FILES_CHKSUM = "file://LICENSE;md5=a7e738bb078a33a825ce4a0282f8cb31" S = "${WORKDIR}/Python-${PV}"
meta/recipes-devtools/python/python3/0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch new file +37 -0
@@ -0,0 +1,37 @@ +From 2f5a4c708d90fa8db21f446ae879cff79387448d Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 20 May 2013 21:03:16 -0700 +Subject: [PATCH] h2py: Fix issue 13032 where it fails with UnicodeDecodeError + +use utf-8 to open the files + +Signed-off-by: Khem Raj <[email protected]> + +Upstream-Status: Pending +--- + Tools/scripts/h2py.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Tools/scripts/h2py.py b/Tools/scripts/h2py.py +index 4f871d9..a53fbe0 100755 +--- a/Tools/scripts/h2py.py ++++ b/Tools/scripts/h2py.py +@@ -69,13 +69,13 @@ def main(): + sys.stdout.write('# Generated by h2py from stdin\n') + process(sys.stdin, sys.stdout) + else: +- fp = open(filename, 'r') ++ fp = open(filename, 'r', encoding='utf-8') + outfile = os.path.basename(filename) + i = outfile.rfind('.') + if i > 0: outfile = outfile[:i] + modname = outfile.upper() + outfile = modname + '.py' +- outfp = open(outfile, 'w') ++ outfp = open(outfile, 'w', encoding='utf-8') + outfp.write('# Generated by h2py from %s\n' % filename) + filedict = {} + for dir in searchdirs: +-- +1.8.1.2 +
meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch +6 -15
@@ -2,9 +2,11 @@ setup.py | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) ---- a/setup.py -+++ b/setup.py -@@ -464,7 +464,8 @@ class PyBuildExt(build_ext): +Index: Python-3.3.2/setup.py +=================================================================== +--- Python-3.3.2.orig/setup.py ++++ Python-3.3.2/setup.py +@@ -444,7 +444,8 @@ class PyBuildExt(build_ext): # only change this for cross builds for 3.3, issues on Mageia if cross_compiling: self.add_gcc_paths()
@@ -14,7 +16,7 @@ # Add paths specified in the environment variables LDFLAGS and # CPPFLAGS for header and library files. -@@ -500,7 +501,7 @@ class PyBuildExt(build_ext): +@@ -480,7 +481,7 @@ class PyBuildExt(build_ext): for directory in reversed(options.dirs): add_dir_to_list(dir_list, directory)
@@ -23,14 +25,3 @@ and not sysconfig.get_config_var('PYTHONFRAMEWORK'): # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework # (PYTHONFRAMEWORK is set) to avoid # linking problems when -@@ -520,6 +521,10 @@ class PyBuildExt(build_ext): - '/lib', '/usr/lib', - ] - inc_dirs = self.compiler.include_dirs + ['/usr/include'] -+ if cross_compiling: -+ lib_dirs = self.compiler.library_dirs -+ inc_dirs = self.compiler.include_dirs -+ - exts = [] - missing = [] -
meta/recipes-devtools/python/python3/140-verbose-sharedmods.patch deleted +0 -10
@@ -1,10 +0,0 @@ ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -477,7 +477,6 @@ $(SYSCONFIGDATA): $(BUILDPYTHON) - - # Build the shared modules - sharedmods: $(BUILDPYTHON) $(SYSCONFIGDATA) -- case $$MAKEFLAGS in *s*) quiet=-q; esac; \ - $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ - $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build -
meta/recipes-devtools/python/python3/h2py-pr13032.patch deleted +0 -185
185 lines not on this page · raw message
meta/recipes-devtools/python/python3_3.3.2.bb renamed from meta/recipes-devtools/python/python3_3.3.0.bb +4 -5
@@ -14,9 +14,8 @@ file://070-dont-clean-ipkg-install.patch \ file://080-distutils-dont_adjust_files.patch \ file://110-enable-zlib.patch \ file://130-readline-setup.patch \ -file://140-verbose-sharedmods.patch \ file://150-fix-setupterm.patch \ -file://h2py-pr13032.patch \ +file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \ ${DISTRO_SRC_URI} \ "
@@ -31,10 +30,10 @@ SRC_URI += "\ file://python-3.3-multilib.patch \ file://shutil-follow-symlink-fix.patch \ " -SRC_URI[md5sum] = "b3b2524f72409d919a4137826a870a8f" -SRC_URI[sha256sum] = "15c113fd6c058712f05d31b4eff149d4d823b8e39ef5e37228dc5dc4f8716df9" +SRC_URI[md5sum] = "7dffe775f3bea68a44f762a3490e5e28" +SRC_URI[sha256sum] = "f77202fe2bbc203205d7bd6e8452567fa1d9bc97f6957c9ef753d9a36cdcbe9a" -LIC_FILES_CHKSUM = "file://LICENSE;md5=d214581529e343354f8e23025bdf582d" +LIC_FILES_CHKSUM = "file://LICENSE;md5=a7e738bb078a33a825ce4a0282f8cb31" S = "${WORKDIR}/Python-${PV}"
Signature · 1 line
1.8.3.4
PATCH v4 14/20 distutils3.bbclass: Fix typo and use proper values for target sysroot
In reply to Khem RajSince OE-Core times we now have machine specific sysroots for targets unlike before when we used arch specific sysroots so reflect that here
--- meta/classes/distutils3.bbclass | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
meta/classes/distutils3.bbclass +5 -6
@@ -11,19 +11,18 @@ DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \ distutils3_do_compile() { STAGING_INCDIR=${STAGING_INCDIR} \ STAGING_LIBDIR=${STAGING_LIBDIR} \ - BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ + BUILD_SYS=${BUILD_SYS} HOST_SYS=${MACHINE} \ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \ build_ext --include-dirs ${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI} \ - --library-dirs ${STAGING_LIBCDIR}/${PYTHON_DIR} \ + --library-dirs ${STAGING_LIBDIR}/${PYTHON_DIR} \ ${DISTUTILS_BUILD_EXT_ARGS} \ build ${DISTUTILS_BUILD_ARGS} || \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py build_ext ${DISTUTILS_BUILD_ARGS} || \ bbfatal "${PYTHON_PN} setup.py build_ext execution failed." } distutils3_stage_headers() { install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} - BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ + BUILD_SYS=${BUILD_SYS} HOST_SYS=${MACHINE} \ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \ bbfatal "${PYTHON_PN} setup.py install_headers execution failed." }
@@ -33,7 +32,7 @@ distutils3_stage_all() { STAGING_LIBDIR=${STAGING_LIBDIR} \ install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \ - BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ + BUILD_SYS=${BUILD_SYS} HOST_SYS=${MACHINE} \ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \ bbfatal "${PYTHON_PN} setup.py install (stage) execution failed." }
@@ -43,7 +42,7 @@ distutils3_do_install() { STAGING_INCDIR=${STAGING_INCDIR} \ STAGING_LIBDIR=${STAGING_LIBDIR} \ PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \ - BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ + BUILD_SYS=${BUILD_SYS} HOST_SYS=${MACHINE} \ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \ bbfatal "${PYTHON_PN} setup.py install execution failed."
Signature · 1 line
1.8.3.4
PATCH v4 15/20 python3, python3-native: Consider OE staging installation
In reply to Khem RajWe use native python in disutils bbclass and this needs to peek into target sysroot when building plugins in cross environment. Otherwise anything that inherits distutils3.bbclass will not build.
--- .../python/python3-native_3.3.2.bb | 1 + ...2-distutils-prefix-is-inside-staging-area.patch | 78 ++++++++++++++ .../python/python3/python-3.3-multilib.patch | 120 +++++++++------------ meta/recipes-devtools/python/python3_3.3.2.bb | 1 + 4 files changed, 131 insertions(+), 69 deletions(-) create mode 100644 meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch
meta/recipes-devtools/python/python3-native_3.3.2.bb +1 -0
@@ -5,6 +5,7 @@ PYTHON_MAJMIN = "3.3" DISTRO_SRC_URI ?= "file://sitecustomize.py" DISTRO_SRC_URI_linuxstdbase = "" SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \ +file://12-distutils-prefix-is-inside-staging-area.patch \ file://000-cross-compile.patch \ file://020-dont-compile-python-files.patch \ file://030-fixup-include-dirs.patch \
meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch new file +78 -0
78 lines not on this page · raw message
meta/recipes-devtools/python/python3/python-3.3-multilib.patch +51 -69
231 lines not on this page · raw message
meta/recipes-devtools/python/python3_3.3.2.bb +1 -0
@@ -7,6 +7,7 @@ PYTHON_BINABI= "${PYTHON_MAJMIN}m" DISTRO_SRC_URI ?= "file://sitecustomize.py" DISTRO_SRC_URI_linuxstdbase = "" SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \ +file://12-distutils-prefix-is-inside-staging-area.patch \ file://000-cross-compile.patch \ file://020-dont-compile-python-files.patch \ file://030-fixup-include-dirs.patch \
Signature · 1 line
1.8.3.4
PATCH v4 16/20 python3: Fix host include contamination issue
In reply to Khem RajLet compiler append sysroot to include path if it can
--- .../python/python3-native_3.3.2.bb | 1 + .../python/python3/sysroot-include-headers.patch | 35 ++++++++++++++++++++++ meta/recipes-devtools/python/python3_3.3.2.bb | 1 + 3 files changed, 37 insertions(+) create mode 100644 meta/recipes-devtools/python/python3/sysroot-include-headers.patch
meta/recipes-devtools/python/python3-native_3.3.2.bb +1 -0
@@ -20,6 +20,7 @@ file://avoid_warning_about_tkinter.patch \ file://06-ctypes-libffi-fix-configure.patch \ file://shutil-follow-symlink-fix.patch \ file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \ +file://sysroot-include-headers.patch \ ${DISTRO_SRC_URI} \ " SRC_URI[md5sum] = "7dffe775f3bea68a44f762a3490e5e28"
meta/recipes-devtools/python/python3/sysroot-include-headers.patch new file +35 -0
@@ -0,0 +1,35 @@ +Dont search hardcoded paths, we might be doing a cross-build +Use '=' in-front to let compiler append sysroot, if it can + +Should fix things like + +configure:6972: arm-angstrom-linux-gnueabi-gcc -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 -DNDEBUG -fno-inline -D__SOFTFP__ --sysroot=/build/v2013.06/build/tmp-angstrom_v2013_06-eglibc/sysroots/beaglebone -c -O2 -pipe -g -feliminate-unused-debug-types -I/usr/include/ncursesw conftest.c >&5 +cc1: warning: include location "/usr/include/ncursesw" is unsafe for cross-compilation [-Wpoison-system-directories] + + +Signed-off-by: Khem Raj +Upstream-Status: Pending + + +Index: Python-3.3.2/setup.py +=================================================================== +--- Python-3.3.2.orig/setup.py 2013-07-30 01:30:48.000000000 -0700 ++++ Python-3.3.2/setup.py 2013-07-30 01:41:11.697862723 -0700 +@@ -1210,7 +1210,7 @@ + panel_library = 'panel' + if curses_library == 'ncursesw': + curses_defines.append(('HAVE_NCURSESW', '1')) +- curses_includes.append('/usr/include/ncursesw') ++ curses_includes.append('=/usr/include/ncursesw') + # Bug 1464056: If _curses.so links with ncursesw, + # _curses_panel.so must link with panelw. + panel_library = 'panelw' +@@ -1819,7 +1819,7 @@ + if host_platform == 'darwin': + # OS X 10.5 comes with libffi.dylib; the include files are + # in /usr/include/ffi +- inc_dirs.append('/usr/include/ffi') ++ inc_dirs.append('=/usr/include/ffi') + + ffi_inc = [sysconfig.get_config_var("LIBFFI_INCLUDEDIR")] + if not ffi_inc or ffi_inc[0] == '':
meta/recipes-devtools/python/python3_3.3.2.bb +1 -0
@@ -30,6 +30,7 @@ SRC_URI += "\ file://host_include_contamination.patch \ file://python-3.3-multilib.patch \ file://shutil-follow-symlink-fix.patch \ + file://sysroot-include-headers.patch \ " SRC_URI[md5sum] = "7dffe775f3bea68a44f762a3490e5e28" SRC_URI[sha256sum] = "f77202fe2bbc203205d7bd6e8452567fa1d9bc97f6957c9ef753d9a36cdcbe9a"
Signature · 1 line
1.8.3.4
PATCH v4 17/20 distutils3.bbclass: Use MACHINE for sysroot when not building for build host
In reply to Khem RajPython's machinery replaces directories in sysroot path to match OE's staging area sysroots. Earlier we use to have HOST_SYS represent sysroot always but now we use MACHINE to represent target sysroots but HOST_SYS to represent host sysroot. This patch caters to that difference
--- meta/classes/distutils3.bbclass | 41 +++++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-)
meta/classes/distutils3.bbclass +29 -12
@@ -9,40 +9,57 @@ DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \ --install-data=${D}/${datadir}" distutils3_do_compile() { - STAGING_INCDIR=${STAGING_INCDIR} \ - STAGING_LIBDIR=${STAGING_LIBDIR} \ - BUILD_SYS=${BUILD_SYS} HOST_SYS=${MACHINE} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \ - build_ext --include-dirs ${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI} \ - --library-dirs ${STAGING_LIBDIR}/${PYTHON_DIR} \ - ${DISTUTILS_BUILD_EXT_ARGS} \ - build ${DISTUTILS_BUILD_ARGS} || \ - bbfatal "${PYTHON_PN} setup.py build_ext execution failed." + if [ ${BUILD_SYS} != ${HOST_SYS} ]; then + SYS=${MACHINE} + else + SYS=${HOST_SYS} + fi + STAGING_INCDIR=${STAGING_INCDIR} \ + STAGING_LIBDIR=${STAGING_LIBDIR} \ + BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \ + build ${DISTUTILS_BUILD_ARGS} || \ + bbfatal "${PYTHON_PN} setup.py build_ext execution failed." } distutils3_stage_headers() { install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} - BUILD_SYS=${BUILD_SYS} HOST_SYS=${MACHINE} \ + if [ ${BUILD_SYS} != ${HOST_SYS} ]; then + SYS=${MACHINE} + else + SYS=${HOST_SYS} + fi + BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \ bbfatal "${PYTHON_PN} setup.py install_headers execution failed." } distutils3_stage_all() { + if [ ${BUILD_SYS} != ${HOST_SYS} ]; then + SYS=${MACHINE} + else + SYS=${HOST_SYS} + fi STAGING_INCDIR=${STAGING_INCDIR} \ STAGING_LIBDIR=${STAGING_LIBDIR} \ install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \ - BUILD_SYS=${BUILD_SYS} HOST_SYS=${MACHINE} \ + BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \ bbfatal "${PYTHON_PN} setup.py install (stage) execution failed." } distutils3_do_install() { install -d ${D}${PYTHON_SITEPACKAGES_DIR} + if [ ${BUILD_SYS} != ${HOST_SYS} ]; then + SYS=${MACHINE} + else + SYS=${HOST_SYS} + fi STAGING_INCDIR=${STAGING_INCDIR} \ STAGING_LIBDIR=${STAGING_LIBDIR} \ PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \ - BUILD_SYS=${BUILD_SYS} HOST_SYS=${MACHINE} \ + BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \ bbfatal "${PYTHON_PN} setup.py install execution failed."
Signature · 1 line
1.8.3.4
PATCH v4 18/20 python3: Fix the compiler invocation and linker flags when cross compiling
In reply to Khem RajThe details are in patch header. This should fix the QA errors about host contamination
Add virtual/libintl to dep list
There is use of libintl.h but we dont
express the dependency
--- .../python/python3-native_3.3.2.bb | 1 + .../python/python3/unixccompiler.patch | 33 ++++++++++++++++++++++ meta/recipes-devtools/python/python3_3.3.2.bb | 3 +- 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-devtools/python/python3/unixccompiler.patch
meta/recipes-devtools/python/python3-native_3.3.2.bb +1 -0
@@ -21,6 +21,7 @@ file://06-ctypes-libffi-fix-configure.patch \ file://shutil-follow-symlink-fix.patch \ file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \ file://sysroot-include-headers.patch \ +file://unixccompiler.patch \ ${DISTRO_SRC_URI} \ " SRC_URI[md5sum] = "7dffe775f3bea68a44f762a3490e5e28"
meta/recipes-devtools/python/python3/unixccompiler.patch new file +33 -0
@@ -0,0 +1,33 @@ +Upstream-Status: Pending + +The CC variable,sometimes like:"x86_64-poky-linux-gcc -m64 --sysroot=/${TMPDIR}/sysroots/qemux86-64", contains option information. +This will lead to wrong compiler name "qemux86-64" rather than "x86_64-poky-linux-gcc" when python finding the compiler name. + +Secondly add -L=<path> this way linker will be able to resolve /usr/lib w.r.t sysroot and not +use hardcoded /usr/lib to look for libs which is wrong in cross compile environment and this will work +ok on native systems too since sysroot for native compilers is / + +Signed-off-by: Mei Lei <[email protected]> +Signed-off-by: Khem Raj <[email protected]> +Index: Python-3.3.2/Lib/distutils/unixccompiler.py +=================================================================== +--- Python-3.3.2.orig/Lib/distutils/unixccompiler.py 2013-05-15 09:32:54.000000000 -0700 ++++ Python-3.3.2/Lib/distutils/unixccompiler.py 2013-08-01 00:58:18.629056286 -0700 +@@ -202,7 +202,7 @@ + # ccompiler.py. + + def library_dir_option(self, dir): +- return "-L" + dir ++ return "-L=" + dir + + def _is_gcc(self, compiler_name): + return "gcc" in compiler_name or "g++" in compiler_name +@@ -221,7 +221,7 @@ + # this time, there's no way to determine this information from + # the configuration data stored in the Python installation, so + # we use this hack. +- compiler = os.path.basename(sysconfig.get_config_var("CC")) ++ compiler = sysconfig.get_config_var("CC") + if sys.platform[:6] == "darwin": + # MacOSX's linker doesn't understand the -R flag at all + return "-L" + dir
meta/recipes-devtools/python/python3_3.3.2.bb +2 -1
@@ -1,6 +1,6 @@ require recipes-devtools/python/python.inc -DEPENDS = "python3-native libffi bzip2 db gdbm openssl readline sqlite3 zlib" +DEPENDS = "python3-native libffi bzip2 db gdbm openssl readline sqlite3 zlib virtual/libintl" PR = "${INC_PR}.0" PYTHON_MAJMIN = "3.3" PYTHON_BINABI= "${PYTHON_MAJMIN}m"
@@ -31,6 +31,7 @@ SRC_URI += "\ file://python-3.3-multilib.patch \ file://shutil-follow-symlink-fix.patch \ file://sysroot-include-headers.patch \ + file://unixccompiler.patch \ " SRC_URI[md5sum] = "7dffe775f3bea68a44f762a3490e5e28" SRC_URI[sha256sum] = "f77202fe2bbc203205d7bd6e8452567fa1d9bc97f6957c9ef753d9a36cdcbe9a"
Signature · 1 line
1.8.3.4
PATCH v4 19/20 python: Add Patch description and status information
In reply to Khem Raj--- meta/recipes-devtools/python/python3/000-cross-compile.patch | 7 +++++++ .../python/python3/020-dont-compile-python-files.patch | 6 ++++++ meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch | 6 ++++++ .../python/python3/070-dont-clean-ipkg-install.patch | 6 ++++++ .../python/python3/080-distutils-dont_adjust_files.patch | 6 ++++++ meta/recipes-devtools/python/python3/110-enable-zlib.patch | 6 ++++++ meta/recipes-devtools/python/python3/130-readline-setup.patch | 6 ++++++ meta/recipes-devtools/python/python3/150-fix-setupterm.patch | 6 ++++++ meta/recipes-devtools/python/python3/python-3.3-multilib.patch | 6 ++++++ .../python/python3/shutil-follow-symlink-fix.patch | 6 ++++++ 10 files changed, 61 insertions(+)
meta/recipes-devtools/python/python3/000-cross-compile.patch +7 -0
@@ -1,3 +1,10 @@ +We cross compile python. This patch uses tools from host/native +python instead of in-tree tools + +-Khem + +Upstream-Status: Inappropriate[Configuration Specific] + --- Makefile.pre.in | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-)
meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch +6 -0
@@ -1,3 +1,9 @@ +Dont cross compile site packages + +-Khem + +Upstream-Status: Inappropriate[Embedded-Specific] + --- Makefile.pre.in | 16 ---------------- 1 file changed, 16 deletions(-)
meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch +6 -0
@@ -1,3 +1,9 @@ +Do not hardcode /usr into include paths when cross compiling + +-Khem + +Upstream-Status: Pending + --- setup.py | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-)
meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch +6 -0
@@ -1,3 +1,9 @@ +consider opkg directories when cleaning up + +-Khem + +Upstream-Status: Inappropriate [OE specific] + --- Makefile.pre.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
meta/recipes-devtools/python/python3/080-distutils-dont_adjust_files.patch +6 -0
@@ -1,3 +1,9 @@ +do not "adjust" python files before copying + +-Khem + +Upstream-Status: Inappropriate [Embedded-Specific] + --- Lib/distutils/command/build_scripts.py | 43 +++------------------------------ 1 file changed, 4 insertions(+), 39 deletions(-)
meta/recipes-devtools/python/python3/110-enable-zlib.patch +6 -0
@@ -1,3 +1,9 @@ +Enable zlib in python + +-Khem + +Upstream-Status: Inappropriate [OE-Specific] + --- Modules/Setup.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/python/python3/130-readline-setup.patch +6 -0
@@ -1,3 +1,9 @@ +package python-readline + +-Khem + +Upstream-Status: Inappropriate [Embedded Specific] + --- a/setup.py +++ b/setup.py @@ -666,45 +666,7 @@ class PyBuildExt(build_ext):
meta/recipes-devtools/python/python3/150-fix-setupterm.patch +6 -0
@@ -1,3 +1,9 @@ +Fix warning with newer compiler + +-Khem + +Upstream-Status: Pending + --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -116,7 +116,7 @@ char *PyCursesVersion = "2.2";
meta/recipes-devtools/python/python3/python-3.3-multilib.patch +6 -0
@@ -1,3 +1,9 @@ +get the sys.lib from python itself and do not use hardcoded value of 'lib' + +-Khem + +Upstream-Status: Pending + Index: Python-3.3.2/Include/pythonrun.h =================================================================== --- Python-3.3.2.orig/Include/pythonrun.h 2013-05-15 09:32:54.000000000 -0700
meta/recipes-devtools/python/python3/shutil-follow-symlink-fix.patch +6 -0
@@ -1,3 +1,9 @@ +shutils should consider symlinks + +-Khem + +Upstream-Status: Pending + --- a/Lib/shutil.py 2013-01-29 12:31:06.926555779 -0800 +++ b/Lib/shutil.py 2013-01-29 16:31:39.097554182 -0800 @@ -132,7 +132,7 @@ def copymode(src, dst, *, follow_symlink
Signature · 1 line
1.8.3.4
PATCH v4 20/20 python3_3.3.2.bb: Add liblzma to RDEPENDS for python3-misc
In reply to Khem RajFixes
and from test-dependencies.sh run there is undeterministic lzma dependency:
WARN: packages/armv5te-oe-linux-gnueabi/python3/python3-misc/latest lost dependency on liblzma
--- meta/recipes-devtools/python/python3_3.3.2.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-devtools/python/python3_3.3.2.bb +1 -0
@@ -197,6 +197,7 @@ FILES_${PN}-dbg += "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/.debug" # catch all the rest (unsorted) PACKAGES += "${PN}-misc" FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}" +RDEPENDS_${PN}-misc = "liblzma" # catch manpage PACKAGES += "${PN}-man"
Signature · 1 line
1.8.3.4
Re: [PATCH 20/20] python3_3.3.2.bb: Add liblzma to RDEPENDS for python3-misc
Quoted 7 lines · Khem Raj
Fixes
and from
test-dependencies.shrun there is undeterministic lzma dependency:WARN: packages/armv5te-oe-linux-gnueabi/python3/python3-misc/latest lost dependency on liblzma
I've already replied in the other thread that this isn't right fix.
Quoted 25 lines
Reported-by Martin Jansa <[email protected]>Signed-off-by Khem Raj <[email protected]>--- meta/recipes-devtools/python/python3_3.3.2.bb | 1 + 1 file changed, 1 insertion(+)meta/recipes-devtools/python/python3_3.3.2.bb +1
-0@@ -197,6 +197,7 @@ FILES_${PN}-dbg += "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/.debug" # catch all the rest (unsorted) PACKAGES += "${PN}-misc" FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}" +RDEPENDS_${PN}-misc = "liblzma" # catch manpage PACKAGES += "${PN}-man"Signature · 6 lines
1.8.3.4 _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 9 lines · Khem Raj
python3: Add recipes
python3: Add native recipe
python3: Upgrade to 3.3.2
python3, python3-native: Consider OE staging installation
python3: Fix host include contamination issue
python3: Fix the compiler invocation and linker flags when cross
compiling
python: Add Patch description and status information python3_3.3.2.bb: Add liblzma to RDEPENDS for python3-misc
For bisecting and clarity, why can't all of those be squashed into "add python 3"? I don't see the point of merging a broken Python 3 recipe and then six required fixes.
Ross
Quoted 9 lines · Ross
Quoted 8 lines · Khem Raj
python3: Add recipes
python3: Add native recipe
python3: Upgrade to 3.3.2
python3, python3-native: Consider OE staging installation
python3: Fix host include contamination issue
python3: Fix the compiler invocation and linker flags when cross
compiling
python: Add Patch description and status information
this one has more than python recipes and is cosmetic. I will leave it alone since it will need breaking apart before squashing it into individual recipes.
Quoted 5 lines
Quoted 1 line
python3_3.3.2.bb: Add liblzma to RDEPENDS for python3-misc
For bisecting and clarity, why can't all of those be squashed into "add python 3"? I don't see the point of merging a broken Python 3 recipe and then six required fixes.
Depends how you look at it. I will squash rest into one.
Quoted 2 lines
Ross
Quoted 11 lines · Ross
Quoted 9 lines · Khem Raj
python3: Add recipes
python3: Add native recipe
python3: Upgrade to 3.3.2
python3, python3-native: Consider OE staging installation
python3: Fix host include contamination issue
python3: Fix the compiler invocation and linker flags when cross
compiling
python: Add Patch description and status information python3_3.3.2.bb: Add liblzma to RDEPENDS for python3-misc
Quoted 3 lines
For bisecting and clarity, why can't all of those be squashed into "add python 3"? I don't see the point of merging a broken Python 3 recipe and then six required fixes.
I have squashed all of the above patches into 1 and posted a V5 series. Let me know if anything is still unsatisfactory
Thx