diff options
Diffstat (limited to 'meta/recipes-devtools/python')
139 files changed, 6188 insertions, 1599 deletions
diff --git a/meta/recipes-devtools/python/fix-path.inc b/meta/recipes-devtools/python/fix-path.inc deleted file mode 100644 index 0738c59ada..0000000000 --- a/meta/recipes-devtools/python/fix-path.inc +++ /dev/null @@ -1,22 +0,0 @@ -do_install_append() { - for i in `find ${D} -name "*.py"` ; do \ - sed -i -e s:${D}::g $i - done - - for i in `find ${D} -name "*.la"` ; do \ - sed -i -e s:${STAGING_LIBDIR}:${libdir}:g $i - done - - if test -e ${D}${bindir} ; then - for i in ${D}${bindir}/* ; do \ - sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i - done - fi - - if test -e ${D}${sbindir} ; then - for i in ${D}${sbindir}/* ; do \ - sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i - done - fi -} - diff --git a/meta/recipes-devtools/python/python-2.6-manifest.inc b/meta/recipes-devtools/python/python-2.6-manifest.inc deleted file mode 100644 index e4e503c72a..0000000000 --- a/meta/recipes-devtools/python/python-2.6-manifest.inc +++ /dev/null @@ -1,272 +0,0 @@ - -# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file. -# Generator: '../../../scripts/contrib/python/generate-manifest-2.6.py' Version 20110222 (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de> -# Visit the Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy - - - -PROVIDES+="${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-core ${PN}-core-dbg ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${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}-zlib " - -PACKAGES="${PN}-core-dbg ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${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}-zlib ${PN}-modules" - -DESCRIPTION_${PN}-audio="Python Audio Handling" -RDEPENDS_${PN}-audio="${PN}-core" -FILES_${PN}-audio="${libdir}/python2.6/wave.* ${libdir}/python2.6/chunk.* ${libdir}/python2.6/sndhdr.* ${libdir}/python2.6/lib-dynload/ossaudiodev.so ${libdir}/python2.6/lib-dynload/audioop.so " - -DESCRIPTION_${PN}-bsddb="Python Berkeley Database Bindings" -RDEPENDS_${PN}-bsddb="${PN}-core" -FILES_${PN}-bsddb="${libdir}/python2.6/bsddb ${libdir}/python2.6/lib-dynload/_bsddb.so " - -DESCRIPTION_${PN}-codecs="Python Codecs, Encodings & i18n Support" -RDEPENDS_${PN}-codecs="${PN}-core ${PN}-lang" -FILES_${PN}-codecs="${libdir}/python2.6/codecs.* ${libdir}/python2.6/encodings ${libdir}/python2.6/gettext.* ${libdir}/python2.6/locale.* ${libdir}/python2.6/lib-dynload/_locale.so ${libdir}/python2.6/lib-dynload/unicodedata.so ${libdir}/python2.6/stringprep.* ${libdir}/python2.6/xdrlib.* " - -DESCRIPTION_${PN}-compile="Python Bytecode Compilation Support" -RDEPENDS_${PN}-compile="${PN}-core" -FILES_${PN}-compile="${libdir}/python2.6/py_compile.* ${libdir}/python2.6/compileall.* " - -DESCRIPTION_${PN}-compiler="Python Compiler Support" -RDEPENDS_${PN}-compiler="${PN}-core" -FILES_${PN}-compiler="${libdir}/python2.6/compiler " - -DESCRIPTION_${PN}-compression="Python High Level Compression Support" -RDEPENDS_${PN}-compression="${PN}-core ${PN}-zlib" -FILES_${PN}-compression="${libdir}/python2.6/gzip.* ${libdir}/python2.6/zipfile.* ${libdir}/python2.6/tarfile.* ${libdir}/python2.6/lib-dynload/bz2.so " - -DESCRIPTION_${PN}-core="Python Interpreter and core modules (needed!)" -RDEPENDS_${PN}-core="" -FILES_${PN}-core="${libdir}/python2.6/__future__.* ${libdir}/python2.6/_abcoll.* ${libdir}/python2.6/abc.* ${libdir}/python2.6/copy.* ${libdir}/python2.6/copy_reg.* ${libdir}/python2.6/ConfigParser.* ${libdir}/python2.6/genericpath.* ${libdir}/python2.6/getopt.* ${libdir}/python2.6/linecache.* ${libdir}/python2.6/new.* ${libdir}/python2.6/os.* ${libdir}/python2.6/posixpath.* ${libdir}/python2.6/struct.* ${libdir}/python2.6/warnings.* ${libdir}/python2.6/site.* ${libdir}/python2.6/stat.* ${libdir}/python2.6/UserDict.* ${libdir}/python2.6/UserList.* ${libdir}/python2.6/UserString.* ${libdir}/python2.6/lib-dynload/binascii.so ${libdir}/python2.6/lib-dynload/_struct.so ${libdir}/python2.6/lib-dynload/time.so ${libdir}/python2.6/lib-dynload/xreadlines.so ${libdir}/python2.6/types.* ${libdir}/python2.6/platform.* ${bindir}/python* " - -DESCRIPTION_${PN}-core-dbg="Python core module debug information" -RDEPENDS_${PN}-core-dbg="${PN}-core" -FILES_${PN}-core-dbg="${libdir}/python2.6/config/.debug ${libdir}/python2.6/lib-dynload/.debug ${bindir}/.debug ${libdir}/.debug " - -DESCRIPTION_${PN}-crypt="Python Basic Cryptographic and Hashing Support" -RDEPENDS_${PN}-crypt="${PN}-core" -FILES_${PN}-crypt="${libdir}/python2.6/hashlib.* ${libdir}/python2.6/md5.* ${libdir}/python2.6/sha.* ${libdir}/python2.6/lib-dynload/crypt.so ${libdir}/python2.6/lib-dynload/_hashlib.so ${libdir}/python2.6/lib-dynload/_sha256.so ${libdir}/python2.6/lib-dynload/_sha512.so " - -DESCRIPTION_${PN}-ctypes="Python C Types Support" -RDEPENDS_${PN}-ctypes="${PN}-core" -FILES_${PN}-ctypes="${libdir}/python2.6/ctypes ${libdir}/python2.6/lib-dynload/_ctypes.so " - -DESCRIPTION_${PN}-curses="Python Curses Support" -RDEPENDS_${PN}-curses="${PN}-core" -FILES_${PN}-curses="${libdir}/python2.6/curses ${libdir}/python2.6/lib-dynload/_curses.so ${libdir}/python2.6/lib-dynload/_curses_panel.so " - -DESCRIPTION_${PN}-datetime="Python Calendar and Time support" -RDEPENDS_${PN}-datetime="${PN}-core ${PN}-codecs" -FILES_${PN}-datetime="${libdir}/python2.6/_strptime.* ${libdir}/python2.6/calendar.* ${libdir}/python2.6/lib-dynload/datetime.so " - -DESCRIPTION_${PN}-db="Python File-Based Database Support" -RDEPENDS_${PN}-db="${PN}-core" -FILES_${PN}-db="${libdir}/python2.6/anydbm.* ${libdir}/python2.6/dumbdbm.* ${libdir}/python2.6/whichdb.* " - -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}/python2.6/bdb.* ${libdir}/python2.6/pdb.* " - -DESCRIPTION_${PN}-dev="Python Development Package" -RDEPENDS_${PN}-dev="${PN}-core" -FILES_${PN}-dev="${includedir} ${libdir}/libpython2.6.so " - -DESCRIPTION_${PN}-difflib="Python helpers for computing deltas between objects." -RDEPENDS_${PN}-difflib="${PN}-lang ${PN}-re" -FILES_${PN}-difflib="${libdir}/python2.6/difflib.* " - -DESCRIPTION_${PN}-distutils="Python Distribution Utilities" -RDEPENDS_${PN}-distutils="${PN}-core" -FILES_${PN}-distutils="${libdir}/python2.6/config ${libdir}/python2.6/distutils " - -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}/python2.6/doctest.* " - -DESCRIPTION_${PN}-elementtree="Python elementree" -RDEPENDS_${PN}-elementtree="${PN}-core" -FILES_${PN}-elementtree="${libdir}/python2.6/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}/python2.6/imaplib.* ${libdir}/python2.6/email " - -DESCRIPTION_${PN}-fcntl="Python's fcntl Interface" -RDEPENDS_${PN}-fcntl="${PN}-core" -FILES_${PN}-fcntl="${libdir}/python2.6/lib-dynload/fcntl.so " - -DESCRIPTION_${PN}-gdbm="Python GNU Database Support" -RDEPENDS_${PN}-gdbm="${PN}-core" -FILES_${PN}-gdbm="${libdir}/python2.6/lib-dynload/gdbm.so " - -DESCRIPTION_${PN}-hotshot="Python Hotshot Profiler" -RDEPENDS_${PN}-hotshot="${PN}-core" -FILES_${PN}-hotshot="${libdir}/python2.6/hotshot ${libdir}/python2.6/lib-dynload/_hotshot.so " - -DESCRIPTION_${PN}-html="Python HTML Processing" -RDEPENDS_${PN}-html="${PN}-core" -FILES_${PN}-html="${libdir}/python2.6/formatter.* ${libdir}/python2.6/htmlentitydefs.* ${libdir}/python2.6/htmllib.* ${libdir}/python2.6/markupbase.* ${libdir}/python2.6/sgmllib.* " - -DESCRIPTION_${PN}-idle="Python Integrated Development Environment" -RDEPENDS_${PN}-idle="${PN}-core ${PN}-tkinter" -FILES_${PN}-idle="${bindir}/idle ${libdir}/python2.6/idlelib " - -DESCRIPTION_${PN}-image="Python Graphical Image Handling" -RDEPENDS_${PN}-image="${PN}-core" -FILES_${PN}-image="${libdir}/python2.6/colorsys.* ${libdir}/python2.6/imghdr.* ${libdir}/python2.6/lib-dynload/imageop.so ${libdir}/python2.6/lib-dynload/rgbimg.so " - -DESCRIPTION_${PN}-io="Python Low-Level I/O" -RDEPENDS_${PN}-io="${PN}-core ${PN}-math" -FILES_${PN}-io="${libdir}/python2.6/lib-dynload/_socket.so ${libdir}/python2.6/lib-dynload/_ssl.so ${libdir}/python2.6/lib-dynload/select.so ${libdir}/python2.6/lib-dynload/termios.so ${libdir}/python2.6/lib-dynload/cStringIO.so ${libdir}/python2.6/pipes.* ${libdir}/python2.6/socket.* ${libdir}/python2.6/ssl.* ${libdir}/python2.6/tempfile.* ${libdir}/python2.6/StringIO.* " - -DESCRIPTION_${PN}-json="Python JSON Support" -RDEPENDS_${PN}-json="${PN}-core ${PN}-math ${PN}-re" -FILES_${PN}-json="${libdir}/python2.6/json " - -DESCRIPTION_${PN}-lang="Python Low-Level Language Support" -RDEPENDS_${PN}-lang="${PN}-core" -FILES_${PN}-lang="${libdir}/python2.6/lib-dynload/_bisect.so ${libdir}/python2.6/lib-dynload/_collections.so ${libdir}/python2.6/lib-dynload/_heapq.so ${libdir}/python2.6/lib-dynload/_weakref.so ${libdir}/python2.6/lib-dynload/_functools.so ${libdir}/python2.6/lib-dynload/array.so ${libdir}/python2.6/lib-dynload/itertools.so ${libdir}/python2.6/lib-dynload/operator.so ${libdir}/python2.6/lib-dynload/parser.so ${libdir}/python2.6/atexit.* ${libdir}/python2.6/bisect.* ${libdir}/python2.6/code.* ${libdir}/python2.6/codeop.* ${libdir}/python2.6/collections.* ${libdir}/python2.6/dis.* ${libdir}/python2.6/functools.* ${libdir}/python2.6/heapq.* ${libdir}/python2.6/inspect.* ${libdir}/python2.6/keyword.* ${libdir}/python2.6/opcode.* ${libdir}/python2.6/symbol.* ${libdir}/python2.6/repr.* ${libdir}/python2.6/token.* ${libdir}/python2.6/tokenize.* ${libdir}/python2.6/traceback.* ${libdir}/python2.6/weakref.* " - -DESCRIPTION_${PN}-logging="Python Logging Support" -RDEPENDS_${PN}-logging="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold" -FILES_${PN}-logging="${libdir}/python2.6/logging " - -DESCRIPTION_${PN}-mailbox="Python Mailbox Format Support" -RDEPENDS_${PN}-mailbox="${PN}-core ${PN}-mime" -FILES_${PN}-mailbox="${libdir}/python2.6/mailbox.* " - -DESCRIPTION_${PN}-math="Python Math Support" -RDEPENDS_${PN}-math="${PN}-core" -FILES_${PN}-math="${libdir}/python2.6/lib-dynload/cmath.so ${libdir}/python2.6/lib-dynload/math.so ${libdir}/python2.6/lib-dynload/_random.so ${libdir}/python2.6/random.* ${libdir}/python2.6/sets.* " - -DESCRIPTION_${PN}-mime="Python MIME Handling APIs" -RDEPENDS_${PN}-mime="${PN}-core ${PN}-io" -FILES_${PN}-mime="${libdir}/python2.6/mimetools.* ${libdir}/python2.6/uu.* ${libdir}/python2.6/quopri.* ${libdir}/python2.6/rfc822.* " - -DESCRIPTION_${PN}-mmap="Python Memory-Mapped-File Support" -RDEPENDS_${PN}-mmap="${PN}-core ${PN}-io" -FILES_${PN}-mmap="${libdir}/python2.6/lib-dynload/mmap.so " - -DESCRIPTION_${PN}-multiprocessing="Python Multiprocessing Support" -RDEPENDS_${PN}-multiprocessing="${PN}-core ${PN}-io ${PN}-lang" -FILES_${PN}-multiprocessing="${libdir}/python2.6/lib-dynload/_multiprocessing.so ${libdir}/python2.6/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}/python2.6/*Cookie*.* ${libdir}/python2.6/base64.* ${libdir}/python2.6/cookielib.* ${libdir}/python2.6/ftplib.* ${libdir}/python2.6/gopherlib.* ${libdir}/python2.6/hmac.* ${libdir}/python2.6/httplib.* ${libdir}/python2.6/mimetypes.* ${libdir}/python2.6/nntplib.* ${libdir}/python2.6/poplib.* ${libdir}/python2.6/smtplib.* ${libdir}/python2.6/telnetlib.* ${libdir}/python2.6/urllib.* ${libdir}/python2.6/urllib2.* ${libdir}/python2.6/urlparse.* ${libdir}/python2.6/uuid.* ${libdir}/python2.6/rfc822.* ${libdir}/python2.6/mimetools.* " - -DESCRIPTION_${PN}-netserver="Python Internet Protocol Servers" -RDEPENDS_${PN}-netserver="${PN}-core ${PN}-netclient" -FILES_${PN}-netserver="${libdir}/python2.6/cgi.* ${libdir}/python2.6/*HTTPServer.* ${libdir}/python2.6/SocketServer.* " - -DESCRIPTION_${PN}-numbers="Python Number APIs" -RDEPENDS_${PN}-numbers="${PN}-core ${PN}-lang ${PN}-re" -FILES_${PN}-numbers="${libdir}/python2.6/decimal.* ${libdir}/python2.6/numbers.* " - -DESCRIPTION_${PN}-pickle="Python Persistence Support" -RDEPENDS_${PN}-pickle="${PN}-core ${PN}-codecs ${PN}-io ${PN}-re" -FILES_${PN}-pickle="${libdir}/python2.6/pickle.* ${libdir}/python2.6/shelve.* ${libdir}/python2.6/lib-dynload/cPickle.so " - -DESCRIPTION_${PN}-pkgutil="Python Package Extension Utility Support" -RDEPENDS_${PN}-pkgutil="${PN}-core" -FILES_${PN}-pkgutil="${libdir}/python2.6/pkgutil.* " - -DESCRIPTION_${PN}-pprint="Python Pretty-Print Support" -RDEPENDS_${PN}-pprint="${PN}-core" -FILES_${PN}-pprint="${libdir}/python2.6/pprint.* " - -DESCRIPTION_${PN}-profile="Python Basic Profiling Support" -RDEPENDS_${PN}-profile="${PN}-core ${PN}-textutils" -FILES_${PN}-profile="${libdir}/python2.6/profile.* ${libdir}/python2.6/pstats.* ${libdir}/python2.6/cProfile.* ${libdir}/python2.6/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}/python2.6/pydoc.* " - -DESCRIPTION_${PN}-re="Python Regular Expression APIs" -RDEPENDS_${PN}-re="${PN}-core" -FILES_${PN}-re="${libdir}/python2.6/re.* ${libdir}/python2.6/sre.* ${libdir}/python2.6/sre_compile.* ${libdir}/python2.6/sre_constants* ${libdir}/python2.6/sre_parse.* " - -DESCRIPTION_${PN}-readline="Python Readline Support" -RDEPENDS_${PN}-readline="${PN}-core" -FILES_${PN}-readline="${libdir}/python2.6/lib-dynload/readline.so ${libdir}/python2.6/rlcompleter.* " - -DESCRIPTION_${PN}-resource="Python Resource Control Interface" -RDEPENDS_${PN}-resource="${PN}-core" -FILES_${PN}-resource="${libdir}/python2.6/lib-dynload/resource.so " - -DESCRIPTION_${PN}-robotparser="Python robots.txt parser" -RDEPENDS_${PN}-robotparser="${PN}-core ${PN}-netclient" -FILES_${PN}-robotparser="${libdir}/python2.6/robotparser.* " - -DESCRIPTION_${PN}-shell="Python Shell-Like Functionality" -RDEPENDS_${PN}-shell="${PN}-core ${PN}-re" -FILES_${PN}-shell="${libdir}/python2.6/cmd.* ${libdir}/python2.6/commands.* ${libdir}/python2.6/dircache.* ${libdir}/python2.6/fnmatch.* ${libdir}/python2.6/glob.* ${libdir}/python2.6/popen2.* ${libdir}/python2.6/shlex.* ${libdir}/python2.6/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.* " - -DESCRIPTION_${PN}-sqlite3="Python Sqlite3 Database Support" -RDEPENDS_${PN}-sqlite3="${PN}-core ${PN}-datetime ${PN}-lang ${PN}-crypt ${PN}-io ${PN}-threading ${PN}-zlib" -FILES_${PN}-sqlite3="${libdir}/python2.6/lib-dynload/_sqlite3.so ${libdir}/python2.6/sqlite3/dbapi2.* ${libdir}/python2.6/sqlite3/__init__.* ${libdir}/python2.6/sqlite3/dump.* " - -DESCRIPTION_${PN}-sqlite3-tests="Python Sqlite3 Database Support Tests" -RDEPENDS_${PN}-sqlite3-tests="${PN}-core ${PN}-sqlite3" -FILES_${PN}-sqlite3-tests="${libdir}/python2.6/sqlite3/test " - -DESCRIPTION_${PN}-stringold="Python String APIs [deprecated]" -RDEPENDS_${PN}-stringold="${PN}-core ${PN}-re" -FILES_${PN}-stringold="${libdir}/python2.6/lib-dynload/strop.so ${libdir}/python2.6/string.* " - -DESCRIPTION_${PN}-subprocess="Python Subprocess Support" -RDEPENDS_${PN}-subprocess="${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle" -FILES_${PN}-subprocess="${libdir}/python2.6/subprocess.* " - -DESCRIPTION_${PN}-syslog="Python Syslog Interface" -RDEPENDS_${PN}-syslog="${PN}-core" -FILES_${PN}-syslog="${libdir}/python2.6/lib-dynload/syslog.so " - -DESCRIPTION_${PN}-terminal="Python Terminal Controlling Support" -RDEPENDS_${PN}-terminal="${PN}-core ${PN}-io" -FILES_${PN}-terminal="${libdir}/python2.6/pty.* ${libdir}/python2.6/tty.* " - -DESCRIPTION_${PN}-tests="Python Tests" -RDEPENDS_${PN}-tests="${PN}-core" -FILES_${PN}-tests="${libdir}/python2.6/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}/python2.6/lib-dynload/_csv.so ${libdir}/python2.6/csv.* ${libdir}/python2.6/optparse.* ${libdir}/python2.6/textwrap.* " - -DESCRIPTION_${PN}-threading="Python Threading & Synchronization Support" -RDEPENDS_${PN}-threading="${PN}-core ${PN}-lang" -FILES_${PN}-threading="${libdir}/python2.6/_threading_local.* ${libdir}/python2.6/dummy_thread.* ${libdir}/python2.6/dummy_threading.* ${libdir}/python2.6/mutex.* ${libdir}/python2.6/threading.* ${libdir}/python2.6/Queue.* " - -DESCRIPTION_${PN}-tkinter="Python Tcl/Tk Bindings" -RDEPENDS_${PN}-tkinter="${PN}-core" -FILES_${PN}-tkinter="${libdir}/python2.6/lib-dynload/_tkinter.so ${libdir}/python2.6/lib-tk " - -DESCRIPTION_${PN}-unittest="Python Unit Testing Framework" -RDEPENDS_${PN}-unittest="${PN}-core ${PN}-stringold ${PN}-lang" -FILES_${PN}-unittest="${libdir}/python2.6/unittest.* " - -DESCRIPTION_${PN}-unixadmin="Python Unix Administration Support" -RDEPENDS_${PN}-unixadmin="${PN}-core" -FILES_${PN}-unixadmin="${libdir}/python2.6/lib-dynload/nis.so ${libdir}/python2.6/lib-dynload/grp.so ${libdir}/python2.6/lib-dynload/pwd.so ${libdir}/python2.6/getpass.* " - -DESCRIPTION_${PN}-xml="Python basic XML support." -RDEPENDS_${PN}-xml="${PN}-core ${PN}-elementtree ${PN}-re" -FILES_${PN}-xml="${libdir}/python2.6/lib-dynload/pyexpat.so ${libdir}/python2.6/xml ${libdir}/python2.6/xmllib.* " - -DESCRIPTION_${PN}-xmlrpc="Python XMLRPC Support" -RDEPENDS_${PN}-xmlrpc="${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang" -FILES_${PN}-xmlrpc="${libdir}/python2.6/xmlrpclib.* ${libdir}/python2.6/SimpleXMLRPCServer.* " - -DESCRIPTION_${PN}-zlib="Python zlib Support." -RDEPENDS_${PN}-zlib="${PN}-core" -FILES_${PN}-zlib="${libdir}/python2.6/lib-dynload/zlib.so " - -DESCRIPTION_${PN}-modules="All Python modules" -RDEPENDS_${PN}-modules="${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${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}-hotshot ${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}-zlib " -ALLOW_EMPTY_${PN}-modules = "1" - - diff --git a/meta/recipes-devtools/python/python-2.7-manifest.inc b/meta/recipes-devtools/python/python-2.7-manifest.inc new file mode 100644 index 0000000000..7ed254bbd6 --- /dev/null +++ b/meta/recipes-devtools/python/python-2.7-manifest.inc @@ -0,0 +1,287 @@ + +# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file. +# Generator: '../../../scripts/contrib/python/generate-manifest-2.7.py' Version 20110222.2 (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de> + + + +PROVIDES+="${PN}-2to3 ${PN}-argparse ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-contextlib ${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}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${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}-plistlib ${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}-zlib " + +PACKAGES="${PN}-dbg ${PN}-2to3 ${PN}-argparse ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-contextlib ${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}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${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}-plistlib ${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}-zlib ${PN}-modules" + +SUMMARY_${PN}-2to3="Python automated Python 2 to 3 code translator" +RDEPENDS_${PN}-2to3="${PN}-core" +FILES_${PN}-2to3="${bindir}/2to3 ${libdir}/python2.7/lib2to3 " + +SUMMARY_${PN}-argparse="Python command line argument parser" +RDEPENDS_${PN}-argparse="${PN}-core ${PN}-codecs ${PN}-textutils" +FILES_${PN}-argparse="${libdir}/python2.7/argparse.* " + +SUMMARY_${PN}-audio="Python Audio Handling" +RDEPENDS_${PN}-audio="${PN}-core" +FILES_${PN}-audio="${libdir}/python2.7/wave.* ${libdir}/python2.7/chunk.* ${libdir}/python2.7/sndhdr.* ${libdir}/python2.7/lib-dynload/ossaudiodev.so ${libdir}/python2.7/lib-dynload/audioop.so ${libdir}/python2.7/audiodev.* ${libdir}/python2.7/sunaudio.* ${libdir}/python2.7/sunau.* ${libdir}/python2.7/toaiff.* " + +SUMMARY_${PN}-bsddb="Python bindings for the Berkeley Database" +RDEPENDS_${PN}-bsddb="${PN}-core" +FILES_${PN}-bsddb="${libdir}/python2.7/bsddb ${libdir}/python2.7/lib-dynload/_bsddb.so " + +SUMMARY_${PN}-codecs="Python codecs, encodings & i18n support" +RDEPENDS_${PN}-codecs="${PN}-core ${PN}-lang" +FILES_${PN}-codecs="${libdir}/python2.7/codecs.* ${libdir}/python2.7/encodings ${libdir}/python2.7/gettext.* ${libdir}/python2.7/locale.* ${libdir}/python2.7/lib-dynload/_locale.so ${libdir}/python2.7/lib-dynload/_codecs* ${libdir}/python2.7/lib-dynload/_multibytecodec.so ${libdir}/python2.7/lib-dynload/unicodedata.so ${libdir}/python2.7/stringprep.* ${libdir}/python2.7/xdrlib.* " + +SUMMARY_${PN}-compile="Python bytecode compilation support" +RDEPENDS_${PN}-compile="${PN}-core" +FILES_${PN}-compile="${libdir}/python2.7/py_compile.* ${libdir}/python2.7/compileall.* " + +SUMMARY_${PN}-compiler="Python compiler support" +RDEPENDS_${PN}-compiler="${PN}-core" +FILES_${PN}-compiler="${libdir}/python2.7/compiler " + +SUMMARY_${PN}-compression="Python high-level compression support" +RDEPENDS_${PN}-compression="${PN}-core ${PN}-zlib" +FILES_${PN}-compression="${libdir}/python2.7/gzip.* ${libdir}/python2.7/zipfile.* ${libdir}/python2.7/tarfile.* ${libdir}/python2.7/lib-dynload/bz2.so " + +SUMMARY_${PN}-contextlib="Python utilities for with-statementcontexts." +RDEPENDS_${PN}-contextlib="${PN}-core" +FILES_${PN}-contextlib="${libdir}/python${PYTHON_MAJMIN}/contextlib.* " + +SUMMARY_${PN}-core="Python interpreter and core modules" +RDEPENDS_${PN}-core="${PN}-lang ${PN}-re" +FILES_${PN}-core="${libdir}/python2.7/__future__.* ${libdir}/python2.7/_abcoll.* ${libdir}/python2.7/abc.* ${libdir}/python2.7/ast.* ${libdir}/python2.7/copy.* ${libdir}/python2.7/copy_reg.* ${libdir}/python2.7/ConfigParser.* ${libdir}/python2.7/genericpath.* ${libdir}/python2.7/getopt.* ${libdir}/python2.7/linecache.* ${libdir}/python2.7/new.* ${libdir}/python2.7/os.* ${libdir}/python2.7/posixpath.* ${libdir}/python2.7/struct.* ${libdir}/python2.7/warnings.* ${libdir}/python2.7/site.* ${libdir}/python2.7/stat.* ${libdir}/python2.7/UserDict.* ${libdir}/python2.7/UserList.* ${libdir}/python2.7/UserString.* ${libdir}/python2.7/lib-dynload/binascii.so ${libdir}/python2.7/lib-dynload/_struct.so ${libdir}/python2.7/lib-dynload/time.so ${libdir}/python2.7/lib-dynload/xreadlines.so ${libdir}/python2.7/types.* ${libdir}/python2.7/platform.* ${bindir}/python* ${libdir}/python2.7/_weakrefset.* ${libdir}/python2.7/sysconfig.* ${libdir}/python2.7/_sysconfigdata.* ${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py " + +SUMMARY_${PN}-crypt="Python basic cryptographic and hashing support" +RDEPENDS_${PN}-crypt="${PN}-core" +FILES_${PN}-crypt="${libdir}/python2.7/hashlib.* ${libdir}/python2.7/md5.* ${libdir}/python2.7/sha.* ${libdir}/python2.7/lib-dynload/crypt.so ${libdir}/python2.7/lib-dynload/_hashlib.so ${libdir}/python2.7/lib-dynload/_sha256.so ${libdir}/python2.7/lib-dynload/_sha512.so " + +SUMMARY_${PN}-ctypes="Python C types support" +RDEPENDS_${PN}-ctypes="${PN}-core" +FILES_${PN}-ctypes="${libdir}/python2.7/ctypes ${libdir}/python2.7/lib-dynload/_ctypes.so ${libdir}/python2.7/lib-dynload/_ctypes_test.so " + +SUMMARY_${PN}-curses="Python curses support" +RDEPENDS_${PN}-curses="${PN}-core" +FILES_${PN}-curses="${libdir}/python2.7/curses ${libdir}/python2.7/lib-dynload/_curses.so ${libdir}/python2.7/lib-dynload/_curses_panel.so " + +SUMMARY_${PN}-datetime="Python calendar and time support" +RDEPENDS_${PN}-datetime="${PN}-core ${PN}-codecs" +FILES_${PN}-datetime="${libdir}/python2.7/_strptime.* ${libdir}/python2.7/calendar.* ${libdir}/python2.7/lib-dynload/datetime.so " + +SUMMARY_${PN}-db="Python file-based database support" +RDEPENDS_${PN}-db="${PN}-core" +FILES_${PN}-db="${libdir}/python2.7/anydbm.* ${libdir}/python2.7/dumbdbm.* ${libdir}/python2.7/whichdb.* " + +SUMMARY_${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}/python2.7/bdb.* ${libdir}/python2.7/pdb.* " + +SUMMARY_${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 ${libdir}/python2.7/config/Makefile " + +SUMMARY_${PN}-difflib="Python helpers for computing deltas between objects" +RDEPENDS_${PN}-difflib="${PN}-lang ${PN}-re" +FILES_${PN}-difflib="${libdir}/python2.7/difflib.* " + +SUMMARY_${PN}-distutils="Python Distribution Utilities" +RDEPENDS_${PN}-distutils="${PN}-core ${PN}-email" +FILES_${PN}-distutils="${libdir}/python2.7/config ${libdir}/python2.7/distutils " + +SUMMARY_${PN}-distutils-staticdev="Python distribution utilities (static libraries)" +RDEPENDS_${PN}-distutils-staticdev="${PN}-distutils" +FILES_${PN}-distutils-staticdev="${libdir}/python2.7/config/lib*.a " + +SUMMARY_${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}/python2.7/doctest.* " + +SUMMARY_${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}/python2.7/imaplib.* ${libdir}/python2.7/email " + +SUMMARY_${PN}-fcntl="Python's fcntl interface" +RDEPENDS_${PN}-fcntl="${PN}-core" +FILES_${PN}-fcntl="${libdir}/python2.7/lib-dynload/fcntl.so " + +SUMMARY_${PN}-gdbm="Python GNU database support" +RDEPENDS_${PN}-gdbm="${PN}-core" +FILES_${PN}-gdbm="${libdir}/python2.7/lib-dynload/gdbm.so " + +SUMMARY_${PN}-hotshot="Python hotshot performance profiler" +RDEPENDS_${PN}-hotshot="${PN}-core" +FILES_${PN}-hotshot="${libdir}/python2.7/hotshot ${libdir}/python2.7/lib-dynload/_hotshot.so " + +SUMMARY_${PN}-html="Python HTML processing support" +RDEPENDS_${PN}-html="${PN}-core" +FILES_${PN}-html="${libdir}/python2.7/formatter.* ${libdir}/python2.7/htmlentitydefs.* ${libdir}/python2.7/htmllib.* ${libdir}/python2.7/markupbase.* ${libdir}/python2.7/sgmllib.* ${libdir}/python2.7/HTMLParser.* " + +SUMMARY_${PN}-idle="Python Integrated Development Environment" +RDEPENDS_${PN}-idle="${PN}-core ${PN}-tkinter" +FILES_${PN}-idle="${bindir}/idle ${libdir}/python2.7/idlelib " + +SUMMARY_${PN}-image="Python graphical image handling" +RDEPENDS_${PN}-image="${PN}-core" +FILES_${PN}-image="${libdir}/python2.7/colorsys.* ${libdir}/python2.7/imghdr.* ${libdir}/python2.7/lib-dynload/imageop.so ${libdir}/python2.7/lib-dynload/rgbimg.so " + +SUMMARY_${PN}-importlib="Python import implementation library" +RDEPENDS_${PN}-importlib="${PN}-core" +FILES_${PN}-importlib="${libdir}/python2.7/importlib " + +SUMMARY_${PN}-io="Python low-level I/O" +RDEPENDS_${PN}-io="${PN}-core ${PN}-math ${PN}-textutils ${PN}-netclient ${PN}-contextlib" +FILES_${PN}-io="${libdir}/python2.7/lib-dynload/_socket.so ${libdir}/python2.7/lib-dynload/_io.so ${libdir}/python2.7/lib-dynload/_ssl.so ${libdir}/python2.7/lib-dynload/select.so ${libdir}/python2.7/lib-dynload/termios.so ${libdir}/python2.7/lib-dynload/cStringIO.so ${libdir}/python2.7/pipes.* ${libdir}/python2.7/socket.* ${libdir}/python2.7/ssl.* ${libdir}/python2.7/tempfile.* ${libdir}/python2.7/StringIO.* ${libdir}/python2.7/io.* ${libdir}/python2.7/_pyio.* " + +SUMMARY_${PN}-json="Python JSON support" +RDEPENDS_${PN}-json="${PN}-core ${PN}-math ${PN}-re ${PN}-codecs" +FILES_${PN}-json="${libdir}/python2.7/json ${libdir}/python2.7/lib-dynload/_json.so " + +SUMMARY_${PN}-lang="Python low-level language support" +RDEPENDS_${PN}-lang="${PN}-core" +FILES_${PN}-lang="${libdir}/python2.7/lib-dynload/_bisect.so ${libdir}/python2.7/lib-dynload/_collections.so ${libdir}/python2.7/lib-dynload/_heapq.so ${libdir}/python2.7/lib-dynload/_weakref.so ${libdir}/python2.7/lib-dynload/_functools.so ${libdir}/python2.7/lib-dynload/array.so ${libdir}/python2.7/lib-dynload/itertools.so ${libdir}/python2.7/lib-dynload/operator.so ${libdir}/python2.7/lib-dynload/parser.so ${libdir}/python2.7/atexit.* ${libdir}/python2.7/bisect.* ${libdir}/python2.7/code.* ${libdir}/python2.7/codeop.* ${libdir}/python2.7/collections.* ${libdir}/python2.7/dis.* ${libdir}/python2.7/functools.* ${libdir}/python2.7/heapq.* ${libdir}/python2.7/inspect.* ${libdir}/python2.7/keyword.* ${libdir}/python2.7/opcode.* ${libdir}/python2.7/symbol.* ${libdir}/python2.7/repr.* ${libdir}/python2.7/token.* ${libdir}/python2.7/tokenize.* ${libdir}/python2.7/traceback.* ${libdir}/python2.7/weakref.* " + +SUMMARY_${PN}-logging="Python logging support" +RDEPENDS_${PN}-logging="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold" +FILES_${PN}-logging="${libdir}/python2.7/logging " + +SUMMARY_${PN}-mailbox="Python mailbox format support" +RDEPENDS_${PN}-mailbox="${PN}-core ${PN}-mime" +FILES_${PN}-mailbox="${libdir}/python2.7/mailbox.* " + +SUMMARY_${PN}-math="Python math support" +RDEPENDS_${PN}-math="${PN}-core ${PN}-crypt" +FILES_${PN}-math="${libdir}/python2.7/lib-dynload/cmath.so ${libdir}/python2.7/lib-dynload/math.so ${libdir}/python2.7/lib-dynload/_random.so ${libdir}/python2.7/random.* ${libdir}/python2.7/sets.* " + +SUMMARY_${PN}-mime="Python MIME handling APIs" +RDEPENDS_${PN}-mime="${PN}-core ${PN}-io" +FILES_${PN}-mime="${libdir}/python2.7/mimetools.* ${libdir}/python2.7/uu.* ${libdir}/python2.7/quopri.* ${libdir}/python2.7/rfc822.* ${libdir}/python2.7/MimeWriter.* " + +SUMMARY_${PN}-mmap="Python memory-mapped file support" +RDEPENDS_${PN}-mmap="${PN}-core ${PN}-io" +FILES_${PN}-mmap="${libdir}/python2.7/lib-dynload/mmap.so " + +SUMMARY_${PN}-multiprocessing="Python multiprocessing support" +RDEPENDS_${PN}-multiprocessing="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-threading ${PN}-ctypes ${PN}-mmap" +FILES_${PN}-multiprocessing="${libdir}/python2.7/lib-dynload/_multiprocessing.so ${libdir}/python2.7/multiprocessing " + +SUMMARY_${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}/python2.7/*Cookie*.* ${libdir}/python2.7/base64.* ${libdir}/python2.7/cookielib.* ${libdir}/python2.7/ftplib.* ${libdir}/python2.7/gopherlib.* ${libdir}/python2.7/hmac.* ${libdir}/python2.7/httplib.* ${libdir}/python2.7/mimetypes.* ${libdir}/python2.7/nntplib.* ${libdir}/python2.7/poplib.* ${libdir}/python2.7/smtplib.* ${libdir}/python2.7/telnetlib.* ${libdir}/python2.7/urllib.* ${libdir}/python2.7/urllib2.* ${libdir}/python2.7/urlparse.* ${libdir}/python2.7/uuid.* ${libdir}/python2.7/rfc822.* ${libdir}/python2.7/mimetools.* " + +SUMMARY_${PN}-netserver="Python Internet Protocol servers" +RDEPENDS_${PN}-netserver="${PN}-core ${PN}-netclient ${PN}-shell ${PN}-threading" +FILES_${PN}-netserver="${libdir}/python2.7/cgi.* ${libdir}/python2.7/*HTTPServer.* ${libdir}/python2.7/SocketServer.* " + +SUMMARY_${PN}-numbers="Python number APIs" +RDEPENDS_${PN}-numbers="${PN}-core ${PN}-lang ${PN}-re" +FILES_${PN}-numbers="${libdir}/python2.7/decimal.* ${libdir}/python2.7/fractions.* ${libdir}/python2.7/numbers.* " + +SUMMARY_${PN}-pickle="Python serialisation/persistence support" +RDEPENDS_${PN}-pickle="${PN}-core ${PN}-codecs ${PN}-io ${PN}-re" +FILES_${PN}-pickle="${libdir}/python2.7/pickle.* ${libdir}/python2.7/shelve.* ${libdir}/python2.7/lib-dynload/cPickle.so ${libdir}/python2.7/pickletools.* " + +SUMMARY_${PN}-pkgutil="Python package extension utility support" +RDEPENDS_${PN}-pkgutil="${PN}-core" +FILES_${PN}-pkgutil="${libdir}/python2.7/pkgutil.* " + +SUMMARY_${PN}-plistlib="Generate and parse Mac OS X .plist files" +RDEPENDS_${PN}-plistlib="${PN}-core ${PN}-datetime ${PN}-io" +FILES_${PN}-plistlib="${libdir}/python2.7/plistlib.* " + +SUMMARY_${PN}-pprint="Python pretty-print support" +RDEPENDS_${PN}-pprint="${PN}-core ${PN}-io" +FILES_${PN}-pprint="${libdir}/python2.7/pprint.* " + +SUMMARY_${PN}-profile="Python basic performance profiling support" +RDEPENDS_${PN}-profile="${PN}-core ${PN}-textutils" +FILES_${PN}-profile="${libdir}/python2.7/profile.* ${libdir}/python2.7/pstats.* ${libdir}/python2.7/cProfile.* ${libdir}/python2.7/lib-dynload/_lsprof.so " + +SUMMARY_${PN}-pydoc="Python interactive help support" +RDEPENDS_${PN}-pydoc="${PN}-core ${PN}-lang ${PN}-stringold ${PN}-re" +FILES_${PN}-pydoc="${bindir}/pydoc ${libdir}/python2.7/pydoc.* ${libdir}/python2.7/pydoc_data " + +SUMMARY_${PN}-re="Python Regular Expression APIs" +RDEPENDS_${PN}-re="${PN}-core" +FILES_${PN}-re="${libdir}/python2.7/re.* ${libdir}/python2.7/sre.* ${libdir}/python2.7/sre_compile.* ${libdir}/python2.7/sre_constants* ${libdir}/python2.7/sre_parse.* " + +SUMMARY_${PN}-readline="Python readline support" +RDEPENDS_${PN}-readline="${PN}-core" +FILES_${PN}-readline="${libdir}/python2.7/lib-dynload/readline.so ${libdir}/python2.7/rlcompleter.* " + +SUMMARY_${PN}-resource="Python resource control interface" +RDEPENDS_${PN}-resource="${PN}-core" +FILES_${PN}-resource="${libdir}/python2.7/lib-dynload/resource.so " + +SUMMARY_${PN}-robotparser="Python robots.txt parser" +RDEPENDS_${PN}-robotparser="${PN}-core ${PN}-netclient" +FILES_${PN}-robotparser="${libdir}/python2.7/robotparser.* " + +SUMMARY_${PN}-shell="Python shell-like functionality" +RDEPENDS_${PN}-shell="${PN}-core ${PN}-re" +FILES_${PN}-shell="${libdir}/python2.7/cmd.* ${libdir}/python2.7/commands.* ${libdir}/python2.7/dircache.* ${libdir}/python2.7/fnmatch.* ${libdir}/python2.7/glob.* ${libdir}/python2.7/popen2.* ${libdir}/python2.7/shlex.* ${libdir}/python2.7/shutil.* " + +SUMMARY_${PN}-smtpd="Python Simple Mail Transport Daemon" +RDEPENDS_${PN}-smtpd="${PN}-core ${PN}-netserver ${PN}-email ${PN}-mime" +FILES_${PN}-smtpd="${bindir}/smtpd.* ${libdir}/python2.7/smtpd.* " + +SUMMARY_${PN}-sqlite3="Python Sqlite3 database support" +RDEPENDS_${PN}-sqlite3="${PN}-core ${PN}-datetime ${PN}-lang ${PN}-crypt ${PN}-io ${PN}-threading ${PN}-zlib" +FILES_${PN}-sqlite3="${libdir}/python2.7/lib-dynload/_sqlite3.so ${libdir}/python2.7/sqlite3/dbapi2.* ${libdir}/python2.7/sqlite3/__init__.* ${libdir}/python2.7/sqlite3/dump.* " + +SUMMARY_${PN}-sqlite3-tests="Python Sqlite3 database support tests" +RDEPENDS_${PN}-sqlite3-tests="${PN}-core ${PN}-sqlite3" +FILES_${PN}-sqlite3-tests="${libdir}/python2.7/sqlite3/test " + +SUMMARY_${PN}-stringold="Python string APIs [deprecated]" +RDEPENDS_${PN}-stringold="${PN}-core ${PN}-re" +FILES_${PN}-stringold="${libdir}/python2.7/lib-dynload/strop.so ${libdir}/python2.7/string.* ${libdir}/python2.7/stringold.* " + +SUMMARY_${PN}-subprocess="Python subprocess support" +RDEPENDS_${PN}-subprocess="${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle" +FILES_${PN}-subprocess="${libdir}/python2.7/subprocess.* " + +SUMMARY_${PN}-syslog="Python syslog interface" +RDEPENDS_${PN}-syslog="${PN}-core" +FILES_${PN}-syslog="${libdir}/python2.7/lib-dynload/syslog.so " + +SUMMARY_${PN}-terminal="Python terminal controlling support" +RDEPENDS_${PN}-terminal="${PN}-core ${PN}-io" +FILES_${PN}-terminal="${libdir}/python2.7/pty.* ${libdir}/python2.7/tty.* " + +SUMMARY_${PN}-tests="Python tests" +RDEPENDS_${PN}-tests="${PN}-core ${PN}-modules" +FILES_${PN}-tests="${libdir}/python2.7/test " + +SUMMARY_${PN}-textutils="Python option parsing, text wrapping and CSV support" +RDEPENDS_${PN}-textutils="${PN}-core ${PN}-io ${PN}-re ${PN}-stringold" +FILES_${PN}-textutils="${libdir}/python2.7/lib-dynload/_csv.so ${libdir}/python2.7/csv.* ${libdir}/python2.7/optparse.* ${libdir}/python2.7/textwrap.* " + +SUMMARY_${PN}-threading="Python threading & synchronization support" +RDEPENDS_${PN}-threading="${PN}-core ${PN}-lang" +FILES_${PN}-threading="${libdir}/python2.7/_threading_local.* ${libdir}/python2.7/dummy_thread.* ${libdir}/python2.7/dummy_threading.* ${libdir}/python2.7/mutex.* ${libdir}/python2.7/threading.* ${libdir}/python2.7/Queue.* " + +SUMMARY_${PN}-tkinter="Python Tcl/Tk bindings" +RDEPENDS_${PN}-tkinter="${PN}-core" +FILES_${PN}-tkinter="${libdir}/python2.7/lib-dynload/_tkinter.so ${libdir}/python2.7/lib-tk " + +SUMMARY_${PN}-unittest="Python unit testing framework" +RDEPENDS_${PN}-unittest="${PN}-core ${PN}-stringold ${PN}-lang ${PN}-io ${PN}-difflib ${PN}-pprint ${PN}-shell" +FILES_${PN}-unittest="${libdir}/python2.7/unittest/ " + +SUMMARY_${PN}-unixadmin="Python Unix administration support" +RDEPENDS_${PN}-unixadmin="${PN}-core" +FILES_${PN}-unixadmin="${libdir}/python2.7/lib-dynload/nis.so ${libdir}/python2.7/lib-dynload/grp.so ${libdir}/python2.7/lib-dynload/pwd.so ${libdir}/python2.7/getpass.* " + +SUMMARY_${PN}-xml="Python basic XML support" +RDEPENDS_${PN}-xml="${PN}-core ${PN}-re" +FILES_${PN}-xml="${libdir}/python2.7/lib-dynload/_elementtree.so ${libdir}/python2.7/lib-dynload/pyexpat.so ${libdir}/python2.7/xml ${libdir}/python2.7/xmllib.* " + +SUMMARY_${PN}-xmlrpc="Python XML-RPC support" +RDEPENDS_${PN}-xmlrpc="${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang" +FILES_${PN}-xmlrpc="${libdir}/python2.7/xmlrpclib.* ${libdir}/python2.7/SimpleXMLRPCServer.* ${libdir}/python2.7/DocXMLRPCServer.* " + +SUMMARY_${PN}-zlib="Python zlib compression support" +RDEPENDS_${PN}-zlib="${PN}-core" +FILES_${PN}-zlib="${libdir}/python2.7/lib-dynload/zlib.so " + +SUMMARY_${PN}-modules="All Python modules" +RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-argparse ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-contextlib ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${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}-plistlib ${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}-zlib " +ALLOW_EMPTY_${PN}-modules = "1" + + diff --git a/meta/recipes-devtools/python/python-3.5-manifest.inc b/meta/recipes-devtools/python/python-3.5-manifest.inc new file mode 100644 index 0000000000..1e20f00c64 --- /dev/null +++ b/meta/recipes-devtools/python/python-3.5-manifest.inc @@ -0,0 +1,283 @@ + +# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file. +# Generator: '../../../scripts/contrib/python/generate-manifest-3.5.py' Version 20140131 (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de> + + + +PROVIDES+="${PN}-2to3 ${PN}-argparse ${PN}-asyncio ${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}-email ${PN}-enum ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${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}-reprlib ${PN}-resource ${PN}-selectors ${PN}-shell ${PN}-signal ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-typing ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc " + +PACKAGES="${PN}-dbg ${PN}-2to3 ${PN}-argparse ${PN}-asyncio ${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}-email ${PN}-enum ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${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}-reprlib ${PN}-resource ${PN}-selectors ${PN}-shell ${PN}-signal ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-typing ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-modules" + +SUMMARY_${PN}-2to3="Python automated Python 2 to 3 code translator" +RDEPENDS_${PN}-2to3="${PN}-core" +FILES_${PN}-2to3="${libdir}/python3.5/lib2to3 ${libdir}/python3.5/lib2to3/__pycache__ " + +SUMMARY_${PN}-argparse="Python command line argument parser" +RDEPENDS_${PN}-argparse="${PN}-core ${PN}-codecs ${PN}-textutils" +FILES_${PN}-argparse="${libdir}/python3.5/argparse.* ${libdir}/python3.5/__pycache__/argparse.* " + +SUMMARY_${PN}-asyncio="Python Asynchronous I/O, event loop, coroutines and tasks" +RDEPENDS_${PN}-asyncio="${PN}-core" +FILES_${PN}-asyncio="${libdir}/python3.5/asyncio ${libdir}/python3.5/asyncio/__pycache__ " + +SUMMARY_${PN}-audio="Python Audio Handling" +RDEPENDS_${PN}-audio="${PN}-core" +FILES_${PN}-audio="${libdir}/python3.5/wave.* ${libdir}/python3.5/__pycache__/wave.* ${libdir}/python3.5/chunk.* ${libdir}/python3.5/__pycache__/chunk.* ${libdir}/python3.5/sndhdr.* ${libdir}/python3.5/__pycache__/sndhdr.* ${libdir}/python3.5/lib-dynload/ossaudiodev.*.so ${libdir}/python3.5/lib-dynload/__pycache__/ossaudiodev.*.so ${libdir}/python3.5/lib-dynload/audioop.*.so ${libdir}/python3.5/lib-dynload/__pycache__/audioop.*.so ${libdir}/python3.5/audiodev.* ${libdir}/python3.5/__pycache__/audiodev.* ${libdir}/python3.5/sunaudio.* ${libdir}/python3.5/__pycache__/sunaudio.* ${libdir}/python3.5/sunau.* ${libdir}/python3.5/__pycache__/sunau.* ${libdir}/python3.5/toaiff.* ${libdir}/python3.5/__pycache__/toaiff.* " + +SUMMARY_${PN}-codecs="Python codecs, encodings & i18n support" +RDEPENDS_${PN}-codecs="${PN}-core ${PN}-lang" +FILES_${PN}-codecs="${libdir}/python3.5/codecs.* ${libdir}/python3.5/__pycache__/codecs.* ${libdir}/python3.5/encodings ${libdir}/python3.5/encodings/__pycache__ ${libdir}/python3.5/gettext.* ${libdir}/python3.5/__pycache__/gettext.* ${libdir}/python3.5/locale.* ${libdir}/python3.5/__pycache__/locale.* ${libdir}/python3.5/lib-dynload/_locale.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_locale.*.so ${libdir}/python3.5/lib-dynload/_codecs* ${libdir}/python3.5/lib-dynload/_codecs*/__pycache__ ${libdir}/python3.5/lib-dynload/_multibytecodec.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_multibytecodec.*.so ${libdir}/python3.5/lib-dynload/unicodedata.*.so ${libdir}/python3.5/lib-dynload/__pycache__/unicodedata.*.so ${libdir}/python3.5/stringprep.* ${libdir}/python3.5/__pycache__/stringprep.* ${libdir}/python3.5/xdrlib.* ${libdir}/python3.5/__pycache__/xdrlib.* " + +SUMMARY_${PN}-compile="Python bytecode compilation support" +RDEPENDS_${PN}-compile="${PN}-core" +FILES_${PN}-compile="${libdir}/python3.5/py_compile.* ${libdir}/python3.5/__pycache__/py_compile.* ${libdir}/python3.5/compileall.* ${libdir}/python3.5/__pycache__/compileall.* " + +SUMMARY_${PN}-compression="Python high-level compression support" +RDEPENDS_${PN}-compression="${PN}-core ${PN}-codecs ${PN}-importlib ${PN}-threading ${PN}-shell" +FILES_${PN}-compression="${libdir}/python3.5/gzip.* ${libdir}/python3.5/__pycache__/gzip.* ${libdir}/python3.5/zipfile.* ${libdir}/python3.5/__pycache__/zipfile.* ${libdir}/python3.5/tarfile.* ${libdir}/python3.5/__pycache__/tarfile.* ${libdir}/python3.5/lib-dynload/bz2.*.so ${libdir}/python3.5/lib-dynload/__pycache__/bz2.*.so ${libdir}/python3.5/lib-dynload/zlib.*.so ${libdir}/python3.5/lib-dynload/__pycache__/zlib.*.so " + +SUMMARY_${PN}-core="Python interpreter and core modules" +RDEPENDS_${PN}-core="${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io ${PN}-math" +FILES_${PN}-core="${libdir}/python3.5/__future__.* ${libdir}/python3.5/__pycache__/__future__.* ${libdir}/python3.5/_abcoll.* ${libdir}/python3.5/__pycache__/_abcoll.* ${libdir}/python3.5/abc.* ${libdir}/python3.5/__pycache__/abc.* ${libdir}/python3.5/ast.* ${libdir}/python3.5/__pycache__/ast.* ${libdir}/python3.5/copy.* ${libdir}/python3.5/__pycache__/copy.* ${libdir}/python3.5/copyreg.* ${libdir}/python3.5/__pycache__/copyreg.* ${libdir}/python3.5/configparser.* ${libdir}/python3.5/__pycache__/configparser.* ${libdir}/python3.5/genericpath.* ${libdir}/python3.5/__pycache__/genericpath.* ${libdir}/python3.5/getopt.* ${libdir}/python3.5/__pycache__/getopt.* ${libdir}/python3.5/linecache.* ${libdir}/python3.5/__pycache__/linecache.* ${libdir}/python3.5/new.* ${libdir}/python3.5/__pycache__/new.* ${libdir}/python3.5/os.* ${libdir}/python3.5/__pycache__/os.* ${libdir}/python3.5/posixpath.* ${libdir}/python3.5/__pycache__/posixpath.* ${libdir}/python3.5/struct.* ${libdir}/python3.5/__pycache__/struct.* ${libdir}/python3.5/warnings.* ${libdir}/python3.5/__pycache__/warnings.* ${libdir}/python3.5/site.* ${libdir}/python3.5/__pycache__/site.* ${libdir}/python3.5/stat.* ${libdir}/python3.5/__pycache__/stat.* ${libdir}/python3.5/UserDict.* ${libdir}/python3.5/__pycache__/UserDict.* ${libdir}/python3.5/UserList.* ${libdir}/python3.5/__pycache__/UserList.* ${libdir}/python3.5/UserString.* ${libdir}/python3.5/__pycache__/UserString.* ${libdir}/python3.5/lib-dynload/binascii.*.so ${libdir}/python3.5/lib-dynload/__pycache__/binascii.*.so ${libdir}/python3.5/lib-dynload/_struct.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_struct.*.so ${libdir}/python3.5/lib-dynload/time.*.so ${libdir}/python3.5/lib-dynload/__pycache__/time.*.so ${libdir}/python3.5/lib-dynload/xreadlines.*.so ${libdir}/python3.5/lib-dynload/__pycache__/xreadlines.*.so ${libdir}/python3.5/types.* ${libdir}/python3.5/__pycache__/types.* ${libdir}/python3.5/platform.* ${libdir}/python3.5/__pycache__/platform.* ${bindir}/python* ${libdir}/python3.5/_weakrefset.* ${libdir}/python3.5/__pycache__/_weakrefset.* ${libdir}/python3.5/sysconfig.* ${libdir}/python3.5/__pycache__/sysconfig.* ${libdir}/python3.5/_sysconfigdata.* ${libdir}/python3.5/__pycache__/_sysconfigdata.* ${includedir}/python${PYTHON_BINABI}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/collections ${libdir}/python${PYTHON_MAJMIN}/_collections_abc.* ${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.* ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py " + +SUMMARY_${PN}-crypt="Python basic cryptographic and hashing support" +RDEPENDS_${PN}-crypt="${PN}-core" +FILES_${PN}-crypt="${libdir}/python3.5/hashlib.* ${libdir}/python3.5/__pycache__/hashlib.* ${libdir}/python3.5/md5.* ${libdir}/python3.5/__pycache__/md5.* ${libdir}/python3.5/sha.* ${libdir}/python3.5/__pycache__/sha.* ${libdir}/python3.5/lib-dynload/crypt.*.so ${libdir}/python3.5/lib-dynload/__pycache__/crypt.*.so ${libdir}/python3.5/lib-dynload/_hashlib.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_hashlib.*.so ${libdir}/python3.5/lib-dynload/_sha256.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_sha256.*.so ${libdir}/python3.5/lib-dynload/_sha512.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_sha512.*.so " + +SUMMARY_${PN}-ctypes="Python C types support" +RDEPENDS_${PN}-ctypes="${PN}-core ${PN}-subprocess" +FILES_${PN}-ctypes="${libdir}/python3.5/ctypes ${libdir}/python3.5/ctypes/__pycache__ ${libdir}/python3.5/lib-dynload/_ctypes.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_ctypes.*.so ${libdir}/python3.5/lib-dynload/_ctypes_test.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_ctypes_test.*.so " + +SUMMARY_${PN}-curses="Python curses support" +RDEPENDS_${PN}-curses="${PN}-core" +FILES_${PN}-curses="${libdir}/python3.5/curses ${libdir}/python3.5/curses/__pycache__ ${libdir}/python3.5/lib-dynload/_curses.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_curses.*.so ${libdir}/python3.5/lib-dynload/_curses_panel.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_curses_panel.*.so " + +SUMMARY_${PN}-datetime="Python calendar and time support" +RDEPENDS_${PN}-datetime="${PN}-core ${PN}-codecs" +FILES_${PN}-datetime="${libdir}/python3.5/_strptime.* ${libdir}/python3.5/__pycache__/_strptime.* ${libdir}/python3.5/calendar.* ${libdir}/python3.5/__pycache__/calendar.* ${libdir}/python3.5/datetime.* ${libdir}/python3.5/__pycache__/datetime.* ${libdir}/python3.5/lib-dynload/_datetime.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_datetime.*.so " + +SUMMARY_${PN}-db="Python file-based database support" +RDEPENDS_${PN}-db="${PN}-core" +FILES_${PN}-db="${libdir}/python3.5/anydbm.* ${libdir}/python3.5/__pycache__/anydbm.* ${libdir}/python3.5/dumbdbm.* ${libdir}/python3.5/__pycache__/dumbdbm.* ${libdir}/python3.5/whichdb.* ${libdir}/python3.5/__pycache__/whichdb.* ${libdir}/python3.5/dbm ${libdir}/python3.5/dbm/__pycache__ ${libdir}/python3.5/lib-dynload/_dbm.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_dbm.*.so " + +SUMMARY_${PN}-debugger="Python debugger" +RDEPENDS_${PN}-debugger="${PN}-core ${PN}-io ${PN}-lang ${PN}-re ${PN}-stringold ${PN}-shell ${PN}-pprint ${PN}-importlib ${PN}-pkgutil" +FILES_${PN}-debugger="${libdir}/python3.5/bdb.* ${libdir}/python3.5/__pycache__/bdb.* ${libdir}/python3.5/pdb.* ${libdir}/python3.5/__pycache__/pdb.* " + +SUMMARY_${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 ${libdir}/python3.5/config/Makefile ${libdir}/python3.5/config/Makefile/__pycache__ " + +SUMMARY_${PN}-difflib="Python helpers for computing deltas between objects" +RDEPENDS_${PN}-difflib="${PN}-lang ${PN}-re" +FILES_${PN}-difflib="${libdir}/python3.5/difflib.* ${libdir}/python3.5/__pycache__/difflib.* " + +SUMMARY_${PN}-distutils="Python Distribution Utilities" +RDEPENDS_${PN}-distutils="${PN}-core ${PN}-email" +FILES_${PN}-distutils="${libdir}/python3.5/config ${libdir}/python3.5/config/__pycache__ ${libdir}/python3.5/distutils ${libdir}/python3.5/distutils/__pycache__ " + +SUMMARY_${PN}-distutils-staticdev="Python distribution utilities (static libraries)" +RDEPENDS_${PN}-distutils-staticdev="${PN}-distutils" +FILES_${PN}-distutils-staticdev="${libdir}/python3.5/config/lib*.a ${libdir}/python3.5/config/__pycache__/lib*.a " + +SUMMARY_${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.5/doctest.* ${libdir}/python3.5/__pycache__/doctest.* " + +SUMMARY_${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.5/imaplib.* ${libdir}/python3.5/__pycache__/imaplib.* ${libdir}/python3.5/email ${libdir}/python3.5/email/__pycache__ " + +SUMMARY_${PN}-enum="Python support for enumerations" +RDEPENDS_${PN}-enum="${PN}-core" +FILES_${PN}-enum="${libdir}/python3.5/enum.* ${libdir}/python3.5/__pycache__/enum.* " + +SUMMARY_${PN}-fcntl="Python's fcntl interface" +RDEPENDS_${PN}-fcntl="${PN}-core" +FILES_${PN}-fcntl="${libdir}/python3.5/lib-dynload/fcntl.*.so ${libdir}/python3.5/lib-dynload/__pycache__/fcntl.*.so " + +SUMMARY_${PN}-gdbm="Python GNU database support" +RDEPENDS_${PN}-gdbm="${PN}-core" +FILES_${PN}-gdbm="${libdir}/python3.5/lib-dynload/_gdbm.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_gdbm.*.so " + +SUMMARY_${PN}-html="Python HTML processing support" +RDEPENDS_${PN}-html="${PN}-core" +FILES_${PN}-html="${libdir}/python3.5/formatter.* ${libdir}/python3.5/__pycache__/formatter.* ${libdir}/python3.5/htmlentitydefs.* ${libdir}/python3.5/__pycache__/htmlentitydefs.* ${libdir}/python3.5/html ${libdir}/python3.5/html/__pycache__ ${libdir}/python3.5/htmllib.* ${libdir}/python3.5/__pycache__/htmllib.* ${libdir}/python3.5/markupbase.* ${libdir}/python3.5/__pycache__/markupbase.* ${libdir}/python3.5/sgmllib.* ${libdir}/python3.5/__pycache__/sgmllib.* ${libdir}/python3.5/HTMLParser.* ${libdir}/python3.5/__pycache__/HTMLParser.* " + +SUMMARY_${PN}-idle="Python Integrated Development Environment" +RDEPENDS_${PN}-idle="${PN}-core ${PN}-tkinter" +FILES_${PN}-idle="${bindir}/idle ${libdir}/python3.5/idlelib ${libdir}/python3.5/idlelib/__pycache__ " + +SUMMARY_${PN}-image="Python graphical image handling" +RDEPENDS_${PN}-image="${PN}-core" +FILES_${PN}-image="${libdir}/python3.5/colorsys.* ${libdir}/python3.5/__pycache__/colorsys.* ${libdir}/python3.5/imghdr.* ${libdir}/python3.5/__pycache__/imghdr.* ${libdir}/python3.5/lib-dynload/imageop.*.so ${libdir}/python3.5/lib-dynload/__pycache__/imageop.*.so ${libdir}/python3.5/lib-dynload/rgbimg.*.so ${libdir}/python3.5/lib-dynload/__pycache__/rgbimg.*.so " + +SUMMARY_${PN}-importlib="Python import implementation library" +RDEPENDS_${PN}-importlib="${PN}-core ${PN}-lang" +FILES_${PN}-importlib="${libdir}/python3.5/importlib ${libdir}/python3.5/importlib/__pycache__ ${libdir}/python3.5/imp.* ${libdir}/python3.5/__pycache__/imp.* " + +SUMMARY_${PN}-io="Python low-level I/O" +RDEPENDS_${PN}-io="${PN}-core ${PN}-math" +FILES_${PN}-io="${libdir}/python3.5/lib-dynload/_socket.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_socket.*.so ${libdir}/python3.5/lib-dynload/_io.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_io.*.so ${libdir}/python3.5/lib-dynload/_ssl.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_ssl.*.so ${libdir}/python3.5/lib-dynload/select.*.so ${libdir}/python3.5/lib-dynload/__pycache__/select.*.so ${libdir}/python3.5/lib-dynload/termios.*.so ${libdir}/python3.5/lib-dynload/__pycache__/termios.*.so ${libdir}/python3.5/lib-dynload/cStringIO.*.so ${libdir}/python3.5/lib-dynload/__pycache__/cStringIO.*.so ${libdir}/python3.5/ipaddress.* ${libdir}/python3.5/__pycache__/ipaddress.* ${libdir}/python3.5/pipes.* ${libdir}/python3.5/__pycache__/pipes.* ${libdir}/python3.5/socket.* ${libdir}/python3.5/__pycache__/socket.* ${libdir}/python3.5/ssl.* ${libdir}/python3.5/__pycache__/ssl.* ${libdir}/python3.5/tempfile.* ${libdir}/python3.5/__pycache__/tempfile.* ${libdir}/python3.5/StringIO.* ${libdir}/python3.5/__pycache__/StringIO.* ${libdir}/python3.5/io.* ${libdir}/python3.5/__pycache__/io.* ${libdir}/python3.5/_pyio.* ${libdir}/python3.5/__pycache__/_pyio.* " + +SUMMARY_${PN}-json="Python JSON support" +RDEPENDS_${PN}-json="${PN}-core ${PN}-math ${PN}-re" +FILES_${PN}-json="${libdir}/python3.5/json ${libdir}/python3.5/json/__pycache__ ${libdir}/python3.5/lib-dynload/_json.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_json.*.so " + +SUMMARY_${PN}-lang="Python low-level language support" +RDEPENDS_${PN}-lang="${PN}-core ${PN}-importlib" +FILES_${PN}-lang="${libdir}/python3.5/lib-dynload/_bisect.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_bisect.*.so ${libdir}/python3.5/lib-dynload/_collections.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_collections.*.so ${libdir}/python3.5/lib-dynload/_heapq.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_heapq.*.so ${libdir}/python3.5/lib-dynload/_weakref.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_weakref.*.so ${libdir}/python3.5/lib-dynload/_functools.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_functools.*.so ${libdir}/python3.5/lib-dynload/array.*.so ${libdir}/python3.5/lib-dynload/__pycache__/array.*.so ${libdir}/python3.5/lib-dynload/itertools.*.so ${libdir}/python3.5/lib-dynload/__pycache__/itertools.*.so ${libdir}/python3.5/lib-dynload/operator.*.so ${libdir}/python3.5/lib-dynload/__pycache__/operator.*.so ${libdir}/python3.5/lib-dynload/parser.*.so ${libdir}/python3.5/lib-dynload/__pycache__/parser.*.so ${libdir}/python3.5/atexit.* ${libdir}/python3.5/__pycache__/atexit.* ${libdir}/python3.5/bisect.* ${libdir}/python3.5/__pycache__/bisect.* ${libdir}/python3.5/code.* ${libdir}/python3.5/__pycache__/code.* ${libdir}/python3.5/codeop.* ${libdir}/python3.5/__pycache__/codeop.* ${libdir}/python3.5/collections.* ${libdir}/python3.5/__pycache__/collections.* ${libdir}/python3.5/_collections_abc.* ${libdir}/python3.5/__pycache__/_collections_abc.* ${libdir}/python3.5/contextlib.* ${libdir}/python3.5/__pycache__/contextlib.* ${libdir}/python3.5/dis.* ${libdir}/python3.5/__pycache__/dis.* ${libdir}/python3.5/functools.* ${libdir}/python3.5/__pycache__/functools.* ${libdir}/python3.5/heapq.* ${libdir}/python3.5/__pycache__/heapq.* ${libdir}/python3.5/inspect.* ${libdir}/python3.5/__pycache__/inspect.* ${libdir}/python3.5/keyword.* ${libdir}/python3.5/__pycache__/keyword.* ${libdir}/python3.5/opcode.* ${libdir}/python3.5/__pycache__/opcode.* ${libdir}/python3.5/operator.* ${libdir}/python3.5/__pycache__/operator.* ${libdir}/python3.5/symbol.* ${libdir}/python3.5/__pycache__/symbol.* ${libdir}/python3.5/repr.* ${libdir}/python3.5/__pycache__/repr.* ${libdir}/python3.5/token.* ${libdir}/python3.5/__pycache__/token.* ${libdir}/python3.5/tokenize.* ${libdir}/python3.5/__pycache__/tokenize.* ${libdir}/python3.5/traceback.* ${libdir}/python3.5/__pycache__/traceback.* ${libdir}/python3.5/weakref.* ${libdir}/python3.5/__pycache__/weakref.* " + +SUMMARY_${PN}-logging="Python logging support" +RDEPENDS_${PN}-logging="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold" +FILES_${PN}-logging="${libdir}/python3.5/logging ${libdir}/python3.5/logging/__pycache__ " + +SUMMARY_${PN}-mailbox="Python mailbox format support" +RDEPENDS_${PN}-mailbox="${PN}-core ${PN}-mime" +FILES_${PN}-mailbox="${libdir}/python3.5/mailbox.* ${libdir}/python3.5/__pycache__/mailbox.* " + +SUMMARY_${PN}-math="Python math support" +RDEPENDS_${PN}-math="${PN}-core ${PN}-crypt" +FILES_${PN}-math="${libdir}/python3.5/lib-dynload/cmath.*.so ${libdir}/python3.5/lib-dynload/__pycache__/cmath.*.so ${libdir}/python3.5/lib-dynload/math.*.so ${libdir}/python3.5/lib-dynload/__pycache__/math.*.so ${libdir}/python3.5/lib-dynload/_random.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_random.*.so ${libdir}/python3.5/random.* ${libdir}/python3.5/__pycache__/random.* ${libdir}/python3.5/sets.* ${libdir}/python3.5/__pycache__/sets.* " + +SUMMARY_${PN}-mime="Python MIME handling APIs" +RDEPENDS_${PN}-mime="${PN}-core ${PN}-io" +FILES_${PN}-mime="${libdir}/python3.5/mimetools.* ${libdir}/python3.5/__pycache__/mimetools.* ${libdir}/python3.5/uu.* ${libdir}/python3.5/__pycache__/uu.* ${libdir}/python3.5/quopri.* ${libdir}/python3.5/__pycache__/quopri.* ${libdir}/python3.5/rfc822.* ${libdir}/python3.5/__pycache__/rfc822.* ${libdir}/python3.5/MimeWriter.* ${libdir}/python3.5/__pycache__/MimeWriter.* " + +SUMMARY_${PN}-mmap="Python memory-mapped file support" +RDEPENDS_${PN}-mmap="${PN}-core ${PN}-io" +FILES_${PN}-mmap="${libdir}/python3.5/lib-dynload/mmap.*.so ${libdir}/python3.5/lib-dynload/__pycache__/mmap.*.so " + +SUMMARY_${PN}-multiprocessing="Python multiprocessing support" +RDEPENDS_${PN}-multiprocessing="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-threading ${PN}-ctypes ${PN}-mmap" +FILES_${PN}-multiprocessing="${libdir}/python3.5/lib-dynload/_multiprocessing.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_multiprocessing.*.so ${libdir}/python3.5/multiprocessing ${libdir}/python3.5/multiprocessing/__pycache__ " + +SUMMARY_${PN}-netclient="Python Internet Protocol clients" +RDEPENDS_${PN}-netclient="${PN}-argparse ${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang ${PN}-logging ${PN}-mime ${PN}-html" +FILES_${PN}-netclient="${libdir}/python3.5/*Cookie*.* ${libdir}/python3.5/__pycache__/*Cookie*.* ${libdir}/python3.5/base64.* ${libdir}/python3.5/__pycache__/base64.* ${libdir}/python3.5/cookielib.* ${libdir}/python3.5/__pycache__/cookielib.* ${libdir}/python3.5/ftplib.* ${libdir}/python3.5/__pycache__/ftplib.* ${libdir}/python3.5/gopherlib.* ${libdir}/python3.5/__pycache__/gopherlib.* ${libdir}/python3.5/hmac.* ${libdir}/python3.5/__pycache__/hmac.* ${libdir}/python3.5/http* ${libdir}/python3.5/http*/__pycache__ ${libdir}/python3.5/httplib.* ${libdir}/python3.5/__pycache__/httplib.* ${libdir}/python3.5/mimetypes.* ${libdir}/python3.5/__pycache__/mimetypes.* ${libdir}/python3.5/nntplib.* ${libdir}/python3.5/__pycache__/nntplib.* ${libdir}/python3.5/poplib.* ${libdir}/python3.5/__pycache__/poplib.* ${libdir}/python3.5/smtplib.* ${libdir}/python3.5/__pycache__/smtplib.* ${libdir}/python3.5/telnetlib.* ${libdir}/python3.5/__pycache__/telnetlib.* ${libdir}/python3.5/urllib ${libdir}/python3.5/urllib/__pycache__ ${libdir}/python3.5/uuid.* ${libdir}/python3.5/__pycache__/uuid.* ${libdir}/python3.5/rfc822.* ${libdir}/python3.5/__pycache__/rfc822.* ${libdir}/python3.5/mimetools.* ${libdir}/python3.5/__pycache__/mimetools.* " + +SUMMARY_${PN}-netserver="Python Internet Protocol servers" +RDEPENDS_${PN}-netserver="${PN}-core ${PN}-netclient ${PN}-shell ${PN}-threading" +FILES_${PN}-netserver="${libdir}/python3.5/cgi.* ${libdir}/python3.5/__pycache__/cgi.* ${libdir}/python3.5/socketserver.* ${libdir}/python3.5/__pycache__/socketserver.* ${libdir}/python3.5/*HTTPServer.* ${libdir}/python3.5/__pycache__/*HTTPServer.* ${libdir}/python3.5/SocketServer.* ${libdir}/python3.5/__pycache__/SocketServer.* " + +SUMMARY_${PN}-numbers="Python number APIs" +RDEPENDS_${PN}-numbers="${PN}-core ${PN}-lang ${PN}-re" +FILES_${PN}-numbers="${libdir}/python3.5/decimal.* ${libdir}/python3.5/__pycache__/decimal.* ${libdir}/python3.5/fractions.* ${libdir}/python3.5/__pycache__/fractions.* ${libdir}/python3.5/numbers.* ${libdir}/python3.5/__pycache__/numbers.* " + +SUMMARY_${PN}-pickle="Python serialisation/persistence support" +RDEPENDS_${PN}-pickle="${PN}-core ${PN}-codecs ${PN}-io ${PN}-re" +FILES_${PN}-pickle="${libdir}/python3.5/_compat_pickle.* ${libdir}/python3.5/__pycache__/_compat_pickle.* ${libdir}/python3.5/pickle.* ${libdir}/python3.5/__pycache__/pickle.* ${libdir}/python3.5/shelve.* ${libdir}/python3.5/__pycache__/shelve.* ${libdir}/python3.5/lib-dynload/cPickle.*.so ${libdir}/python3.5/lib-dynload/__pycache__/cPickle.*.so ${libdir}/python3.5/pickletools.* ${libdir}/python3.5/__pycache__/pickletools.* " + +SUMMARY_${PN}-pkgutil="Python package extension utility support" +RDEPENDS_${PN}-pkgutil="${PN}-core" +FILES_${PN}-pkgutil="${libdir}/python3.5/pkgutil.* ${libdir}/python3.5/__pycache__/pkgutil.* " + +SUMMARY_${PN}-pprint="Python pretty-print support" +RDEPENDS_${PN}-pprint="${PN}-core ${PN}-io" +FILES_${PN}-pprint="${libdir}/python3.5/pprint.* ${libdir}/python3.5/__pycache__/pprint.* " + +SUMMARY_${PN}-profile="Python basic performance profiling support" +RDEPENDS_${PN}-profile="${PN}-core ${PN}-textutils" +FILES_${PN}-profile="${libdir}/python3.5/profile.* ${libdir}/python3.5/__pycache__/profile.* ${libdir}/python3.5/pstats.* ${libdir}/python3.5/__pycache__/pstats.* ${libdir}/python3.5/cProfile.* ${libdir}/python3.5/__pycache__/cProfile.* ${libdir}/python3.5/lib-dynload/_lsprof.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_lsprof.*.so " + +SUMMARY_${PN}-pydoc="Python interactive help support" +RDEPENDS_${PN}-pydoc="${PN}-core ${PN}-lang ${PN}-stringold ${PN}-re" +FILES_${PN}-pydoc="${bindir}/pydoc ${libdir}/python3.5/pydoc.* ${libdir}/python3.5/__pycache__/pydoc.* ${libdir}/python3.5/pydoc_data ${libdir}/python3.5/pydoc_data/__pycache__ " + +SUMMARY_${PN}-re="Python Regular Expression APIs" +RDEPENDS_${PN}-re="${PN}-core" +FILES_${PN}-re="${libdir}/python3.5/re.* ${libdir}/python3.5/__pycache__/re.* ${libdir}/python3.5/sre.* ${libdir}/python3.5/__pycache__/sre.* ${libdir}/python3.5/sre_compile.* ${libdir}/python3.5/__pycache__/sre_compile.* ${libdir}/python3.5/sre_constants* ${libdir}/python3.5/sre_constants*/__pycache__ ${libdir}/python3.5/sre_parse.* ${libdir}/python3.5/__pycache__/sre_parse.* " + +SUMMARY_${PN}-readline="Python readline support" +RDEPENDS_${PN}-readline="${PN}-core" +FILES_${PN}-readline="${libdir}/python3.5/lib-dynload/readline.*.so ${libdir}/python3.5/lib-dynload/__pycache__/readline.*.so ${libdir}/python3.5/rlcompleter.* ${libdir}/python3.5/__pycache__/rlcompleter.* " + +SUMMARY_${PN}-reprlib="Python alternate repr() implementation" +RDEPENDS_${PN}-reprlib="${PN}-core" +FILES_${PN}-reprlib="${libdir}/python3.5/reprlib.py ${libdir}/python3.5/__pycache__/reprlib.py " + +SUMMARY_${PN}-resource="Python resource control interface" +RDEPENDS_${PN}-resource="${PN}-core" +FILES_${PN}-resource="${libdir}/python3.5/lib-dynload/resource.*.so ${libdir}/python3.5/lib-dynload/__pycache__/resource.*.so " + +SUMMARY_${PN}-selectors="Python High-level I/O multiplexing" +RDEPENDS_${PN}-selectors="${PN}-core" +FILES_${PN}-selectors="${libdir}/python3.5/selectors.* ${libdir}/python3.5/__pycache__/selectors.* " + +SUMMARY_${PN}-shell="Python shell-like functionality" +RDEPENDS_${PN}-shell="${PN}-core ${PN}-re ${PN}-compression" +FILES_${PN}-shell="${libdir}/python3.5/cmd.* ${libdir}/python3.5/__pycache__/cmd.* ${libdir}/python3.5/commands.* ${libdir}/python3.5/__pycache__/commands.* ${libdir}/python3.5/dircache.* ${libdir}/python3.5/__pycache__/dircache.* ${libdir}/python3.5/fnmatch.* ${libdir}/python3.5/__pycache__/fnmatch.* ${libdir}/python3.5/glob.* ${libdir}/python3.5/__pycache__/glob.* ${libdir}/python3.5/popen2.* ${libdir}/python3.5/__pycache__/popen2.* ${libdir}/python3.5/shlex.* ${libdir}/python3.5/__pycache__/shlex.* ${libdir}/python3.5/shutil.* ${libdir}/python3.5/__pycache__/shutil.* " + +SUMMARY_${PN}-signal="Python set handlers for asynchronous events support" +RDEPENDS_${PN}-signal="${PN}-core ${PN}-enum" +FILES_${PN}-signal="${libdir}/python3.5/signal.* ${libdir}/python3.5/__pycache__/signal.* " + +SUMMARY_${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.5/smtpd.* ${libdir}/python3.5/__pycache__/smtpd.* " + +SUMMARY_${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.5/lib-dynload/_sqlite3.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_sqlite3.*.so ${libdir}/python3.5/sqlite3/dbapi2.* ${libdir}/python3.5/sqlite3/__pycache__/dbapi2.* ${libdir}/python3.5/sqlite3/__init__.* ${libdir}/python3.5/sqlite3/__pycache__/__init__.* ${libdir}/python3.5/sqlite3/dump.* ${libdir}/python3.5/sqlite3/__pycache__/dump.* " + +SUMMARY_${PN}-sqlite3-tests="Python Sqlite3 database support tests" +RDEPENDS_${PN}-sqlite3-tests="${PN}-core ${PN}-sqlite3" +FILES_${PN}-sqlite3-tests="${libdir}/python3.5/sqlite3/test ${libdir}/python3.5/sqlite3/test/__pycache__ " + +SUMMARY_${PN}-stringold="Python string APIs [deprecated]" +RDEPENDS_${PN}-stringold="${PN}-core ${PN}-re" +FILES_${PN}-stringold="${libdir}/python3.5/lib-dynload/strop.*.so ${libdir}/python3.5/lib-dynload/__pycache__/strop.*.so ${libdir}/python3.5/string.* ${libdir}/python3.5/__pycache__/string.* ${libdir}/python3.5/stringold.* ${libdir}/python3.5/__pycache__/stringold.* " + +SUMMARY_${PN}-subprocess="Python subprocess support" +RDEPENDS_${PN}-subprocess="${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle ${PN}-threading ${PN}-signal ${PN}-selectors" +FILES_${PN}-subprocess="${libdir}/python3.5/subprocess.* ${libdir}/python3.5/__pycache__/subprocess.* ${libdir}/python3.5/lib-dynload/_posixsubprocess.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_posixsubprocess.*.so " + +SUMMARY_${PN}-syslog="Python syslog interface" +RDEPENDS_${PN}-syslog="${PN}-core" +FILES_${PN}-syslog="${libdir}/python3.5/lib-dynload/syslog.*.so ${libdir}/python3.5/lib-dynload/__pycache__/syslog.*.so " + +SUMMARY_${PN}-terminal="Python terminal controlling support" +RDEPENDS_${PN}-terminal="${PN}-core ${PN}-io" +FILES_${PN}-terminal="${libdir}/python3.5/pty.* ${libdir}/python3.5/__pycache__/pty.* ${libdir}/python3.5/tty.* ${libdir}/python3.5/__pycache__/tty.* " + +SUMMARY_${PN}-tests="Python tests" +RDEPENDS_${PN}-tests="${PN}-core" +FILES_${PN}-tests="${libdir}/python3.5/test ${libdir}/python3.5/test/__pycache__ " + +SUMMARY_${PN}-textutils="Python option parsing, text wrapping and CSV support" +RDEPENDS_${PN}-textutils="${PN}-core ${PN}-io ${PN}-re ${PN}-stringold" +FILES_${PN}-textutils="${libdir}/python3.5/lib-dynload/_csv.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_csv.*.so ${libdir}/python3.5/csv.* ${libdir}/python3.5/__pycache__/csv.* ${libdir}/python3.5/optparse.* ${libdir}/python3.5/__pycache__/optparse.* ${libdir}/python3.5/textwrap.* ${libdir}/python3.5/__pycache__/textwrap.* " + +SUMMARY_${PN}-threading="Python threading & synchronization support" +RDEPENDS_${PN}-threading="${PN}-core ${PN}-lang" +FILES_${PN}-threading="${libdir}/python3.5/_threading_local.* ${libdir}/python3.5/__pycache__/_threading_local.* ${libdir}/python3.5/dummy_thread.* ${libdir}/python3.5/__pycache__/dummy_thread.* ${libdir}/python3.5/dummy_threading.* ${libdir}/python3.5/__pycache__/dummy_threading.* ${libdir}/python3.5/mutex.* ${libdir}/python3.5/__pycache__/mutex.* ${libdir}/python3.5/threading.* ${libdir}/python3.5/__pycache__/threading.* ${libdir}/python3.5/queue.* ${libdir}/python3.5/__pycache__/queue.* " + +SUMMARY_${PN}-tkinter="Python Tcl/Tk bindings" +RDEPENDS_${PN}-tkinter="${PN}-core" +FILES_${PN}-tkinter="${libdir}/python3.5/lib-dynload/_tkinter.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_tkinter.*.so ${libdir}/python3.5/lib-tk ${libdir}/python3.5/lib-tk/__pycache__ ${libdir}/python3.5/tkinter ${libdir}/python3.5/tkinter/__pycache__ " + +SUMMARY_${PN}-typing="Python typing support" +RDEPENDS_${PN}-typing="${PN}-core" +FILES_${PN}-typing="${libdir}/python3.5/typing.* ${libdir}/python3.5/__pycache__/typing.* " + +SUMMARY_${PN}-unittest="Python unit testing framework" +RDEPENDS_${PN}-unittest="${PN}-core ${PN}-stringold ${PN}-lang ${PN}-io ${PN}-difflib ${PN}-pprint ${PN}-shell" +FILES_${PN}-unittest="${libdir}/python3.5/unittest/ ${libdir}/python3.5/unittest/__pycache__ " + +SUMMARY_${PN}-unixadmin="Python Unix administration support" +RDEPENDS_${PN}-unixadmin="${PN}-core" +FILES_${PN}-unixadmin="${libdir}/python3.5/lib-dynload/nis.*.so ${libdir}/python3.5/lib-dynload/__pycache__/nis.*.so ${libdir}/python3.5/lib-dynload/grp.*.so ${libdir}/python3.5/lib-dynload/__pycache__/grp.*.so ${libdir}/python3.5/lib-dynload/pwd.*.so ${libdir}/python3.5/lib-dynload/__pycache__/pwd.*.so ${libdir}/python3.5/getpass.* ${libdir}/python3.5/__pycache__/getpass.* " + +SUMMARY_${PN}-xml="Python basic XML support" +RDEPENDS_${PN}-xml="${PN}-core ${PN}-re" +FILES_${PN}-xml="${libdir}/python3.5/lib-dynload/_elementtree.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_elementtree.*.so ${libdir}/python3.5/lib-dynload/pyexpat.*.so ${libdir}/python3.5/lib-dynload/__pycache__/pyexpat.*.so ${libdir}/python3.5/xml ${libdir}/python3.5/xml/__pycache__ ${libdir}/python3.5/xmllib.* ${libdir}/python3.5/__pycache__/xmllib.* " + +SUMMARY_${PN}-xmlrpc="Python XML-RPC support" +RDEPENDS_${PN}-xmlrpc="${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang ${PN}-pydoc" +FILES_${PN}-xmlrpc="${libdir}/python3.5/xmlrpclib.* ${libdir}/python3.5/__pycache__/xmlrpclib.* ${libdir}/python3.5/SimpleXMLRPCServer.* ${libdir}/python3.5/__pycache__/SimpleXMLRPCServer.* ${libdir}/python3.5/DocXMLRPCServer.* ${libdir}/python3.5/__pycache__/DocXMLRPCServer.* ${libdir}/python3.5/xmlrpc ${libdir}/python3.5/xmlrpc/__pycache__ " + +SUMMARY_${PN}-modules="All Python modules" +RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-argparse ${PN}-asyncio ${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}-email ${PN}-enum ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${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}-reprlib ${PN}-resource ${PN}-selectors ${PN}-shell ${PN}-signal ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-typing ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc " +ALLOW_EMPTY_${PN}-modules = "1" + + diff --git a/meta/recipes-devtools/python/python-async.inc b/meta/recipes-devtools/python/python-async.inc new file mode 100644 index 0000000000..2c5cb4d191 --- /dev/null +++ b/meta/recipes-devtools/python/python-async.inc @@ -0,0 +1,15 @@ +SUMMARY = "Python framework to process interdependent tasks in a pool of workers" +HOMEPAGE = "http://github.com/gitpython-developers/async" +SECTION = "devel/python" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=88df8e78b9edfd744953862179f2d14e" + +SRC_URI = "https://files.pythonhosted.org/packages/source/a/async/async-${PV}.tar.gz" +SRC_URI[md5sum] = "9b06b5997de2154f3bc0273f80bcef6b" +SRC_URI[sha256sum] = "ac6894d876e45878faae493b0cf61d0e28ec417334448ac0a6ea2229d8343051" + +UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/async/" + +S = "${WORKDIR}/async-${PV}" + +BBCLASSEXTEND = "nativesdk" diff --git a/meta/recipes-devtools/python/python-async_0.6.2.bb b/meta/recipes-devtools/python/python-async_0.6.2.bb new file mode 100644 index 0000000000..d855e42a79 --- /dev/null +++ b/meta/recipes-devtools/python/python-async_0.6.2.bb @@ -0,0 +1,5 @@ +require python-async.inc + +inherit setuptools + +RDEPENDS_${PN} += "python-threading python-lang" diff --git a/meta/recipes-devtools/python/python-dbus_0.83.2.bb b/meta/recipes-devtools/python/python-dbus_0.83.2.bb deleted file mode 100644 index 323dae50ef..0000000000 --- a/meta/recipes-devtools/python/python-dbus_0.83.2.bb +++ /dev/null @@ -1,25 +0,0 @@ -DESCRIPTION = "Python bindings for DBus, a socket-based message bus system for interprocess communication" -SECTION = "devel/python" -HOMEPAGE = "http://www.freedesktop.org/Software/dbus" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=f5612614133e9a2f2dad527d97554670" -DEPENDS = "expat dbus dbus-glib virtual/libintl python-pyrex-native" -PR = "r0" - -SRC_URI = "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${PV}.tar.gz" - -SRC_URI[md5sum] = "4ebcaa905bdcb4132b915196b0a3691b" -SRC_URI[sha256sum] = "883729c98f40790021e3be0f7028ae863ee1c4a7b922a5578c1342592adfff64" -S = "${WORKDIR}/dbus-python-${PV}" - -inherit distutils-base autotools pkgconfig - -export BUILD_SYS -export HOST_SYS - -export STAGING_LIBDIR -export STAGING_INCDIR - -RDEPENDS_${PN} = "python-io python-logging python-stringold python-threading python-xml" - -FILES_${PN}-dev += "${libdir}/pkgconfig diff --git a/meta/recipes-devtools/python/python-git.inc b/meta/recipes-devtools/python/python-git.inc new file mode 100644 index 0000000000..feddf275b9 --- /dev/null +++ b/meta/recipes-devtools/python/python-git.inc @@ -0,0 +1,21 @@ +SUMMARY = "Python library used to interact with Git repositories" +DESCRIPTION = "GitPython provides object model read and write access to \ +a git repository. Access repository information conveniently, alter the \ +index directly, handle remotes, or go down to low-level object database \ +access with big-files support." +HOMEPAGE = "http://github.com/gitpython-developers/GitPython" +SECTION = "devel/python" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=8b8d26c37c1d5a04f9b0186edbebc183" + +SRC_URI = "https://files.pythonhosted.org/packages/source/G/GitPython/GitPython-${PV}.tar.gz" + +SRC_URI[md5sum] = "77f8339e68dedb6d7c4e26371a588ed9" +SRC_URI[sha256sum] = "e96f8e953cf9fee0a7599fc587667591328760b6341a0081ef311a942fc96204" + +UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/GitPython/" +UPSTREAM_CHECK_REGEX = "/GitPython/(?P<pver>(\d+[\.\-_]*)+)" + +S = "${WORKDIR}/GitPython-${PV}" + +BBCLASSEXTEND = "nativesdk" diff --git a/meta/recipes-devtools/python/python-git_2.1.1.bb b/meta/recipes-devtools/python/python-git_2.1.1.bb new file mode 100644 index 0000000000..e49dbea544 --- /dev/null +++ b/meta/recipes-devtools/python/python-git_2.1.1.bb @@ -0,0 +1,7 @@ +require python-git.inc + +DEPENDS = "python-gitdb" + +inherit setuptools + +RDEPENDS_${PN} += "python-gitdb python-lang python-io python-shell python-math python-re python-subprocess python-stringold python-unixadmin" diff --git a/meta/recipes-devtools/python/python-gitdb.inc b/meta/recipes-devtools/python/python-gitdb.inc new file mode 100644 index 0000000000..08193fbf25 --- /dev/null +++ b/meta/recipes-devtools/python/python-gitdb.inc @@ -0,0 +1,16 @@ +SUMMARY = "A pure-Python git object database" +HOMEPAGE = "http://github.com/gitpython-developers/gitdb" +SECTION = "devel/python" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=59e5ecb13339a936eedf83282eaf4528" + +SRC_URI = "https://files.pythonhosted.org/packages/source/g/gitdb/gitdb-${PV}.tar.gz" + +SRC_URI[md5sum] = "44e4366b8bdfd306b075c3a52c96ae1a" +SRC_URI[sha256sum] = "a3ebbc27be035a2e874ed904df516e35f4a29a778a764385de09de9e0f139658" + +UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/gitdb/" + +S = "${WORKDIR}/gitdb-${PV}" + +BBCLASSEXTEND = "nativesdk" diff --git a/meta/recipes-devtools/python/python-gitdb_0.6.4.bb b/meta/recipes-devtools/python/python-gitdb_0.6.4.bb new file mode 100644 index 0000000000..1777395793 --- /dev/null +++ b/meta/recipes-devtools/python/python-gitdb_0.6.4.bb @@ -0,0 +1,7 @@ +require python-gitdb.inc + +DEPENDS = "python-async python-smmap" + +inherit distutils + +RDEPENDS_${PN} += "python-smmap python-async python-mmap python-lang python-zlib python-io python-shell" diff --git a/meta/recipes-devtools/python/python-gst/python-path.patch b/meta/recipes-devtools/python/python-gst/python-path.patch deleted file mode 100644 index 21b5bbfcfc..0000000000 --- a/meta/recipes-devtools/python/python-gst/python-path.patch +++ /dev/null @@ -1,28 +0,0 @@ -Upstream-Status:Pending - -Index: gst-python-0.10.19/acinclude.m4 -=================================================================== ---- gst-python-0.10.19.orig/acinclude.m4 2010-04-21 15:23:44.000000000 -0700 -+++ gst-python-0.10.19/acinclude.m4 2010-11-15 14:43:00.642994001 -0800 -@@ -43,6 +43,13 @@ - [AC_REQUIRE([AM_PATH_PYTHON]) - AC_MSG_CHECKING(for headers required to compile python extensions) - dnl deduce PYTHON_INCLUDES -+ -+AC_ARG_WITH(python-includes, -+ [ --with-python-includes=DIR path to Python includes], py_exec_prefix=$withval) -+if test x$py_exec_prefix != x; then -+PYTHON_INCLUDES="-I${py_exec_prefix}/include/python${PYTHON_VERSION}" -+py_prefix="${py_exec_prefix}" -+else - py_prefix=`$PYTHON -c "import sys; print sys.prefix"` - py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` - if $PYTHON-config --help 2>/dev/null; then -@@ -53,6 +60,7 @@ - PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" - fi - fi -+fi - AC_SUBST(PYTHON_INCLUDES) - dnl check if the headers exist: - save_CPPFLAGS="$CPPFLAGS" diff --git a/meta/recipes-devtools/python/python-gst_0.10.21.bb b/meta/recipes-devtools/python/python-gst_0.10.21.bb deleted file mode 100644 index dd1ad5f0e8..0000000000 --- a/meta/recipes-devtools/python/python-gst_0.10.21.bb +++ /dev/null @@ -1,23 +0,0 @@ -DESCRIPTION = "Python Gstreamer bindings" -SECTION = "devel/python" -LICENSE = "LGPLv2.1" -DEPENDS = "gstreamer gst-plugins-base python-pygobject" -RDEPENDS_${PN} += "python-pygtk" -PR = "r0" - -SRC_URI = "http://gstreamer.freedesktop.org/src/gst-python/gst-python-${PV}.tar.bz2 \ - file://python-path.patch" - -SRC_URI[md5sum] = "31340ae3e877797a10d088a226d74b16" -SRC_URI[sha256sum] = "d5962132c84b88b54d0f63832b8dfcc383a7805827da5abc2d1d215ba86a6f92" -S = "${WORKDIR}/gst-python-${PV}" - -LIC_FILES_CHKSUM = "file://COPYING;md5=39ff67e932b7bdfa9b78bad67151690b" - -inherit autotools distutils-base pkgconfig - -EXTRA_OECONF += "--with-python-includes=${STAGING_INCDIR}/../" - -FILES_${PN} += "${datadir}/gst-python" -FILES_${PN}-dev += "${datadir}/gst-python/0.10/defs" -FILES_${PN}-dbg += "${libdir}/${PYTHON_DIR}/site-packages/gst-0.10/gst/.debug/" diff --git a/meta/recipes-devtools/python/python-imaging/path.patch b/meta/recipes-devtools/python/python-imaging/path.patch deleted file mode 100644 index a5bba75ef6..0000000000 --- a/meta/recipes-devtools/python/python-imaging/path.patch +++ /dev/null @@ -1,35 +0,0 @@ -Upstream-Status: Inappropriate [embedded specific] - -Index: Imaging-1.1.7/setup.py -=================================================================== ---- Imaging-1.1.7.orig/setup.py -+++ Imaging-1.1.7/setup.py -@@ -34,10 +34,10 @@ def libinclude(root): - # TIFF_ROOT = libinclude("/opt/tiff") - - TCL_ROOT = None --JPEG_ROOT = None --ZLIB_ROOT = None -+JPEG_ROOT = os.environ['STAGING_LIBDIR'] -+ZLIB_ROOT = os.environ['STAGING_LIBDIR'] - TIFF_ROOT = None --FREETYPE_ROOT = None -+FREETYPE_ROOT = os.environ['STAGING_LIBDIR'], os.environ['STAGING_INCDIR'] - LCMS_ROOT = None - - # FIXME: add mechanism to explicitly *disable* the use of a library -@@ -207,14 +207,6 @@ class pil_build_ext(build_ext): - if os.path.isfile(os.path.join(tcl_dir, "tk.h")): - add_directory(include_dirs, tcl_dir) - -- # standard locations -- add_directory(library_dirs, "/usr/local/lib") -- add_directory(include_dirs, "/usr/local/include") -- -- add_directory(library_dirs, "/usr/lib") -- add_directory(include_dirs, "/usr/include") -- -- # - # insert new dirs *before* default libs, to avoid conflicts - # between Python PYD stub libs and real libraries - diff --git a/meta/recipes-devtools/python/python-imaging_1.1.7.bb b/meta/recipes-devtools/python/python-imaging_1.1.7.bb deleted file mode 100644 index ce3b977114..0000000000 --- a/meta/recipes-devtools/python/python-imaging_1.1.7.bb +++ /dev/null @@ -1,34 +0,0 @@ -DESCRIPTION = "Python Imaging Library" -SECTION = "devel/python" -PRIORITY = "optional" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://README;beginline=92;endline=120;md5=c4371af4579f1e489cf881c1443dd4ec" -DEPENDS = "freetype jpeg tiff" -RDEPENDS_${PN} = "python-lang python-stringold" -SRCNAME = "Imaging" -PR = "ml1" - -SRC_URI = "http://effbot.org/downloads/Imaging-${PV}.tar.gz \ - file://path.patch" - -SRC_URI[md5sum] = "fc14a54e1ce02a0225be8854bfba478e" -SRC_URI[sha256sum] = "895bc7c2498c8e1f9b99938f1a40dc86b3f149741f105cf7c7bd2e0725405211" -S = "${WORKDIR}/${SRCNAME}-${PV}" - -inherit distutils - -do_compile() { - export STAGING_LIBDIR=${STAGING_LIBDIR} - export STAGING_INCDIR=${STAGING_INCDIR} - distutils_do_compile -} - -do_install() { - export STAGING_LIBDIR=${STAGING_LIBDIR} - export STAGING_INCDIR=${STAGING_INCDIR} - distutils_do_install - install -d ${D}${datadir}/doc/${PN}/html/ - install -m 0644 ${S}/README ${D}${datadir}/doc/${PN}/ - install -m 0644 ${S}/Docs/* ${D}${datadir}/doc/${PN}/html/ - -} diff --git a/meta/recipes-devtools/python/python-mako.inc b/meta/recipes-devtools/python/python-mako.inc new file mode 100644 index 0000000000..10364db97c --- /dev/null +++ b/meta/recipes-devtools/python/python-mako.inc @@ -0,0 +1,15 @@ +SUMMARY = "Templating library for Python" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=1bb21fa2d2f7a534c884b990430a6863" + +SRC_URI = "https://files.pythonhosted.org/packages/source/M/Mako/Mako-${PV}.tar.gz" + +SRC_URI[md5sum] = "a28e22a339080316b2acc352b9ee631c" +SRC_URI[sha256sum] = "48559ebd872a8e77f92005884b3d88ffae552812cdf17db6768e5c3be5ebbe0d" + +UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/mako/" +UPSTREAM_CHECK_REGEX = "/Mako/(?P<pver>(\d+[\.\-_]*)+)" + +S = "${WORKDIR}/Mako-${PV}" + diff --git a/meta/recipes-devtools/python/python-mako_1.0.6.bb b/meta/recipes-devtools/python/python-mako_1.0.6.bb new file mode 100644 index 0000000000..230044e1a2 --- /dev/null +++ b/meta/recipes-devtools/python/python-mako_1.0.6.bb @@ -0,0 +1,17 @@ +require python-mako.inc + +inherit setuptools + +RDEPENDS_${PN} = "python-threading \ + python-netclient \ + python-html \ +" +RDEPENDS_${PN}_class-native = "" + +BBCLASSEXTEND = "native nativesdk" + +# The same utility is packaged in python3-mako, so it would conflict +do_install_append() { + rm -f ${D}${bindir}/mako-render + rmdir ${D}${bindir} +} diff --git a/meta/recipes-devtools/python/python-native-2.7-manifest.inc b/meta/recipes-devtools/python/python-native-2.7-manifest.inc new file mode 100644 index 0000000000..581a37ab14 --- /dev/null +++ b/meta/recipes-devtools/python/python-native-2.7-manifest.inc @@ -0,0 +1,10 @@ + +# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file. +# Generator: '../../../scripts/contrib/python/generate-manifest-2.7.py --native' Version 20110222.2 (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de> + + + +RPROVIDES+="python-2to3-native python-argparse-native python-audio-native python-bsddb-native python-codecs-native python-compile-native python-compiler-native python-compression-native python-contextlib-native python-core-native python-crypt-native python-ctypes-native python-curses-native python-datetime-native python-db-native python-debugger-native python-dev-native python-difflib-native python-distutils-native python-distutils-staticdev-native python-doctest-native python-email-native python-fcntl-native python-gdbm-native python-hotshot-native python-html-native python-idle-native python-image-native python-importlib-native python-io-native python-json-native python-lang-native python-logging-native python-mailbox-native python-math-native python-mime-native python-mmap-native python-multiprocessing-native python-netclient-native python-netserver-native python-numbers-native python-pickle-native python-pkgutil-native python-plistlib-native python-pprint-native python-profile-native python-pydoc-native python-re-native python-readline-native python-resource-native python-robotparser-native python-shell-native python-smtpd-native python-sqlite3-native python-sqlite3-tests-native python-stringold-native python-subprocess-native python-syslog-native python-terminal-native python-tests-native python-textutils-native python-threading-native python-tkinter-native python-unittest-native python-unixadmin-native python-xml-native python-xmlrpc-native python-zlib-native " + + + diff --git a/meta/recipes-devtools/python/python-native-3.5-manifest.inc b/meta/recipes-devtools/python/python-native-3.5-manifest.inc new file mode 100644 index 0000000000..10be3e9bb8 --- /dev/null +++ b/meta/recipes-devtools/python/python-native-3.5-manifest.inc @@ -0,0 +1,10 @@ + +# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file. +# Generator: '../../../scripts/contrib/python/generate-manifest-3.5.py --native' Version 20140131 (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de> + + + +RPROVIDES+="python3-2to3-native python3-argparse-native python3-asyncio-native python3-audio-native python3-codecs-native python3-compile-native python3-compression-native python3-core-native python3-crypt-native python3-ctypes-native python3-curses-native python3-datetime-native python3-db-native python3-debugger-native python3-dev-native python3-difflib-native python3-distutils-native python3-distutils-staticdev-native python3-doctest-native python3-email-native python3-enum-native python3-fcntl-native python3-gdbm-native python3-html-native python3-idle-native python3-image-native python3-importlib-native python3-io-native python3-json-native python3-lang-native python3-logging-native python3-mailbox-native python3-math-native python3-mime-native python3-mmap-native python3-multiprocessing-native python3-netclient-native python3-netserver-native python3-numbers-native python3-pickle-native python3-pkgutil-native python3-pprint-native python3-profile-native python3-pydoc-native python3-re-native python3-readline-native python3-reprlib-native python3-resource-native python3-selectors-native python3-shell-native python3-signal-native python3-smtpd-native python3-sqlite3-native python3-sqlite3-tests-native python3-stringold-native python3-subprocess-native python3-syslog-native python3-terminal-native python3-tests-native python3-textutils-native python3-threading-native python3-tkinter-native python3-typing-native python3-unittest-native python3-unixadmin-native python3-xml-native python3-xmlrpc-native " + + + diff --git a/meta/recipes-devtools/python/python-native/04-default-is-optimized.patch b/meta/recipes-devtools/python/python-native/04-default-is-optimized.patch deleted file mode 100644 index 8fe147e0ef..0000000000 --- a/meta/recipes-devtools/python/python-native/04-default-is-optimized.patch +++ /dev/null @@ -1,20 +0,0 @@ -Upstream-Status: Inappropriate [embedded specific] - -# When compiling for an embedded system, we need every bit of -# performance we can get. default to optimized with the option -# of opt-out. -# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de> - -Index: Python-2.6.1/Python/compile.c -=================================================================== ---- Python-2.6.1.orig/Python/compile.c -+++ Python-2.6.1/Python/compile.c -@@ -32,7 +32,7 @@ - #include "symtable.h" - #include "opcode.h" - --int Py_OptimizeFlag = 0; -+int Py_OptimizeFlag = 1; - - #define DEFAULT_BLOCK_SIZE 16 - #define DEFAULT_BLOCKS 8 diff --git a/meta/recipes-devtools/python/python-native/12-distutils-prefix-is-inside-staging-area.patch b/meta/recipes-devtools/python/python-native/12-distutils-prefix-is-inside-staging-area.patch deleted file mode 100644 index 9532eb3ad9..0000000000 --- a/meta/recipes-devtools/python/python-native/12-distutils-prefix-is-inside-staging-area.patch +++ /dev/null @@ -1,62 +0,0 @@ -Upstream-Status: Inappropriate [embedded specific] - -# The proper prefix is inside our staging area. -# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de> - -Index: Python-2.6.6/Lib/distutils/sysconfig.py -=================================================================== ---- Python-2.6.6.orig/Lib/distutils/sysconfig.py -+++ Python-2.6.6/Lib/distutils/sysconfig.py -@@ -19,8 +19,8 @@ import sys - from distutils.errors import DistutilsPlatformError - - # These are needed in a couple of spots, so just compute them once. --PREFIX = os.path.normpath(sys.prefix) --EXEC_PREFIX = os.path.normpath(sys.exec_prefix) -+PREFIX = os.path.normpath(sys.prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") ) -+EXEC_PREFIX = os.path.normpath(sys.exec_prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") ) - - # Path to the base directory of the project. On Windows the binary may - # live in project/PCBuild9. If we're dealing with an x64 Windows build, -@@ -70,7 +70,10 @@ def get_python_inc(plat_specific=0, pref - sys.exec_prefix -- i.e., ignore 'plat_specific'. - """ - if prefix is None: -- prefix = plat_specific and EXEC_PREFIX or PREFIX -+ if plat_specific: -+ prefix = plat_specific and os.environ['STAGING_INCDIR'].rstrip('include') -+ else: -+ prefix = plat_specific and EXEC_PREFIX or PREFIX - - if os.name == "posix": - if python_build: -@@ -116,7 +119,10 @@ def get_python_lib(plat_specific=0, stan - sys.exec_prefix -- i.e., ignore 'plat_specific'. - """ - if prefix is None: -- prefix = plat_specific and EXEC_PREFIX or PREFIX -+ if plat_specific: -+ prefix = plat_specific and os.environ['STAGING_LIBDIR'].rstrip('lib') -+ else: -+ prefix = plat_specific and EXEC_PREFIX or PREFIX - - if os.name == "posix": - libpython = os.path.join(prefix, -@@ -216,7 +222,7 @@ def get_config_h_filename(): - else: - # The name of the config.h file changed in 2.2 - config_h = 'pyconfig.h' -- return os.path.join(inc_dir, config_h) -+ return os.path.join(inc_dir, config_h).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") ) - - - def get_makefile_filename(): -@@ -225,7 +231,7 @@ def get_makefile_filename(): - return os.path.join(os.path.dirname(os.path.realpath(sys.executable)), - "Makefile") - lib_dir = get_python_lib(plat_specific=1, standard_lib=1) -- return os.path.join(lib_dir, "config", "Makefile") -+ return os.path.join(lib_dir, "config", "Makefile").replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") ) - - - def parse_config_h(fp, g=None): diff --git a/meta/recipes-devtools/python/python-native/debug.patch b/meta/recipes-devtools/python/python-native/debug.patch index 5ec10d6b20..3617882640 100644 --- a/meta/recipes-devtools/python/python-native/debug.patch +++ b/meta/recipes-devtools/python/python-native/debug.patch @@ -1,24 +1,27 @@ Upstream-Status: Pending -Index: Python-2.6.1/Lib/distutils/unixccompiler.py +Index: Python-2.7.12/Lib/distutils/unixccompiler.py =================================================================== ---- Python-2.6.1.orig/Lib/distutils/unixccompiler.py 2009-11-13 16:04:54.000000000 +0000 -+++ Python-2.6.1/Lib/distutils/unixccompiler.py 2009-11-13 16:06:27.000000000 +0000 -@@ -300,6 +300,8 @@ - dylib_f = self.library_filename(lib, lib_type='dylib') - static_f = self.library_filename(lib, lib_type='static') +--- Python-2.7.12.orig/Lib/distutils/unixccompiler.py ++++ Python-2.7.12/Lib/distutils/unixccompiler.py +@@ -278,6 +278,8 @@ class UnixCCompiler(CCompiler): + + + print "Looking in %s for %s" % (lib, dirs) + for dir in dirs: shared = os.path.join(dir, shared_f) dylib = os.path.join(dir, dylib_f) -@@ -309,10 +311,13 @@ +@@ -298,12 +300,16 @@ class UnixCCompiler(CCompiler): # assuming that *all* Unix C compilers do. And of course I'm # ignoring even GCC's "-static" option. So sue me. if os.path.exists(dylib): + print "Found %s" % (dylib) return dylib + elif os.path.exists(xcode_stub): ++ print "Found %s" % (xcode_stub) + return xcode_stub elif os.path.exists(shared): + print "Found %s" % (shared) return shared diff --git a/meta/recipes-devtools/python/python-native/multilib.patch b/meta/recipes-devtools/python/python-native/multilib.patch new file mode 100644 index 0000000000..ad46085094 --- /dev/null +++ b/meta/recipes-devtools/python/python-native/multilib.patch @@ -0,0 +1,235 @@ +Rebased for Python 2.7.9 + +Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> + +2011/09/29 +The python recipe building was failing because python-native +could not handle sys.lib var. sys.lib var is defined in the +multilib patch hence added this multilib.patch for python-native +recipe. + +Upstream-Status: Inappropriate [oe-specific] + +Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> + +Index: Python-2.7.13/Include/pythonrun.h +=================================================================== +--- Python-2.7.13.orig/Include/pythonrun.h ++++ Python-2.7.13/Include/pythonrun.h +@@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void); + /* In their own files */ + PyAPI_FUNC(const char *) Py_GetVersion(void); + PyAPI_FUNC(const char *) Py_GetPlatform(void); ++PyAPI_FUNC(const char *) Py_GetLib(void); + PyAPI_FUNC(const char *) Py_GetCopyright(void); + PyAPI_FUNC(const char *) Py_GetCompiler(void); + PyAPI_FUNC(const char *) Py_GetBuildInfo(void); +Index: Python-2.7.13/Lib/distutils/command/install.py +=================================================================== +--- Python-2.7.13.orig/Lib/distutils/command/install.py ++++ Python-2.7.13/Lib/distutils/command/install.py +@@ -22,6 +22,8 @@ from site import USER_BASE + from site import USER_SITE + + ++libname = sys.lib ++ + if sys.version < "2.2": + WINDOWS_SCHEME = { + 'purelib': '$base', +@@ -42,7 +44,7 @@ else: + INSTALL_SCHEMES = { + 'unix_prefix': { + 'purelib': '$base/lib/python$py_version_short/site-packages', +- 'platlib': '$platbase/lib/python$py_version_short/site-packages', ++ 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages', + 'headers': '$base/include/python$py_version_short/$dist_name', + 'scripts': '$base/bin', + 'data' : '$base', +Index: Python-2.7.13/Lib/pydoc.py +=================================================================== +--- Python-2.7.13.orig/Lib/pydoc.py ++++ Python-2.7.13/Lib/pydoc.py +@@ -375,7 +375,7 @@ class Doc: + docmodule = docclass = docroutine = docother = docproperty = docdata = fail + + def getdocloc(self, object, +- basedir=os.path.join(sys.exec_prefix, "lib", ++ basedir=os.path.join(sys.exec_prefix, "sys.lib", + "python"+sys.version[0:3])): + """Return the location of module docs or None""" + +Index: Python-2.7.13/Lib/site.py +=================================================================== +--- Python-2.7.13.orig/Lib/site.py ++++ Python-2.7.13/Lib/site.py +@@ -288,13 +288,19 @@ def getsitepackages(): + if sys.platform in ('os2emx', 'riscos'): + sitepackages.append(os.path.join(prefix, "Lib", "site-packages")) + elif os.sep == '/': +- sitepackages.append(os.path.join(prefix, "lib", ++ sitepackages.append(os.path.join(prefix, sys.lib, + "python" + sys.version[:3], + "site-packages")) +- sitepackages.append(os.path.join(prefix, "lib", "site-python")) ++ if sys.lib != "lib": ++ sitepackages.append(os.path.join(prefix, "lib", ++ "python" + sys.version[:3], ++ "site-packages")) ++ sitepackages.append(os.path.join(prefix, sys.lib, "site-python")) ++ if sys.lib != "lib": ++ sitepackages.append(os.path.join(prefix, "lib", "site-python")) + else: + sitepackages.append(prefix) +- sitepackages.append(os.path.join(prefix, "lib", "site-packages")) ++ sitepackages.append(os.path.join(prefix, sys.lib, "site-packages")) + return sitepackages + + def addsitepackages(known_paths): +Index: Python-2.7.13/Lib/test/test_dl.py +=================================================================== +--- Python-2.7.13.orig/Lib/test/test_dl.py ++++ Python-2.7.13/Lib/test/test_dl.py +@@ -4,10 +4,11 @@ + import unittest + from test.test_support import verbose, import_module + dl = import_module('dl', deprecated=True) ++import sys + + sharedlibs = [ +- ('/usr/lib/libc.so', 'getpid'), +- ('/lib/libc.so.6', 'getpid'), ++ ('/usr/'+sys.lib+'/libc.so', 'getpid'), ++ ('/'+sys.lib+'/libc.so.6', 'getpid'), + ('/usr/bin/cygwin1.dll', 'getpid'), + ('/usr/lib/libc.dylib', 'getpid'), + ] +Index: Python-2.7.13/Lib/trace.py +=================================================================== +--- Python-2.7.13.orig/Lib/trace.py ++++ Python-2.7.13/Lib/trace.py +@@ -754,10 +754,10 @@ def main(argv=None): + # should I also call expanduser? (after all, could use $HOME) + + s = s.replace("$prefix", +- os.path.join(sys.prefix, "lib", ++ os.path.join(sys.prefix, sys.lib, + "python" + sys.version[:3])) + s = s.replace("$exec_prefix", +- os.path.join(sys.exec_prefix, "lib", ++ os.path.join(sys.exec_prefix, sys.lib, + "python" + sys.version[:3])) + s = os.path.normpath(s) + ignore_dirs.append(s) +Index: Python-2.7.13/Makefile.pre.in +=================================================================== +--- Python-2.7.13.orig/Makefile.pre.in ++++ Python-2.7.13/Makefile.pre.in +@@ -92,6 +92,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG + + # Machine-dependent subdirectories + MACHDEP= @MACHDEP@ ++LIB= @LIB@ + + # Multiarch directory (may be empty) + MULTIARCH= @MULTIARCH@ +@@ -111,7 +112,7 @@ LIBDIR= @libdir@ + MANDIR= @mandir@ + INCLUDEDIR= @includedir@ + CONFINCLUDEDIR= $(exec_prefix)/include +-SCRIPTDIR= $(prefix)/lib ++SCRIPTDIR= $(prefix)/@LIB@ + + # Detailed destination directories + BINLIBDEST= $(LIBDIR)/python$(VERSION) +@@ -668,6 +669,7 @@ Modules/getpath.o: $(srcdir)/Modules/get + -DEXEC_PREFIX='"$(exec_prefix)"' \ + -DVERSION='"$(VERSION)"' \ + -DVPATH='"$(VPATH)"' \ ++ -DLIB='"$(LIB)"' \ + -o $@ $(srcdir)/Modules/getpath.c + + Modules/python.o: $(srcdir)/Modules/python.c +@@ -708,7 +710,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES) + Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H) + + Python/getplatform.o: $(srcdir)/Python/getplatform.c +- $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c ++ $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -DLIB='"$(LIB)"' -o $@ $(srcdir)/Python/getplatform.c + + Python/importdl.o: $(srcdir)/Python/importdl.c + $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c +Index: Python-2.7.13/Modules/getpath.c +=================================================================== +--- Python-2.7.13.orig/Modules/getpath.c ++++ Python-2.7.13/Modules/getpath.c +@@ -100,6 +100,13 @@ + #error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined" + #endif + ++#define LIB_PYTHON LIB "/python" VERSION ++ ++#ifndef PYTHONPATH ++#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \ ++ EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload" ++#endif ++ + #ifndef LANDMARK + #define LANDMARK "os.py" + #endif +@@ -108,7 +115,7 @@ static char prefix[MAXPATHLEN+1]; + static char exec_prefix[MAXPATHLEN+1]; + static char progpath[MAXPATHLEN+1]; + static char *module_search_path = NULL; +-static char lib_python[] = "lib/python" VERSION; ++static char lib_python[] = LIB_PYTHON; + + static void + reduce(char *dir) +Index: Python-2.7.13/Python/getplatform.c +=================================================================== +--- Python-2.7.13.orig/Python/getplatform.c ++++ Python-2.7.13/Python/getplatform.c +@@ -10,3 +10,13 @@ Py_GetPlatform(void) + { + return PLATFORM; + } ++ ++#ifndef LIB ++#define LIB "lib" ++#endif ++ ++const char * ++Py_GetLib(void) ++{ ++ return LIB; ++} +Index: Python-2.7.13/Python/sysmodule.c +=================================================================== +--- Python-2.7.13.orig/Python/sysmodule.c ++++ Python-2.7.13/Python/sysmodule.c +@@ -1437,6 +1437,8 @@ _PySys_Init(void) + PyString_FromString(Py_GetCopyright())); + SET_SYS_FROM_STRING("platform", + PyString_FromString(Py_GetPlatform())); ++ SET_SYS_FROM_STRING("lib", ++ PyString_FromString(Py_GetLib())); + SET_SYS_FROM_STRING("executable", + PyString_FromString(Py_GetProgramFullPath())); + SET_SYS_FROM_STRING("prefix", +Index: Python-2.7.13/configure.ac +=================================================================== +--- Python-2.7.13.orig/configure.ac ++++ Python-2.7.13/configure.ac +@@ -759,6 +759,11 @@ SunOS*) + ;; + esac + ++AC_SUBST(LIB) ++AC_MSG_CHECKING(LIB) ++LIB=`basename ${libdir}` ++AC_MSG_RESULT($LIB) ++ + + AC_SUBST(LIBRARY) + AC_MSG_CHECKING(LIBRARY) diff --git a/meta/recipes-devtools/python/python-native/nohostlibs.patch b/meta/recipes-devtools/python/python-native/nohostlibs.patch index aed45c9913..078060b49e 100644 --- a/meta/recipes-devtools/python/python-native/nohostlibs.patch +++ b/meta/recipes-devtools/python/python-native/nohostlibs.patch @@ -1,27 +1,40 @@ Upstream-Status: Inappropriate [embedded specific] -Index: Python-2.6.6/setup.py +2014/12/15 +Rebased for python-2.7.9 +Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> +Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> + +Index: Python-2.7.9/setup.py =================================================================== ---- Python-2.6.6.orig/setup.py -+++ Python-2.6.6/setup.py -@@ -356,8 +356,8 @@ class PyBuildExt(build_ext): +--- Python-2.7.9.orig/setup.py ++++ Python-2.7.9/setup.py +@@ -439,9 +439,9 @@ class PyBuildExt(build_ext): def detect_modules(self): # Ensure that /usr/local is always used -- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') -- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') -+ #add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') -+ #add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') - - # Add paths specified in the environment variables LDFLAGS and - # CPPFLAGS for header and library files. -@@ -393,10 +393,10 @@ class PyBuildExt(build_ext): +- if not cross_compiling: +- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') +- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') ++ # if not cross_compiling: ++ # add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') ++ # add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') + if cross_compiling: + self.add_gcc_paths() + self.add_multiarch_paths() +@@ -480,15 +480,15 @@ class PyBuildExt(build_ext): for directory in reversed(options.dirs): add_dir_to_list(dir_list, directory) -- if os.path.normpath(sys.prefix) != '/usr': +- if os.path.normpath(sys.prefix) != '/usr' \ +- and not sysconfig.get_config_var('PYTHONFRAMEWORK'): ++ #if os.path.normpath(sys.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 + # building a framework with different architectures than + # the one that is currently installed (issue #7473) - add_dir_to_list(self.compiler.library_dirs, -+ + add_dir_to_list(self.compiler.library_dirs, sysconfig.get_config_var("LIBDIR")) - add_dir_to_list(self.compiler.include_dirs, @@ -29,27 +42,13 @@ Index: Python-2.6.6/setup.py sysconfig.get_config_var("INCLUDEDIR")) try: -@@ -407,11 +407,8 @@ class PyBuildExt(build_ext): - # lib_dirs and inc_dirs are used to search for files; - # if a file is found in one of those directories, it can - # be assumed that no additional -I,-L directives are needed. -- lib_dirs = self.compiler.library_dirs + [ -- '/lib64', '/usr/lib64', -- '/lib', '/usr/lib', -- ] -- inc_dirs = self.compiler.include_dirs + ['/usr/include'] -+ lib_dirs = self.compiler.library_dirs -+ inc_dirs = self.compiler.include_dirs - exts = [] - missing = [] - -@@ -661,8 +658,7 @@ class PyBuildExt(build_ext): +@@ -761,8 +761,7 @@ class PyBuildExt(build_ext): pass # Issue 7384: Already linked against curses or tinfo. elif curses_library: readline_libs.append(curses_library) - elif self.compiler.find_library_file(lib_dirs + -- ['/usr/lib/termcap'], +- ['/usr/lib/termcap'], + elif self.compiler.find_library_file(lib_dirs, - 'termcap'): + 'termcap'): readline_libs.append('termcap') exts.append( Extension('readline', ['readline.c'], diff --git a/meta/recipes-devtools/python/python-native/revert_use_of_sysconfigdata.patch b/meta/recipes-devtools/python/python-native/revert_use_of_sysconfigdata.patch new file mode 100644 index 0000000000..202aaf1069 --- /dev/null +++ b/meta/recipes-devtools/python/python-native/revert_use_of_sysconfigdata.patch @@ -0,0 +1,86 @@ +On older versions of Python, sysconfig read the data from both the Makefile and +the Python.h file generated at build time, created dictionaries with their variables +and used those when using get_config_var(), now it uses _sysconfigdata.build_time_vars[] +which contains information from the HOST, erroneous in our case, this patch reverts this +behavior and uses Python.h and Makefile to get information. + +Upstream-Status: Inappropriate [oe-specific] + +Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> + +Index: Python-2.7.9/Lib/distutils/sysconfig.py +=================================================================== +--- Python-2.7.9.orig/Lib/distutils/sysconfig.py ++++ Python-2.7.9/Lib/distutils/sysconfig.py +@@ -401,12 +401,66 @@ _config_vars = None + + def _init_posix(): + """Initialize the module as appropriate for POSIX systems.""" +- # _sysconfigdata is generated at build time, see the sysconfig module +- from _sysconfigdata import build_time_vars +- global _config_vars +- _config_vars = {} +- _config_vars.update(build_time_vars) ++ g = {} ++ # load the installed Makefile: ++ try: ++ filename = get_makefile_filename() ++ parse_makefile(filename, g) ++ except IOError, msg: ++ my_msg = "invalid Python installation: unable to open %s" % filename ++ if hasattr(msg, "strerror"): ++ my_msg = my_msg + " (%s)" % msg.strerror ++ ++ raise DistutilsPlatformError(my_msg) ++ ++ # load the installed pyconfig.h: ++ try: ++ filename = get_config_h_filename() ++ parse_config_h(file(filename), g) ++ except IOError, msg: ++ my_msg = "invalid Python installation: unable to open %s" % filename ++ if hasattr(msg, "strerror"): ++ my_msg = my_msg + " (%s)" % msg.strerror ++ ++ raise DistutilsPlatformError(my_msg) ++ ++ # On AIX, there are wrong paths to the linker scripts in the Makefile ++ # -- these paths are relative to the Python source, but when installed ++ # the scripts are in another directory. ++ if python_build: ++ g['LDSHARED'] = g['BLDSHARED'] + ++ elif get_python_version() < '2.1': ++ # The following two branches are for 1.5.2 compatibility. ++ if sys.platform == 'aix4': # what about AIX 3.x ? ++ # Linker script is in the config directory, not in Modules as the ++ # Makefile says. ++ python_lib = get_python_lib(standard_lib=1) ++ ld_so_aix = os.path.join(python_lib, 'config', 'ld_so_aix') ++ python_exp = os.path.join(python_lib, 'config', 'python.exp') ++ ++ g['LDSHARED'] = "%s %s -bI:%s" % (ld_so_aix, g['CC'], python_exp) ++ ++ elif sys.platform == 'beos': ++ # Linker script is in the config directory. In the Makefile it is ++ # relative to the srcdir, which after installation no longer makes ++ # sense. ++ python_lib = get_python_lib(standard_lib=1) ++ linkerscript_path = string.split(g['LDSHARED'])[0] ++ linkerscript_name = os.path.basename(linkerscript_path) ++ linkerscript = os.path.join(python_lib, 'config', ++ linkerscript_name) ++ ++ # XXX this isn't the right place to do this: adding the Python ++ # library to the link, if needed, should be in the "build_ext" ++ # command. (It's also needed for non-MS compilers on Windows, and ++ # it's taken care of for them by the 'build_ext.get_libraries()' ++ # method.) ++ g['LDSHARED'] = ("%s -L%s/lib -lpython%s" % ++ (linkerscript, PREFIX, get_python_version())) ++ ++ global _config_vars ++ _config_vars = g + + def _init_nt(): + """Initialize the module as appropriate for NT""" diff --git a/meta/recipes-devtools/python/python-native/unixccompiler.patch b/meta/recipes-devtools/python/python-native/unixccompiler.patch new file mode 100644 index 0000000000..4502829129 --- /dev/null +++ b/meta/recipes-devtools/python/python-native/unixccompiler.patch @@ -0,0 +1,20 @@ +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. + +Signed-off-by: Mei Lei <lei.mei@intel.com> +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Index: Python-2.7.2/Lib/distutils/unixccompiler.py +=================================================================== +--- Python-2.7.2.orig/Lib/distutils/unixccompiler.py 2011-11-24 13:51:10.539998722 -0800 ++++ Python-2.7.2/Lib/distutils/unixccompiler.py 2011-11-24 15:54:36.872137766 -0800 +@@ -282,7 +282,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 diff --git a/meta/recipes-devtools/python/python-native_2.6.6.bb b/meta/recipes-devtools/python/python-native_2.6.6.bb deleted file mode 100644 index 0f9ae10e5a..0000000000 --- a/meta/recipes-devtools/python/python-native_2.6.6.bb +++ /dev/null @@ -1,39 +0,0 @@ -require python.inc -DEPENDS = "openssl-native bzip2-full-native zlib-native readline-native sqlite3-native" -PR = "${INC_PR}.1" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=38fdd546420fab09ac6bd3d8a1c83eb6" - -SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \ - file://04-default-is-optimized.patch \ - file://05-enable-ctypes-cross-build.patch \ - file://06-ctypes-libffi-fix-configure.patch \ - file://10-distutils-fix-swig-parameter.patch \ - file://11-distutils-never-modify-shebang-line.patch \ - file://12-distutils-prefix-is-inside-staging-area.patch \ - file://debug.patch \ - file://nohostlibs.patch" -S = "${WORKDIR}/Python-${PV}" - -SRC_URI[md5sum] = "cf4e6881bb84a7ce6089e4a307f71f14" -SRC_URI[sha256sum] = "134c5e0736bae2e5570d0b915693374f11108ded63c35a23a35d282737d2ce83" - -inherit native - -EXTRA_OEMAKE = '\ - BUILD_SYS="" \ - HOST_SYS="" \ - LIBC="" \ - STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \ - STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \ -' - -do_configure_prepend() { - autoreconf --verbose --install --force --exclude=autopoint Modules/_ctypes/libffi || bbnote "_ctypes failed to autoreconf" -} - -do_install() { - oe_runmake 'DESTDIR=${D}' install - install -d ${D}${bindir}/ - install -m 0755 Parser/pgen ${D}${bindir}/ -} diff --git a/meta/recipes-devtools/python/python-native_2.7.13.bb b/meta/recipes-devtools/python/python-native_2.7.13.bb new file mode 100644 index 0000000000..7edf153489 --- /dev/null +++ b/meta/recipes-devtools/python/python-native_2.7.13.bb @@ -0,0 +1,61 @@ +require python.inc + +EXTRANATIVEPATH += "bzip2-native" +DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native expat-native" +PR = "${INC_PR}.1" + +SRC_URI += "\ + file://05-enable-ctypes-cross-build.patch \ + file://10-distutils-fix-swig-parameter.patch \ + file://11-distutils-never-modify-shebang-line.patch \ + file://0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch \ + file://debug.patch \ + file://unixccompiler.patch \ + file://nohostlibs.patch \ + file://multilib.patch \ + file://add-md5module-support.patch \ + file://builddir.patch \ + file://parallel-makeinst-create-bindir.patch \ + file://revert_use_of_sysconfigdata.patch \ + " + +S = "${WORKDIR}/Python-${PV}" + +FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:" + +inherit native + +require python-native-${PYTHON_MAJMIN}-manifest.inc + +EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --with-system-expat=${STAGING_DIR_HOST}" + +EXTRA_OEMAKE = '\ + LIBC="" \ + STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \ + STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \ +' + +do_configure_append() { + autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi +} + +do_install() { + oe_runmake 'DESTDIR=${D}' install + 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 + + # Add a symlink to the native Python so that scripts can just invoke + # "nativepython" and get the right one without needing absolute paths + # (these often end up too long for the #! parser in the kernel as the + # buffer is 128 bytes long). + ln -s python-native/python ${D}${bindir}/nativepython + + # We don't want modules in ~/.local being used in preference to those + # installed in the native sysroot, so disable user site support. + sed -i -e 's,^\(ENABLE_USER_SITE = \).*,\1False,' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py +} diff --git a/meta/recipes-devtools/python/python-nose_1.3.7.bb b/meta/recipes-devtools/python/python-nose_1.3.7.bb new file mode 100644 index 0000000000..3757f3a8b7 --- /dev/null +++ b/meta/recipes-devtools/python/python-nose_1.3.7.bb @@ -0,0 +1,24 @@ +SUMMARY = "Extends Python unittest to make testing easier" +DESCRIPTION = "nose extends the test loading and running features of unittest, \ +making it easier to write, find and run tests." +SECTION = "devel/python" +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://lgpl.txt;md5=a6f89e2100d9b6cdffcea4f398e37343" + +SRC_URI = "https://files.pythonhosted.org/packages/source/n/nose/nose-${PV}.tar.gz" + +SRC_URI[md5sum] = "4d3ad0ff07b61373d2cefc89c5d0b20b" +SRC_URI[sha256sum] = "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98" + +UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/nose/" +UPSTREAM_CHECK_REGEX = "/nose/(?P<pver>(\d+[\.\-_]*)+)" + +S = "${WORKDIR}/nose-${PV}" + +inherit setuptools + +RDEPENDS_${PN} = "\ + python-unittest \ + " + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-devtools/python/python-pexpect_4.2.1.bb b/meta/recipes-devtools/python/python-pexpect_4.2.1.bb new file mode 100644 index 0000000000..1321797ef9 --- /dev/null +++ b/meta/recipes-devtools/python/python-pexpect_4.2.1.bb @@ -0,0 +1,28 @@ +SUMMARY = "A Pure Python Expect like Module for Python" +HOMEPAGE = "http://pexpect.readthedocs.org/" +SECTION = "devel/python" +LICENSE = "ISC" +LIC_FILES_CHKSUM = "file://LICENSE;md5=1c7a725251880af8c6a148181665385b" + +SRCNAME = "pexpect" + +SRC_URI = "https://files.pythonhosted.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz" +SRC_URI[md5sum] = "3694410001a99dff83f0b500a1ca1c95" +SRC_URI[sha256sum] = "3d132465a75b57aa818341c6521392a06cc660feb3988d7f1074f39bd23c9a92" + +UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/pexpect" + +S = "${WORKDIR}/pexpect-${PV}" + +inherit setuptools + +RDEPENDS_${PN} = "\ + python-core \ + python-io \ + python-terminal \ + python-resource \ + python-fcntl \ + python-ptyprocess \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-devtools/python/python-ptyprocess_0.5.1.bb b/meta/recipes-devtools/python/python-ptyprocess_0.5.1.bb new file mode 100644 index 0000000000..eed24ad2ec --- /dev/null +++ b/meta/recipes-devtools/python/python-ptyprocess_0.5.1.bb @@ -0,0 +1,23 @@ +SUMMARY = "Run a subprocess in a pseudo terminal" +HOMEPAGE = "http://ptyprocess.readthedocs.io/en/latest/" +SECTION = "devel/python" +LICENSE = "ISC" +LIC_FILES_CHKSUM = "file://LICENSE;md5=cfdcd51fa7d5808da4e74346ee394490" + +SRCNAME = "ptyprocess" + +SRC_URI = "https://files.pythonhosted.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz" +SRC_URI[md5sum] = "94e537122914cc9ec9c1eadcd36e73a1" +SRC_URI[sha256sum] = "0530ce63a9295bfae7bd06edc02b6aa935619f486f0f1dc0972f516265ee81a6" + +UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/ptyprocess" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit setuptools + +RDEPENDS_${PN} = "\ + python-core \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-devtools/python/python-pycairo_1.8.10.bb b/meta/recipes-devtools/python/python-pycairo_1.8.10.bb deleted file mode 100644 index b76724ea33..0000000000 --- a/meta/recipes-devtools/python/python-pycairo_1.8.10.bb +++ /dev/null @@ -1,31 +0,0 @@ -DESCRIPTION = "Python Bindings for the Cairo canvas library" -HOMEPAGE = "http://cairographics.org/pycairo" -BUGTRACKER = "http://bugs.freedesktop.org" -SECTION = "python-devel" -LICENSE = "LGPLv2.1 & MPL-1" -LIC_FILES_CHKSUM = "file://COPYING;md5=f2e071ab72978431b294a0d696327421" -# cairo >= 1.8.8 -DEPENDS = "cairo" -PR = "r1" - -SRC_URI = "http://cairographics.org/releases/py2cairo-${PV}.tar.gz" - -SRC_URI[md5sum] = "87421a6a70304120555ba7ba238f3dc3" -SRC_URI[sha256sum] = "b15f71019e42e06d86f7e8fe5587f07c3de5a59a6c3a071b25fe100796dbcd56" -S = "${WORKDIR}/pycairo-${PV}" - -inherit distutils pkgconfig - -do_compile_prepend() { -#fix the installation path of __init__.py -#It was going in the sysroot instead of target install location - sed -i -e "s#dsy.get_python_lib()#'${D}${PYTHON_SITEPACKAGES_DIR}'#" ${S}/setup.py -} - -do_install_append () { - install -d ${D}${includedir} - install -d ${D}${libdir} - mv ${D}${datadir}/include/* ${D}${includedir} - mv ${D}${datadir}/lib/* ${D}${libdir} - sed -i -e 's#prefix=.*#prefix=${prefix}#' ${D}${libdir}/pkgconfig/pycairo.pc -} diff --git a/meta/recipes-devtools/python/python-pycurl.inc b/meta/recipes-devtools/python/python-pycurl.inc new file mode 100644 index 0000000000..d26318b6d2 --- /dev/null +++ b/meta/recipes-devtools/python/python-pycurl.inc @@ -0,0 +1,31 @@ +SUMMARY = "Python bindings for libcurl" +HOMEPAGE = "http://pycurl.sourceforge.net/" +SECTION = "devel/python" +LICENSE = "LGPLv2.1+ | MIT" +LIC_FILES_CHKSUM = "file://README.rst;beginline=166;endline=182;md5=a84a1caa65b89d4584b693d3680062fb \ + file://COPYING-LGPL;md5=3579a9fd0221d49a237aaa33492f988c \ + file://COPYING-MIT;md5=b7e434aeb228ed731c00bcf177e79b19" + +DEPENDS = "curl ${PYTHON_PN}" +RDEPENDS_${PN} = "${PYTHON_PN}-core curl" +SRCNAME = "pycurl" + +SRC_URI = "\ + http://${SRCNAME}.sourceforge.net/download/${SRCNAME}-${PV}.tar.gz;name=archive \ + file://no-static-link.patch \ +" + +SRC_URI[archive.md5sum] = "bca7bf47320082588db544ced2ba8717" +SRC_URI[archive.sha256sum] = "8a1e0eb55573388275a1d6c2534ca4cfca5d7fa772b99b505c08fa149b27aed0" +S = "${WORKDIR}/${SRCNAME}-${PV}" + +BBCLASSEXTEND = "native" + +# Ensure the docstrings are generated as make clean will remove them +do_compile_prepend() { + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py docstrings +} + +do_install_append() { + rm -rf ${D}${datadir}/share +} diff --git a/meta/recipes-devtools/python/python-pycurl/no-static-link.patch b/meta/recipes-devtools/python/python-pycurl/no-static-link.patch index c97f5dc029..212779ca37 100644 --- a/meta/recipes-devtools/python/python-pycurl/no-static-link.patch +++ b/meta/recipes-devtools/python/python-pycurl/no-static-link.patch @@ -1,16 +1,17 @@ Upstream-Status: Pending -Index: pycurl-7.18.2/setup.py -=================================================================== ---- pycurl-7.18.2.orig/setup.py -+++ pycurl-7.18.2/setup.py -@@ -97,8 +97,7 @@ else: - else: - extra_compile_args.append(e) - libs = split_quoted( -- os.popen("'%s' --libs" % CURL_CONFIG).read()+\ -- os.popen("'%s' --static-libs" % CURL_CONFIG).read()) -+ os.popen("'%s' --libs" % CURL_CONFIG).read()) - for e in libs: - if e[:2] == "-l": - libraries.append(e[2:]) +Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> +Signed-off-by: Maxin B. John <maxin.john@intel.com> +--- +diff -Naur pycurl-7.19.5.2-orig/setup.py pycurl-7.19.5.2/setup.py +--- pycurl-7.19.5.2-orig/setup.py 2015-11-02 15:42:24.000000000 +0200 ++++ pycurl-7.19.5.2/setup.py 2015-11-02 17:59:36.121527273 +0200 +@@ -154,7 +154,7 @@ + optbuf = '' + sslhintbuf = '' + errtext = '' +- for option in ["--libs", "--static-libs"]: ++ for option in ["--libs"]: + p = subprocess.Popen((CURL_CONFIG, option), + stdout=subprocess.PIPE, stderr=subprocess.PIPE) + stdout, stderr = p.communicate() diff --git a/meta/recipes-devtools/python/python-pycurl_7.19.0.bb b/meta/recipes-devtools/python/python-pycurl_7.19.0.bb deleted file mode 100644 index b868ad8cde..0000000000 --- a/meta/recipes-devtools/python/python-pycurl_7.19.0.bb +++ /dev/null @@ -1,32 +0,0 @@ -DESCRIPTION = "libcurl python bindings." -HOMEPAGE = "http://pycurl.sourceforge.net/" -SECTION = "devel/python" -PRIORITY = "optional" -LICENSE = "LGPLv2.1+ | MIT" -LIC_FILES_CHKSUM = "file://README;endline=13;md5=fbfe545b1869617123a08c0983ef17b2 \ - file://COPYING;md5=3579a9fd0221d49a237aaa33492f988c \ - file://COPYING2;md5=ffaa1e283b7f9bf5aafd8d45db6f7518" - -DEPENDS = "curl python" -RDEPENDS_${PN} = "python-core curl" -SRCNAME = "pycurl" -PR = "r1" - -SRC_URI = "\ - http://${SRCNAME}.sourceforge.net/download/${SRCNAME}-${PV}.tar.gz;name=archive \ - file://no-static-link.patch;patch=1 \ -" - -SRC_URI[archive.md5sum] = "919d58fe37e69fe87ce4534d8b6a1c7b" -SRC_URI[archive.sha256sum] = "eb782dfcc5a7c023539a077462b83c167e178128ee9f7201665b9fbb1a8b0642" -S = "${WORKDIR}/${SRCNAME}-${PV}" - -inherit distutils - -# need to export these variables for python-config to work -export BUILD_SYS -export HOST_SYS -export STAGING_INCDIR -export STAGING_LIBDIR - -BBCLASSEXTEND = "native" diff --git a/meta/recipes-devtools/python/python-pycurl_7.21.5.bb b/meta/recipes-devtools/python/python-pycurl_7.21.5.bb new file mode 100644 index 0000000000..eb70cea663 --- /dev/null +++ b/meta/recipes-devtools/python/python-pycurl_7.21.5.bb @@ -0,0 +1,3 @@ +require python-pycurl.inc + +inherit distutils diff --git a/meta/recipes-devtools/python/python-pygobject/generate-constants.patch b/meta/recipes-devtools/python/python-pygobject/generate-constants.patch deleted file mode 100644 index be2ecd3b7c..0000000000 --- a/meta/recipes-devtools/python/python-pygobject/generate-constants.patch +++ /dev/null @@ -1,20 +0,0 @@ -Upstream-Status: Pending - -Index: pygobject-2.14.2/gobject/Makefile.am -=================================================================== ---- pygobject-2.14.2.orig/gobject/Makefile.am -+++ pygobject-2.14.2/gobject/Makefile.am -@@ -21,11 +21,11 @@ if PLATFORM_WIN32 - common_ldflags += -no-undefined - endif - --constants.py: generate-constants$(EXEEXT) constants.py.in -+constants.py: constants.py.in - rm -f constants.py - cp $(srcdir)/constants.py.in constants.py - chmod 644 constants.py -- $(top_builddir)/gobject/generate-constants$(EXEEXT) >> constants.py -+ gobject-generate-constants$(EXEEXT) >> constants.py - chmod 444 constants.py - - generate_constants_CFLAGS = $(GLIB_CFLAGS) diff --git a/meta/recipes-devtools/python/python-pygobject_2.27.91.bb b/meta/recipes-devtools/python/python-pygobject_2.27.91.bb deleted file mode 100644 index d35f672f66..0000000000 --- a/meta/recipes-devtools/python/python-pygobject_2.27.91.bb +++ /dev/null @@ -1,38 +0,0 @@ -DESCRIPTION = "Python GObject bindings" -SECTION = "devel/python" -LICENSE = "LGPLv2.1" -LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7" -DEPENDS = "python-pygobject-native-${PV} glib-2.0" -DEPENDS_virtclass-native = "glib-2.0-native" -RDEPENDS_virtclass-native = "" -PR = "r0" - -MAJ_VER = "${@bb.data.getVar('PV',d,1).split('.')[0]}.${@bb.data.getVar('PV',d,1).split('.')[1]}" - -SRC_URI = "${GNOME_MIRROR}/pygobject/${MAJ_VER}/pygobject-${PV}.tar.bz2" - -SRC_URI[md5sum] = "2b11a3050264721aac83188224b093a8" -SRC_URI[sha256sum] = "a1dffbe2a8e0d490594554ed8d06f0ee4a371acb6c210e7f35158e9ae77e0df4" -S = "${WORKDIR}/pygobject-${PV}" - -FILESPATH = "${FILE_DIRNAME}/python-pygobject:${FILE_DIRNAME}/files" -EXTRA_OECONF += "--disable-introspection" - -inherit autotools distutils-base pkgconfig - -# necessary to let the call for python-config succeed -export BUILD_SYS -export HOST_SYS -export STAGING_INCDIR -export STAGING_LIBDIR - -PACKAGES += "${PN}-lib" - -RDEPENDS_${PN} += "python-textutils" - -FILES_${PN} = "${libdir}/python*" -FILES_${PN}-lib = "${libdir}/lib*.so.*" -FILES_${PN}-dev += "${bindir} ${datadir}" -FILES_${PN}-dbg += "${libdir}/.debug" - -BBCLASSEXTEND = "native" diff --git a/meta/recipes-devtools/python/python-pygtk/acinclude.m4 b/meta/recipes-devtools/python/python-pygtk/acinclude.m4 deleted file mode 100644 index 53518fb2eb..0000000000 --- a/meta/recipes-devtools/python/python-pygtk/acinclude.m4 +++ /dev/null @@ -1,90 +0,0 @@ -## this one is commonly used with AM_PATH_PYTHONDIR ... -dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]]) -dnl Check if a module containing a given symbol is visible to python. -AC_DEFUN(AM_CHECK_PYMOD, -[AC_REQUIRE([AM_PATH_PYTHON]) -py_mod_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'` -AC_MSG_CHECKING(for ifelse([$2],[],,[$2 in ])python module $1) -AC_CACHE_VAL(py_cv_mod_$py_mod_var, [ -ifelse([$2],[], [prog=" -import sys -try: - import $1 -except ImportError: - sys.exit(1) -except: - sys.exit(0) -sys.exit(0)"], [prog=" -import $1 -$1.$2"]) -if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC - then - eval "py_cv_mod_$py_mod_var=yes" - else - eval "py_cv_mod_$py_mod_var=no" - fi -]) -py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"` -if test "x$py_val" != xno; then - AC_MSG_RESULT(yes) - ifelse([$3], [],, [$3 -])dnl -else - AC_MSG_RESULT(no) - ifelse([$4], [],, [$4 -])dnl -fi -]) - -dnl a macro to check for ability to create python extensions -dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE]) -dnl function also defines PYTHON_INCLUDES -AC_DEFUN([AM_CHECK_PYTHON_HEADERS], -[AC_REQUIRE([AM_PATH_PYTHON]) -AC_MSG_CHECKING(for headers required to compile python extensions) -dnl deduce PYTHON_INCLUDES -AC_ARG_WITH(python-includes, - [ --with-python-includes=DIR path to Python includes], py_exec_prefix=$withval) -if test x$py_exec_prefix != x; then -PYTHON_INCLUDES="-I${py_exec_prefix}/include/python${PYTHON_VERSION}" -else -py_prefix=`$PYTHON -c "import sys; print sys.prefix"` -py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` -PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" -if test "$py_prefix" != "$py_exec_prefix"; then - PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" -fi -fi -AC_SUBST(PYTHON_INCLUDES) -dnl check if the headers exist: -save_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES" -AC_TRY_CPP([#include <Python.h>],dnl -[AC_MSG_RESULT(found) -$1],dnl -[AC_MSG_RESULT(not found) -$2]) -CPPFLAGS="$save_CPPFLAGS" -]) - -dnl -dnl JH_ADD_CFLAG(FLAG) -dnl checks whether the C compiler supports the given flag, and if so, adds -dnl it to $CFLAGS. If the flag is already present in the list, then the -dnl check is not performed. -AC_DEFUN([JH_ADD_CFLAG], -[ -case " $CFLAGS " in -*@<:@\ \ @:>@$1@<:@\ \ @:>@*) - ;; -*) - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $1" - AC_MSG_CHECKING([whether [$]CC understands $1]) - AC_TRY_COMPILE([], [], [jh_has_option=yes], [jh_has_option=no]) - AC_MSG_RESULT($jh_has_option) - if test $jh_has_option = no; then - CFLAGS="$save_CFLAGS" - fi - ;; -esac]) diff --git a/meta/recipes-devtools/python/python-pygtk/fix-gtkunixprint.patch b/meta/recipes-devtools/python/python-pygtk/fix-gtkunixprint.patch deleted file mode 100644 index 6d2f64b414..0000000000 --- a/meta/recipes-devtools/python/python-pygtk/fix-gtkunixprint.patch +++ /dev/null @@ -1,18 +0,0 @@ -Upstream-Status: Inappropriate [configuration] - -Index: pygtk-2.10.0/gtk/gtkunixprint.override -=================================================================== ---- pygtk-2.10.0.orig/gtk/gtkunixprint.override -+++ pygtk-2.10.0/gtk/gtkunixprint.override -@@ -105,11 +105,7 @@ _wrap_gtk_print_job_get_surface(PyGObjec - if (pyg_error_check(&error)) - return NULL; - --#if PYCAIRO_VERSION_HEX >= 0x1010600 - return PycairoSurface_FromSurface(surface, NULL); --#else -- return PycairoSurface_FromSurface(surface, NULL, NULL); --#endif - } - %% - override gtk_print_job_send kwargs diff --git a/meta/recipes-devtools/python/python-pygtk/nodocs.patch b/meta/recipes-devtools/python/python-pygtk/nodocs.patch deleted file mode 100644 index f07309a7ba..0000000000 --- a/meta/recipes-devtools/python/python-pygtk/nodocs.patch +++ /dev/null @@ -1,15 +0,0 @@ -Upstream-Status: Inappropriate [configuration] - -Index: pygtk-2.17.0/Makefile.am -=================================================================== ---- pygtk-2.17.0.orig/Makefile.am -+++ pygtk-2.17.0/Makefile.am -@@ -4,7 +4,7 @@ if BUILD_GTK - GTK_SUBDIR = gtk - endif - --SUBDIRS = . $(GTK_SUBDIR) examples tests docs -+SUBDIRS = . $(GTK_SUBDIR) examples tests - - PLATFORM_VERSION = 2.0 - diff --git a/meta/recipes-devtools/python/python-pygtk/prevent_to_get_display_during_import.patch b/meta/recipes-devtools/python/python-pygtk/prevent_to_get_display_during_import.patch deleted file mode 100644 index 833038e7f8..0000000000 --- a/meta/recipes-devtools/python/python-pygtk/prevent_to_get_display_during_import.patch +++ /dev/null @@ -1,16 +0,0 @@ -Upstream-Status: Pending - -Index: pygtk-2.10.4/gtk/__init__.py -=================================================================== ---- pygtk-2.10.4.orig/gtk/__init__.py 2007-11-27 19:27:05.000000000 -0300 -+++ pygtk-2.10.4/gtk/__init__.py 2007-11-27 19:28:22.000000000 -0300 -@@ -78,7 +78,8 @@ - - keysyms = LazyModule('keysyms', locals()) - --_init() -+if not hasattr(sys.modules['__main__'], 'python_launcher_enabled'): -+ _init() - - # CAPI - _PyGtk_API = _gtk._PyGtk_API diff --git a/meta/recipes-devtools/python/python-pygtk/python-pygtk2/acinclude.m4 b/meta/recipes-devtools/python/python-pygtk/python-pygtk2/acinclude.m4 deleted file mode 100644 index 53518fb2eb..0000000000 --- a/meta/recipes-devtools/python/python-pygtk/python-pygtk2/acinclude.m4 +++ /dev/null @@ -1,90 +0,0 @@ -## this one is commonly used with AM_PATH_PYTHONDIR ... -dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]]) -dnl Check if a module containing a given symbol is visible to python. -AC_DEFUN(AM_CHECK_PYMOD, -[AC_REQUIRE([AM_PATH_PYTHON]) -py_mod_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'` -AC_MSG_CHECKING(for ifelse([$2],[],,[$2 in ])python module $1) -AC_CACHE_VAL(py_cv_mod_$py_mod_var, [ -ifelse([$2],[], [prog=" -import sys -try: - import $1 -except ImportError: - sys.exit(1) -except: - sys.exit(0) -sys.exit(0)"], [prog=" -import $1 -$1.$2"]) -if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC - then - eval "py_cv_mod_$py_mod_var=yes" - else - eval "py_cv_mod_$py_mod_var=no" - fi -]) -py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"` -if test "x$py_val" != xno; then - AC_MSG_RESULT(yes) - ifelse([$3], [],, [$3 -])dnl -else - AC_MSG_RESULT(no) - ifelse([$4], [],, [$4 -])dnl -fi -]) - -dnl a macro to check for ability to create python extensions -dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE]) -dnl function also defines PYTHON_INCLUDES -AC_DEFUN([AM_CHECK_PYTHON_HEADERS], -[AC_REQUIRE([AM_PATH_PYTHON]) -AC_MSG_CHECKING(for headers required to compile python extensions) -dnl deduce PYTHON_INCLUDES -AC_ARG_WITH(python-includes, - [ --with-python-includes=DIR path to Python includes], py_exec_prefix=$withval) -if test x$py_exec_prefix != x; then -PYTHON_INCLUDES="-I${py_exec_prefix}/include/python${PYTHON_VERSION}" -else -py_prefix=`$PYTHON -c "import sys; print sys.prefix"` -py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` -PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" -if test "$py_prefix" != "$py_exec_prefix"; then - PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" -fi -fi -AC_SUBST(PYTHON_INCLUDES) -dnl check if the headers exist: -save_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES" -AC_TRY_CPP([#include <Python.h>],dnl -[AC_MSG_RESULT(found) -$1],dnl -[AC_MSG_RESULT(not found) -$2]) -CPPFLAGS="$save_CPPFLAGS" -]) - -dnl -dnl JH_ADD_CFLAG(FLAG) -dnl checks whether the C compiler supports the given flag, and if so, adds -dnl it to $CFLAGS. If the flag is already present in the list, then the -dnl check is not performed. -AC_DEFUN([JH_ADD_CFLAG], -[ -case " $CFLAGS " in -*@<:@\ \ @:>@$1@<:@\ \ @:>@*) - ;; -*) - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $1" - AC_MSG_CHECKING([whether [$]CC understands $1]) - AC_TRY_COMPILE([], [], [jh_has_option=yes], [jh_has_option=no]) - AC_MSG_RESULT($jh_has_option) - if test $jh_has_option = no; then - CFLAGS="$save_CFLAGS" - fi - ;; -esac]) diff --git a/meta/recipes-devtools/python/python-pygtk_2.17.0.bb b/meta/recipes-devtools/python/python-pygtk_2.17.0.bb deleted file mode 100644 index f56e1fec84..0000000000 --- a/meta/recipes-devtools/python/python-pygtk_2.17.0.bb +++ /dev/null @@ -1,54 +0,0 @@ -DESCRIPTION = "Python GTK+ 2.17.x Bindings" -SECTION = "devel/python" -# needs gtk+ 2.17.x -DEPENDS = "gtk+ libglade python-pycairo python-pygobject" -RDEPENDS_${PN} = "python-shell python-pycairo python-pygobject" -PROVIDES = "python-pygtk2" -SRCNAME = "pygtk" -LICENSE = "LGPLv2.1" -LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7" -PR = "ml9" - -SRC_URI = "ftp://ftp.gnome.org/pub/gnome/sources/pygtk/2.17/${SRCNAME}-${PV}.tar.bz2 \ - file://fix-gtkunixprint.patch \ - file://prevent_to_get_display_during_import.patch \ - file://nodocs.patch \ - file://acinclude.m4" - -SRC_URI[md5sum] = "43d704343d7ca04a6e4ddd4fa73a3c55" -SRC_URI[sha256sum] = "6a61817a2e765c6209c72ecdf44389ec134c1ebed1d842408bf001c9321f1400" -S = "${WORKDIR}/${SRCNAME}-${PV}" - -EXTRA_OECONF = "--disable-docs --with-python-includes=${STAGING_INCDIR}/../" - -inherit autotools pkgconfig distutils-base - -do_configure_prepend() { - install -m 0644 ${WORKDIR}/acinclude.m4 ${S}/ - sed -i \ - -e s:'`$PKG_CONFIG --variable defsdir pygobject-2.0`':\"${STAGING_DATADIR}/pygobject/2.0/defs\":g \ - -e s:'`$PKG_CONFIG --variable=pygtkincludedir pygobject-2.0`':\"${STAGING_INCDIR}/pygtk-2.0\":g \ - -e s:'`$PKG_CONFIG --variable=datadir pygobject-2.0`':\"${STAGING_DATADIR}\":g \ - -e s:'`$PKG_CONFIG --variable codegendir pygobject-2.0`':\"${STAGING_DATADIR}/pygobject/2.0/codegen\":g \ - -e s:'`$PKG_CONFIG --variable=fixxref pygobject-2.0`':\"${STAGING_DATADIR}/pygobject/xsl/fixxref.py\":g \ - ${S}/configure.ac - sed -i 's:tests docs:tests:' Makefile.am -} - -# dirty fix #1: remove dependency on python-pygobject-dev -do_install_append() { - find ${D} -name "*.la"|xargs rm -f - rm -f ${D}/${bindir}/pygtk-codegen-2.0 - rm -rf ${D}/${libdir}/pkgconfig -} - -# dirty fix #2: fix build system paths leaking in -require fix-path.inc - -PACKAGES =+ "${PN}-demo" -FILES_${PN}-demo = " ${bindir}/pygtk-demo ${libdir}/pygtk " -RDEPENDS_${PN}-demo = "python-pygtk python-stringold python-lang" - -# todo: revamp packaging, package demo seperatly -FILES_${PN}-dev += " ${libdir}/pygtk/2.0 ${bindir}/pygtk-* ${datadir}/pygtk/2.0" - diff --git a/meta/recipes-devtools/python/python-pyrex-native_0.9.9.bb b/meta/recipes-devtools/python/python-pyrex-native_0.9.9.bb deleted file mode 100644 index 827635425d..0000000000 --- a/meta/recipes-devtools/python/python-pyrex-native_0.9.9.bb +++ /dev/null @@ -1,5 +0,0 @@ -require python-pyrex_${PV}.bb -inherit native -DEPENDS = "python-native" -RDEPENDS_${PN} = "" -PR = "r1" diff --git a/meta/recipes-devtools/python/python-pyrex/pyrex-fix-optimized-mode.patch b/meta/recipes-devtools/python/python-pyrex/pyrex-fix-optimized-mode.patch deleted file mode 100644 index c58c3280e2..0000000000 --- a/meta/recipes-devtools/python/python-pyrex/pyrex-fix-optimized-mode.patch +++ /dev/null @@ -1,15 +0,0 @@ -Upstream-Status: Pending - -Index: Pyrex-0.9.8.4/Pyrex/Distutils/extension.py -=================================================================== ---- Pyrex-0.9.8.4.orig/Pyrex/Distutils/extension.py -+++ Pyrex-0.9.8.4/Pyrex/Distutils/extension.py -@@ -15,7 +15,7 @@ except ImportError: - warnings = None - - class Extension(_Extension.Extension): -- _Extension.Extension.__doc__ + \ -+ _Extension.Extension.__doc__ or "" + \ - """pyrex_include_dirs : [string] - list of directories to search for Pyrex header files (.pxd) (in - Unix form for portability) diff --git a/meta/recipes-devtools/python/python-pyrex_0.9.9.bb b/meta/recipes-devtools/python/python-pyrex_0.9.9.bb deleted file mode 100644 index f14a0e615a..0000000000 --- a/meta/recipes-devtools/python/python-pyrex_0.9.9.bb +++ /dev/null @@ -1,20 +0,0 @@ -DESCRIPTION = "Pyrex is a language specially designed for writing Python extension modules. \ -It's designed to bridge the gap between the nice, high-level, easy-to-use world of Python \ -and the messy, low-level world of C." -SECTION = "devel/python" -PRIORITY = "optional" -LICENSE = "Apache-2" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=771d472f53f933033f57eeee7808e5bd" -SRCNAME = "Pyrex" -PR = "ml0" - -SRC_URI = "\ - http://www.cosc.canterbury.ac.nz/greg.ewing/python/${SRCNAME}/${SRCNAME}-${PV}.tar.gz \ - file://pyrex-fix-optimized-mode.patch \ -" - -SRC_URI[md5sum] = "515dee67d15d4393841e2d60e8341947" -SRC_URI[sha256sum] = "5f87df06831d0b3412eb4bc9d3fc2ee7bfae1b913d7da8c23ab2bf5699fb6b50" -S = "${WORKDIR}/${SRCNAME}-${PV}" - -inherit distutils diff --git a/meta/recipes-devtools/python/python-scons-native_2.0.1.bb b/meta/recipes-devtools/python/python-scons-native_2.0.1.bb deleted file mode 100644 index f7646a2587..0000000000 --- a/meta/recipes-devtools/python/python-scons-native_2.0.1.bb +++ /dev/null @@ -1,6 +0,0 @@ -require python-scons_${PV}.bb -inherit native -DEPENDS = "python-native" -RDEPENDS_${PN} = "" -PR = "r1" - diff --git a/meta/recipes-devtools/python/python-scons-native_2.5.1.bb b/meta/recipes-devtools/python/python-scons-native_2.5.1.bb new file mode 100644 index 0000000000..dae89ab5d2 --- /dev/null +++ b/meta/recipes-devtools/python/python-scons-native_2.5.1.bb @@ -0,0 +1,8 @@ +require python-scons_${PV}.bb +inherit native pythonnative +DEPENDS = "python-native" +RDEPENDS_${PN} = "" + +do_install_append() { + create_wrapper ${D}${bindir}/scons SCONS_LIB_DIR='${STAGING_DIR_HOST}/${PYTHON_SITEPACKAGES_DIR}' +} diff --git a/meta/recipes-devtools/python/python-scons_2.0.1.bb b/meta/recipes-devtools/python/python-scons_2.0.1.bb deleted file mode 100644 index 0dfa8379ed..0000000000 --- a/meta/recipes-devtools/python/python-scons_2.0.1.bb +++ /dev/null @@ -1,16 +0,0 @@ -DESCRIPTION = "A Software Construction Tool" -SECTION = "devel/python" -PRIORITY = "optional" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=8481211ebbeaed9cdc7ad5a3b0c98aaf" -SRCNAME = "scons" - -PR = "r0" - -SRC_URI = "${SOURCEFORGE_MIRROR}/scons/scons-${PV}.tar.gz" - -SRC_URI[md5sum] = "beca648b894cdbf85383fffc79516d18" -SRC_URI[sha256sum] = "0a8151da41c4a26c776c84f44f747ce03e093d43be3e83b38c14a76ab3256762" -S = "${WORKDIR}/${SRCNAME}-${PV}" - -inherit distutils diff --git a/meta/recipes-devtools/python/python-scons_2.5.1.bb b/meta/recipes-devtools/python/python-scons_2.5.1.bb new file mode 100644 index 0000000000..3f43856199 --- /dev/null +++ b/meta/recipes-devtools/python/python-scons_2.5.1.bb @@ -0,0 +1,23 @@ +SUMMARY = "Software Construction tool (make/autotools replacement)" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3a885dff6d14e4cd876d9008a09a42de" +SRCNAME = "scons" + +SRC_URI = "https://files.pythonhosted.org/packages/source/s/${SRCNAME}/${SRCNAME}-${PV}.tar.gz" + +SRC_URI[md5sum] = "3eac81e5e8206304a9b4683c57665aa4" +SRC_URI[sha256sum] = "c8de85fc02ed1a687b1f2ac791eaa0c1707b4382a204f17d782b5b111b9fdf07" + +UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/SCons/" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit setuptools + +RDEPENDS_${PN} = "\ + python-fcntl \ + python-io \ + python-json \ + python-subprocess \ + " diff --git a/meta/recipes-devtools/python/python-setuptools.inc b/meta/recipes-devtools/python/python-setuptools.inc new file mode 100644 index 0000000000..40f47d4bcd --- /dev/null +++ b/meta/recipes-devtools/python/python-setuptools.inc @@ -0,0 +1,21 @@ +SUMMARY = "Download, build, install, upgrade, and uninstall Python packages" +HOMEPAGE = "https://pypi.python.org/pypi/setuptools" +SECTION = "devel/python" +LICENSE = "MIT" + +LIC_FILES_CHKSUM = "file://setup.py;beginline=146;endline=146;md5=3e8df024d6c1442d18e84acf8fbbc475" + +SRCNAME = "setuptools" + +SRC_URI = "https://files.pythonhosted.org/packages/source/s/${SRCNAME}/${SRCNAME}-${PV}.tar.gz" + +SRC_URI[md5sum] = "8b67868c3430e978833ebd0d1b766694" +SRC_URI[sha256sum] = "8303fb24306385f09bf8b0e5a385c1548e42e8efc08558d64049bc0d55ea012d" + +UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/setuptools" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +do_install_prepend() { + install -d ${D}${PYTHON_SITEPACKAGES_DIR} +} diff --git a/meta/recipes-devtools/python/python-setuptools_32.1.1.bb b/meta/recipes-devtools/python/python-setuptools_32.1.1.bb new file mode 100644 index 0000000000..526474c7ea --- /dev/null +++ b/meta/recipes-devtools/python/python-setuptools_32.1.1.bb @@ -0,0 +1,38 @@ +require python-setuptools.inc + +PROVIDES = "python-distribute" + +DEPENDS += "python" +DEPENDS_class-native += "python-native" + +inherit distutils + +DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${PYTHON_SITEPACKAGES_DIR}" + +RDEPENDS_${PN} = "\ + python-stringold \ + python-email \ + python-shell \ + python-distutils \ + python-compression \ + python-pkgutil \ + python-plistlib \ + python-numbers \ + python-html \ + python-netserver \ + python-ctypes \ + python-subprocess \ + python-unittest \ + python-compile \ +" + +RDEPENDS_${PN}_class-native = "\ + python-distutils \ + python-compression \ +" + +RREPLACES_${PN} = "python-distribute" +RPROVIDES_${PN} = "python-distribute" +RCONFLICTS_${PN} = "python-distribute" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-devtools/python/python-six.inc b/meta/recipes-devtools/python/python-six.inc new file mode 100644 index 0000000000..bd12fa94a1 --- /dev/null +++ b/meta/recipes-devtools/python/python-six.inc @@ -0,0 +1,16 @@ +SUMMARY = "Python 2 and 3 compatibility library" +HOMEPAGE = "https://pypi.python.org/pypi/six/" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=6f00d4a50713fa859858dd9abaa35b21" + +SRC_URI = "https://files.pythonhosted.org/packages/source/s/six/six-${PV}.tar.gz" +SRC_URI[md5sum] = "34eed507548117b2ab523ab14b2f8b55" +SRC_URI[sha256sum] = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a" + +UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/six/" +UPSTREAM_CHECK_REGEX = "/six/(?P<pver>(\d+[\.\-_]*)+)" + +BBCLASSEXTEND = "native nativesdk" + +S = "${WORKDIR}/six-${PV}" diff --git a/meta/recipes-devtools/python/python-six_1.10.0.bb b/meta/recipes-devtools/python/python-six_1.10.0.bb new file mode 100644 index 0000000000..4350485f73 --- /dev/null +++ b/meta/recipes-devtools/python/python-six_1.10.0.bb @@ -0,0 +1,4 @@ +inherit setuptools +require python-six.inc + +RDEPENDS_${PN} += "python-io" diff --git a/meta/recipes-devtools/python/python-smmap.inc b/meta/recipes-devtools/python/python-smmap.inc new file mode 100644 index 0000000000..d67e6b5412 --- /dev/null +++ b/meta/recipes-devtools/python/python-smmap.inc @@ -0,0 +1,19 @@ +SUMMARY = "Python implementation of a sliding window memory map manager" +DESCRIPTION = "A pure Python implementation of a sliding memory map to \ +help unifying memory mapped access on 32 and 64 bit systems and to help \ +managing resources more efficiently." +HOMEPAGE = "http://github.com/gitpython-developers/GitPython" +SECTION = "devel/python" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=e910b35b0ef4e1f665b9a75d6afb7709" + +SRC_URI = "https://files.pythonhosted.org/packages/source/s/smmap/smmap-${PV}.tar.gz" +SRC_URI[md5sum] = "d7932d5ace206bf4ae15198cf36fb6ab" +SRC_URI[sha256sum] = "0e2b62b497bd5f0afebc002eda4d90df9d209c30ef257e8673c90a6b5c119d62" + +UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/smmap/" +UPSTREAM_CHECK_REGEX = "/smmap/(?P<pver>(\d+[\.\-_]*)+)" + +S = "${WORKDIR}/smmap-${PV}" + +BBCLASSEXTEND = "nativesdk" diff --git a/meta/recipes-devtools/python/python-smmap_0.9.0.bb b/meta/recipes-devtools/python/python-smmap_0.9.0.bb new file mode 100644 index 0000000000..c118dd8d63 --- /dev/null +++ b/meta/recipes-devtools/python/python-smmap_0.9.0.bb @@ -0,0 +1,5 @@ +require python-smmap.inc + +inherit setuptools + +RDEPENDS_${PN} += "python-codecs python-mmap python-lang" diff --git a/meta/recipes-devtools/python/python.inc b/meta/recipes-devtools/python/python.inc index 3de220b6a4..b9ec69275a 100644 --- a/meta/recipes-devtools/python/python.inc +++ b/meta/recipes-devtools/python/python.inc @@ -1,35 +1,32 @@ -DESCRIPTION = "The Python Programming Language" +SUMMARY = "The Python Programming Language" HOMEPAGE = "http://www.python.org" -LICENSE = "PSF" +LICENSE = "PSFv2" SECTION = "devel/python" -PRIORITY = "optional" -# bump this on every change in contrib/python/generate-manifest-2.6.py -INC_PR = "nk1" +# bump this on every change in contrib/python/generate-manifest-2.7.py +INC_PR = "r1" -DEFAULT_PREFERENCE = "-26" +LIC_FILES_CHKSUM = "file://LICENSE;md5=6b60258130e4ed10d3101517eb5b9385" -PYTHON_MAJMIN = "2.6" +SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz" -inherit autotools +SRC_URI[md5sum] = "53b43534153bb2a0363f08bae8b9d990" +SRC_URI[sha256sum] = "35d543986882f78261f97787fd3e06274bfa6df29fac9b4a94f73930ff98f731" -EXTRA_OECONF = "\ - --with-threads \ - --with-pymalloc \ - --with-cyclic-gc \ - --without-cxx \ - --with-signal-module \ - --with-wctype-functions \ - --enable-shared \ -" +# python recipe is actually python 2.x +# also, exclude pre-releases for both python 2.x and 3.x +UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>2(\.\d+)+).tar" + +PYTHON_MAJMIN = "2.7" + +inherit autotools pkgconfig -EXTRA_OECONF_linuxstdbase = "\ +EXTRA_OECONF = "\ --with-threads \ --with-pymalloc \ - --with-cyclic-gc \ - --without-cxx \ + --without-cxx-main \ --with-signal-module \ --enable-shared \ - ac_cv_sizeof_off_t=8 \ + --enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'yes', 'no', d)} \ + ac_cv_header_bluetooth_bluetooth_h=no ac_cv_header_bluetooth_h=no \ + ${PYTHONLSBOPTS} \ " - -PARALLEL_MAKE = "" diff --git a/meta/recipes-devtools/python/python/0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch b/meta/recipes-devtools/python/python/0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch new file mode 100644 index 0000000000..502f849804 --- /dev/null +++ b/meta/recipes-devtools/python/python/0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch @@ -0,0 +1,51 @@ +From 4cdf2e9df13c6327fcc94d53e4953005543aef3d Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Wed, 6 Apr 2016 17:43:02 +0300 +Subject: [PATCH 01/10] distutils: set the prefix to be inside staging + directory + +The proper prefix is inside our staging area. + +Upstream-Status: Inappropriate [embedded specific] +Signed-off-by: Michael 'Mickey' Lauer <mickey@vanille-media.de> +Signed-off-by: Phil Blundell <philb@gnu.org> +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + Lib/distutils/sysconfig.py | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py +index de7da1d..f3aacf7 100644 +--- a/Lib/distutils/sysconfig.py ++++ b/Lib/distutils/sysconfig.py +@@ -75,7 +75,7 @@ def get_python_inc(plat_specific=0, prefix=None): + sys.exec_prefix -- i.e., ignore 'plat_specific'. + """ + if prefix is None: +- prefix = plat_specific and EXEC_PREFIX or PREFIX ++ prefix = os.environ['STAGING_INCDIR'].rstrip('include') + + if os.name == "posix": + if python_build: +@@ -115,12 +115,16 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): + If 'prefix' is supplied, use it instead of sys.prefix or + sys.exec_prefix -- i.e., ignore 'plat_specific'. + """ ++ lib_basename = os.environ['STAGING_LIBDIR'].split('/')[-1] + if prefix is None: +- prefix = plat_specific and EXEC_PREFIX or PREFIX ++ if plat_specific: ++ prefix = os.environ['STAGING_LIBDIR'].rstrip(lib_basename) ++ else: ++ prefix = PREFIX + + if os.name == "posix": + libpython = os.path.join(prefix, +- "lib", "python" + get_python_version()) ++ lib_basename, "python" + get_python_version()) + if standard_lib: + return libpython + else: +-- +2.8.0.rc3 + diff --git a/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch b/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch index 6c769ac7d3..366ce3e400 100644 --- a/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch +++ b/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch @@ -1,93 +1,83 @@ +We need to ensure our host tools get run during build, not the freshly +built cross-tools (this will not work), so we introduce HOSTPYTHON and HOSTPGEN. + Upstream-Status: Inappropriate [embedded specific] -# We need to ensure our host tools get run during build, not the freshly -# built cross-tools (this will not work), so we introduce HOSTPYTHON and HOSTPGEN. -# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de> +Signed-off-by: Michael 'Mickey' Lauer <mickey@vanille-media.de> +Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> + +Rebased for python-2.7.9 +Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> -Index: Python-2.6.6/Makefile.pre.in +Index: Python-2.7.13/Makefile.pre.in =================================================================== ---- Python-2.6.6.orig/Makefile.pre.in -+++ Python-2.6.6/Makefile.pre.in -@@ -175,6 +175,7 @@ UNICODE_OBJS= @UNICODE_OBJS@ - - PYTHON= python$(EXE) - BUILDPYTHON= python$(BUILDEXE) -+HOSTPYTHON= $(BUILDPYTHON) - - # The task to run while instrument when building the profile-opt target - PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck -@@ -205,7 +206,7 @@ GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar +--- Python-2.7.13.orig/Makefile.pre.in ++++ Python-2.7.13/Makefile.pre.in +@@ -245,6 +245,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@ ########################################################################## # Parser PGEN= Parser/pgen$(EXE) -- +HOSTPGEN= $(PGEN)$(EXE) - POBJS= \ - Parser/acceler.o \ - Parser/grammar1.o \ -@@ -394,8 +395,8 @@ platform: $(BUILDPYTHON) - # Build the shared modules - sharedmods: $(BUILDPYTHON) - @case $$MAKEFLAGS in \ -- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \ -- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \ -+ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \ -+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \ - esac - # Build static library -@@ -517,7 +518,7 @@ Modules/python.o: $(srcdir)/Modules/pyth + PSRCS= \ + Parser/acceler.c \ +@@ -512,7 +513,7 @@ $(BUILDPYTHON): Modules/python.o $(LIBRA + $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) + + platform: $(BUILDPYTHON) pybuilddir.txt +- $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform ++ $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform + + # Create build directory and generate the sysconfig build-time data there. + # pybuilddir.txt contains the name of the build dir and is used for +@@ -681,7 +682,7 @@ Modules/pwdmodule.o: $(srcdir)/Modules/p - $(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT) - -@$(INSTALL) -d Include -- -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) -+ -$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) + $(GRAMMAR_H): @GENERATED_COMMENT@ $(GRAMMAR_INPUT) $(PGEN) + @$(MKDIR_P) Include +- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) ++ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) + $(GRAMMAR_C): @GENERATED_COMMENT@ $(GRAMMAR_H) + touch $(GRAMMAR_C) - $(PGEN): $(PGENOBJS) - $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN) -@@ -887,23 +888,23 @@ libinstall: build_all $(srcdir)/Lib/$(PL - done - $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt +@@ -1121,27 +1122,27 @@ libinstall: build_all $(srcdir)/Lib/$(PL + $(DESTDIR)$(LIBDEST)/distutils/tests ; \ + fi PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ +- $(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ + $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ -d $(LIBDEST) -f \ - -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST) + -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ + $(DESTDIR)$(LIBDEST) PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ -+ $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ +- $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ ++ $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ -d $(LIBDEST) -f \ - -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST) + -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ + $(DESTDIR)$(LIBDEST) -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ -+ $(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ +- $(PYTHON_FOR_BUILD) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ ++ $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ -d $(LIBDEST)/site-packages -f \ -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ -+ $(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ +- $(PYTHON_FOR_BUILD) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ ++ $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ -d $(LIBDEST)/site-packages -f \ -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- ./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()" -+ $(HOSTPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()" +- $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt ++ $(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt ++ $(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt # Create the PLATDIR source directory, if one wasn't distributed.. $(srcdir)/Lib/$(PLATDIR): -@@ -1001,7 +1002,7 @@ libainstall: all - # Install the dynamically loadable modules - # This goes into $(exec_prefix) - sharedinstall: -- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \ -+ $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \ - --prefix=$(prefix) \ - --install-scripts=$(BINDIR) \ - --install-platlib=$(DESTSHARED) \ -Index: Python-2.6.6/setup.py +Index: Python-2.7.13/setup.py =================================================================== ---- Python-2.6.6.orig/setup.py -+++ Python-2.6.6/setup.py -@@ -322,6 +322,7 @@ class PyBuildExt(build_ext): +--- Python-2.7.13.orig/setup.py ++++ Python-2.7.13/setup.py +@@ -350,6 +350,7 @@ class PyBuildExt(build_ext): self.failed.append(ext.name) self.announce('*** WARNING: renaming "%s" since importing it' ' failed: %s' % (ext.name, why), level=3) @@ -95,23 +85,12 @@ Index: Python-2.6.6/setup.py assert not self.inplace basename, tail = os.path.splitext(ext_filename) newname = basename + "_failed" + tail -@@ -356,8 +357,8 @@ class PyBuildExt(build_ext): - - def detect_modules(self): - # Ensure that /usr/local is always used -- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') -- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') -+ # add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') -+ # add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') - - # Add paths specified in the environment variables LDFLAGS and - # CPPFLAGS for header and library files. -@@ -456,6 +457,9 @@ class PyBuildExt(build_ext): +@@ -574,6 +575,9 @@ class PyBuildExt(build_ext): # XXX Omitted modules: gl, pure, dl, SGI-specific modules -+ lib_dirs = [ os.getenv( "STAGING_LIBDIR" ) ] -+ inc_dirs = [ os.getenv( "STAGING_INCDIR" ) ] ++ lib_dirs = [ os.getenv("STAGING_LIBDIR"), os.getenv("STAGING_BASELIBDIR") ] ++ inc_dirs = [ os.getenv("STAGING_INCDIR") ] + # # The following modules are all pretty straightforward, and compile diff --git a/meta/recipes-devtools/python/python/02-remove-test-for-cross.patch b/meta/recipes-devtools/python/python/02-remove-test-for-cross.patch deleted file mode 100644 index 9b164d5df7..0000000000 --- a/meta/recipes-devtools/python/python/02-remove-test-for-cross.patch +++ /dev/null @@ -1,108 +0,0 @@ -Upstream-Status: Inappropriate [embedded specific] - -# OpenEmbedded prepopulates the autotools site cache, so if this -# would be using AC_TRY_CACHE, we could patch it in a more sane way -# Alas, I don't have enough autotalent to do that. -# -# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de> -Index: Python-2.6.1/configure.in -=================================================================== ---- Python-2.6.5.orig/configure.in 2010-07-06 04:37:09.000000000 -0700 -+++ Python-2.6.5/configure.in 2010-07-06 04:40:18.000000000 -0700 -@@ -2697,50 +2697,6 @@ - AC_CHECK_LIB(resolv, inet_aton) - ) - --# On Tru64, chflags seems to be present, but calling it will --# exit Python --AC_CACHE_CHECK([for chflags], [ac_cv_have_chflags], [dnl --AC_TRY_RUN([[ --#include <sys/stat.h> --#include <unistd.h> --int main(int argc, char*argv[]) --{ -- if(chflags(argv[0], 0) != 0) -- return 1; -- return 0; --} --]], ac_cv_have_chflags=yes, -- ac_cv_have_chflags=no, -- ac_cv_have_chflags=cross) --]) --if test "$ac_cv_have_chflags" = cross ; then -- AC_CHECK_FUNC([chflags], [ac_cv_have_chflags="yes"], [ac_cv_have_chflags="no"]) --fi --if test "$ac_cv_have_chflags" = yes ; then -- AC_DEFINE(HAVE_CHFLAGS, 1, Define to 1 if you have the `chflags' function.) --fi -- --AC_CACHE_CHECK([for lchflags], [ac_cv_have_lchflags], [dnl --AC_TRY_RUN([[ --#include <sys/stat.h> --#include <unistd.h> --int main(int argc, char*argv[]) --{ -- if(lchflags(argv[0], 0) != 0) -- return 1; -- return 0; --} --]], ac_cv_have_lchflags=yes, -- ac_cv_have_lchflags=no, -- ac_cv_have_lchflags=cross) --]) --if test "$ac_cv_have_lchflags" = cross ; then -- AC_CHECK_FUNC([lchflags], [ac_cv_have_lchflags="yes"], [ac_cv_have_lchflags="no"]) --fi --if test "$ac_cv_have_lchflags" = yes ; then -- AC_DEFINE(HAVE_LCHFLAGS, 1, Define to 1 if you have the `lchflags' function.) --fi -- - dnl Check if system zlib has *Copy() functions - dnl - dnl On MacOSX the linker will search for dylibs on the entire linker path -@@ -3844,45 +3800,6 @@ - AC_MSG_RESULT(no) - fi - --AC_MSG_CHECKING(for %zd printf() format support) --AC_TRY_RUN([#include <stdio.h> --#include <stddef.h> --#include <string.h> -- --#ifdef HAVE_SYS_TYPES_H --#include <sys/types.h> --#endif -- --#ifdef HAVE_SSIZE_T --typedef ssize_t Py_ssize_t; --#elif SIZEOF_VOID_P == SIZEOF_LONG --typedef long Py_ssize_t; --#else --typedef int Py_ssize_t; --#endif -- --int main() --{ -- char buffer[256]; -- -- if(sprintf(buffer, "%zd", (size_t)123) < 0) -- return 1; -- -- if (strcmp(buffer, "123")) -- return 1; -- -- if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0) -- return 1; -- -- if (strcmp(buffer, "-123")) -- return 1; -- -- return 0; --}], --[AC_MSG_RESULT(yes) -- AC_DEFINE(PY_FORMAT_SIZE_T, "z", [Define to printf format modifier for Py_ssize_t])], -- AC_MSG_RESULT(no)) -- - AC_CHECK_TYPE(socklen_t,, - AC_DEFINE(socklen_t,int, - Define to `int' if <sys/socket.h> does not define.),[ diff --git a/meta/recipes-devtools/python/python/03-fix-tkinter-detection.patch b/meta/recipes-devtools/python/python/03-fix-tkinter-detection.patch index d74e4b1776..650ceb5951 100644 --- a/meta/recipes-devtools/python/python/03-fix-tkinter-detection.patch +++ b/meta/recipes-devtools/python/python/03-fix-tkinter-detection.patch @@ -1,14 +1,18 @@ Upstream-Status: Inappropriate [embedded specific] -# We need to supply STAGING_INCDIR here, otherwise the Tk headers -# will not be found. -# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille.de> +We need to supply STAGING_INCDIR here, otherwise the Tk headers +will not be found. -Index: Python-2.6.1/setup.py -=================================================================== ---- Python-2.6.1.orig/setup.py -+++ Python-2.6.1/setup.py -@@ -1543,7 +1543,7 @@ class PyBuildExt(build_ext): +Signed-off-by: Michael 'Mickey' Lauer <mickey@vanille.de> +Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> + +Rebased for python-2.7.9 + +diff --git a/setup.py b/setup.py +index 8fe1fb8..67eda74 100644 +--- a/setup.py ++++ b/setup.py +@@ -1892,7 +1892,7 @@ class PyBuildExt(build_ext): dotversion = dotversion[:-1] + '.' + dotversion[-1] tcl_include_sub = [] tk_include_sub = [] @@ -17,12 +21,12 @@ Index: Python-2.6.1/setup.py tcl_include_sub += [dir + os.sep + "tcl" + dotversion] tk_include_sub += [dir + os.sep + "tk" + dotversion] tk_include_sub += tcl_include_sub -@@ -1562,22 +1562,6 @@ class PyBuildExt(build_ext): +@@ -1911,22 +1911,6 @@ class PyBuildExt(build_ext): if dir not in include_dirs: include_dirs.append(dir) - # Check for various platform-specific directories -- if platform == 'sunos5': +- if host_platform == 'sunos5': - include_dirs.append('/usr/openwin/include') - added_lib_dirs.append('/usr/openwin/lib') - elif os.path.exists('/usr/X11R6/include'): @@ -38,5 +42,5 @@ Index: Python-2.6.1/setup.py - added_lib_dirs.append('/usr/X11/lib') - # If Cygwin, then verify that X is installed before proceeding - if platform == 'cygwin': + if host_platform == 'cygwin': x11_inc = find_file('X11/Xlib.h', [], include_dirs) diff --git a/meta/recipes-devtools/python/python/04-default-is-optimized.patch b/meta/recipes-devtools/python/python/04-default-is-optimized.patch deleted file mode 100644 index 042ac5e46f..0000000000 --- a/meta/recipes-devtools/python/python/04-default-is-optimized.patch +++ /dev/null @@ -1,54 +0,0 @@ -Upstream-Status: Inappropriate [embedded specific] - -# when compiling for an embedded system, we need every bit of -# performance we can get. default to optimized with the option -# of opt-out. -# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de> - -Index: Python-2.6.6/Python/compile.c -=================================================================== ---- Python-2.6.6.orig/Python/compile.c -+++ Python-2.6.6/Python/compile.c -@@ -32,7 +32,7 @@ - #include "symtable.h" - #include "opcode.h" - --int Py_OptimizeFlag = 0; -+int Py_OptimizeFlag = 1; - - #define DEFAULT_BLOCK_SIZE 16 - #define DEFAULT_BLOCKS 8 -Index: Python-2.6.6/Modules/main.c -=================================================================== ---- Python-2.6.6.orig/Modules/main.c -+++ Python-2.6.6/Modules/main.c -@@ -40,7 +40,7 @@ static char **orig_argv; - static int orig_argc; - - /* command line options */ --#define BASE_OPTS "3bBc:dEhiJm:OQ:sStuUvVW:xX?" -+#define BASE_OPTS "3bBc:dEhiJm:NOQ:sStuUvVW:xX?" - - #ifndef RISCOS - #define PROGRAM_OPTS BASE_OPTS -@@ -69,8 +69,7 @@ Options and arguments (and corresponding - static char *usage_2 = "\ - if stdin does not appear to be a terminal; also PYTHONINSPECT=x\n\ - -m mod : run library module as a script (terminates option list)\n\ ---O : optimize generated bytecode slightly; also PYTHONOPTIMIZE=x\n\ ---OO : remove doc-strings in addition to the -O optimizations\n\ -+-N : do NOT optimize generated bytecode\n\ - -Q arg : division options: -Qold (default), -Qwarn, -Qwarnall, -Qnew\n\ - -s : don't add user site directory to sys.path; also PYTHONNOUSERSITE\n\ - -S : don't imply 'import site' on initialization\n\ -@@ -328,8 +327,8 @@ Py_Main(int argc, char **argv) - - /* case 'J': reserved for Jython */ - -- case 'O': -- Py_OptimizeFlag++; -+ case 'N': -+ Py_OptimizeFlag=0; - break; - - case 'B': diff --git a/meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch b/meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch index a68a20620a..5cc8742462 100644 --- a/meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch +++ b/meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch @@ -1,25 +1,22 @@ +Rebased for python 2.7.9 + Upstream-Status: Inappropriate [embedded specific] # CTypes need to know the actual host we are building on. # Signed-Off: Michael Dietrich <mdt@emdete.de> -Index: Python-2.6.1/setup.py +Index: Python-2.7.9/setup.py =================================================================== ---- Python-2.6.1.orig/setup.py -+++ Python-2.6.1/setup.py -@@ -1656,16 +1656,16 @@ class PyBuildExt(build_ext): - ffi_configfile): - from distutils.dir_util import mkpath - mkpath(ffi_builddir) -- config_args = [] -+ config_args = ['--host=%s' % os.environ["HOST_SYS"], ] +--- Python-2.7.9.orig/setup.py ++++ Python-2.7.9/setup.py +@@ -2028,12 +2028,12 @@ class PyBuildExt(build_ext): # Pass empty CFLAGS because we'll just append the resulting # CFLAGS to Python's; -g or -O2 is to be avoided. - cmd = "cd %s && env CFLAGS='' '%s/configure' %s" \ - % (ffi_builddir, ffi_srcdir, " ".join(config_args)) + cmd = "(cd %s && autoconf -W cross) && (cd %s && env CFLAGS='' '%s/configure' %s)" \ -+ % (ffi_srcdir, ffi_builddir, ffi_srcdir, " ".join(config_args)) ++ % (ffi_srcdir, ffi_builddir, ffi_srcdir, " ".join(config_args)) res = os.system(cmd) if res or not os.path.exists(ffi_configfile): diff --git a/meta/recipes-devtools/python/python/06-avoid_usr_lib_termcap_path_in_linking.patch b/meta/recipes-devtools/python/python/06-avoid_usr_lib_termcap_path_in_linking.patch index b39b22f496..435b319013 100644 --- a/meta/recipes-devtools/python/python/06-avoid_usr_lib_termcap_path_in_linking.patch +++ b/meta/recipes-devtools/python/python/06-avoid_usr_lib_termcap_path_in_linking.patch @@ -9,18 +9,24 @@ This Patch fixes this issue in the python build environment. 11 Oct 2010 Nitin A Kamble <nitin.a.kamble@intel.com> -Index: Python-2.6.6/setup.py -=================================================================== ---- Python-2.6.6.orig/setup.py -+++ Python-2.6.6/setup.py -@@ -665,12 +665,10 @@ class PyBuildExt(build_ext): +2011/09/29 +Rebased for python 2.7.2 +Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> + +Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> + +diff --git a/setup.py b/setup.py +index 67eda74..59c537e 100644 +--- a/setup.py ++++ b/setup.py +@@ -761,12 +761,10 @@ class PyBuildExt(build_ext): pass # Issue 7384: Already linked against curses or tinfo. elif curses_library: readline_libs.append(curses_library) - elif self.compiler.find_library_file(lib_dirs + -- ['/usr/lib/termcap'], +- ['/usr/lib/termcap'], + elif self.compiler.find_library_file(lib_dirs, - 'termcap'): + 'termcap'): readline_libs.append('termcap') exts.append( Extension('readline', ['readline.c'], - library_dirs=['/usr/lib/termcap'], diff --git a/meta/recipes-devtools/python/python/06-ctypes-libffi-fix-configure.patch b/meta/recipes-devtools/python/python/06-ctypes-libffi-fix-configure.patch deleted file mode 100644 index 8de5694cb4..0000000000 --- a/meta/recipes-devtools/python/python/06-ctypes-libffi-fix-configure.patch +++ /dev/null @@ -1,58 +0,0 @@ -This fixes configure issues with recent autoconf, e.g: - autoreconf: Entering directory `Modules/_ctypes/libffi' - autoreconf: configure.ac: not using Gettext - autoreconf: running: aclocal --force - configure.ac:26: error: m4_copy: won't overwrite defined macro: _AC_ARG_VAR_PRECIOUS - configure.ac:26: the top level - -The problem is still present in python-2.6.5 but fixed in python-svn. - -Upstream-Status: Accepted [python-svn] - -Signed-off-by: Antonio Ospite <ospite@studenti.unina.it> -Acked-by: Martin Jansa <Martin.Jansa@gmail.com> -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> -Signed-off-by: Saul Wold <sgw@linux.intel.com> - -diff -pruN Python-2.6.4.orig//Modules/_ctypes/libffi/configure.ac Python-2.6.4/Modules/_ctypes/libffi/configure.ac ---- Python-2.6.4.orig//Modules/_ctypes/libffi/configure.ac 2009-04-28 22:01:18.000000000 +0200 -+++ Python-2.6.4/Modules/_ctypes/libffi/configure.ac 2010-04-20 22:46:02.000000000 +0200 -@@ -23,6 +23,7 @@ AM_INIT_AUTOMAKE - m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS]) - m4_define([_AC_ARG_VAR_PRECIOUS],[]) - AC_PROG_CC -+m4_undefine([_AC_ARG_VAR_PRECIOUS]) - m4_rename([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS]) - - AC_SUBST(CFLAGS) -@@ -366,7 +367,7 @@ test -d src/$TARGETDIR || mkdir src/$TAR - - AC_CONFIG_LINKS(include/ffitarget.h:src/$TARGETDIR/ffitarget.h) - --AC_CONFIG_FILES(include/ffi.h) -+AC_CONFIG_FILES(include/ffi.h include/Makefile Makefile) - - AC_CONFIG_LINKS(include/ffi_common.h:include/ffi_common.h) - -diff -pruN Python-2.6.4.orig//Modules/_ctypes/libffi/Makefile.am Python-2.6.4/Modules/_ctypes/libffi/Makefile.am ---- Python-2.6.4.orig//Modules/_ctypes/libffi/Makefile.am 2008-03-04 21:09:11.000000000 +0100 -+++ Python-2.6.4/Modules/_ctypes/libffi/Makefile.am 2010-04-20 22:54:03.000000000 +0200 -@@ -2,7 +2,7 @@ - - AUTOMAKE_OPTIONS = foreign subdir-objects - --SUBDIRS = include testsuite man -+SUBDIRS = include - - EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj configure.host \ - src/alpha/ffi.c src/alpha/osf.S src/alpha/ffitarget.h \ -@@ -32,8 +32,6 @@ EXTRA_DIST = LICENSE ChangeLog.v1 Change - src/frv/ffi.c src/frv/eabi.S src/frv/ffitarget.h src/dlmalloc.c \ - libtool-version ChangeLog.libffi - --info_TEXINFOS = doc/libffi.texi -- - ## ################################################################ - - ## - diff --git a/meta/recipes-devtools/python/python/99-ignore-optimization-flag.patch b/meta/recipes-devtools/python/python/99-ignore-optimization-flag.patch deleted file mode 100644 index a5d9812caf..0000000000 --- a/meta/recipes-devtools/python/python/99-ignore-optimization-flag.patch +++ /dev/null @@ -1,21 +0,0 @@ -Upstream-Status: Inappropriate [embedded specific] - -# Reinstate the empty -O option to fix weird mixing of native and target -# binaries and libraries with LD_LIBRARY_PATH when host==target -# -# Signed-off-by: Denys Dmytriyenko <denis@denix.org> - -Index: Python-2.6.6/Modules/main.c -=================================================================== ---- Python-2.6.6.orig/Modules/main.c -+++ Python-2.6.6/Modules/main.c -@@ -327,6 +327,9 @@ Py_Main(int argc, char **argv) - - /* case 'J': reserved for Jython */ - -+ case 'O': /* ignore it */ -+ break; -+ - case 'N': - Py_OptimizeFlag=0; - break; diff --git a/meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch b/meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch new file mode 100644 index 0000000000..38e53778dc --- /dev/null +++ b/meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch @@ -0,0 +1,41 @@ +Upstream-Status: Backport + +Signed-off-by: Andreas Oberritter <obi@opendreambox.org> + +From 905d1b30ac7cb0e31c57cec0533825c8f170b942 Mon Sep 17 00:00:00 2001 +From: Victor Stinner <victor.stinner@gmail.com> +Date: Mon, 9 Jan 2017 11:10:41 +0100 +Subject: [PATCH] Don't use getentropy() on Linux + +Issue #29188: Support glibc 2.24 on Linux: don't use getentropy() function but +read from /dev/urandom to get random bytes, for example in os.urandom(). On +Linux, getentropy() is implemented which getrandom() is blocking mode, whereas +os.urandom() should not block. + +(cherry picked from commit 2687486756721e39164fa9f597e468c35d495227) +--- + Python/random.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/Python/random.c b/Python/random.c +index b4bc1f3..f3f5d14 100644 +--- a/Python/random.c ++++ b/Python/random.c +@@ -94,8 +94,15 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise) + } + + /* Issue #25003: Don't use getentropy() on Solaris (available since +- * Solaris 11.3), it is blocking whereas os.urandom() should not block. */ +-#elif defined(HAVE_GETENTROPY) && !defined(sun) ++ Solaris 11.3), it is blocking whereas os.urandom() should not block. ++ ++ Issue #29188: Don't use getentropy() on Linux since the glibc 2.24 ++ implements it with the getrandom() syscall which can fail with ENOSYS, ++ and this error is not supported in py_getentropy() and getrandom() is called ++ with flags=0 which blocks until system urandom is initialized, which is not ++ the desired behaviour to seed the Python hash secret nor for os.urandom(): ++ see the PEP 524 which was only implemented in Python 3.6. */ ++#elif defined(HAVE_GETENTROPY) && !defined(sun) && !defined(linux) + #define PY_GETENTROPY 1 + + /* Fill buffer with size pseudo-random bytes generated by getentropy(). diff --git a/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch b/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch new file mode 100644 index 0000000000..a97ff6b250 --- /dev/null +++ b/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch @@ -0,0 +1,28 @@ +configure.ac: add CROSSPYTHONPATH into PYTHONPATH for PYTHON_FOR_BUILD + +When building x86->x86 the system will try to execute .so and related items +from the default PYTHONPATH. This will fail if the target CPU contains +instructions that the host CPU does not have, add CROSSPYTHONPATH +into PYTHONPATH so we can prepend the list to find correct libs. + +Upstream-Status: Inappropriate [OE-Core integration specific] + +Signed-off-by: Mark Hatle <mark.hatle@windriver.com> +Signed-off-by: Jackie Huang <jackie.huang@windriver.com> +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: Python-2.7.11/configure.ac +=================================================================== +--- Python-2.7.11.orig/configure.ac ++++ Python-2.7.11/configure.ac +@@ -33,7 +33,7 @@ if test "$cross_compiling" = yes; then + AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found]) + fi + AC_MSG_RESULT($interp) +- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp ++ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(CROSSPYTHONPATH):$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp + fi + elif test "$cross_compiling" = maybe; then + AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH]) diff --git a/meta/recipes-devtools/python/python/add-md5module-support.patch b/meta/recipes-devtools/python/python/add-md5module-support.patch new file mode 100644 index 0000000000..33fea77554 --- /dev/null +++ b/meta/recipes-devtools/python/python/add-md5module-support.patch @@ -0,0 +1,18 @@ + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Saul Wold <sgw@linux.intel.com> + +Index: Python-2.7.2/Modules/Setup.dist +=================================================================== +--- Python-2.7.2.orig/Modules/Setup.dist 2011-06-11 08:46:26.000000000 -0700 ++++ Python-2.7.2/Modules/Setup.dist 2011-12-27 15:51:41.244623219 -0800 +@@ -248,7 +248,7 @@ + # Message-Digest Algorithm, described in RFC 1321. The necessary files + # md5.c and md5.h are included here. + +-#_md5 md5module.c md5.c ++_md5 md5module.c md5.c + + + # The _sha module implements the SHA checksum algorithms. diff --git a/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch b/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch new file mode 100644 index 0000000000..3347321fde --- /dev/null +++ b/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch @@ -0,0 +1,39 @@ +_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] + +Also simply disable the tk module since its not in DEPENDS. +Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> + +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 + +diff --git Python-3.5.1.orig/setup.py Python-3.5.1/setup.py +index b4633b9..d7588c0 100644 +--- Python-3.5.1.orig/setup.py ++++ Python-3.5.1/setup.py +@@ -1536,7 +1536,7 @@ class PyBuildExt(build_ext): + self.extensions.extend(exts) + + # Call the method for detecting whether _tkinter can be compiled +- self.detect_tkinter(inc_dirs, lib_dirs) ++ # self.detect_tkinter(inc_dirs, lib_dirs) + + # tkinter module will not be avalaible as yocto + # doesn't have tk integrated (yet) diff --git a/meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch b/meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch new file mode 100644 index 0000000000..337e0e3e29 --- /dev/null +++ b/meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch @@ -0,0 +1,23 @@ +sunaudiodev module is sunos specific so we avoid a warning by not +adding this module to missing variable. + +Upstream-Status: Inappropriate [distribution] + +Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> + +Index: Python-2.7.2/setup.py +=================================================================== +--- Python-2.7.2.orig/setup.py 2012-04-05 22:29:18.049196608 +0300 ++++ Python-2.7.2/setup.py 2012-04-05 22:29:57.505195453 +0300 +@@ -1522,8 +1522,9 @@ + if platform == 'sunos5': + # SunOS specific modules + exts.append( Extension('sunaudiodev', ['sunaudiodev.c']) ) +- else: +- missing.append('sunaudiodev') ++ # If platform is not sunos warning is useless ++ #else: ++ # missing.append('sunaudiodev') + + if platform == 'darwin': + # _scproxy diff --git a/meta/recipes-devtools/python/python/builddir.patch b/meta/recipes-devtools/python/python/builddir.patch new file mode 100644 index 0000000000..ad629a022e --- /dev/null +++ b/meta/recipes-devtools/python/python/builddir.patch @@ -0,0 +1,46 @@ +When cross compiling python, we used to need to install the Makefile, pyconfig.h +and the python library to their final location before being able to compile the +rest of python. This change allows us to point python at its own source when +building, avoiding a variety of sysroot staging issues and simplifying the main +python recipe. + +Upstream-Status: Inappropriate +RP 2012/11/13 + +Index: Python-2.7.9/Lib/sysconfig.py +=================================================================== +--- Python-2.7.9.orig/Lib/sysconfig.py ++++ Python-2.7.9/Lib/sysconfig.py +@@ -93,6 +93,7 @@ _PREFIX = os.path.normpath(sys.prefix) + _EXEC_PREFIX = os.path.normpath(sys.exec_prefix) + _CONFIG_VARS = None + _USER_BASE = None ++_PYTHONBUILDDIR = os.environ.get("PYTHONBUILDDIR", None) + + def _safe_realpath(path): + try: +@@ -100,7 +101,9 @@ def _safe_realpath(path): + except OSError: + return path + +-if sys.executable: ++if _PYTHONBUILDDIR: ++ _PROJECT_BASE = _PYTHONBUILDDIR ++elif sys.executable: + _PROJECT_BASE = os.path.dirname(_safe_realpath(sys.executable)) + else: + # sys.executable can be empty if argv[0] has been changed and Python is +Index: Python-2.7.9/Lib/distutils/sysconfig.py +=================================================================== +--- Python-2.7.9.orig/Lib/distutils/sysconfig.py ++++ Python-2.7.9/Lib/distutils/sysconfig.py +@@ -26,6 +26,9 @@ EXEC_PREFIX = os.path.normpath(sys.exec_ + # live in project/PCBuild9. If we're dealing with an x64 Windows build, + # it'll live in project/PCbuild/amd64. + project_base = os.path.dirname(os.path.abspath(sys.executable)) ++_PYTHONBUILDDIR = os.environ.get("PYTHONBUILDDIR", None) ++if _PYTHONBUILDDIR: ++ project_base = _PYTHONBUILDDIR + if os.name == "nt" and "pcbuild" in project_base[-8:].lower(): + project_base = os.path.abspath(os.path.join(project_base, os.path.pardir)) + # PC/VS7.1 diff --git a/meta/recipes-devtools/python/python/cgi_py.patch b/meta/recipes-devtools/python/python/cgi_py.patch new file mode 100644 index 0000000000..de504f9dcf --- /dev/null +++ b/meta/recipes-devtools/python/python/cgi_py.patch @@ -0,0 +1,23 @@ +Lib/cgi.py: Update the script as mentioned in the comment + +Upstream-Status: Inappropriate [distribution] + +Signed-off-by: Mark Hatle <mark.hatle@windriver.com> + +--- 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. + diff --git a/meta/recipes-devtools/python/python/check-if-target-is-64b-not-host.patch b/meta/recipes-devtools/python/python/check-if-target-is-64b-not-host.patch new file mode 100644 index 0000000000..e6d6c65bbe --- /dev/null +++ b/meta/recipes-devtools/python/python/check-if-target-is-64b-not-host.patch @@ -0,0 +1,57 @@ +Author: Andrei Gherzan <andrei@gherzan.ro> +Date: Sun Mar 25 02:02:27 2012 +0200 + +This patch was added for 64bit host machines. In the compile process python +is checking if platform is a 64bit platform using sys.maxint which is the host's +value. The patch fixes this issue so that python would check if TARGET machine +is 64bit not the HOST machine. In this way will have "dl" and "imageop" modules +built if HOST machine is 64bit but the target machine is 32bit. + +Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> + +Upstream-Status: Pending + +Index: Python-2.7.11/setup.py +=================================================================== +--- Python-2.7.11.orig/setup.py ++++ Python-2.7.11/setup.py +@@ -35,6 +35,21 @@ COMPILED_WITH_PYDEBUG = ('--with-pydebug + # This global variable is used to hold the list of modules to be disabled. + disabled_module_list = [] + ++def target_is_64bit_platform (): ++ """ ++ In case of cross-compile, some modules are not build as setup checks if HOST ++ is 64bit and not TARGET. ++ As python was built for TARGET we can check this in pyconfig.h in this way: ++ Sizeof LONG on a 32 bit platform is 4 bytes ++ Sizeof LONG on a 64 bit platform is 8 bytes ++ """ ++ pyconf = open("pyconfig.h").read() ++ aux = re.search(r"#s*define\s+SIZEOF_LONG\s+8\s*", pyconf) ++ if aux is not None: ++ return True ++ else: ++ return False ++ + def add_dir_to_list(dirlist, dir): + """Add the directory 'dir' to the list 'dirlist' (at the front) if + 1) 'dir' is not already in 'dirlist' +@@ -716,7 +731,7 @@ class PyBuildExt(build_ext): + exts.append( Extension('audioop', ['audioop.c']) ) + + # Disabled on 64-bit platforms +- if sys.maxsize != 9223372036854775807L: ++ if not target_is_64bit_platform(): + # Operations on images + exts.append( Extension('imageop', ['imageop.c']) ) + else: +@@ -1545,7 +1560,7 @@ class PyBuildExt(build_ext): + missing.append('_codecs_%s' % loc) + + # Dynamic loading module +- if sys.maxint == 0x7fffffff: ++ if not target_is_64bit_platform(): + # This requires sizeof(int) == sizeof(long) == sizeof(char*) + dl_inc = find_file('dlfcn.h', [], inc_dirs) + if (dl_inc is not None) and (host_platform not in ['atheos']): diff --git a/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch b/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch new file mode 100644 index 0000000000..669112dab0 --- /dev/null +++ b/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch @@ -0,0 +1,33 @@ +Add 'build-test' and 'runtest-TESTS' targets to Makefile, to build and run tests +cross-compiled. + +Signed-off-by: Tudor Florea <tudor.florea@enea.com> +Upstream-Status: Pending +--- +diff -ruN a/Makefile.pre.in b/Makefile.pre.in +--- a/Makefile.pre.in 2013-06-27 10:44:11.033840532 +0200 ++++ b/Makefile.pre.in 2013-06-27 10:44:39.572635273 +0200 +@@ -709,14 +709,19 @@ + # generated bytecode. This is sometimes a very shy bug needing a lot of + # sample data. + +-TESTOPTS= -l $(EXTRATESTOPTS) ++TESTOPTS= -l -v $(EXTRATESTOPTS) + TESTPROG= $(srcdir)/Lib/test/regrtest.py +-TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS) +-test: all platform +- -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f ++TESTPYTHON= $(RUNSHARED) $(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS) ++test: build-test ++ $(MAKE) runtest-TESTS ++ ++runtest-TESTS: ++ -find $(srcdir) -name '*.py[co]' -print | xargs rm -f + -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) + $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) + ++build-test: all platform ++ + testall: all platform + -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f + $(TESTPYTHON) $(srcdir)/Lib/compileall.py diff --git a/meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch b/meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch new file mode 100644 index 0000000000..5f7309367c --- /dev/null +++ b/meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch @@ -0,0 +1,77 @@ +Upstream-Status: Inappropriate [Embedded specific] + +This patch fixes issuing with different libdir like lib64. +This patch makes the native python binary modules findable +in the install process of the host python. + +Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> +Date: 2012/03/14 + +Updated for python 2.7.3 +Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> +Date: 2012/05/01 + +Rebased for python-2.7.9 +Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> + + +Index: Python-2.7.9/Lib/sysconfig.py +=================================================================== +--- Python-2.7.9.orig/Lib/sysconfig.py ++++ Python-2.7.9/Lib/sysconfig.py +@@ -9,7 +9,7 @@ _INSTALL_SCHEMES = { + 'posix_prefix': { + 'stdlib': '{base}/'+sys.lib+'/python{py_version_short}', + 'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}', +- 'purelib': '{base}/lib/python{py_version_short}/site-packages', ++ 'purelib': '{base}/'+sys.lib+'/python{py_version_short}/site-packages', + 'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages', + 'include': '{base}/include/python{py_version_short}', + 'platinclude': '{platbase}/include/python{py_version_short}', +@@ -67,7 +67,7 @@ _INSTALL_SCHEMES = { + 'posix_user': { + 'stdlib': '{userbase}/'+sys.lib+'/python{py_version_short}', + 'platstdlib': '{userbase}/'+sys.lib+'/python{py_version_short}', +- 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', ++ 'purelib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages', + 'platlib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages', + 'include': '{userbase}/include/python{py_version_short}', + 'scripts': '{userbase}/bin', +Index: Python-2.7.9/Makefile.pre.in +=================================================================== +--- Python-2.7.9.orig/Makefile.pre.in ++++ Python-2.7.9/Makefile.pre.in +@@ -1046,27 +1046,27 @@ libinstall: build_all $(srcdir)/Lib/$(PL + $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ + $(DESTDIR)$(LIBDEST)/distutils/tests ; \ + fi +- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ ++ PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ + $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST) -f \ + -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ + $(DESTDIR)$(LIBDEST) +- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ ++ PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH}$(RUNSHARED) \ + $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST) -f \ + -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ + $(DESTDIR)$(LIBDEST) +- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ ++ -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ + $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST)/site-packages -f \ + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages +- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ ++ -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ + $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST)/site-packages -f \ + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages +- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ ++ -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ + $(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt +- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ ++ -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ + $(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt + + # Create the PLATDIR source directory, if one wasn't distributed.. diff --git a/meta/recipes-devtools/python/python/host_include_contamination.patch b/meta/recipes-devtools/python/python/host_include_contamination.patch new file mode 100644 index 0000000000..e0aafb218b --- /dev/null +++ b/meta/recipes-devtools/python/python/host_include_contamination.patch @@ -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 <raj.khem@gmail.com> +Upstream-Status: Pending + + +diff --git a/setup.py b/setup.py +index ba2d242..bf859be 100644 +--- a/setup.py ++++ b/setup.py +@@ -393,6 +393,8 @@ class PyBuildExt(build_ext): + + if not find_executable('dpkg-architecture'): + return ++ if os.environ.get('CROSS_COMPILE') is not None: ++ return + opt = '' + if cross_compiling: + opt = '-t' + sysconfig.get_config_var('HOST_GNU_TYPE') diff --git a/meta/recipes-devtools/python/python/multilib.patch b/meta/recipes-devtools/python/python/multilib.patch new file mode 100644 index 0000000000..50cc5911aa --- /dev/null +++ b/meta/recipes-devtools/python/python/multilib.patch @@ -0,0 +1,296 @@ +Rebased for python-2.7.9 +Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> + +Index: Python-2.7.13/configure.ac +=================================================================== +--- Python-2.7.13.orig/configure.ac ++++ Python-2.7.13/configure.ac +@@ -759,6 +759,10 @@ SunOS*) + ;; + esac + ++AC_SUBST(LIB) ++AC_MSG_CHECKING(LIB) ++LIB=`basename ${libdir}` ++AC_MSG_RESULT($LIB) + + AC_SUBST(LIBRARY) + AC_MSG_CHECKING(LIBRARY) +Index: Python-2.7.13/Include/pythonrun.h +=================================================================== +--- Python-2.7.13.orig/Include/pythonrun.h ++++ Python-2.7.13/Include/pythonrun.h +@@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void); + /* In their own files */ + PyAPI_FUNC(const char *) Py_GetVersion(void); + PyAPI_FUNC(const char *) Py_GetPlatform(void); ++PyAPI_FUNC(const char *) Py_GetLib(void); + PyAPI_FUNC(const char *) Py_GetCopyright(void); + PyAPI_FUNC(const char *) Py_GetCompiler(void); + PyAPI_FUNC(const char *) Py_GetBuildInfo(void); +Index: Python-2.7.13/Lib/distutils/command/install.py +=================================================================== +--- Python-2.7.13.orig/Lib/distutils/command/install.py ++++ Python-2.7.13/Lib/distutils/command/install.py +@@ -22,6 +22,8 @@ from site import USER_BASE + from site import USER_SITE + + ++libname = sys.lib ++ + if sys.version < "2.2": + WINDOWS_SCHEME = { + 'purelib': '$base', +@@ -42,7 +44,7 @@ else: + INSTALL_SCHEMES = { + 'unix_prefix': { + 'purelib': '$base/lib/python$py_version_short/site-packages', +- 'platlib': '$platbase/lib/python$py_version_short/site-packages', ++ 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages', + 'headers': '$base/include/python$py_version_short/$dist_name', + 'scripts': '$base/bin', + 'data' : '$base', +Index: Python-2.7.13/Lib/distutils/sysconfig.py +=================================================================== +--- Python-2.7.13.orig/Lib/distutils/sysconfig.py ++++ Python-2.7.13/Lib/distutils/sysconfig.py +@@ -119,8 +119,11 @@ def get_python_lib(plat_specific=0, stan + prefix = plat_specific and EXEC_PREFIX or PREFIX + + if os.name == "posix": +- libpython = os.path.join(prefix, +- "lib", "python" + get_python_version()) ++ if plat_specific or standard_lib: ++ lib = sys.lib ++ else: ++ lib = "lib" ++ libpython = os.path.join(prefix, lib, "python" + get_python_version()) + if standard_lib: + return libpython + else: +Index: Python-2.7.13/Lib/pydoc.py +=================================================================== +--- Python-2.7.13.orig/Lib/pydoc.py ++++ Python-2.7.13/Lib/pydoc.py +@@ -375,7 +375,7 @@ class Doc: + docmodule = docclass = docroutine = docother = docproperty = docdata = fail + + def getdocloc(self, object, +- basedir=os.path.join(sys.exec_prefix, "lib", ++ basedir=os.path.join(sys.exec_prefix, "sys.lib", + "python"+sys.version[0:3])): + """Return the location of module docs or None""" + +Index: Python-2.7.13/Lib/site.py +=================================================================== +--- Python-2.7.13.orig/Lib/site.py ++++ Python-2.7.13/Lib/site.py +@@ -288,13 +288,18 @@ def getsitepackages(): + if sys.platform in ('os2emx', 'riscos'): + sitepackages.append(os.path.join(prefix, "Lib", "site-packages")) + elif os.sep == '/': +- sitepackages.append(os.path.join(prefix, "lib", ++ sitepackages.append(os.path.join(prefix, sys.lib, + "python" + sys.version[:3], + "site-packages")) +- sitepackages.append(os.path.join(prefix, "lib", "site-python")) ++ sitepackages.append(os.path.join(prefix, sys.lib, "site-python")) ++ if sys.lib != "lib": ++ sitepackages.append(os.path.join(prefix, "lib", ++ "python" + sys.version[:3], ++ "site-packages")) ++ sitepackages.append(os.path.join(prefix, "lib", "site-python")) + else: + sitepackages.append(prefix) +- sitepackages.append(os.path.join(prefix, "lib", "site-packages")) ++ sitepackages.append(os.path.join(prefix, sys.lib, "site-packages")) + return sitepackages + + def addsitepackages(known_paths): +Index: Python-2.7.13/Lib/sysconfig.py +=================================================================== +--- Python-2.7.13.orig/Lib/sysconfig.py ++++ Python-2.7.13/Lib/sysconfig.py +@@ -7,10 +7,10 @@ from os.path import pardir, realpath + + _INSTALL_SCHEMES = { + 'posix_prefix': { +- 'stdlib': '{base}/lib/python{py_version_short}', +- 'platstdlib': '{platbase}/lib/python{py_version_short}', ++ 'stdlib': '{base}/'+sys.lib+'/python{py_version_short}', ++ 'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}', + 'purelib': '{base}/lib/python{py_version_short}/site-packages', +- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages', ++ 'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages', + 'include': '{base}/include/python{py_version_short}', + 'platinclude': '{platbase}/include/python{py_version_short}', + 'scripts': '{base}/bin', +@@ -65,10 +65,10 @@ _INSTALL_SCHEMES = { + 'data' : '{userbase}', + }, + 'posix_user': { +- 'stdlib': '{userbase}/lib/python{py_version_short}', +- 'platstdlib': '{userbase}/lib/python{py_version_short}', ++ 'stdlib': '{userbase}/'+sys.lib+'/python{py_version_short}', ++ 'platstdlib': '{userbase}/'+sys.lib+'/python{py_version_short}', + 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', +- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages', ++ 'platlib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages', + 'include': '{userbase}/include/python{py_version_short}', + 'scripts': '{userbase}/bin', + 'data' : '{userbase}', +Index: Python-2.7.13/Lib/test/test_dl.py +=================================================================== +--- Python-2.7.13.orig/Lib/test/test_dl.py ++++ Python-2.7.13/Lib/test/test_dl.py +@@ -4,10 +4,11 @@ + import unittest + from test.test_support import verbose, import_module + dl = import_module('dl', deprecated=True) ++import sys + + sharedlibs = [ +- ('/usr/lib/libc.so', 'getpid'), +- ('/lib/libc.so.6', 'getpid'), ++ ('/usr/'+sys.lib+'/libc.so', 'getpid'), ++ ('/'+sys.lib+'/libc.so.6', 'getpid'), + ('/usr/bin/cygwin1.dll', 'getpid'), + ('/usr/lib/libc.dylib', 'getpid'), + ] +Index: Python-2.7.13/Lib/test/test_site.py +=================================================================== +--- Python-2.7.13.orig/Lib/test/test_site.py ++++ Python-2.7.13/Lib/test/test_site.py +@@ -235,12 +235,16 @@ class HelperFunctionsTests(unittest.Test + self.assertEqual(dirs[0], wanted) + elif os.sep == '/': + # OS X, Linux, FreeBSD, etc +- self.assertEqual(len(dirs), 2) + wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3], + 'site-packages') +- self.assertEqual(dirs[0], wanted) ++ self.assertTrue(wanted in dirs) + wanted = os.path.join('xoxo', 'lib', 'site-python') +- self.assertEqual(dirs[1], wanted) ++ self.assertTrue(wanted in dirs) ++ wanted = os.path.join('xoxo', sys.lib, 'python' + sys.version[:3], ++ 'site-packages') ++ self.assertTrue(wanted in dirs) ++ wanted = os.path.join('xoxo', sys.lib, 'site-python') ++ self.assertTrue(wanted in dirs) + else: + # other platforms + self.assertEqual(len(dirs), 2) +Index: Python-2.7.13/Lib/trace.py +=================================================================== +--- Python-2.7.13.orig/Lib/trace.py ++++ Python-2.7.13/Lib/trace.py +@@ -754,10 +754,10 @@ def main(argv=None): + # should I also call expanduser? (after all, could use $HOME) + + s = s.replace("$prefix", +- os.path.join(sys.prefix, "lib", ++ os.path.join(sys.prefix, sys.lib, + "python" + sys.version[:3])) + s = s.replace("$exec_prefix", +- os.path.join(sys.exec_prefix, "lib", ++ os.path.join(sys.exec_prefix, sys.lib, + "python" + sys.version[:3])) + s = os.path.normpath(s) + ignore_dirs.append(s) +Index: Python-2.7.13/Makefile.pre.in +=================================================================== +--- Python-2.7.13.orig/Makefile.pre.in ++++ Python-2.7.13/Makefile.pre.in +@@ -92,6 +92,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG + + # Machine-dependent subdirectories + MACHDEP= @MACHDEP@ ++LIB= @LIB@ + + # Multiarch directory (may be empty) + MULTIARCH= @MULTIARCH@ +@@ -111,7 +112,7 @@ LIBDIR= @libdir@ + MANDIR= @mandir@ + INCLUDEDIR= @includedir@ + CONFINCLUDEDIR= $(exec_prefix)/include +-SCRIPTDIR= $(prefix)/lib ++SCRIPTDIR= $(prefix)/@LIB@ + + # Detailed destination directories + BINLIBDEST= $(LIBDIR)/python$(VERSION) +@@ -669,6 +670,7 @@ Modules/getpath.o: $(srcdir)/Modules/get + -DEXEC_PREFIX='"$(exec_prefix)"' \ + -DVERSION='"$(VERSION)"' \ + -DVPATH='"$(VPATH)"' \ ++ -DLIB='"$(LIB)"' \ + -o $@ $(srcdir)/Modules/getpath.c + + Modules/python.o: $(srcdir)/Modules/python.c +@@ -709,7 +711,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES) + Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H) + + Python/getplatform.o: $(srcdir)/Python/getplatform.c +- $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c ++ $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -DLIB='"$(LIB)"' -o $@ $(srcdir)/Python/getplatform.c + + Python/importdl.o: $(srcdir)/Python/importdl.c + $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c +Index: Python-2.7.13/Modules/getpath.c +=================================================================== +--- Python-2.7.13.orig/Modules/getpath.c ++++ Python-2.7.13/Modules/getpath.c +@@ -100,6 +100,13 @@ + #error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined" + #endif + ++#define LIB_PYTHON LIB "/python" VERSION ++ ++#ifndef PYTHONPATH ++#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \ ++ EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload" ++#endif ++ + #ifndef LANDMARK + #define LANDMARK "os.py" + #endif +@@ -108,7 +115,7 @@ static char prefix[MAXPATHLEN+1]; + static char exec_prefix[MAXPATHLEN+1]; + static char progpath[MAXPATHLEN+1]; + static char *module_search_path = NULL; +-static char lib_python[] = "lib/python" VERSION; ++static char lib_python[] = LIB_PYTHON; + + static void + reduce(char *dir) +Index: Python-2.7.13/Python/getplatform.c +=================================================================== +--- Python-2.7.13.orig/Python/getplatform.c ++++ Python-2.7.13/Python/getplatform.c +@@ -10,3 +10,13 @@ Py_GetPlatform(void) + { + return PLATFORM; + } ++ ++#ifndef LIB ++#define LIB "lib" ++#endif ++ ++const char * ++Py_GetLib(void) ++{ ++ return LIB; ++} +Index: Python-2.7.13/Python/sysmodule.c +=================================================================== +--- Python-2.7.13.orig/Python/sysmodule.c ++++ Python-2.7.13/Python/sysmodule.c +@@ -1437,6 +1437,8 @@ _PySys_Init(void) + PyString_FromString(Py_GetCopyright())); + SET_SYS_FROM_STRING("platform", + PyString_FromString(Py_GetPlatform())); ++ SET_SYS_FROM_STRING("lib", ++ PyString_FromString(Py_GetLib())); + SET_SYS_FROM_STRING("executable", + PyString_FromString(Py_GetProgramFullPath())); + SET_SYS_FROM_STRING("prefix", diff --git a/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch b/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch new file mode 100644 index 0000000000..951cb466ff --- /dev/null +++ b/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch @@ -0,0 +1,19 @@ +When using make -j with the 'install' target, it's possible for altbininstall +(which normally creates BINDIR) and libainstall (which doesn't, though it +installs python-config there) to race, resulting in a failure due to +attempting to install python-config into a nonexistent BINDIR. Ensure it also +exists in the libainstall target. + +Upstream-Status: Pending + +--- Python-2.7.3.orig/Makefile.pre.in ++++ Python-2.7.3/Makefile.pre.in +@@ -1008,7 +1008,7 @@ LIBPL= $(LIBP)/config + LIBPC= $(LIBDIR)/pkgconfig + + libainstall: all python-config +- @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC); \ ++ @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC) $(BINDIR); \ + do \ + if test ! -d $(DESTDIR)$$i; then \ + echo "Creating directory $$i"; \ diff --git a/meta/recipes-devtools/python/python/python-2.7.3-remove-bsdb-rpath.patch b/meta/recipes-devtools/python/python/python-2.7.3-remove-bsdb-rpath.patch new file mode 100644 index 0000000000..216be0a448 --- /dev/null +++ b/meta/recipes-devtools/python/python/python-2.7.3-remove-bsdb-rpath.patch @@ -0,0 +1,28 @@ +Upstream-Status: Inappropriate [embedded specific] + +Remove the RPATH to avoid QA issue warning. + +RP: Added secondary unnecessary rpath to the list 2012/8/7 +Signed-off-by: Jackie Huang <jackie.huang@windriver.com> + + +Index: Python-2.7.3/setup.py +=================================================================== +--- Python-2.7.3.orig/setup.py 2012-08-07 10:41:58.560132529 +0000 ++++ Python-2.7.3/setup.py 2012-08-07 11:09:47.852094515 +0000 +@@ -1042,7 +1042,6 @@ + exts.append(Extension('_bsddb', ['_bsddb.c'], + depends = ['bsddb.h'], + library_dirs=dblib_dir, +- runtime_library_dirs=dblib_dir, + include_dirs=db_incs, + libraries=dblibs)) + else: +@@ -1252,7 +1251,6 @@ + print "building dbm using bdb" + dbmext = Extension('dbm', ['dbmmodule.c'], + library_dirs=dblib_dir, +- runtime_library_dirs=dblib_dir, + include_dirs=db_incs, + define_macros=[ + ('HAVE_BERKDB_H', None), diff --git a/meta/recipes-devtools/python/python/run-ptest b/meta/recipes-devtools/python/python/run-ptest new file mode 100644 index 0000000000..a2f9eed444 --- /dev/null +++ b/meta/recipes-devtools/python/python/run-ptest @@ -0,0 +1,5 @@ +#!/bin/sh +# +#This script is used to run python test suites + +make -f LIBDIR/python/ptest/Makefile -k runtest-TESTS srcdir=LIBDIR/python2.7 TESTPROG=LIBDIR/python2.7/test/regrtest.py | sed -e '/\.\.\. ok/ s/^/PASS: /g' -e '/\.\.\. [ERROR|FAIL]/ s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g' diff --git a/meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch b/meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch new file mode 100644 index 0000000000..dacb552ec7 --- /dev/null +++ b/meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch @@ -0,0 +1,35 @@ +python should search for db.h in inc_dirs and not in a hardcoded path. +If db.h is found but HASHVERSION is not 2 we avoid a warning by not +adding this module to missing variable. + +Upstream-Status: Inappropriate [distribution] + +Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> + + +diff --git a/setup.py b/setup.py +index b887808..ae51607 100644 +--- a/setup.py ++++ b/setup.py +@@ -1237,6 +1237,8 @@ class PyBuildExt(build_ext): + # the more recent berkeleydb's db.h file first in the include path + # when attempting to compile and it will fail. + f = "/usr/include/db.h" ++ if len(inc_dirs) != 0: ++ f = os.path.join(inc_dirs[0], "db.h") + + if host_platform == 'darwin': + if is_macosx_sdk_path(f): +@@ -1257,8 +1259,10 @@ class PyBuildExt(build_ext): + libraries=libraries)) + else: + exts.append(Extension('bsddb185', ['bsddbmodule.c'])) +- else: +- missing.append('bsddb185') ++ # If a newer version is detected don't report an useless ++ # warning ++ #else: ++ # missing.append('bsddb185') + else: + missing.append('bsddb185') + diff --git a/meta/recipes-devtools/python/python/setup_py_skip_cross_import_check.patch b/meta/recipes-devtools/python/python/setup_py_skip_cross_import_check.patch new file mode 100644 index 0000000000..6ccdb948b9 --- /dev/null +++ b/meta/recipes-devtools/python/python/setup_py_skip_cross_import_check.patch @@ -0,0 +1,27 @@ +This patch skips over the 'import check' setup.py does when building +extensions. This generally won't work when cross-compiling. + +Upstream-Status: Inappropriate [embedded-specific] + +Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> + +Index: Python-2.7.2/setup.py +=================================================================== +--- Python-2.7.2.orig/setup.py 2011-11-04 16:46:34.553796410 -0500 ++++ Python-2.7.2/setup.py 2011-11-04 16:59:49.692802313 -0500 +@@ -287,6 +287,15 @@ + (ext.name, sys.exc_info()[1])) + self.failed.append(ext.name) + return ++ ++ # If we're cross-compiling, we want to skip the import check ++ # i.e. we shouldn't be dynamically loading target shared libs ++ if os.environ.get('CROSS_COMPILE') is not None: ++ self.announce( ++ 'WARNING: skipping import check for cross-compiled "%s"' % ++ ext.name) ++ return ++ + # Workaround for Mac OS X: The Carbon-based modules cannot be + # reliably imported into a command-line Python + if 'Carbon' in ext.extra_link_args: diff --git a/meta/recipes-devtools/python/python/setuptweaks.patch b/meta/recipes-devtools/python/python/setuptweaks.patch new file mode 100644 index 0000000000..3a91b1916c --- /dev/null +++ b/meta/recipes-devtools/python/python/setuptweaks.patch @@ -0,0 +1,57 @@ +This patch removes various ways native system options can pass into the python +compilation and somehow break C modules. + +Upstream-Status: Inappropriate [OE Specific] + +RP 2012/04/23 + +Index: Python-2.7.2/setup.py +=================================================================== +--- Python-2.7.2.orig/setup.py 2012-04-23 20:03:47.295582553 +0000 ++++ Python-2.7.2/setup.py 2012-04-23 20:03:15.000000000 +0000 +@@ -231,7 +231,13 @@ + # compilers + if compiler is not None: + (ccshared,cflags) = sysconfig.get_config_vars('CCSHARED','CFLAGS') +- args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags ++ # Need to filter out -isysroot from the flags. Ideally should ++ # figure out target flags here. ++ flags = [] ++ for f in cflags.split(): ++ if not f.startswith("-isystem"): ++ flags.append(f) ++ args['compiler_so'] = compiler + ' ' + ccshared + ' ' + ' '.join(flags) + self.compiler.set_executables(**args) + + build_ext.build_extensions(self) +@@ -393,7 +399,6 @@ + # into configure and stored in the Makefile (issue found on OS X 10.3). + for env_var, arg_name, dir_list in ( + ('LDFLAGS', '-R', self.compiler.runtime_library_dirs), +- ('LDFLAGS', '-L', self.compiler.library_dirs), + ('CPPFLAGS', '-I', self.compiler.include_dirs)): + env_val = sysconfig.get_config_var(env_var) + if env_val: +@@ -419,16 +424,16 @@ + for directory in reversed(options.dirs): + add_dir_to_list(dir_list, directory) + +- if os.path.normpath(sys.prefix) != '/usr' \ +- and not sysconfig.get_config_var('PYTHONFRAMEWORK'): ++# if os.path.normpath(sys.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 + # building a framework with different architectures than + # the one that is currently installed (issue #7473) +- add_dir_to_list(self.compiler.library_dirs, +- sysconfig.get_config_var("LIBDIR")) +- add_dir_to_list(self.compiler.include_dirs, +- sysconfig.get_config_var("INCLUDEDIR")) ++# add_dir_to_list(self.compiler.library_dirs, ++# sysconfig.get_config_var("LIBDIR")) ++# add_dir_to_list(self.compiler.include_dirs, ++# sysconfig.get_config_var("INCLUDEDIR")) + + try: + have_unicode = unicode diff --git a/meta/recipes-devtools/python/python/use_sysroot_ncurses_instead_of_host.patch b/meta/recipes-devtools/python/python/use_sysroot_ncurses_instead_of_host.patch new file mode 100644 index 0000000000..2c657861c8 --- /dev/null +++ b/meta/recipes-devtools/python/python/use_sysroot_ncurses_instead_of_host.patch @@ -0,0 +1,20 @@ +Python tries to use ncursesw from the host, +if it is not found causes an error on configure, +we should use ncursesw from sysroot instead + + +Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> + +Index: Python-2.7.9/configure.ac +=================================================================== +--- Python-2.7.9.orig/configure.ac ++++ Python-2.7.9/configure.ac +@@ -4311,7 +4311,7 @@ fi + + # first curses configure check + ac_save_cppflags="$CPPFLAGS" +-CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw" ++CPPFLAGS="$CPPFLAGS -I=/usr/include/ncursesw" + + AC_CHECK_HEADERS(curses.h ncurses.h) + diff --git a/meta/recipes-devtools/python/python3-async_0.6.2.bb b/meta/recipes-devtools/python/python3-async_0.6.2.bb new file mode 100644 index 0000000000..54a30f5498 --- /dev/null +++ b/meta/recipes-devtools/python/python3-async_0.6.2.bb @@ -0,0 +1,6 @@ +require python-async.inc + +inherit setuptools3 + +RDEPENDS_${PN} += "python3-threading python3-lang" + diff --git a/meta/recipes-devtools/python/python3-dbus_1.2.4.bb b/meta/recipes-devtools/python/python3-dbus_1.2.4.bb new file mode 100644 index 0000000000..de5a01c7f2 --- /dev/null +++ b/meta/recipes-devtools/python/python3-dbus_1.2.4.bb @@ -0,0 +1,23 @@ +SUMMARY = "Python bindings for the DBus inter-process communication system" +SECTION = "devel/python" +HOMEPAGE = "http://www.freedesktop.org/Software/dbus" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=0b83047ce9e948b67c0facc5f233476a" +DEPENDS = "expat dbus dbus-glib virtual/libintl" + +SRC_URI = "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${PV}.tar.gz \ +" + +SRC_URI[md5sum] = "7372a588c83a7232b4e08159bfd48fe5" +SRC_URI[sha256sum] = "e2f1d6871f74fba23652e51d10873e54f71adab0525833c19bad9e99b1b2f9cc" +S = "${WORKDIR}/dbus-python-${PV}" + +inherit distutils3-base autotools pkgconfig + +PACKAGECONFIG ?= "" +PACKAGECONFIG[docs] = "--enable-html-docs,--disable-html-docs,python3-docutils-native" +PACKAGECONFIG[api-docs] = "--enable-api-docs,--disable-api-docs,python3-docutils-native python3-epydoc-native" + +RDEPENDS_${PN} = "python3-io python3-logging python3-stringold python3-threading python3-xml" + +FILES_${PN}-dev += "${libdir}/pkgconfig" diff --git a/meta/recipes-devtools/python/python3-docutils_0.13.1.bb b/meta/recipes-devtools/python/python3-docutils_0.13.1.bb new file mode 100644 index 0000000000..e36388c6fd --- /dev/null +++ b/meta/recipes-devtools/python/python3-docutils_0.13.1.bb @@ -0,0 +1,18 @@ +SUMMARY = "Text processing system for documentation" +HOMEPAGE = "http://docutils.sourceforge.net" +SECTION = "devel/python" +LICENSE = "PSF & BSD-2-Clause & GPLv3" +LIC_FILES_CHKSUM = "file://COPYING.txt;md5=7a4646907ab9083c826280b19e103106" + +DEPENDS = "python3" + +SRC_URI = "${SOURCEFORGE_MIRROR}/docutils/docutils-${PV}.tar.gz" +SRC_URI[md5sum] = "ea4a893c633c788be9b8078b6b305d53" +SRC_URI[sha256sum] = "718c0f5fb677be0f34b781e04241c4067cbd9327b66bdd8e763201130f5175be" + +S = "${WORKDIR}/docutils-${PV}" + +inherit distutils3 + +BBCLASSEXTEND = "native" + diff --git a/meta/recipes-devtools/python/python3-git_2.1.1.bb b/meta/recipes-devtools/python/python3-git_2.1.1.bb new file mode 100644 index 0000000000..7a2d452a24 --- /dev/null +++ b/meta/recipes-devtools/python/python3-git_2.1.1.bb @@ -0,0 +1,7 @@ +require python-git.inc + +DEPENDS = "python3-gitdb" + +inherit setuptools3 + +RDEPENDS_${PN} += "python3-gitdb python3-lang python3-io python3-shell python3-math python3-re python3-subprocess python3-stringold python3-unixadmin python3-enum python3-logging python3-datetime python3-netclient python3-unittest python3-argparse" diff --git a/meta/recipes-devtools/python/python3-gitdb_0.6.4.bb b/meta/recipes-devtools/python/python3-gitdb_0.6.4.bb new file mode 100644 index 0000000000..80d9d469af --- /dev/null +++ b/meta/recipes-devtools/python/python3-gitdb_0.6.4.bb @@ -0,0 +1,7 @@ +require python-gitdb.inc + +DEPENDS = "python3-async python3-smmap" + +inherit distutils3 + +RDEPENDS_${PN} += "python3-smmap python3-async python3-mmap python3-lang python3-io python3-shell python3-crypt python3-compression" diff --git a/meta/recipes-devtools/python/python3-iniparse/0001-Add-python-3-compatibility.patch b/meta/recipes-devtools/python/python3-iniparse/0001-Add-python-3-compatibility.patch new file mode 100644 index 0000000000..44090a20d0 --- /dev/null +++ b/meta/recipes-devtools/python/python3-iniparse/0001-Add-python-3-compatibility.patch @@ -0,0 +1,552 @@ +From 8a98e4d44a5e59439a4b6bd95368cc362412c995 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Fri, 24 Mar 2017 18:06:08 +0200 +Subject: [PATCH] Add python 3 compatibility. + +Taken from +http://pkgs.fedoraproject.org/cgit/rpms/python-iniparse.git/tree/python-iniparse-python3-compat.patch + +Upstream-Status: Inappropriate [upstream is defunct] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + iniparse/__init__.py | 20 ++++++++++---------- + iniparse/compat.py | 30 ++++++++++++++++-------------- + iniparse/config.py | 16 ++++++++-------- + iniparse/configparser.py | 7 +++++++ + iniparse/ini.py | 20 ++++++++++++-------- + iniparse/utils.py | 4 ++-- + tests/__init__.py | 14 +++++++------- + tests/test_compat.py | 23 +++++++++++++++-------- + tests/test_fuzz.py | 18 +++++++++--------- + tests/test_ini.py | 8 ++++---- + tests/test_misc.py | 4 ++-- + tests/test_tidy.py | 2 +- + tests/test_unicode.py | 10 +++++----- + 13 files changed, 98 insertions(+), 78 deletions(-) + create mode 100644 iniparse/configparser.py + +diff --git a/iniparse/__init__.py b/iniparse/__init__.py +index 8de756f..7193f92 100644 +--- a/iniparse/__init__.py ++++ b/iniparse/__init__.py +@@ -3,17 +3,17 @@ + # Copyright (c) 2007 Tim Lauridsen <tla@rasmil.dk> + # All Rights Reserved. See LICENSE-PSF & LICENSE for details. + +-from ini import INIConfig, change_comment_syntax +-from config import BasicConfig, ConfigNamespace +-from compat import RawConfigParser, ConfigParser, SafeConfigParser +-from utils import tidy ++from .ini import INIConfig, change_comment_syntax ++from .config import BasicConfig, ConfigNamespace ++from .compat import RawConfigParser, ConfigParser, SafeConfigParser ++from .utils import tidy + +-from ConfigParser import DuplicateSectionError, \ +- NoSectionError, NoOptionError, \ +- InterpolationMissingOptionError, \ +- InterpolationDepthError, \ +- InterpolationSyntaxError, \ +- DEFAULTSECT, MAX_INTERPOLATION_DEPTH ++from .configparser import DuplicateSectionError, \ ++ NoSectionError, NoOptionError, \ ++ InterpolationMissingOptionError, \ ++ InterpolationDepthError, \ ++ InterpolationSyntaxError, \ ++ DEFAULTSECT, MAX_INTERPOLATION_DEPTH + + __all__ = [ + 'BasicConfig', 'ConfigNamespace', +diff --git a/iniparse/compat.py b/iniparse/compat.py +index db89ed8..f95c25c 100644 +--- a/iniparse/compat.py ++++ b/iniparse/compat.py +@@ -12,19 +12,21 @@ The underlying INIConfig object can be accessed as cfg.data + """ + + import re +-from ConfigParser import DuplicateSectionError, \ +- NoSectionError, NoOptionError, \ +- InterpolationMissingOptionError, \ +- InterpolationDepthError, \ +- InterpolationSyntaxError, \ +- DEFAULTSECT, MAX_INTERPOLATION_DEPTH ++from .configparser import DuplicateSectionError, \ ++ NoSectionError, NoOptionError, \ ++ InterpolationMissingOptionError, \ ++ InterpolationDepthError, \ ++ InterpolationSyntaxError, \ ++ DEFAULTSECT, MAX_INTERPOLATION_DEPTH + + # These are imported only for compatiability. + # The code below does not reference them directly. +-from ConfigParser import Error, InterpolationError, \ +- MissingSectionHeaderError, ParsingError ++from .configparser import Error, InterpolationError, \ ++ MissingSectionHeaderError, ParsingError + +-import ini ++import six ++ ++from . import ini + + class RawConfigParser(object): + def __init__(self, defaults=None, dict_type=dict): +@@ -56,7 +58,7 @@ class RawConfigParser(object): + # The default section is the only one that gets the case-insensitive + # treatment - so it is special-cased here. + if section.lower() == "default": +- raise ValueError, 'Invalid section name: %s' % section ++ raise ValueError('Invalid section name: %s' % section) + + if self.has_section(section): + raise DuplicateSectionError(section) +@@ -88,7 +90,7 @@ class RawConfigParser(object): + filename may also be given. + """ + files_read = [] +- if isinstance(filenames, basestring): ++ if isinstance(filenames, six.string_types): + filenames = [filenames] + for filename in filenames: + try: +@@ -143,7 +145,7 @@ class RawConfigParser(object): + def getboolean(self, section, option): + v = self.get(section, option) + if v.lower() not in self._boolean_states: +- raise ValueError, 'Not a boolean: %s' % v ++ raise ValueError('Not a boolean: %s' % v) + return self._boolean_states[v.lower()] + + def has_option(self, section, option): +@@ -234,7 +236,7 @@ class ConfigParser(RawConfigParser): + if "%(" in value: + try: + value = value % vars +- except KeyError, e: ++ except KeyError as e: + raise InterpolationMissingOptionError( + option, section, rawval, e.args[0]) + else: +@@ -283,7 +285,7 @@ class SafeConfigParser(ConfigParser): + _badpercent_re = re.compile(r"%[^%]|%$") + + def set(self, section, option, value): +- if not isinstance(value, basestring): ++ if not isinstance(value, six.string_types): + raise TypeError("option values must be strings") + # check for bad percent signs: + # first, replace all "good" interpolations +diff --git a/iniparse/config.py b/iniparse/config.py +index 5cfa2ea..3b28549 100644 +--- a/iniparse/config.py ++++ b/iniparse/config.py +@@ -143,7 +143,7 @@ class BasicConfig(ConfigNamespace): + + >>> n.aaa = 42 + >>> del n.x +- >>> print n ++ >>> print(n) + aaa = 42 + name.first = paramjit + name.last = oberoi +@@ -152,7 +152,7 @@ class BasicConfig(ConfigNamespace): + + >>> isinstance(n.name, ConfigNamespace) + True +- >>> print n.name ++ >>> print(n.name) + first = paramjit + last = oberoi + >>> sorted(list(n.name)) +@@ -160,7 +160,7 @@ class BasicConfig(ConfigNamespace): + + Finally, values can be read from a file as follows: + +- >>> from StringIO import StringIO ++ >>> from six import StringIO + >>> sio = StringIO(''' + ... # comment + ... ui.height = 100 +@@ -171,7 +171,7 @@ class BasicConfig(ConfigNamespace): + ... ''') + >>> n = BasicConfig() + >>> n._readfp(sio) +- >>> print n ++ >>> print(n) + complexity = medium + data.secret.password = goodness=gracious me + have_python +@@ -199,7 +199,7 @@ class BasicConfig(ConfigNamespace): + + def __str__(self, prefix=''): + lines = [] +- keys = self._data.keys() ++ keys = list(self._data.keys()) + keys.sort() + for name in keys: + value = self._data[name] +@@ -258,7 +258,7 @@ def update_config(target, source): + >>> n.ui.display_clock = True + >>> n.ui.display_qlength = True + >>> n.ui.width = 150 +- >>> print n ++ >>> print(n) + playlist.expand_playlist = True + ui.display_clock = True + ui.display_qlength = True +@@ -267,7 +267,7 @@ def update_config(target, source): + >>> from iniparse import ini + >>> i = ini.INIConfig() + >>> update_config(i, n) +- >>> print i ++ >>> print(i) + [playlist] + expand_playlist = True + <BLANKLINE> +@@ -277,7 +277,7 @@ def update_config(target, source): + width = 150 + + """ +- for name in source: ++ for name in sorted(source): + value = source[name] + if isinstance(value, ConfigNamespace): + if name in target: +diff --git a/iniparse/configparser.py b/iniparse/configparser.py +new file mode 100644 +index 0000000..c543d50 +--- /dev/null ++++ b/iniparse/configparser.py +@@ -0,0 +1,7 @@ ++try: ++ from ConfigParser import * ++ # not all objects get imported with __all__ ++ from ConfigParser import Error, InterpolationMissingOptionError ++except ImportError: ++ from configparser import * ++ from configparser import Error, InterpolationMissingOptionError +diff --git a/iniparse/ini.py b/iniparse/ini.py +index 408354d..052d9e9 100644 +--- a/iniparse/ini.py ++++ b/iniparse/ini.py +@@ -7,7 +7,7 @@ + + Example: + +- >>> from StringIO import StringIO ++ >>> from six import StringIO + >>> sio = StringIO('''# configure foo-application + ... [foo] + ... bar1 = qualia +@@ -16,14 +16,14 @@ Example: + ... special = 1''') + + >>> cfg = INIConfig(sio) +- >>> print cfg.foo.bar1 ++ >>> print(cfg.foo.bar1) + qualia +- >>> print cfg['foo-ext'].special ++ >>> print(cfg['foo-ext'].special) + 1 + >>> cfg.foo.newopt = 'hi!' + >>> cfg.baz.enabled = 0 + +- >>> print cfg ++ >>> print(cfg) + # configure foo-application + [foo] + bar1 = qualia +@@ -42,9 +42,11 @@ Example: + # Backward-compatiable with ConfigParser + + import re +-from ConfigParser import DEFAULTSECT, ParsingError, MissingSectionHeaderError ++from .configparser import DEFAULTSECT, ParsingError, MissingSectionHeaderError + +-import config ++import six ++ ++from . import config + + class LineType(object): + line = None +@@ -278,6 +280,8 @@ class LineContainer(object): + value = property(get_value, set_value) + + def __str__(self): ++ for c in self.contents: ++ pass#print(c.__str__()) + s = [x.__str__() for x in self.contents] + return '\n'.join(s) + +@@ -465,7 +469,7 @@ class INIConfig(config.ConfigNamespace): + self._sections = {} + if defaults is None: defaults = {} + self._defaults = INISection(LineContainer(), optionxformsource=self) +- for name, value in defaults.iteritems(): ++ for name, value in defaults.items(): + self._defaults[name] = value + if fp is not None: + self._readfp(fp) +@@ -551,7 +555,7 @@ class INIConfig(config.ConfigNamespace): + + for line in readline_iterator(fp): + # Check for BOM on first line +- if linecount == 0 and isinstance(line, unicode): ++ if linecount == 0 and isinstance(line, six.text_type): + if line[0] == u'\ufeff': + line = line[1:] + self._bom = True +diff --git a/iniparse/utils.py b/iniparse/utils.py +index 829fc28..f8b773a 100644 +--- a/iniparse/utils.py ++++ b/iniparse/utils.py +@@ -1,5 +1,5 @@ +-import compat +-from ini import LineContainer, EmptyLine ++from . import compat ++from .ini import LineContainer, EmptyLine + + def tidy(cfg): + """Clean up blank lines. +diff --git a/tests/__init__.py b/tests/__init__.py +index f1fa321..88689fb 100644 +--- a/tests/__init__.py ++++ b/tests/__init__.py +@@ -1,12 +1,12 @@ + import unittest, doctest + +-import test_ini +-import test_misc +-import test_fuzz +-import test_compat +-import test_unicode +-import test_tidy +-import test_multiprocessing ++from . import test_ini ++from . import test_misc ++from . import test_fuzz ++from . import test_compat ++from . import test_unicode ++from . import test_tidy ++from . import test_multiprocessing + from iniparse import config + from iniparse import ini + +diff --git a/tests/test_compat.py b/tests/test_compat.py +index b8da3d5..b6dfb5c 100644 +--- a/tests/test_compat.py ++++ b/tests/test_compat.py +@@ -1,9 +1,16 @@ + from iniparse import compat as ConfigParser +-import StringIO ++from six import StringIO ++try: ++ import UserDict ++except ImportError: ++ import collections as UserDict + import unittest +-import UserDict + +-from test import test_support ++import sys ++if sys.version_info[0] < 3: ++ from test import test_support ++else: ++ from test import support as test_support + + class SortedDict(UserDict.UserDict): + def items(self): +@@ -35,7 +42,7 @@ class TestCaseBase(unittest.TestCase): + + def fromstring(self, string, defaults=None): + cf = self.newconfig(defaults) +- sio = StringIO.StringIO(string) ++ sio = StringIO(string) + cf.readfp(sio) + return cf + +@@ -161,7 +168,7 @@ class TestCaseBase(unittest.TestCase): + "No Section!\n") + + def parse_error(self, exc, src): +- sio = StringIO.StringIO(src) ++ sio = StringIO(src) + self.assertRaises(exc, self.cf.readfp, sio) + + def test_query_errors(self): +@@ -181,7 +188,7 @@ class TestCaseBase(unittest.TestCase): + def get_error(self, exc, section, option): + try: + self.cf.get(section, option) +- except exc, e: ++ except exc as e: + return e + else: + self.fail("expected exception type %s.%s" +@@ -227,7 +234,7 @@ class TestCaseBase(unittest.TestCase): + "foo: another very\n" + " long line" + ) +- output = StringIO.StringIO() ++ output = StringIO() + cf.write(output) + self.assertEqual( + output.getvalue(), +@@ -465,7 +472,7 @@ class SortedTestCase(RawConfigParserTestCase): + "o1=4\n" + "[a]\n" + "k=v\n") +- output = StringIO.StringIO() ++ output = StringIO() + self.cf.write(output) + self.assertEquals(output.getvalue(), + "[a]\n" +diff --git a/tests/test_fuzz.py b/tests/test_fuzz.py +index 5420dcc..b219500 100644 +--- a/tests/test_fuzz.py ++++ b/tests/test_fuzz.py +@@ -1,9 +1,10 @@ + import re + import os + import random ++import sys + import unittest +-import ConfigParser +-from StringIO import StringIO ++from six import StringIO ++from six.moves import configparser + from iniparse import compat, ini, tidy + + # TODO: +@@ -96,24 +97,25 @@ class test_fuzz(unittest.TestCase): + s = '\n'.join(good_lines) + cc = compat.RawConfigParser() + cc.readfp(StringIO(s)) +- cc_py = ConfigParser.RawConfigParser() ++ cc_py = configparser.RawConfigParser() + cc_py.readfp(StringIO(s)) + # compare the two configparsers + self.assertEqualConfig(cc_py, cc) + # check that tidy does not change semantics + tidy(cc) +- cc_tidy = ConfigParser.RawConfigParser() ++ cc_tidy = configparser.RawConfigParser() + cc_tidy.readfp(StringIO(str(cc.data))) + self.assertEqualConfig(cc_py, cc_tidy) + except AssertionError: + fname = 'fuzz-test-iter-%d.ini' % fuzz_iter +- print 'Fuzz test failed at iteration', fuzz_iter +- print 'Writing out failing INI file as', fname ++ print('Fuzz test failed at iteration', fuzz_iter) ++ print('Writing out failing INI file as', fname) + f = open(fname, 'w') + f.write(s) + f.close() + raise + ++ @unittest.skipIf(sys.version_info[0] > 2, 'http://code.google.com/p/iniparse/issues/detail?id=22#c9') + def assertEqualConfig(self, c1, c2): + self.assertEqualSorted(c1.sections(), c2.sections()) + self.assertEqualSorted(c1.defaults().items(), c2.defaults().items()) +@@ -123,9 +125,7 @@ class test_fuzz(unittest.TestCase): + self.assertEqual(c1.get(sec, opt), c2.get(sec, opt)) + + def assertEqualSorted(self, l1, l2): +- l1.sort() +- l2.sort() +- self.assertEqual(l1, l2) ++ self.assertEqual(sorted(l1), sorted(l2)) + + class suite(unittest.TestSuite): + def __init__(self): +diff --git a/tests/test_ini.py b/tests/test_ini.py +index 6a76edb..07d4f4e 100644 +--- a/tests/test_ini.py ++++ b/tests/test_ini.py +@@ -1,5 +1,5 @@ + import unittest +-from StringIO import StringIO ++from six import StringIO + + from iniparse import ini + from iniparse import compat +@@ -196,13 +196,13 @@ but = also me + self.assertEqual(p._data.find('section2').find('just').value, 'kidding') + + itr = p._data.finditer('section1') +- v = itr.next() ++ v = next(itr) + self.assertEqual(v.find('help').value, 'yourself') + self.assertEqual(v.find('but').value, 'also me') +- v = itr.next() ++ v = next(itr) + self.assertEqual(v.find('help').value, 'me') + self.assertEqual(v.find('I\'m').value, 'desperate') +- self.assertRaises(StopIteration, itr.next) ++ self.assertRaises(StopIteration, next, itr) + + self.assertRaises(KeyError, p._data.find, 'section') + self.assertRaises(KeyError, p._data.find('section2').find, 'ahem') +diff --git a/tests/test_misc.py b/tests/test_misc.py +index 31cf4da..96ef035 100644 +--- a/tests/test_misc.py ++++ b/tests/test_misc.py +@@ -1,9 +1,9 @@ + import re + import unittest + import pickle +-import ConfigParser ++from six.moves import configparser ++from six import StringIO + from textwrap import dedent +-from StringIO import StringIO + from iniparse import compat, ini + + class CaseSensitiveConfigParser(compat.ConfigParser): +diff --git a/tests/test_tidy.py b/tests/test_tidy.py +index 7304747..26b6cde 100644 +--- a/tests/test_tidy.py ++++ b/tests/test_tidy.py +@@ -1,6 +1,6 @@ + import unittest + from textwrap import dedent +-from StringIO import StringIO ++from six import StringIO + + from iniparse import tidy,INIConfig + from iniparse.ini import EmptyLine +diff --git a/tests/test_unicode.py b/tests/test_unicode.py +index a56fcab..14d4fbd 100644 +--- a/tests/test_unicode.py ++++ b/tests/test_unicode.py +@@ -1,5 +1,5 @@ + import unittest +-from StringIO import StringIO ++import six + from iniparse import compat, ini + + class test_unicode(unittest.TestCase): +@@ -17,14 +17,14 @@ baz = Marc-Andr\202 + """ + + def basic_tests(self, s, strable): +- f = StringIO(s) ++ f = six.StringIO(s) + i = ini.INIConfig(f) +- self.assertEqual(unicode(i), s) +- self.assertEqual(type(i.foo.bar), unicode) ++ self.assertEqual(six.text_type(i), s) ++ self.assertEqual(type(i.foo.bar), six.text_type) + if strable: + self.assertEqual(str(i), str(s)) + else: +- self.assertRaises(UnicodeEncodeError, lambda: str(i)) ++ self.assertRaises(UnicodeEncodeError, lambda: six.text_type(i).encode('ascii')) + return i + + def test_ascii(self): +-- +2.11.0 + diff --git a/meta/recipes-devtools/python/python3-iniparse_0.4.bb b/meta/recipes-devtools/python/python3-iniparse_0.4.bb new file mode 100644 index 0000000000..f51ce647c9 --- /dev/null +++ b/meta/recipes-devtools/python/python3-iniparse_0.4.bb @@ -0,0 +1,20 @@ +SUMMARY = "Accessing and Modifying INI files" +HOMEPAGE = "https://pypi.python.org/pypi/iniparse/" +LICENSE = "MIT & PSF" +LIC_FILES_CHKSUM = "file://LICENSE-PSF;md5=1c78a5bb3584b353496d5f6f34edb4b2 \ + file://LICENSE;md5=52f28065af11d69382693b45b5a8eb54" + +SRC_URI = "https://files.pythonhosted.org/packages/source/i/iniparse/iniparse-${PV}.tar.gz \ + file://0001-Add-python-3-compatibility.patch " +SRC_URI[md5sum] = "5e573e9e9733d97623881ce9bbe5eca6" +SRC_URI[sha256sum] = "abc1ee12d2cfb2506109072d6c21e40b6c75a3fe90a9c924327d80bc0d99c054" +UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/iniparse/" + +inherit distutils3 + +RDEPENDS_${PN} += "python3-core python3-six" +DEPENDS += "python3-six" + +BBCLASSEXTEND = "native nativesdk" + +S = "${WORKDIR}/iniparse-${PV}" diff --git a/meta/recipes-devtools/python/python3-mako_1.0.6.bb b/meta/recipes-devtools/python/python3-mako_1.0.6.bb new file mode 100644 index 0000000000..2b50ffd08a --- /dev/null +++ b/meta/recipes-devtools/python/python3-mako_1.0.6.bb @@ -0,0 +1,11 @@ +require python-mako.inc + +inherit setuptools3 + +RDEPENDS_${PN} = "python3-threading \ + python3-netclient \ + python3-html \ +" +RDEPENDS_${PN}_class-native = "" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-devtools/python/python3-native_3.5.2.bb b/meta/recipes-devtools/python/python3-native_3.5.2.bb new file mode 100644 index 0000000000..edcf2244f5 --- /dev/null +++ b/meta/recipes-devtools/python/python3-native_3.5.2.bb @@ -0,0 +1,79 @@ +require recipes-devtools/python/python.inc + +PR = "${INC_PR}.0" +PYTHON_MAJMIN = "3.5" +DISTRO_SRC_URI ?= "file://sitecustomize.py" +DISTRO_SRC_URI_linuxstdbase = "" +SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ +file://12-distutils-prefix-is-inside-staging-area.patch \ +file://python-config.patch \ +file://000-cross-compile.patch \ +file://030-fixup-include-dirs.patch \ +file://070-dont-clean-ipkg-install.patch \ +file://080-distutils-dont_adjust_files.patch \ +file://130-readline-setup.patch \ +file://150-fix-setupterm.patch \ +file://python-3.3-multilib.patch \ +file://03-fix-tkinter-detection.patch \ +file://avoid_warning_about_tkinter.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} \ +file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \ +file://setup.py-check-cross_compiling-when-get-FLAGS.patch \ +file://0001-Do-not-use-the-shell-version-of-python-config-that-w.patch \ +" + +SRC_URI[md5sum] = "8906efbacfcdc7c3c9198aeefafd159e" +SRC_URI[sha256sum] = "0010f56100b9b74259ebcd5d4b295a32324b58b517403a10d1a2aa7cb22bca40" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=6b60258130e4ed10d3101517eb5b9385" + +# exclude pre-releases for both python 2.x and 3.x +UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar" + +S = "${WORKDIR}/Python-${PV}" + +EXTRANATIVEPATH += "bzip2-native" +DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native" + +inherit native + +require python-native-${PYTHON_MAJMIN}-manifest.inc + +EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --without-ensurepip" + +EXTRA_OEMAKE = '\ + LIBC="" \ + STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \ + STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \ + LIB=${baselib} \ + ARCH=${TARGET_ARCH} \ +' + +# No ctypes option for python 3 +PYTHONLSBOPTS = "" + +do_configure_append() { + autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi +} + +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 python3|' $PYTHSCRIPT + done + + # Tests are large and we don't need them in the native sysroot + rm ${D}${libdir}/python${PYTHON_MAJMIN}/test -rf +} diff --git a/meta/recipes-devtools/python/python3-nose_1.3.7.bb b/meta/recipes-devtools/python/python3-nose_1.3.7.bb new file mode 100644 index 0000000000..99bba4403f --- /dev/null +++ b/meta/recipes-devtools/python/python3-nose_1.3.7.bb @@ -0,0 +1,24 @@ +SUMMARY = "Extends Python unittest to make testing easier" +DESCRIPTION = "nose extends the test loading and running features of unittest, \ +making it easier to write, find and run tests." +SECTION = "devel/python" +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://lgpl.txt;md5=a6f89e2100d9b6cdffcea4f398e37343" + +SRC_URI = "https://files.pythonhosted.org/packages/source/n/nose/nose-${PV}.tar.gz" + +SRC_URI[md5sum] = "4d3ad0ff07b61373d2cefc89c5d0b20b" +SRC_URI[sha256sum] = "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98" + +UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/nose/" +UPSTREAM_CHECK_REGEX = "/nose/(?P<pver>(\d+[\.\-_]*)+)" + +S = "${WORKDIR}/nose-${PV}" + +inherit setuptools3 + +RDEPENDS_${PN}_class-target = "\ + python3-unittest \ + " + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-devtools/python/python3-pip_9.0.1.bb b/meta/recipes-devtools/python/python3-pip_9.0.1.bb new file mode 100644 index 0000000000..4456b9b1b1 --- /dev/null +++ b/meta/recipes-devtools/python/python3-pip_9.0.1.bb @@ -0,0 +1,56 @@ +SUMMARY = "The PyPA recommended tool for installing Python packages" +sHOMEPAGEsss = "https://pypi.python.org/pypi/pip" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=25fba45109565f87de20bae85bc39452" + +SRCNAME = "pip" +DEPENDS += "python3 python3-setuptools-native" + +SRC_URI = "https://files.pythonhosted.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz" + +SRC_URI[md5sum] = "35f01da33009719497f01a4ba69d63c9" +SRC_URI[sha256sum] = "09f243e1a7b461f654c26a725fa373211bb7ff17a9300058b205c61658ca940d" + +UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/pip" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit distutils3 + +DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${PYTHON_SITEPACKAGES_DIR}" + +do_install_prepend() { + install -d ${D}${PYTHON_SITEPACKAGES_DIR} +} + +# Use setuptools site.py instead, avoid shared state issue +do_install_append() { + rm ${D}${PYTHON_SITEPACKAGES_DIR}/site.py + rm ${D}${PYTHON_SITEPACKAGES_DIR}/__pycache__/site.cpython-*.pyc + + # Install as pip3 and leave pip2 as default + rm ${D}/${bindir}/pip + + # Installed eggs need to be passed directly to the interpreter via a pth file + echo "./${SRCNAME}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/${SRCNAME}-${PV}.pth + + # Make sure we use /usr/bin/env python3 + for PYTHSCRIPT in `grep -rIl ${bindir} ${D}${bindir}/pip3*`; do + sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT + done +} + +RDEPENDS_${PN} = "\ + python3-compile \ + python3-io \ + python3-enum \ + python3-html \ + python3-json \ + python3-netserver \ + python3-setuptools \ + python3-unixadmin \ + python3-xmlrpc \ +" + +BBCLASSEXTEND = "native" diff --git a/meta/recipes-devtools/python/python3-pycairo_1.10.0.bb b/meta/recipes-devtools/python/python3-pycairo_1.10.0.bb new file mode 100644 index 0000000000..f9031b3bca --- /dev/null +++ b/meta/recipes-devtools/python/python3-pycairo_1.10.0.bb @@ -0,0 +1,40 @@ +SUMMARY = "Python bindings for the Cairo canvas library" +HOMEPAGE = "http://cairographics.org/pycairo" +BUGTRACKER = "http://bugs.freedesktop.org" +SECTION = "python-devel" +LICENSE = "LGPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02" + +# cairo >= 1.8.8 +DEPENDS = "cairo" +PR = "r2" + +SRC_URI = "http://cairographics.org/releases/pycairo-${PV}.tar.bz2" + +SRC_URI[md5sum] = "e6fd3f2f1e6a72e0db0868c4985669c5" +SRC_URI[sha256sum] = "9aa4078e7eb5be583aeabbe8d87172797717f95e8c4338f0d4a17b683a7253be" + +S = "${WORKDIR}/pycairo-${PV}" + +inherit distutils3 pkgconfig + +BBCLASSEXTEND = "native" + +do_configure() { + PYTHON=${PYTHON} ./waf configure --prefix=${D}${prefix} --libdir=${D}${libdir} +} + +do_compile() { + ./waf build ${PARALLEL_MAKE} +} + +do_install() { + ./waf install + sed \ + -e 's:@prefix@:${prefix}:' \ + -e 's:@VERSION@:${PV}:' \ + -e 's:@includedir@:${includedir}:' \ + py3cairo.pc.in > py3cairo.pc + install -m 0644 py3cairo.pc ${D}${libdir}/pkgconfig/ +} diff --git a/meta/recipes-devtools/python/python3-pycurl_7.21.5.bb b/meta/recipes-devtools/python/python3-pycurl_7.21.5.bb new file mode 100644 index 0000000000..5d11192ab6 --- /dev/null +++ b/meta/recipes-devtools/python/python3-pycurl_7.21.5.bb @@ -0,0 +1,5 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/python-pycurl:" + +require python-pycurl.inc + +inherit distutils3 diff --git a/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch b/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch new file mode 100644 index 0000000000..a391f7e74e --- /dev/null +++ b/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch @@ -0,0 +1,41 @@ +From 5e5350d730f85957a42c6d846d347d080e7dd996 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Fri, 23 Oct 2015 12:40:34 +0300 +Subject: [PATCH] configure.ac: add sysroot path to GI_DATADIR; don't set + introspection scanner and compiler paths + +Upstream-Status: Pending [review on oe-core maillist] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + configure.ac | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 2c0cfbd..cfcb3bf 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -194,7 +194,7 @@ PKG_CHECK_MODULES(GI, + gobject-introspection-1.0 >= introspection_required_version + ) + +-GI_DATADIR=$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0) ++GI_DATADIR=$PKG_CONFIG_SYSROOT_DIR$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0) + AC_SUBST(GI_DATADIR) + + if test "$enable_cairo" != no; then +@@ -219,12 +219,6 @@ AC_ARG_WITH(common, + with_common=yes) + AM_CONDITIONAL(WITH_COMMON, test "$with_common" = "yes") + +-INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` +-INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` +- +-AC_SUBST(INTROSPECTION_SCANNER) +-AC_SUBST(INTROSPECTION_COMPILER) +- + # compiler warnings, errors, required cflags, and code coverage support + GNOME_COMPILE_WARNINGS([maximum]) + AC_MSG_CHECKING(for Gnome code coverage support) +-- +2.1.4 + diff --git a/meta/recipes-devtools/python/python3-pygobject_3.22.0.bb b/meta/recipes-devtools/python/python3-pygobject_3.22.0.bb new file mode 100644 index 0000000000..143048d9ef --- /dev/null +++ b/meta/recipes-devtools/python/python3-pygobject_3.22.0.bb @@ -0,0 +1,31 @@ +SUMMARY = "Python GObject bindings" +SECTION = "devel/python" +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7" + +inherit autotools pkgconfig gnomebase distutils3-base gobject-introspection upstream-version-is-even + +DEPENDS += "gnome-common-native python3 glib-2.0" + +SRCNAME="pygobject" +SRC_URI = " \ + http://ftp.gnome.org/pub/GNOME/sources/${SRCNAME}/${@gnome_verdir("${PV}")}/${SRCNAME}-${PV}.tar.xz \ + file://0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch \ +" + +SRC_URI[md5sum] = "ed4117ed5d554d25fd7718807fbf819f" +SRC_URI[sha256sum] = "08b29cfb08efc80f7a8630a2734dec65a99c1b59f1e5771c671d2e4ed8a5cbe7" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + + +PACKAGECONFIG ??= "${@bb.utils.contains_any('DISTRO_FEATURES', [ 'directfb', 'wayland', 'x11' ], 'cairo', '', d)}" + +# python3-pycairo is checked on configuration -> DEPENDS +# we don't link against python3-pycairo -> RDEPENDS +PACKAGECONFIG[cairo] = "--enable-cairo,--disable-cairo,cairo python3-pycairo, python3-pycairo" + +RDEPENDS_${PN} += "python3-setuptools python3-importlib" + +BBCLASSEXTEND = "native" +PACKAGECONFIG_class-native = "" diff --git a/meta/recipes-devtools/python/python3-pygpgme_0.3.bb b/meta/recipes-devtools/python/python3-pygpgme_0.3.bb new file mode 100644 index 0000000000..495f677cfa --- /dev/null +++ b/meta/recipes-devtools/python/python3-pygpgme_0.3.bb @@ -0,0 +1,18 @@ +SUMMARY = "A Python module for working with OpenPGP messages" +HOMEPAGE = "https://launchpad.net/pygpgme" +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://README;md5=2dc15a76acf01e126188c8de634ae4b3" + +SRC_URI = "https://launchpad.net/pygpgme/trunk/${PV}/+download/pygpgme-${PV}.tar.gz" +SRC_URI[md5sum] = "d38355af73f0352cde3d410b25f34fd0" +SRC_URI[sha256sum] = "5fd887c407015296a8fd3f4b867fe0fcca3179de97ccde90449853a3dfb802e1" + +S = "${WORKDIR}/pygpgme-${PV}" + +inherit distutils3 + +DEPENDS = "gpgme python3" + +RDEPENDS_${PN} += "python3-core" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-devtools/python/python3-setuptools_32.1.1.bb b/meta/recipes-devtools/python/python3-setuptools_32.1.1.bb new file mode 100644 index 0000000000..65af6f0dad --- /dev/null +++ b/meta/recipes-devtools/python/python3-setuptools_32.1.1.bb @@ -0,0 +1,37 @@ +require python-setuptools.inc + +DEPENDS += "python3" +DEPENDS_class-native += "python3-native" + +inherit distutils3 + +DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${PYTHON_SITEPACKAGES_DIR}" + +# The installer puts the wrong path in the setuptools.pth file. Correct it. +do_install_append() { + rm ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth + mv ${D}${bindir}/easy_install ${D}${bindir}/easy3_install + echo "./${SRCNAME}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth +} + +RDEPENDS_${PN} = "\ + python3-distutils \ + python3-compression \ +" +RDEPENDS_${PN}_class-target = "\ + python3-ctypes \ + python3-distutils \ + python3-email \ + python3-importlib \ + python3-numbers \ + python3-compression \ + python3-shell \ + python3-subprocess \ + python3-textutils \ + python3-pkgutil \ + python3-threading \ + python3-misc \ + python3-unittest \ + python3-xml \ +" +BBCLASSEXTEND = "native" diff --git a/meta/recipes-devtools/python/python3-six_1.10.0.bb b/meta/recipes-devtools/python/python3-six_1.10.0.bb new file mode 100644 index 0000000000..38a47b77dd --- /dev/null +++ b/meta/recipes-devtools/python/python3-six_1.10.0.bb @@ -0,0 +1,4 @@ +inherit setuptools3 +require python-six.inc + +RDEPENDS_${PN} += "python3-io" diff --git a/meta/recipes-devtools/python/python3-smmap_0.9.0.bb b/meta/recipes-devtools/python/python3-smmap_0.9.0.bb new file mode 100644 index 0000000000..9f8a26d79e --- /dev/null +++ b/meta/recipes-devtools/python/python3-smmap_0.9.0.bb @@ -0,0 +1,5 @@ +require python-smmap.inc + +inherit setuptools3 + +RDEPENDS_${PN} += "python3-codecs python3-mmap python3-lang" diff --git a/meta/recipes-devtools/python/python3/000-cross-compile.patch b/meta/recipes-devtools/python/python3/000-cross-compile.patch new file mode 100644 index 0000000000..2d822218f4 --- /dev/null +++ b/meta/recipes-devtools/python/python3/000-cross-compile.patch @@ -0,0 +1,85 @@ +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(-) + +Index: Python-3.5.2/Makefile.pre.in +=================================================================== +--- Python-3.5.2.orig/Makefile.pre.in ++++ Python-3.5.2/Makefile.pre.in +@@ -220,6 +220,7 @@ LIBOBJS= @LIBOBJS@ + + PYTHON= python$(EXE) + BUILDPYTHON= python$(BUILDEXE) ++HOSTPYTHON= $(BUILDPYTHON) + + cross_compiling=@cross_compiling@ + PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@ +@@ -279,6 +280,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@ + ########################################################################## + # Parser + PGEN= Parser/pgen$(EXE) ++HOSTPGEN= $(PGEN)$(EXE) + + PSRCS= \ + Parser/acceler.c \ +@@ -509,7 +511,7 @@ build_all_generate_profile: + + run_profile_task: + : # FIXME: can't run for a cross build +- $(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) || true ++ $(LLVM_PROF_FILE) $(RUNSHARED) $(HOSTPYTHON) $(PROFILE_TASK) || true + + build_all_merge_profile: + $(LLVM_PROF_MERGER) +@@ -792,7 +794,7 @@ $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGEN) + @$(MKDIR_P) Include + # Avoid copying the file onto itself for an in-tree build + if test "$(cross_compiling)" != "yes"; then \ +- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C); \ ++ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C); \ + else \ + cp $(srcdir)/Include/graminit.h $(GRAMMAR_H).tmp; \ + mv $(GRAMMAR_H).tmp $(GRAMMAR_H); \ +@@ -990,7 +992,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Programs/pyth + ###################################################################### + + TESTOPTS= $(EXTRATESTOPTS) +-TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) $(TESTPYTHONOPTS) ++TESTPYTHON= $(RUNSHARED) $(HOSTPYTHON) $(TESTPYTHONOPTS) + TESTRUNNER= $(TESTPYTHON) $(srcdir)/Tools/scripts/run_tests.py + TESTTIMEOUT= 3600 + +@@ -1481,7 +1483,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 +@@ -1547,7 +1549,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 +@@ -1683,7 +1685,7 @@ funny: + + # Perform some verification checks on any modified files. + patchcheck: all +- $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py ++ $(RUNSHARED) ./$(HOSTPYTHON) $(srcdir)/Tools/scripts/patchcheck.py + + # Dependencies + diff --git a/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch b/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch new file mode 100644 index 0000000000..b7e0ac6354 --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch @@ -0,0 +1,38 @@ +From 045c99b5f1eb6e4e0d8ad1ef9f0ba6574f738150 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Fri, 23 Oct 2015 12:25:09 +0300 +Subject: [PATCH] Do not use the shell version of python-config that was + introduced in 3.4 + +Revert instead to the original python version: it has our tweaks and +outputs directories correctly. + +Upstream-Status: Inappropriate [oe-specific] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + Makefile.pre.in | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +diff --git a/Makefile.pre.in b/Makefile.pre.in +index d7fc9a0..47e60bc 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1270,12 +1270,9 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh + sed -e "s,@EXENAME@,$(BINDIR)/python$(LDVERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config.py + # Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR} + sed -e 's,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g' < Misc/python-config.sh >python-config +- # On Darwin, always use the python version of the script, the shell +- # version doesn't use the compiler customizations that are provided +- # in python (_osx_support.py). +- if test `uname -s` = Darwin; then \ +- cp python-config.py python-config; \ +- fi ++ # In OpenEmbedded, always use the python version of the script, the shell ++ # version is broken in multiple ways, and doesn't return correct directories ++ cp python-config.py python-config + + + # Install the include files +-- +2.1.4 + diff --git a/meta/recipes-devtools/python/python3/0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch b/meta/recipes-devtools/python/python3/0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch new file mode 100644 index 0000000000..dd6b24fe92 --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch @@ -0,0 +1,37 @@ +From 2f5a4c708d90fa8db21f446ae879cff79387448d Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +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 <raj.khem@gmail.com> + +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 + diff --git a/meta/recipes-devtools/python/python3/03-fix-tkinter-detection.patch b/meta/recipes-devtools/python/python3/03-fix-tkinter-detection.patch new file mode 100644 index 0000000000..fddfd2b2f6 --- /dev/null +++ b/meta/recipes-devtools/python/python3/03-fix-tkinter-detection.patch @@ -0,0 +1,42 @@ +Upstream-Status: Inappropriate [embedded specific] + +# We need to supply STAGING_INCDIR here, otherwise the Tk headers +# will not be found. +# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille.de> + +Index: Python-3.3.0rc2/setup.py +=================================================================== +--- Python-3.3.0rc2.orig/setup.py 2012-09-20 15:24:14.009124003 -0700 ++++ Python-3.3.0rc2/setup.py 2012-09-20 15:25:08.449124963 -0700 +@@ -1620,7 +1620,7 @@ + dotversion = dotversion[:-1] + '.' + dotversion[-1] + tcl_include_sub = [] + tk_include_sub = [] +- for dir in inc_dirs: ++ for dir in [os.getenv("STAGING_INCDIR")]: + tcl_include_sub += [dir + os.sep + "tcl" + dotversion] + tk_include_sub += [dir + os.sep + "tk" + dotversion] + tk_include_sub += tcl_include_sub +@@ -1639,22 +1639,6 @@ + if dir not in include_dirs: + include_dirs.append(dir) + +- # Check for various platform-specific directories +- if host_platform == 'sunos5': +- include_dirs.append('/usr/openwin/include') +- added_lib_dirs.append('/usr/openwin/lib') +- elif os.path.exists('/usr/X11R6/include'): +- include_dirs.append('/usr/X11R6/include') +- added_lib_dirs.append('/usr/X11R6/lib64') +- added_lib_dirs.append('/usr/X11R6/lib') +- elif os.path.exists('/usr/X11R5/include'): +- include_dirs.append('/usr/X11R5/include') +- added_lib_dirs.append('/usr/X11R5/lib') +- else: +- # Assume default location for X11 +- include_dirs.append('/usr/X11/include') +- added_lib_dirs.append('/usr/X11/lib') +- + # If Cygwin, then verify that X is installed before proceeding + if host_platform == 'cygwin': + x11_inc = find_file('X11/Xlib.h', [], include_dirs) diff --git a/meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch b/meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch new file mode 100644 index 0000000000..6beac7b805 --- /dev/null +++ b/meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch @@ -0,0 +1,33 @@ +Do not hardcode /usr into include paths when cross compiling + +-Khem + +Upstream-Status: Pending + +--- + setup.py | 15 ++------------- + 1 file changed, 2 insertions(+), 13 deletions(-) + +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() +- 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. +@@ -480,7 +481,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 diff --git a/meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch b/meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch new file mode 100644 index 0000000000..789929b715 --- /dev/null +++ b/meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch @@ -0,0 +1,36 @@ +consider opkg directories when cleaning up + +-Khem + +Upstream-Status: Inappropriate [OE specific] + +--- + 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 diff --git a/meta/recipes-devtools/python/python3/080-distutils-dont_adjust_files.patch b/meta/recipes-devtools/python/python3/080-distutils-dont_adjust_files.patch new file mode 100644 index 0000000000..b96419a638 --- /dev/null +++ b/meta/recipes-devtools/python/python3/080-distutils-dont_adjust_files.patch @@ -0,0 +1,92 @@ +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(-) + +--- a/Lib/distutils/command/build_scripts.py ++++ b/Lib/distutils/command/build_scripts.py +@@ -51,10 +51,7 @@ class build_scripts(Command): + + + def copy_scripts(self): +- """Copy each script listed in 'self.scripts'; if it's marked as a +- Python script in the Unix way (first line matches 'first_line_re', +- ie. starts with "\#!" and contains "python"), then adjust the first +- line to refer to the current Python interpreter as we copy. ++ """Copy each script listed in 'self.scripts' + """ + self.mkpath(self.build_dir) + outfiles = [] +@@ -78,64 +75,10 @@ class build_scripts(Command): + if not self.dry_run: + raise + f = None +- else: +- encoding, lines = tokenize.detect_encoding(f.readline) +- f.seek(0) +- first_line = f.readline() +- if not first_line: +- self.warn("%s is an empty file (skipping)" % script) +- continue +- +- match = first_line_re.match(first_line) +- if match: +- adjust = True +- post_interp = match.group(1) or b'' +- +- if adjust: +- log.info("copying and adjusting %s -> %s", script, +- self.build_dir) +- updated_files.append(outfile) +- if not self.dry_run: +- if not sysconfig.python_build: +- executable = self.executable +- else: +- executable = os.path.join( +- sysconfig.get_config_var("BINDIR"), +- "python%s%s" % (sysconfig.get_config_var("VERSION"), +- sysconfig.get_config_var("EXE"))) +- executable = os.fsencode(executable) +- shebang = b"#!" + executable + post_interp + b"\n" +- # Python parser starts to read a script using UTF-8 until +- # it gets a #coding:xxx cookie. The shebang has to be the +- # first line of a file, the #coding:xxx cookie cannot be +- # written before. So the shebang has to be decodable from +- # UTF-8. +- try: +- shebang.decode('utf-8') +- except UnicodeDecodeError: +- raise ValueError( +- "The shebang ({!r}) is not decodable " +- "from utf-8".format(shebang)) +- # If the script is encoded to a custom encoding (use a +- # #coding:xxx cookie), the shebang has to be decodable from +- # the script encoding too. +- try: +- shebang.decode(encoding) +- except UnicodeDecodeError: +- raise ValueError( +- "The shebang ({!r}) is not decodable " +- "from the script encoding ({})" +- .format(shebang, encoding)) +- with open(outfile, "wb") as outf: +- outf.write(shebang) +- outf.writelines(f.readlines()) +- if f: +- f.close() +- else: +- if f: ++ if f: + f.close() +- updated_files.append(outfile) +- self.copy_file(script, outfile) ++ updated_files.append(outfile) ++ self.copy_file(script, outfile) + + if os.name == 'posix': + for file in outfiles: diff --git a/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch b/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch new file mode 100644 index 0000000000..c53ec0cfc8 --- /dev/null +++ b/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch @@ -0,0 +1,57 @@ +From 7630ab22578746d3d790d0598c0d279cf7afed97 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 14 May 2013 15:00:26 -0700 +Subject: [PATCH 01/20] python3: Add target and native recipes + +Upstream-Status: Inappropriate [embedded specific] + +02/2015 Rebased for Python 3.4.2 + +# The proper prefix is inside our staging area. +# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de> +# Signed-off-by: Phil Blundell <philb@gnu.org> +# Signed-off-by: Khem Raj <raj.khem@gmail.com> +# Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> + +--- + Lib/distutils/sysconfig.py | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py +index 573724d..390c485 100644 +--- a/Lib/distutils/sysconfig.py ++++ b/Lib/distutils/sysconfig.py +@@ -84,7 +84,9 @@ def get_python_inc(plat_specific=0, prefix=None): + If 'prefix' is supplied, use it instead of sys.base_prefix or + sys.base_exec_prefix -- i.e., ignore 'plat_specific'. + """ +- if prefix is None: ++ if prefix is None and os.environ['STAGING_INCDIR'] != "": ++ prefix = os.environ['STAGING_INCDIR'].rstrip('include') ++ elif prefix is None: + prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX + if os.name == "posix": + if python_build: +@@ -125,6 +127,10 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): + If 'prefix' is supplied, use it instead of sys.base_prefix or + sys.base_exec_prefix -- i.e., ignore 'plat_specific'. + """ ++ lib_basename = os.environ['STAGING_LIBDIR'].split('/')[-1] ++ if prefix is None and os.environ['STAGING_LIBDIR'] != "": ++ prefix = os.environ['STAGING_LIBDIR'].rstrip(lib_basename) ++ + if prefix is None: + if standard_lib: + prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX +@@ -133,7 +139,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): + + if os.name == "posix": + libpython = os.path.join(prefix, +- "lib", "python" + get_python_version()) ++ lib_basename, "python" + get_python_version()) + if standard_lib: + return libpython + else: +-- +2.8.0.rc3 + diff --git a/meta/recipes-devtools/python/python3/130-readline-setup.patch b/meta/recipes-devtools/python/python3/130-readline-setup.patch new file mode 100644 index 0000000000..c805652d69 --- /dev/null +++ b/meta/recipes-devtools/python/python3/130-readline-setup.patch @@ -0,0 +1,55 @@ +package python-readline + +-Khem + +Upstream-Status: Inappropriate [Embedded Specific] + +--- a/setup.py ++++ b/setup.py +@@ -666,45 +666,7 @@ class PyBuildExt(build_ext): + # readline + do_readline = self.compiler.find_library_file(lib_dirs, 'readline') + readline_termcap_library = "" +- curses_library = "" +- # Cannot use os.popen here in py3k. +- tmpfile = os.path.join(self.build_temp, 'readline_termcap_lib') +- if not os.path.exists(self.build_temp): +- os.makedirs(self.build_temp) +- # Determine if readline is already linked against curses or tinfo. +- if do_readline: +- if cross_compiling: +- ret = os.system("%s -d %s | grep '(NEEDED)' > %s" \ +- % (sysconfig.get_config_var('READELF'), +- do_readline, tmpfile)) +- elif find_executable('ldd'): +- ret = os.system("ldd %s > %s" % (do_readline, tmpfile)) +- else: +- ret = 256 +- if ret >> 8 == 0: +- with open(tmpfile) as fp: +- for ln in fp: +- if 'curses' in ln: +- readline_termcap_library = re.sub( +- r'.*lib(n?cursesw?)\.so.*', r'\1', ln +- ).rstrip() +- break +- # termcap interface split out from ncurses +- if 'tinfo' in ln: +- readline_termcap_library = 'tinfo' +- break +- if os.path.exists(tmpfile): +- os.unlink(tmpfile) +- # Issue 7384: If readline is already linked against curses, +- # use the same library for the readline and curses modules. +- if 'curses' in readline_termcap_library: +- curses_library = readline_termcap_library +- elif self.compiler.find_library_file(lib_dirs, 'ncursesw'): +- curses_library = 'ncursesw' +- elif self.compiler.find_library_file(lib_dirs, 'ncurses'): +- curses_library = 'ncurses' +- elif self.compiler.find_library_file(lib_dirs, 'curses'): +- curses_library = 'curses' ++ curses_library = "ncurses" + + if host_platform == 'darwin': + os_release = int(os.uname()[2].split('.')[0]) diff --git a/meta/recipes-devtools/python/python3/150-fix-setupterm.patch b/meta/recipes-devtools/python/python3/150-fix-setupterm.patch new file mode 100644 index 0000000000..78d7c78670 --- /dev/null +++ b/meta/recipes-devtools/python/python3/150-fix-setupterm.patch @@ -0,0 +1,17 @@ +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"; + #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 diff --git a/meta/recipes-devtools/python/python3/avoid-ncursesw-include-path.patch b/meta/recipes-devtools/python/python3/avoid-ncursesw-include-path.patch new file mode 100644 index 0000000000..f29ae53371 --- /dev/null +++ b/meta/recipes-devtools/python/python3/avoid-ncursesw-include-path.patch @@ -0,0 +1,21 @@ +Upstream-Status: Pending + +We should make sure that sysroot is used by gcc instead of assuming +hardcoded locations for include paths + + +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +Index: Python-3.4.2/configure.ac +=================================================================== +--- Python-3.4.2.orig/configure.ac ++++ Python-3.4.2/configure.ac +@@ -4434,7 +4434,7 @@ fi + + # first curses header check + ac_save_cppflags="$CPPFLAGS" +-CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw" ++CPPFLAGS="$CPPFLAGS -I=/usr/include/ncursesw" + + AC_CHECK_HEADERS(curses.h ncurses.h) + diff --git a/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch b/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch new file mode 100644 index 0000000000..3347321fde --- /dev/null +++ b/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch @@ -0,0 +1,39 @@ +_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] + +Also simply disable the tk module since its not in DEPENDS. +Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> + +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 + +diff --git Python-3.5.1.orig/setup.py Python-3.5.1/setup.py +index b4633b9..d7588c0 100644 +--- Python-3.5.1.orig/setup.py ++++ Python-3.5.1/setup.py +@@ -1536,7 +1536,7 @@ class PyBuildExt(build_ext): + self.extensions.extend(exts) + + # Call the method for detecting whether _tkinter can be compiled +- self.detect_tkinter(inc_dirs, lib_dirs) ++ # self.detect_tkinter(inc_dirs, lib_dirs) + + # tkinter module will not be avalaible as yocto + # doesn't have tk integrated (yet) diff --git a/meta/recipes-devtools/python/python3/cgi_py.patch b/meta/recipes-devtools/python/python3/cgi_py.patch new file mode 100644 index 0000000000..de504f9dcf --- /dev/null +++ b/meta/recipes-devtools/python/python3/cgi_py.patch @@ -0,0 +1,23 @@ +Lib/cgi.py: Update the script as mentioned in the comment + +Upstream-Status: Inappropriate [distribution] + +Signed-off-by: Mark Hatle <mark.hatle@windriver.com> + +--- 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. + diff --git a/meta/recipes-devtools/python/python3/configure.ac-fix-LIBPL.patch b/meta/recipes-devtools/python/python3/configure.ac-fix-LIBPL.patch new file mode 100644 index 0000000000..97214f9aa4 --- /dev/null +++ b/meta/recipes-devtools/python/python3/configure.ac-fix-LIBPL.patch @@ -0,0 +1,30 @@ +From 7c4f8d87473d6238c120ec6031b58f83a17a39a5 Mon Sep 17 00:00:00 2001 +From: Robert Yang <liezhi.yang@windriver.com> +Date: Mon, 28 Dec 2015 22:52:06 -0800 +Subject: [PATCH] configure.ac: fix LIBPL + +Use LIBDIR rather than prefix/lib, so that it would work when lib64. + +Upstream-Status: Pending + +Signed-off-by: Robert Yang <liezhi.yang@windriver.com> +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 63aef8e..aefb27f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4366,7 +4366,7 @@ AC_MSG_RESULT($LDVERSION) + + dnl define LIBPL after ABIFLAGS and LDVERSION is defined. + AC_SUBST(PY_ENABLE_SHARED) +-LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}" ++LIBPL='$(LIBDIR)'"/python${VERSION}/config-${LDVERSION}" + AC_SUBST(LIBPL) + + # Check whether right shifting a negative integer extends the sign bit +-- +1.7.9.5 + diff --git a/meta/recipes-devtools/python/python3/fix_for_using_different_libdir.patch b/meta/recipes-devtools/python/python3/fix_for_using_different_libdir.patch new file mode 100644 index 0000000000..0610565d3c --- /dev/null +++ b/meta/recipes-devtools/python/python3/fix_for_using_different_libdir.patch @@ -0,0 +1,54 @@ +Upstream-Status: Inappropriate [Embedded specific] + +This patch fixes issuing with different libdir like lib64. +This patch makes the native python binary modules findable +in the install process of the host python. + +Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> +Date: 2012/03/14 + +Updated for python 2.7.3 +Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> +Date: 2012/05/01 + +Index: Python-3.3.0rc2/Lib/sysconfig.py +=================================================================== +--- Python-3.3.0rc2.orig/Lib/sysconfig.py 2012-09-20 22:50:11.000000000 -0700 ++++ Python-3.3.0rc2/Lib/sysconfig.py 2012-09-20 22:53:01.561123396 -0700 +@@ -21,9 +21,9 @@ + + _INSTALL_SCHEMES = { + 'posix_prefix': { +- 'stdlib': '{installed_base}/'+sys.lib+'/python{py_version_short}', ++ 'stdlib': '{base}/'+sys.lib+'/python{py_version_short}', + 'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}', +- 'purelib': '{base}/lib/python{py_version_short}/site-packages', ++ 'purelib': '{base}/'+sys.lib+'/python{py_version_short}/site-packages', + 'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages', + 'include': + '{installed_base}/include/python{py_version_short}{abiflags}', +@@ -83,7 +83,7 @@ + 'posix_user': { + 'stdlib': '{userbase}/'+sys.lib+'/python{py_version_short}', + 'platstdlib': '{userbase}/'+sys.lib+'/python{py_version_short}', +- 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', ++ 'purelib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages', + 'platlib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages', + 'include': '{userbase}/include/python{py_version_short}', + 'scripts': '{userbase}/bin', +Index: Python-3.3.0rc2/Makefile.pre.in +=================================================================== +--- Python-3.3.0rc2.orig/Makefile.pre.in 2012-09-20 22:50:11.000000000 -0700 ++++ Python-3.3.0rc2/Makefile.pre.in 2012-09-20 22:50:54.245123997 -0700 +@@ -1080,9 +1080,9 @@ + $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ + $(DESTDIR)$(LIBDEST)/distutils/tests ; \ + fi +- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ ++ -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt +- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ ++ -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt + + # Create the PLATDIR source directory, if one wasn't distributed.. diff --git a/meta/recipes-devtools/python/python3/host_include_contamination.patch b/meta/recipes-devtools/python/python3/host_include_contamination.patch new file mode 100644 index 0000000000..ef2054d9a9 --- /dev/null +++ b/meta/recipes-devtools/python/python3/host_include_contamination.patch @@ -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 <raj.khem@gmail.com> +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') diff --git a/meta/recipes-devtools/python/python3/python-3.3-multilib.patch b/meta/recipes-devtools/python/python3/python-3.3-multilib.patch new file mode 100644 index 0000000000..08c4403cbf --- /dev/null +++ b/meta/recipes-devtools/python/python3/python-3.3-multilib.patch @@ -0,0 +1,361 @@ +From 51fe6f22d0ba113674fb358bd11d75fe659bd26e Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 14 May 2013 15:00:26 -0700 +Subject: [PATCH 01/13] get the sys.lib from python itself and do not use + hardcoded value of 'lib' + +02/2015 Rebased for 3.4.2 + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> + +--- + Include/pythonrun.h | 3 +++ + Lib/distutils/command/install.py | 4 +++- + Lib/pydoc.py | 2 +- + Lib/site.py | 4 ++-- + Lib/sysconfig.py | 18 +++++++++--------- + Lib/trace.py | 4 ++-- + Makefile.pre.in | 7 +++++-- + Modules/getpath.c | 10 +++++++++- + Python/getplatform.c | 20 ++++++++++++++++++++ + Python/sysmodule.c | 4 ++++ + configure.ac | 35 +++++++++++++++++++++++++++++++++++ + setup.py | 9 ++++----- + 12 files changed, 97 insertions(+), 23 deletions(-) + +diff --git a/Include/pythonrun.h b/Include/pythonrun.h +index 9c2e813..2f79cb6 100644 +--- a/Include/pythonrun.h ++++ b/Include/pythonrun.h +@@ -23,6 +23,9 @@ typedef struct { + } PyCompilerFlags; + #endif + ++PyAPI_FUNC(const char *) Py_GetArch(void); ++PyAPI_FUNC(const char *) Py_GetLib(void); ++ + #ifndef Py_LIMITED_API + PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *); + PyAPI_FUNC(int) PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *); +diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py +index 67db007..b46b45b 100644 +--- a/Lib/distutils/command/install.py ++++ b/Lib/distutils/command/install.py +@@ -19,6 +19,8 @@ from site import USER_BASE + from site import USER_SITE + HAS_USER_SITE = True + ++libname = sys.lib ++ + WINDOWS_SCHEME = { + 'purelib': '$base/Lib/site-packages', + 'platlib': '$base/Lib/site-packages', +@@ -30,7 +32,7 @@ WINDOWS_SCHEME = { + INSTALL_SCHEMES = { + 'unix_prefix': { + 'purelib': '$base/lib/python$py_version_short/site-packages', +- 'platlib': '$platbase/lib/python$py_version_short/site-packages', ++ 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages', + 'headers': '$base/include/python$py_version_short$abiflags/$dist_name', + 'scripts': '$base/bin', + 'data' : '$base', +diff --git a/Lib/pydoc.py b/Lib/pydoc.py +index 3ca08c9..6528730 100755 +--- a/Lib/pydoc.py ++++ b/Lib/pydoc.py +@@ -384,7 +384,7 @@ class Doc: + docmodule = docclass = docroutine = docother = docproperty = docdata = fail + + def getdocloc(self, object, +- basedir=os.path.join(sys.base_exec_prefix, "lib", ++ basedir=os.path.join(sys.base_exec_prefix, sys.lib, + "python%d.%d" % sys.version_info[:2])): + """Return the location of module docs or None""" + +diff --git a/Lib/site.py b/Lib/site.py +index 3f78ef5..511931e 100644 +--- a/Lib/site.py ++++ b/Lib/site.py +@@ -303,12 +303,12 @@ def getsitepackages(prefixes=None): + seen.add(prefix) + + if os.sep == '/': +- sitepackages.append(os.path.join(prefix, "lib", ++ sitepackages.append(os.path.join(prefix, sys.lib, + "python" + sys.version[:3], + "site-packages")) + else: + sitepackages.append(prefix) +- sitepackages.append(os.path.join(prefix, "lib", "site-packages")) ++ sitepackages.append(os.path.join(prefix, sys.lib, "site-packages")) + if sys.platform == "darwin": + # for framework builds *only* we add the standard Apple + # locations. +diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py +index 9c34be0..3d1181a 100644 +--- a/Lib/sysconfig.py ++++ b/Lib/sysconfig.py +@@ -20,10 +20,10 @@ __all__ = [ + + _INSTALL_SCHEMES = { + 'posix_prefix': { +- 'stdlib': '{installed_base}/lib/python{py_version_short}', +- 'platstdlib': '{platbase}/lib/python{py_version_short}', ++ 'stdlib': '{installed_base}/'+sys.lib+'/python{py_version_short}', ++ 'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}', + 'purelib': '{base}/lib/python{py_version_short}/site-packages', +- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages', ++ 'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages', + 'include': + '{installed_base}/include/python{py_version_short}{abiflags}', + 'platinclude': +@@ -32,10 +32,10 @@ _INSTALL_SCHEMES = { + 'data': '{base}', + }, + 'posix_home': { +- 'stdlib': '{installed_base}/lib/python', +- 'platstdlib': '{base}/lib/python', ++ 'stdlib': '{installed_base}/'+sys.lib+'/python', ++ 'platstdlib': '{base}/'+sys.lib+'/python', + 'purelib': '{base}/lib/python', +- 'platlib': '{base}/lib/python', ++ 'platlib': '{base}/'+sys.lib+'/python', + 'include': '{installed_base}/include/python', + 'platinclude': '{installed_base}/include/python', + 'scripts': '{base}/bin', +@@ -61,10 +61,10 @@ _INSTALL_SCHEMES = { + 'data': '{userbase}', + }, + 'posix_user': { +- 'stdlib': '{userbase}/lib/python{py_version_short}', +- 'platstdlib': '{userbase}/lib/python{py_version_short}', ++ 'stdlib': '{userbase}/'+sys.lib+'/python{py_version_short}', ++ 'platstdlib': '{userbase}/'+sys.lib+'/python{py_version_short}', + 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', +- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages', ++ 'platlib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages', + 'include': '{userbase}/include/python{py_version_short}', + 'scripts': '{userbase}/bin', + 'data': '{userbase}', +diff --git a/Lib/trace.py b/Lib/trace.py +index f108266..7fd83f2 100755 +--- a/Lib/trace.py ++++ b/Lib/trace.py +@@ -749,10 +749,10 @@ def main(argv=None): + # should I also call expanduser? (after all, could use $HOME) + + s = s.replace("$prefix", +- os.path.join(sys.base_prefix, "lib", ++ os.path.join(sys.base_prefix, sys.lib, + "python" + sys.version[:3])) + s = s.replace("$exec_prefix", +- os.path.join(sys.base_exec_prefix, "lib", ++ os.path.join(sys.base_exec_prefix, sys.lib, + "python" + sys.version[:3])) + s = os.path.normpath(s) + ignore_dirs.append(s) +diff --git a/Makefile.pre.in b/Makefile.pre.in +index 109f402..61a41e2 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -106,6 +106,8 @@ PY_CORE_CFLAGS= $(PY_CFLAGS) $(PY_CFLAGS_NODIST) $(PY_CPPFLAGS) $(CFLAGSFORSHARE + + # Machine-dependent subdirectories + MACHDEP= @MACHDEP@ ++LIB= @LIB@ ++ARCH= @ARCH@ + + # Multiarch directory (may be empty) + MULTIARCH= @MULTIARCH@ +@@ -125,7 +127,7 @@ LIBDIR= @libdir@ + MANDIR= @mandir@ + INCLUDEDIR= @includedir@ + CONFINCLUDEDIR= $(exec_prefix)/include +-SCRIPTDIR= $(prefix)/lib ++SCRIPTDIR= @libdir@ + ABIFLAGS= @ABIFLAGS@ + + # Detailed destination directories +@@ -755,6 +757,7 @@ Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile + -DEXEC_PREFIX='"$(exec_prefix)"' \ + -DVERSION='"$(VERSION)"' \ + -DVPATH='"$(VPATH)"' \ ++ -DARCH='"$(ARCH)"' -DLIB='"$(LIB)"' \ + -o $@ $(srcdir)/Modules/getpath.c + + Programs/python.o: $(srcdir)/Programs/python.c +@@ -835,7 +838,7 @@ $(OPCODE_H): $(srcdir)/Lib/opcode.py $(OPCODE_H_SCRIPT) + Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H) + + Python/getplatform.o: $(srcdir)/Python/getplatform.c +- $(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c ++ $(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -DARCH='"$(ARCH)"' -DLIB='"$(LIB)"' -o $@ $(srcdir)/Python/getplatform.c + + Python/importdl.o: $(srcdir)/Python/importdl.c + $(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c +diff --git a/Modules/getpath.c b/Modules/getpath.c +index 18deb60..a01c3f8 100644 +--- a/Modules/getpath.c ++++ b/Modules/getpath.c +@@ -105,6 +105,13 @@ + #error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined" + #endif + ++#define LIB_PYTHON LIB "/python" VERSION ++ ++#ifndef PYTHONPATH ++#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \ ++ EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload" ++#endif ++ + #ifndef LANDMARK + #define LANDMARK L"os.py" + #endif +@@ -113,6 +120,7 @@ static wchar_t prefix[MAXPATHLEN+1]; + static wchar_t exec_prefix[MAXPATHLEN+1]; + static wchar_t progpath[MAXPATHLEN+1]; + static wchar_t *module_search_path = NULL; ++static wchar_t *lib_python = L"" LIB_PYTHON; + + /* Get file status. Encode the path to the locale encoding. */ + +@@ -494,7 +502,7 @@ calculate_path(void) + _pythonpath = Py_DecodeLocale(PYTHONPATH, NULL); + _prefix = Py_DecodeLocale(PREFIX, NULL); + _exec_prefix = Py_DecodeLocale(EXEC_PREFIX, NULL); +- lib_python = Py_DecodeLocale("lib/python" VERSION, NULL); ++ lib_python = Py_DecodeLocale(LIB_PYTHON, NULL); + + if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) { + Py_FatalError( +diff --git a/Python/getplatform.c b/Python/getplatform.c +index 6899140..66a49c6 100644 +--- a/Python/getplatform.c ++++ b/Python/getplatform.c +@@ -10,3 +10,23 @@ Py_GetPlatform(void) + { + return PLATFORM; + } ++ ++#ifndef ARCH ++#define ARCH "unknown" ++#endif ++ ++const char * ++Py_GetArch(void) ++{ ++ return ARCH; ++} ++ ++#ifndef LIB ++#define LIB "lib" ++#endif ++ ++const char * ++Py_GetLib(void) ++{ ++ return LIB; ++} +diff --git a/Python/sysmodule.c b/Python/sysmodule.c +index 8d7e05a..d9dee0f 100644 +--- a/Python/sysmodule.c ++++ b/Python/sysmodule.c +@@ -1790,6 +1790,10 @@ _PySys_Init(void) + PyUnicode_FromString(Py_GetCopyright())); + SET_SYS_FROM_STRING("platform", + PyUnicode_FromString(Py_GetPlatform())); ++ SET_SYS_FROM_STRING("arch", ++ PyUnicode_FromString(Py_GetArch())); ++ SET_SYS_FROM_STRING("lib", ++ PyUnicode_FromString(Py_GetLib())); + SET_SYS_FROM_STRING("executable", + PyUnicode_FromWideChar( + Py_GetProgramFullPath(), -1)); +diff --git a/configure.ac b/configure.ac +index 707324d..e8d59a3 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -883,6 +883,41 @@ PLATDIR=plat-$MACHDEP + AC_SUBST(PLATDIR) + AC_SUBST(PLATFORM_TRIPLET) + ++AC_SUBST(ARCH) ++AC_MSG_CHECKING(ARCH) ++ARCH=`uname -m` ++case $ARCH in ++i?86) ARCH=i386;; ++esac ++AC_MSG_RESULT($ARCH) ++ ++AC_SUBST(LIB) ++AC_MSG_CHECKING(LIB) ++case $ac_sys_system in ++Linux*) ++ # Test if the compiler is 64bit ++ echo 'int i;' > conftest.$ac_ext ++ python_cv_cc_64bit_output=no ++ if AC_TRY_EVAL(ac_compile); then ++ case `/usr/bin/file conftest.$ac_objext` in ++ *"ELF 64"*) ++ python_cv_cc_64bit_output=yes ++ ;; ++ esac ++ fi ++ rm -rf conftest* ++ ;; ++esac ++ ++case $ARCH:$python_cv_cc_64bit_output in ++ppc64:yes | powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes) ++ LIB="lib64" ++ ;; ++*:*) ++ LIB="lib" ++ ;; ++esac ++AC_MSG_RESULT($LIB) + + AC_MSG_CHECKING([for -Wl,--no-as-needed]) + save_LDFLAGS="$LDFLAGS" +diff --git a/setup.py b/setup.py +index 6d26deb..7b14215 100644 +--- a/setup.py ++++ b/setup.py +@@ -495,7 +495,7 @@ class PyBuildExt(build_ext): + # directories (i.e. '.' and 'Include') must be first. See issue + # 10520. + if not cross_compiling: +- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') ++ add_dir_to_list(self.compiler.library_dirs, os.path.join('/usr/local', sys.lib)) + add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') + # only change this for cross builds for 3.3, issues on Mageia + if cross_compiling: +@@ -553,8 +553,7 @@ class PyBuildExt(build_ext): + # be assumed that no additional -I,-L directives are needed. + if not cross_compiling: + lib_dirs = self.compiler.library_dirs + [ +- '/lib64', '/usr/lib64', +- '/lib', '/usr/lib', ++ '/' + sys.lib, '/usr/' + sys.lib, + ] + inc_dirs = self.compiler.include_dirs + ['/usr/include'] + else: +@@ -746,11 +745,11 @@ class PyBuildExt(build_ext): + elif curses_library: + readline_libs.append(curses_library) + elif self.compiler.find_library_file(lib_dirs + +- ['/usr/lib/termcap'], ++ ['/usr/'+sys.lib+'/termcap'], + 'termcap'): + readline_libs.append('termcap') + exts.append( Extension('readline', ['readline.c'], +- library_dirs=['/usr/lib/termcap'], ++ library_dirs=['/usr/'+sys.lib+'/termcap'], + extra_link_args=readline_extra_link_args, + libraries=readline_libs) ) + else: +-- +2.11.0 + diff --git a/meta/recipes-devtools/python/python3/python-config.patch b/meta/recipes-devtools/python/python3/python-config.patch new file mode 100644 index 0000000000..f23b8b7df0 --- /dev/null +++ b/meta/recipes-devtools/python/python3/python-config.patch @@ -0,0 +1,46 @@ +python-config: Revert to using distutils.sysconfig + +The newer sysconfig module shares some code with distutils.sysconfig, but the same modifications as in + +12-distutils-prefix-is-inside-staging-area.patch makes distutils.sysconfig + +affect the native runtime as well as cross building. Use the old, patched +implementation which returns paths in the staging directory and for the target, +as appropriate. + +Upstream-Status: Inappropriate [Embedded Specific] + +Signed-off-by: Tyler Hall <tylerwhall@gmail.com> +: +Index: Python-3.3.3/Misc/python-config.in +=================================================================== +--- Python-3.3.3.orig/Misc/python-config.in ++++ Python-3.3.3/Misc/python-config.in +@@ -4,7 +4,7 @@ + import getopt + import os + import sys +-import sysconfig ++from distutils import sysconfig + + valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags', + 'ldflags', 'extension-suffix', 'help', 'abiflags', 'configdir'] +@@ -32,14 +32,14 @@ if '--help' in opt_flags: + + for opt in opt_flags: + if opt == '--prefix': +- print(sysconfig.get_config_var('prefix')) ++ print(sysconfig.PREFIX) + + elif opt == '--exec-prefix': +- print(sysconfig.get_config_var('exec_prefix')) ++ print(sysconfig.EXEC_PREFIX) + + elif opt in ('--includes', '--cflags'): +- flags = ['-I' + sysconfig.get_path('include'), +- '-I' + sysconfig.get_path('platinclude')] ++ flags = ['-I' + sysconfig.get_python_inc(), ++ '-I' + sysconfig.get_python_inc(plat_specific=True)] + if opt == '--cflags': + flags.extend(getvar('CFLAGS').split()) + print(' '.join(flags)) diff --git a/meta/recipes-devtools/python/python3/python3-fix-CVE-2016-1000110.patch b/meta/recipes-devtools/python/python3/python3-fix-CVE-2016-1000110.patch new file mode 100644 index 0000000000..ab1b7230ea --- /dev/null +++ b/meta/recipes-devtools/python/python3/python3-fix-CVE-2016-1000110.patch @@ -0,0 +1,148 @@ +From aab3e8c432b90508ac14755128f5a687be2fdf43 Mon Sep 17 00:00:00 2001 +From: Mingli Yu <Mingli.Yu@windriver.com> +Date: Thu, 22 Sep 2016 16:39:49 +0800 +Subject: [PATCH] python3: fix CVE-2016-1000110 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Ignore the HTTP_PROXY variable when REQUEST_METHOD environment is set, which +indicates that the script is in CGI mode. + +Issue #27568 Reported and patch contributed by Rémi Rampin. [#27568] + +Backport patch from https://hg.python.org/cpython/rev/a0ac52ed8f79 + +Upstream-Status: Backport +CVE: CVE-2016-1000110 +Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> +--- + Doc/howto/urllib2.rst | 5 +++++ + Doc/library/urllib.request.rst | 17 ++++++++++++++++- + Lib/test/test_urllib.py | 14 +++++++++++++- + Lib/urllib/request.py | 6 ++++++ + Misc/NEWS | 4 ++++ + 5 files changed, 44 insertions(+), 2 deletions(-) + +diff --git a/Doc/howto/urllib2.rst b/Doc/howto/urllib2.rst +index 24a4156..d2c7991 100644 +--- a/Doc/howto/urllib2.rst ++++ b/Doc/howto/urllib2.rst +@@ -538,6 +538,11 @@ setting up a `Basic Authentication`_ handler: :: + through a proxy. However, this can be enabled by extending urllib.request as + shown in the recipe [#]_. + ++.. note:: ++ ++ ``HTTP_PROXY`` will be ignored if a variable ``REQUEST_METHOD`` is set; see ++ the documentation on :func:`~urllib.request.getproxies`. ++ + + Sockets and Layers + ================== +diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst +index 1338906..1291aeb 100644 +--- a/Doc/library/urllib.request.rst ++++ b/Doc/library/urllib.request.rst +@@ -173,6 +173,16 @@ The :mod:`urllib.request` module defines the following functions: + If both lowercase and uppercase environment variables exist (and disagree), + lowercase is preferred. + ++ .. note:: ++ ++ If the environment variable ``REQUEST_METHOD`` is set, which usually ++ indicates your script is running in a CGI environment, the environment ++ variable ``HTTP_PROXY`` (uppercase ``_PROXY``) will be ignored. This is ++ because that variable can be injected by a client using the "Proxy:" HTTP ++ header. If you need to use an HTTP proxy in a CGI environment, either use ++ ``ProxyHandler`` explicitly, or make sure the variable name is in ++ lowercase (or at least the ``_proxy`` suffix). ++ + + The following classes are provided: + +@@ -280,6 +290,11 @@ The following classes are provided: + list of hostname suffixes, optionally with ``:port`` appended, for example + ``cern.ch,ncsa.uiuc.edu,some.host:8080``. + ++ .. note:: ++ ++ ``HTTP_PROXY`` will be ignored if a variable ``REQUEST_METHOD`` is set; ++ see the documentation on :func:`~urllib.request.getproxies`. ++ + + .. class:: HTTPPasswordMgr() + +@@ -1138,7 +1153,7 @@ the returned bytes object to string once it determines or guesses + the appropriate encoding. + + The following W3C document, https://www.w3.org/International/O-charset\ , lists +-the various ways in which a (X)HTML or a XML document could have specified its ++the various ways in which an (X)HTML or an XML document could have specified its + encoding information. + + As the python.org website uses *utf-8* encoding as specified in its meta tag, we +diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py +index 5d05f8d..247598a 100644 +--- a/Lib/test/test_urllib.py ++++ b/Lib/test/test_urllib.py +@@ -1,4 +1,4 @@ +-"""Regresssion tests for what was in Python 2's "urllib" module""" ++"""Regression tests for what was in Python 2's "urllib" module""" + + import urllib.parse + import urllib.request +@@ -232,6 +232,18 @@ class ProxyTests(unittest.TestCase): + self.assertTrue(urllib.request.proxy_bypass_environment('anotherdomain.com:8888')) + self.assertTrue(urllib.request.proxy_bypass_environment('newdomain.com:1234')) + ++ def test_proxy_cgi_ignore(self): ++ try: ++ self.env.set('HTTP_PROXY', 'http://somewhere:3128') ++ proxies = urllib.request.getproxies_environment() ++ self.assertEqual('http://somewhere:3128', proxies['http']) ++ self.env.set('REQUEST_METHOD', 'GET') ++ proxies = urllib.request.getproxies_environment() ++ self.assertNotIn('http', proxies) ++ finally: ++ self.env.unset('REQUEST_METHOD') ++ self.env.unset('HTTP_PROXY') ++ + def test_proxy_bypass_environment_host_match(self): + bypass = urllib.request.proxy_bypass_environment + self.env.set('NO_PROXY', +diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py +index 1731fe3..3be327d 100644 +--- a/Lib/urllib/request.py ++++ b/Lib/urllib/request.py +@@ -2412,6 +2412,12 @@ def getproxies_environment(): + name = name.lower() + if value and name[-6:] == '_proxy': + proxies[name[:-6]] = value ++ # CVE-2016-1000110 - If we are running as CGI script, forget HTTP_PROXY ++ # (non-all-lowercase) as it may be set from the web server by a "Proxy:" ++ # header from the client ++ # If "proxy" is lowercase, it will still be used thanks to the next block ++ if 'REQUEST_METHOD' in os.environ: ++ proxies.pop('http', None) + for name, value in os.environ.items(): + if name[-6:] == '_proxy': + name = name.lower() +diff --git a/Misc/NEWS b/Misc/NEWS +index 4ad2551..2fcc95b 100644 +--- a/Misc/NEWS ++++ b/Misc/NEWS +@@ -329,6 +329,10 @@ Library + - Issue #26644: Raise ValueError rather than SystemError when a negative + length is passed to SSLSocket.recv() or read(). + ++- Issue #27568: Prevent HTTPoxy attack (CVE-2016-1000110). Ignore the ++ HTTP_PROXY variable when REQUEST_METHOD environment is set, which indicates ++ that the script is in CGI mode. ++ + - Issue #23804: Fix SSL recv(0) and read(0) methods to return zero bytes + instead of up to 1024. + +-- +2.8.1 + diff --git a/meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch b/meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch new file mode 100644 index 0000000000..2bc8b8c460 --- /dev/null +++ b/meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch @@ -0,0 +1,33 @@ +From 43238e1ac13e32984d015c92a5841f3de1fe1d15 Mon Sep 17 00:00:00 2001 +From: Jackie Huang <jackie.huang@windriver.com> +Date: Tue, 18 Nov 2014 00:07:07 -0500 +Subject: [PATCH] setup.py: no host headers libs + +When we are cross-compiling, setup.py should never look in /usr +or /usr/local to find headers or libraries. + +Upstream-Status: Inappropriate [Cross compile specific] + +Signed-off-by: Jackie Huang <jackie.huang@windriver.com> +--- + setup.py | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/setup.py b/setup.py +index f020b28..e8339cd 100644 +--- a/setup.py ++++ b/setup.py +@@ -444,10 +444,7 @@ class PyBuildExt(build_ext): + if not cross_compiling: + add_dir_to_list(self.compiler.library_dirs, os.path.join('/usr/local', sys.lib)) + add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') +- # only change this for cross builds for 3.3, issues on Mageia +- if cross_compiling: + self.add_gcc_paths() +- if not cross_compiling: + self.add_multiarch_paths() + + # Add paths specified in the environment variables LDFLAGS and +-- +2.0.0 + diff --git a/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch b/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch new file mode 100644 index 0000000000..74490d93a5 --- /dev/null +++ b/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch @@ -0,0 +1,28 @@ +From 53ed216d7bf70dd2a925432b6805a701e5fc3e0e Mon Sep 17 00:00:00 2001 +From: Jackie Huang <jackie.huang@windriver.com> +Date: Mon, 17 Nov 2014 06:44:47 +0000 +Subject: [PATCH] python3 use CROSSPYTHONPATH for PYTHON_FOR_BUILD + +Upstream-Status: Inappropriate [Cross compile specific] + +Signed-off-by: Jackie Huang <jackie.huang@windriver.com> +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 989baf9..2890c96 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -67,7 +67,7 @@ if test "$cross_compiling" = yes; then + AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found]) + fi + AC_MSG_RESULT($interp) +- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp ++ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(CROSSPYTHONPATH) '$interp + fi + elif test "$cross_compiling" = maybe; then + AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH]) +-- +2.0.1 + diff --git a/meta/recipes-devtools/python/python3/setup.py-check-cross_compiling-when-get-FLAGS.patch b/meta/recipes-devtools/python/python3/setup.py-check-cross_compiling-when-get-FLAGS.patch new file mode 100644 index 0000000000..fc2e12dfe5 --- /dev/null +++ b/meta/recipes-devtools/python/python3/setup.py-check-cross_compiling-when-get-FLAGS.patch @@ -0,0 +1,50 @@ +From 8dad810f3a3d073f09ad72e1a3ee0a895eab2ca1 Mon Sep 17 00:00:00 2001 +From: Robert Yang <liezhi.yang@windriver.com> +Date: Sun, 18 Jan 2015 19:05:36 -0800 +Subject: [PATCH] setup.py:check cross_compiling when get FLAGS + +Fixed when compile target pythnon3: +gcc -isystem/path/to/sysroots/x86_64-linux/usr/include \ + -L=/path/to/sysroots/x86_64-linux/usr/lib + +This is incorrect, the native sysroot should not be used by target +python3. + +Upstream-Status: Pending + +Signed-off-by: Robert Yang <liezhi.yang@windriver.com> +--- + setup.py | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/setup.py b/setup.py +index e8339cd..83fd31f 100644 +--- a/setup.py ++++ b/setup.py +@@ -238,7 +238,10 @@ class PyBuildExt(build_ext): + # unfortunately, distutils doesn't let us provide separate C and C++ + # compilers + if compiler is not None: +- (ccshared,cflags) = sysconfig.get_config_vars('CCSHARED','CFLAGS') ++ if cross_compiling: ++ (ccshared,cflags) = (os.environ.get('CCSHARED') or '', os.environ.get('CFLAGS') or '') ++ else: ++ (ccshared,cflags) = sysconfig.get_config_vars('CCSHARED','CFLAGS') + args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags + self.compiler.set_executables(**args) + +@@ -457,7 +460,10 @@ class PyBuildExt(build_ext): + ('LDFLAGS', '-R', self.compiler.runtime_library_dirs), + ('LDFLAGS', '-L', self.compiler.library_dirs), + ('CPPFLAGS', '-I', self.compiler.include_dirs)): +- env_val = sysconfig.get_config_var(env_var) ++ if cross_compiling: ++ env_val = os.environ.get(env_var) ++ else: ++ env_val = sysconfig.get_config_var(env_var) + if env_val: + # To prevent optparse from raising an exception about any + # options in env_val that it doesn't know about we strip out +-- +1.7.9.5 + diff --git a/meta/recipes-devtools/python/python3/setup.py-find-libraries-in-staging-dirs.patch b/meta/recipes-devtools/python/python3/setup.py-find-libraries-in-staging-dirs.patch new file mode 100644 index 0000000000..f26bd38b02 --- /dev/null +++ b/meta/recipes-devtools/python/python3/setup.py-find-libraries-in-staging-dirs.patch @@ -0,0 +1,30 @@ +Patch setup.py so that the detect_modules() function looks for required +libraries and headers in STAGING_LIBDIR / STAGING_INCDIR. + +Without this patch, several extension modules are not built, even though +their dependencies are present in the compiler's search paths. +The result is the following warning, and ultimately incomplete packages: + +| The necessary bits to build these optional modules were not found: +| _bz2 _curses_panel _dbm +| _gdbm _lzma _sqlite3 +| nis readline zlib +| To find the necessary bits, look in setup.py in detect_modules() for the module's name. + +Upstream-Status: Inappropriate [Cross compile specific] + +Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de> + +Index: Python-3.4.3/setup.py +=================================================================== +--- Python-3.4.3.orig/setup.py ++++ Python-3.4.3/setup.py +@@ -521,6 +521,8 @@ class PyBuildExt(build_ext): + else: + lib_dirs = self.compiler.library_dirs[:] + inc_dirs = self.compiler.include_dirs[:] ++ lib_dirs.append(os.environ.get('STAGING_LIBDIR')) ++ inc_dirs.append(os.environ.get('STAGING_INCDIR')) + exts = [] + missing = [] + diff --git a/meta/recipes-devtools/python/python3/setuptweaks.patch b/meta/recipes-devtools/python/python3/setuptweaks.patch new file mode 100644 index 0000000000..3a91b1916c --- /dev/null +++ b/meta/recipes-devtools/python/python3/setuptweaks.patch @@ -0,0 +1,57 @@ +This patch removes various ways native system options can pass into the python +compilation and somehow break C modules. + +Upstream-Status: Inappropriate [OE Specific] + +RP 2012/04/23 + +Index: Python-2.7.2/setup.py +=================================================================== +--- Python-2.7.2.orig/setup.py 2012-04-23 20:03:47.295582553 +0000 ++++ Python-2.7.2/setup.py 2012-04-23 20:03:15.000000000 +0000 +@@ -231,7 +231,13 @@ + # compilers + if compiler is not None: + (ccshared,cflags) = sysconfig.get_config_vars('CCSHARED','CFLAGS') +- args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags ++ # Need to filter out -isysroot from the flags. Ideally should ++ # figure out target flags here. ++ flags = [] ++ for f in cflags.split(): ++ if not f.startswith("-isystem"): ++ flags.append(f) ++ args['compiler_so'] = compiler + ' ' + ccshared + ' ' + ' '.join(flags) + self.compiler.set_executables(**args) + + build_ext.build_extensions(self) +@@ -393,7 +399,6 @@ + # into configure and stored in the Makefile (issue found on OS X 10.3). + for env_var, arg_name, dir_list in ( + ('LDFLAGS', '-R', self.compiler.runtime_library_dirs), +- ('LDFLAGS', '-L', self.compiler.library_dirs), + ('CPPFLAGS', '-I', self.compiler.include_dirs)): + env_val = sysconfig.get_config_var(env_var) + if env_val: +@@ -419,16 +424,16 @@ + for directory in reversed(options.dirs): + add_dir_to_list(dir_list, directory) + +- if os.path.normpath(sys.prefix) != '/usr' \ +- and not sysconfig.get_config_var('PYTHONFRAMEWORK'): ++# if os.path.normpath(sys.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 + # building a framework with different architectures than + # the one that is currently installed (issue #7473) +- add_dir_to_list(self.compiler.library_dirs, +- sysconfig.get_config_var("LIBDIR")) +- add_dir_to_list(self.compiler.include_dirs, +- sysconfig.get_config_var("INCLUDEDIR")) ++# add_dir_to_list(self.compiler.library_dirs, ++# sysconfig.get_config_var("LIBDIR")) ++# add_dir_to_list(self.compiler.include_dirs, ++# sysconfig.get_config_var("INCLUDEDIR")) + + try: + have_unicode = unicode diff --git a/meta/recipes-devtools/python/python3/shutil-follow-symlink-fix.patch b/meta/recipes-devtools/python/python3/shutil-follow-symlink-fix.patch new file mode 100644 index 0000000000..802b1c7203 --- /dev/null +++ b/meta/recipes-devtools/python/python3/shutil-follow-symlink-fix.patch @@ -0,0 +1,17 @@ +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 + 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`. + diff --git a/meta/recipes-devtools/python/python-native/sitecustomize.py b/meta/recipes-devtools/python/python3/sitecustomize.py index 273901898a..4c8b5e2ba3 100644 --- a/meta/recipes-devtools/python/python-native/sitecustomize.py +++ b/meta/recipes-devtools/python/python3/sitecustomize.py @@ -27,19 +27,11 @@ def __enableReadlineSupport(): except IOError: pass -def __enableDefaultEncoding(): - import sys - try: - sys.setdefaultencoding( "utf8" ) - except LookupError: - pass - import sys try: import rlcompleter, readline except ImportError: pass else: - __enableDefaultEncoding() __registerExitHandler() __enableReadlineSupport() diff --git a/meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch b/meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch new file mode 100644 index 0000000000..de07643f2b --- /dev/null +++ b/meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch @@ -0,0 +1,54 @@ +From fc93b3cc23b4f9698ae92a42986dbb02b6f19588 Mon Sep 17 00:00:00 2001 +From: Robert Yang <liezhi.yang@windriver.com> +Date: Sun, 18 Jan 2015 06:29:50 -0800 +Subject: [PATCH] sysconfig.py: add _PYTHON_PROJECT_SRC + +python3 has introduced _PYTHON_PROJECT_BASE which is used for separate B +and S, but it doesn't work when compile Modules, the target python3 runs +python3-native's sysconfig to get srcdir which is the native's, there +would be errors when native's srcdir has been removed, add +_PYTHON_PROJECT_SRC to fix the problem. + +Upstream-Status: Pending + +Signed-off-by: Robert Yang <liezhi.yang@windriver.com> +--- + Lib/distutils/sysconfig.py | 5 ++++- + Lib/sysconfig.py | 5 ++++- + 2 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py +index a545ab9..74317d1 100644 +--- a/Lib/distutils/sysconfig.py ++++ b/Lib/distutils/sysconfig.py +@@ -554,7 +554,10 @@ def get_config_vars(*args): + _config_vars['exec_prefix'] = EXEC_PREFIX + + # Always convert srcdir to an absolute path +- srcdir = _config_vars.get('srcdir', project_base) ++ if "_PYTHON_PROJECT_SRC" in os.environ: ++ srcdir = os.path.abspath(os.environ["_PYTHON_PROJECT_SRC"]) ++ else: ++ srcdir = _config_vars.get('srcdir', project_base) + if os.name == 'posix': + if python_build: + # If srcdir is a relative path (typically '.' or '..') +diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py +index 7287f11..cc92998 100644 +--- a/Lib/sysconfig.py ++++ b/Lib/sysconfig.py +@@ -562,7 +562,10 @@ def get_config_vars(*args): + _CONFIG_VARS['userbase'] = _getuserbase() + + # Always convert srcdir to an absolute path +- srcdir = _CONFIG_VARS.get('srcdir', _PROJECT_BASE) ++ if "_PYTHON_PROJECT_SRC" in os.environ: ++ srcdir = os.path.abspath(os.environ["_PYTHON_PROJECT_SRC"]) ++ else: ++ srcdir = _CONFIG_VARS.get('srcdir', _PROJECT_BASE) + if os.name == 'posix': + if _PYTHON_BUILD: + # If srcdir is a relative path (typically '.' or '..') +-- +1.7.9.5 + diff --git a/meta/recipes-devtools/python/python3/sysroot-include-headers.patch b/meta/recipes-devtools/python/python3/sysroot-include-headers.patch new file mode 100644 index 0000000000..785b5567f2 --- /dev/null +++ b/meta/recipes-devtools/python/python3/sysroot-include-headers.patch @@ -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] == '': diff --git a/meta/recipes-devtools/python/python3/tweak-MULTIARCH-for-powerpc-linux-gnuspe.patch b/meta/recipes-devtools/python/python3/tweak-MULTIARCH-for-powerpc-linux-gnuspe.patch new file mode 100644 index 0000000000..8d037278bd --- /dev/null +++ b/meta/recipes-devtools/python/python3/tweak-MULTIARCH-for-powerpc-linux-gnuspe.patch @@ -0,0 +1,52 @@ +From 5d6509313198ec9b686cad50b002212e4344004b Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Fri, 11 Mar 2016 01:15:45 -0500 +Subject: [PATCH] configure.ac: tweak MULTIARCH for powerpc-linux-gnuspe + +For p1022ds bsp, the MULTIARCH is powerpc-linux-gnuspev1 and +python3 did not recognize the extra 'v1' which caused python3 +configure error for the platform triplet. + +Q:Why Python3 check platform triplet? + +A:Under Linux, GNU/KFreeBSD and the Hurd, C extensions now include +the architecture triplet in the extension name, to make it easy to +test builds for different ABIs in the same working tree. + +Here is the generated C extensions which take platform triplet into account. +... +|image/usr/lib/python3.5/lib-dynload/_datetime.cpython-35m-powerpc-linux-gnuspe.so +... + +https://bugs.python.org/issue22980 +https://www.python.org/dev/peps/pep-3149/ +https://bugs.python.org/review/22980/patch/14593/54808 + +Upstream-Status: Pending + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + configure.ac | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 9eb3d22..c34a9a0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -724,6 +724,13 @@ fi + + + MULTIARCH=$($CC --print-multiarch 2>/dev/null) ++ ++# Tweak MULTIARCH ++if test x$MULTIARCH = xpowerpc-linux-gnuspev1 ++then ++ MULTIARCH="powerpc-linux-gnuspe" ++fi ++ + AC_SUBST(MULTIARCH) + + AC_MSG_CHECKING([for the platform triplet based on compiler characteristics]) +-- +1.9.1 + diff --git a/meta/recipes-devtools/python/python3/unixccompiler.patch b/meta/recipes-devtools/python/python3/unixccompiler.patch new file mode 100644 index 0000000000..3e2b1d1c2e --- /dev/null +++ b/meta/recipes-devtools/python/python3/unixccompiler.patch @@ -0,0 +1,35 @@ +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 <lei.mei@intel.com> +Signed-off-by: Khem Raj <raj.khem@gmail.com> +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,9 @@ + # ccompiler.py. + + def library_dir_option(self, dir): +- return "-L" + dir ++ if dir.startswith("/"): ++ 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 diff --git a/meta/recipes-devtools/python/python3/upstream-random-fixes.patch b/meta/recipes-devtools/python/python3/upstream-random-fixes.patch new file mode 100644 index 0000000000..0d9152ccd7 --- /dev/null +++ b/meta/recipes-devtools/python/python3/upstream-random-fixes.patch @@ -0,0 +1,721 @@ +This patch updates random.c to match upstream python's code at revision +8125d9a8152b. This addresses various issues around problems with glibc 2.24 +and 2.25 such that python would fail to start with: + +[rpurdie@centos7 ~]$ /tmp/t2/sysroots/x86_64-pokysdk-linux/usr/bin/python3 +Fatal Python error: getentropy() failed +Aborted + +(taken from our buildtools-tarball also breaks eSDK) + +Upstream-Status: Backport + +# HG changeset patch +# User Victor Stinner <victor.stinner@gmail.com> +# Date 1483957133 -3600 +# Node ID 8125d9a8152b79e712cb09c7094b9129b9bcea86 +# Parent 337461574c90281630751b6095c4e1baf380cf7d +Issue #29157: Prefer getrandom() over getentropy() + +Copy and then adapt Python/random.c from default branch. Difference between 3.5 +and default branches: + +* Python 3.5 only uses getrandom() in non-blocking mode: flags=GRND_NONBLOCK +* If getrandom() fails with EAGAIN: py_getrandom() immediately fails and + remembers that getrandom() doesn't work. +* Python 3.5 has no _PyOS_URandomNonblock() function: _PyOS_URandom() + works in non-blocking mode on Python 3.5 + +RP 2017/1/22 + +Index: Python-3.5.2/Python/random.c +=================================================================== +--- Python-3.5.2.orig/Python/random.c ++++ Python-3.5.2/Python/random.c +@@ -1,6 +1,9 @@ + #include "Python.h" + #ifdef MS_WINDOWS + # include <windows.h> ++/* All sample MSDN wincrypt programs include the header below. It is at least ++ * required with Min GW. */ ++# include <wincrypt.h> + #else + # include <fcntl.h> + # ifdef HAVE_SYS_STAT_H +@@ -36,10 +39,9 @@ win32_urandom_init(int raise) + return 0; + + error: +- if (raise) ++ if (raise) { + PyErr_SetFromWindowsErr(0); +- else +- Py_FatalError("Failed to initialize Windows random API (CryptoGen)"); ++ } + return -1; + } + +@@ -52,8 +54,9 @@ win32_urandom(unsigned char *buffer, Py_ + + if (hCryptProv == 0) + { +- if (win32_urandom_init(raise) == -1) ++ if (win32_urandom_init(raise) == -1) { + return -1; ++ } + } + + while (size > 0) +@@ -62,11 +65,9 @@ win32_urandom(unsigned char *buffer, Py_ + if (!CryptGenRandom(hCryptProv, (DWORD)chunk, buffer)) + { + /* CryptGenRandom() failed */ +- if (raise) ++ if (raise) { + PyErr_SetFromWindowsErr(0); +- else +- Py_FatalError("Failed to initialized the randomized hash " +- "secret using CryptoGen)"); ++ } + return -1; + } + buffer += chunk; +@@ -75,55 +76,29 @@ win32_urandom(unsigned char *buffer, Py_ + return 0; + } + +-/* Issue #25003: Don't use getentropy() on Solaris (available since +- * Solaris 11.3), it is blocking whereas os.urandom() should not block. */ +-#elif defined(HAVE_GETENTROPY) && !defined(sun) +-#define PY_GETENTROPY 1 +- +-/* Fill buffer with size pseudo-random bytes generated by getentropy(). +- Return 0 on success, or raise an exception and return -1 on error. +- +- If fatal is nonzero, call Py_FatalError() instead of raising an exception +- on error. */ +-static int +-py_getentropy(unsigned char *buffer, Py_ssize_t size, int fatal) +-{ +- while (size > 0) { +- Py_ssize_t len = Py_MIN(size, 256); +- int res; +- +- if (!fatal) { +- Py_BEGIN_ALLOW_THREADS +- res = getentropy(buffer, len); +- Py_END_ALLOW_THREADS +- +- if (res < 0) { +- PyErr_SetFromErrno(PyExc_OSError); +- return -1; +- } +- } +- else { +- res = getentropy(buffer, len); +- if (res < 0) +- Py_FatalError("getentropy() failed"); +- } +- +- buffer += len; +- size -= len; +- } +- return 0; +-} +- +-#else ++#else /* !MS_WINDOWS */ + + #if defined(HAVE_GETRANDOM) || defined(HAVE_GETRANDOM_SYSCALL) + #define PY_GETRANDOM 1 + ++/* Call getrandom() to get random bytes: ++ ++ - Return 1 on success ++ - Return 0 if getrandom() is not available (failed with ENOSYS or EPERM), ++ or if getrandom(GRND_NONBLOCK) failed with EAGAIN (system urandom not ++ initialized yet). ++ - Raise an exception (if raise is non-zero) and return -1 on error: ++ if getrandom() failed with EINTR, raise is non-zero and the Python signal ++ handler raised an exception, or if getrandom() failed with a different ++ error. ++ ++ getrandom() is retried if it failed with EINTR: interrupted by a signal. */ + static int + py_getrandom(void *buffer, Py_ssize_t size, int raise) + { +- /* Is getrandom() supported by the running kernel? +- * Need Linux kernel 3.17 or newer, or Solaris 11.3 or newer */ ++ /* Is getrandom() supported by the running kernel? Set to 0 if getrandom() ++ failed with ENOSYS or EPERM. Need Linux kernel 3.17 or newer, or Solaris ++ 11.3 or newer */ + static int getrandom_works = 1; + + /* getrandom() on Linux will block if called before the kernel has +@@ -132,84 +107,165 @@ py_getrandom(void *buffer, Py_ssize_t si + * see https://bugs.python.org/issue26839. To avoid this, use the + * GRND_NONBLOCK flag. */ + const int flags = GRND_NONBLOCK; +- int n; ++ char *dest; ++ long n; + +- if (!getrandom_works) ++ if (!getrandom_works) { + return 0; ++ } + ++ dest = buffer; + while (0 < size) { + #ifdef sun + /* Issue #26735: On Solaris, getrandom() is limited to returning up +- to 1024 bytes */ ++ to 1024 bytes. Call it multiple times if more bytes are ++ requested. */ + n = Py_MIN(size, 1024); + #else +- n = size; ++ n = Py_MIN(size, LONG_MAX); + #endif + + errno = 0; + #ifdef HAVE_GETRANDOM + if (raise) { + Py_BEGIN_ALLOW_THREADS +- n = getrandom(buffer, n, flags); ++ n = getrandom(dest, n, flags); + Py_END_ALLOW_THREADS + } + else { +- n = getrandom(buffer, n, flags); ++ n = getrandom(dest, n, flags); + } + #else + /* On Linux, use the syscall() function because the GNU libc doesn't +- * expose the Linux getrandom() syscall yet. See: +- * https://sourceware.org/bugzilla/show_bug.cgi?id=17252 */ ++ expose the Linux getrandom() syscall yet. See: ++ https://sourceware.org/bugzilla/show_bug.cgi?id=17252 */ + if (raise) { + Py_BEGIN_ALLOW_THREADS +- n = syscall(SYS_getrandom, buffer, n, flags); ++ n = syscall(SYS_getrandom, dest, n, flags); + Py_END_ALLOW_THREADS + } + else { +- n = syscall(SYS_getrandom, buffer, n, flags); ++ n = syscall(SYS_getrandom, dest, n, flags); + } + #endif + + if (n < 0) { +- if (errno == ENOSYS) { ++ /* ENOSYS: the syscall is not supported by the kernel. ++ EPERM: the syscall is blocked by a security policy (ex: SECCOMP) ++ or something else. */ ++ if (errno == ENOSYS || errno == EPERM) { + getrandom_works = 0; + return 0; + } ++ + if (errno == EAGAIN) { +- /* If we failed with EAGAIN, the entropy pool was +- * uninitialized. In this case, we return failure to fall +- * back to reading from /dev/urandom. +- * +- * Note: In this case the data read will not be random so +- * should not be used for cryptographic purposes. Retaining +- * the existing semantics for practical purposes. */ ++ /* getrandom(GRND_NONBLOCK) fails with EAGAIN if the system ++ urandom is not initialiazed yet. In this case, fall back on ++ reading from /dev/urandom. ++ ++ Note: In this case the data read will not be random so ++ should not be used for cryptographic purposes. Retaining ++ the existing semantics for practical purposes. */ + getrandom_works = 0; + return 0; + } + + if (errno == EINTR) { +- if (PyErr_CheckSignals()) { +- if (!raise) +- Py_FatalError("getrandom() interrupted by a signal"); +- return -1; ++ if (raise) { ++ if (PyErr_CheckSignals()) { ++ return -1; ++ } + } +- /* retry getrandom() */ ++ ++ /* retry getrandom() if it was interrupted by a signal */ + continue; + } + +- if (raise) ++ if (raise) { + PyErr_SetFromErrno(PyExc_OSError); +- else +- Py_FatalError("getrandom() failed"); ++ } + return -1; + } + +- buffer += n; ++ dest += n; + size -= n; + } + return 1; + } +-#endif ++ ++#elif defined(HAVE_GETENTROPY) ++#define PY_GETENTROPY 1 ++ ++/* Fill buffer with size pseudo-random bytes generated by getentropy(): ++ ++ - Return 1 on success ++ - Return 0 if getentropy() syscall is not available (failed with ENOSYS or ++ EPERM). ++ - Raise an exception (if raise is non-zero) and return -1 on error: ++ if getentropy() failed with EINTR, raise is non-zero and the Python signal ++ handler raised an exception, or if getentropy() failed with a different ++ error. ++ ++ getentropy() is retried if it failed with EINTR: interrupted by a signal. */ ++static int ++py_getentropy(char *buffer, Py_ssize_t size, int raise) ++{ ++ /* Is getentropy() supported by the running kernel? Set to 0 if ++ getentropy() failed with ENOSYS or EPERM. */ ++ static int getentropy_works = 1; ++ ++ if (!getentropy_works) { ++ return 0; ++ } ++ ++ while (size > 0) { ++ /* getentropy() is limited to returning up to 256 bytes. Call it ++ multiple times if more bytes are requested. */ ++ Py_ssize_t len = Py_MIN(size, 256); ++ int res; ++ ++ if (raise) { ++ Py_BEGIN_ALLOW_THREADS ++ res = getentropy(buffer, len); ++ Py_END_ALLOW_THREADS ++ } ++ else { ++ res = getentropy(buffer, len); ++ } ++ ++ if (res < 0) { ++ /* ENOSYS: the syscall is not supported by the running kernel. ++ EPERM: the syscall is blocked by a security policy (ex: SECCOMP) ++ or something else. */ ++ if (errno == ENOSYS || errno == EPERM) { ++ getentropy_works = 0; ++ return 0; ++ } ++ ++ if (errno == EINTR) { ++ if (raise) { ++ if (PyErr_CheckSignals()) { ++ return -1; ++ } ++ } ++ ++ /* retry getentropy() if it was interrupted by a signal */ ++ continue; ++ } ++ ++ if (raise) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ } ++ return -1; ++ } ++ ++ buffer += len; ++ size -= len; ++ } ++ return 1; ++} ++#endif /* defined(HAVE_GETENTROPY) && !defined(sun) */ ++ + + static struct { + int fd; +@@ -217,127 +273,123 @@ static struct { + ino_t st_ino; + } urandom_cache = { -1 }; + ++/* Read random bytes from the /dev/urandom device: + +-/* Read size bytes from /dev/urandom into buffer. +- Call Py_FatalError() on error. */ +-static void +-dev_urandom_noraise(unsigned char *buffer, Py_ssize_t size) +-{ +- int fd; +- Py_ssize_t n; ++ - Return 0 on success ++ - Raise an exception (if raise is non-zero) and return -1 on error + +- assert (0 < size); ++ Possible causes of errors: + +-#ifdef PY_GETRANDOM +- if (py_getrandom(buffer, size, 0) == 1) +- return; +- /* getrandom() is not supported by the running kernel, fall back +- * on reading /dev/urandom */ +-#endif ++ - open() failed with ENOENT, ENXIO, ENODEV, EACCES: the /dev/urandom device ++ was not found. For example, it was removed manually or not exposed in a ++ chroot or container. ++ - open() failed with a different error ++ - fstat() failed ++ - read() failed or returned 0 + +- fd = _Py_open_noraise("/dev/urandom", O_RDONLY); +- if (fd < 0) +- Py_FatalError("Failed to open /dev/urandom"); ++ read() is retried if it failed with EINTR: interrupted by a signal. + +- while (0 < size) +- { +- do { +- n = read(fd, buffer, (size_t)size); +- } while (n < 0 && errno == EINTR); +- if (n <= 0) +- { +- /* stop on error or if read(size) returned 0 */ +- Py_FatalError("Failed to read bytes from /dev/urandom"); +- break; +- } +- buffer += n; +- size -= (Py_ssize_t)n; +- } +- close(fd); +-} ++ The file descriptor of the device is kept open between calls to avoid using ++ many file descriptors when run in parallel from multiple threads: ++ see the issue #18756. ++ ++ st_dev and st_ino fields of the file descriptor (from fstat()) are cached to ++ check if the file descriptor was replaced by a different file (which is ++ likely a bug in the application): see the issue #21207. + +-/* Read size bytes from /dev/urandom into buffer. +- Return 0 on success, raise an exception and return -1 on error. */ ++ If the file descriptor was closed or replaced, open a new file descriptor ++ but don't close the old file descriptor: it probably points to something ++ important for some third-party code. */ + static int +-dev_urandom_python(char *buffer, Py_ssize_t size) ++dev_urandom(char *buffer, Py_ssize_t size, int raise) + { + int fd; + Py_ssize_t n; +- struct _Py_stat_struct st; +-#ifdef PY_GETRANDOM +- int res; +-#endif + +- if (size <= 0) +- return 0; ++ if (raise) { ++ struct _Py_stat_struct st; + +-#ifdef PY_GETRANDOM +- res = py_getrandom(buffer, size, 1); +- if (res < 0) +- return -1; +- if (res == 1) +- return 0; +- /* getrandom() is not supported by the running kernel, fall back +- * on reading /dev/urandom */ +-#endif +- +- if (urandom_cache.fd >= 0) { +- /* Does the fd point to the same thing as before? (issue #21207) */ +- if (_Py_fstat_noraise(urandom_cache.fd, &st) +- || st.st_dev != urandom_cache.st_dev +- || st.st_ino != urandom_cache.st_ino) { +- /* Something changed: forget the cached fd (but don't close it, +- since it probably points to something important for some +- third-party code). */ +- urandom_cache.fd = -1; +- } +- } +- if (urandom_cache.fd >= 0) +- fd = urandom_cache.fd; +- else { +- fd = _Py_open("/dev/urandom", O_RDONLY); +- if (fd < 0) { +- if (errno == ENOENT || errno == ENXIO || +- errno == ENODEV || errno == EACCES) +- PyErr_SetString(PyExc_NotImplementedError, +- "/dev/urandom (or equivalent) not found"); +- /* otherwise, keep the OSError exception raised by _Py_open() */ +- return -1; +- } + if (urandom_cache.fd >= 0) { +- /* urandom_fd was initialized by another thread while we were +- not holding the GIL, keep it. */ +- close(fd); +- fd = urandom_cache.fd; ++ /* Does the fd point to the same thing as before? (issue #21207) */ ++ if (_Py_fstat_noraise(urandom_cache.fd, &st) ++ || st.st_dev != urandom_cache.st_dev ++ || st.st_ino != urandom_cache.st_ino) { ++ /* Something changed: forget the cached fd (but don't close it, ++ since it probably points to something important for some ++ third-party code). */ ++ urandom_cache.fd = -1; ++ } + } ++ if (urandom_cache.fd >= 0) ++ fd = urandom_cache.fd; + else { +- if (_Py_fstat(fd, &st)) { +- close(fd); ++ fd = _Py_open("/dev/urandom", O_RDONLY); ++ if (fd < 0) { ++ if (errno == ENOENT || errno == ENXIO || ++ errno == ENODEV || errno == EACCES) { ++ PyErr_SetString(PyExc_NotImplementedError, ++ "/dev/urandom (or equivalent) not found"); ++ } ++ /* otherwise, keep the OSError exception raised by _Py_open() */ + return -1; + } ++ if (urandom_cache.fd >= 0) { ++ /* urandom_fd was initialized by another thread while we were ++ not holding the GIL, keep it. */ ++ close(fd); ++ fd = urandom_cache.fd; ++ } + else { +- urandom_cache.fd = fd; +- urandom_cache.st_dev = st.st_dev; +- urandom_cache.st_ino = st.st_ino; ++ if (_Py_fstat(fd, &st)) { ++ close(fd); ++ return -1; ++ } ++ else { ++ urandom_cache.fd = fd; ++ urandom_cache.st_dev = st.st_dev; ++ urandom_cache.st_ino = st.st_ino; ++ } + } + } +- } + +- do { +- n = _Py_read(fd, buffer, (size_t)size); +- if (n == -1) +- return -1; +- if (n == 0) { +- PyErr_Format(PyExc_RuntimeError, +- "Failed to read %zi bytes from /dev/urandom", +- size); ++ do { ++ n = _Py_read(fd, buffer, (size_t)size); ++ if (n == -1) ++ return -1; ++ if (n == 0) { ++ PyErr_Format(PyExc_RuntimeError, ++ "Failed to read %zi bytes from /dev/urandom", ++ size); ++ return -1; ++ } ++ ++ buffer += n; ++ size -= n; ++ } while (0 < size); ++ } ++ else { ++ fd = _Py_open_noraise("/dev/urandom", O_RDONLY); ++ if (fd < 0) { + return -1; + } + +- buffer += n; +- size -= n; +- } while (0 < size); ++ while (0 < size) ++ { ++ do { ++ n = read(fd, buffer, (size_t)size); ++ } while (n < 0 && errno == EINTR); + ++ if (n <= 0) { ++ /* stop on error or if read(size) returned 0 */ ++ close(fd); ++ return -1; ++ } ++ ++ buffer += n; ++ size -= n; ++ } ++ close(fd); ++ } + return 0; + } + +@@ -349,8 +401,8 @@ dev_urandom_close(void) + urandom_cache.fd = -1; + } + } ++#endif /* !MS_WINDOWS */ + +-#endif + + /* Fill buffer with pseudo-random bytes generated by a linear congruent + generator (LCG): +@@ -373,29 +425,98 @@ lcg_urandom(unsigned int x0, unsigned ch + } + } + +-/* Fill buffer with size pseudo-random bytes from the operating system random +- number generator (RNG). It is suitable for most cryptographic purposes +- except long living private keys for asymmetric encryption. ++/* Read random bytes: + +- Return 0 on success, raise an exception and return -1 on error. */ +-int +-_PyOS_URandom(void *buffer, Py_ssize_t size) ++ - Return 0 on success ++ - Raise an exception (if raise is non-zero) and return -1 on error ++ ++ Used sources of entropy ordered by preference, preferred source first: ++ ++ - CryptGenRandom() on Windows ++ - getrandom() function (ex: Linux and Solaris): call py_getrandom() ++ - getentropy() function (ex: OpenBSD): call py_getentropy() ++ - /dev/urandom device ++ ++ Read from the /dev/urandom device if getrandom() or getentropy() function ++ is not available or does not work. ++ ++ Prefer getrandom() over getentropy() because getrandom() supports blocking ++ and non-blocking mode and Python requires non-blocking RNG at startup to ++ initialize its hash secret: see the PEP 524. ++ ++ Prefer getrandom() and getentropy() over reading directly /dev/urandom ++ because these functions don't need file descriptors and so avoid ENFILE or ++ EMFILE errors (too many open files): see the issue #18756. ++ ++ Only use RNG running in the kernel. They are more secure because it is ++ harder to get the internal state of a RNG running in the kernel land than a ++ RNG running in the user land. The kernel has a direct access to the hardware ++ and has access to hardware RNG, they are used as entropy sources. ++ ++ Note: the OpenSSL RAND_pseudo_bytes() function does not automatically reseed ++ its RNG on fork(), two child processes (with the same pid) generate the same ++ random numbers: see issue #18747. Kernel RNGs don't have this issue, ++ they have access to good quality entropy sources. ++ ++ If raise is zero: ++ ++ - Don't raise an exception on error ++ - Don't call the Python signal handler (don't call PyErr_CheckSignals()) if ++ a function fails with EINTR: retry directly the interrupted function ++ - Don't release the GIL to call functions. ++*/ ++static int ++pyurandom(void *buffer, Py_ssize_t size, int raise) + { ++#if defined(PY_GETRANDOM) || defined(PY_GETENTROPY) ++ int res; ++#endif ++ + if (size < 0) { +- PyErr_Format(PyExc_ValueError, +- "negative argument not allowed"); ++ if (raise) { ++ PyErr_Format(PyExc_ValueError, ++ "negative argument not allowed"); ++ } + return -1; + } +- if (size == 0) ++ ++ if (size == 0) { + return 0; ++ } + + #ifdef MS_WINDOWS +- return win32_urandom((unsigned char *)buffer, size, 1); +-#elif defined(PY_GETENTROPY) +- return py_getentropy(buffer, size, 0); ++ return win32_urandom((unsigned char *)buffer, size, raise); ++#else ++ ++#if defined(PY_GETRANDOM) || defined(PY_GETENTROPY) ++#ifdef PY_GETRANDOM ++ res = py_getrandom(buffer, size, raise); + #else +- return dev_urandom_python((char*)buffer, size); ++ res = py_getentropy(buffer, size, raise); + #endif ++ if (res < 0) { ++ return -1; ++ } ++ if (res == 1) { ++ return 0; ++ } ++ /* getrandom() or getentropy() function is not available: failed with ++ ENOSYS, EPERM or EAGAIN. Fall back on reading from /dev/urandom. */ ++#endif ++ ++ return dev_urandom(buffer, size, raise); ++#endif ++} ++ ++/* Fill buffer with size pseudo-random bytes from the operating system random ++ number generator (RNG). It is suitable for most cryptographic purposes ++ except long living private keys for asymmetric encryption. ++ ++ Return 0 on success. Raise an exception and return -1 on error. */ ++int ++_PyOS_URandom(void *buffer, Py_ssize_t size) ++{ ++ return pyurandom(buffer, size, 1); + } + + void +@@ -436,13 +557,14 @@ _PyRandom_Init(void) + } + } + else { +-#ifdef MS_WINDOWS +- (void)win32_urandom(secret, secret_size, 0); +-#elif defined(PY_GETENTROPY) +- (void)py_getentropy(secret, secret_size, 1); +-#else +- dev_urandom_noraise(secret, secret_size); +-#endif ++ int res; ++ ++ /* _PyRandom_Init() is called very early in the Python initialization ++ and so exceptions cannot be used (use raise=0). */ ++ res = pyurandom(secret, secret_size, 0); ++ if (res < 0) { ++ Py_FatalError("failed to get random numbers to initialize Python"); ++ } + } + } + +@@ -454,8 +576,6 @@ _PyRandom_Fini(void) + CryptReleaseContext(hCryptProv, 0); + hCryptProv = 0; + } +-#elif defined(PY_GETENTROPY) +- /* nothing to clean */ + #else + dev_urandom_close(); + #endif diff --git a/meta/recipes-devtools/python/python3_3.5.2.bb b/meta/recipes-devtools/python/python3_3.5.2.bb new file mode 100644 index 0000000000..2ff7c9e278 --- /dev/null +++ b/meta/recipes-devtools/python/python3_3.5.2.bb @@ -0,0 +1,224 @@ +require recipes-devtools/python/python.inc + +DEPENDS = "python3-native libffi bzip2 db gdbm openssl readline sqlite3 zlib virtual/libintl xz" +PR = "${INC_PR}.0" +PYTHON_MAJMIN = "3.5" +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.xz \ +file://python-config.patch \ +file://000-cross-compile.patch \ +file://030-fixup-include-dirs.patch \ +file://070-dont-clean-ipkg-install.patch \ +file://080-distutils-dont_adjust_files.patch \ +file://130-readline-setup.patch \ +file://150-fix-setupterm.patch \ +file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \ +file://tweak-MULTIARCH-for-powerpc-linux-gnuspe.patch \ +${DISTRO_SRC_URI} \ +" + +SRC_URI += "\ + file://03-fix-tkinter-detection.patch \ + file://avoid_warning_about_tkinter.patch \ + file://cgi_py.patch \ + file://host_include_contamination.patch \ + file://python-3.3-multilib.patch \ + file://shutil-follow-symlink-fix.patch \ + file://sysroot-include-headers.patch \ + file://unixccompiler.patch \ + file://avoid-ncursesw-include-path.patch \ + file://python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \ + file://python3-setup.py-no-host-headers-libs.patch \ + file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \ + file://setup.py-check-cross_compiling-when-get-FLAGS.patch \ + file://setup.py-find-libraries-in-staging-dirs.patch \ + file://configure.ac-fix-LIBPL.patch \ + file://python3-fix-CVE-2016-1000110.patch \ + file://upstream-random-fixes.patch \ + " +SRC_URI[md5sum] = "8906efbacfcdc7c3c9198aeefafd159e" +SRC_URI[sha256sum] = "0010f56100b9b74259ebcd5d4b295a32324b58b517403a10d1a2aa7cb22bca40" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=6b60258130e4ed10d3101517eb5b9385" + +# exclude pre-releases for both python 2.x and 3.x +UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar" + +S = "${WORKDIR}/Python-${PV}" + +inherit autotools multilib_header python3native pkgconfig + +CONFIGUREOPTS += " --with-system-ffi " + +CACHED_CONFIGUREVARS = "ac_cv_have_chflags=no \ + ac_cv_have_lchflags=no \ + ac_cv_have_long_long_format=yes \ + ac_cv_buggy_getaddrinfo=no \ + ac_cv_file__dev_ptmx=yes \ + ac_cv_file__dev_ptc=no \ +" + +TARGET_CC_ARCH += "-DNDEBUG -fno-inline" +SDK_CC_ARCH += "-DNDEBUG -fno-inline" +EXTRA_OEMAKE += "CROSS_COMPILE=yes" +EXTRA_OECONF += "CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ --without-ensurepip" + +export CROSS_COMPILE = "${TARGET_PREFIX}" +export _PYTHON_PROJECT_BASE = "${B}" +export _PYTHON_PROJECT_SRC = "${S}" +export CCSHARED = "-fPIC" + +# Fix cross compilation of different modules +export CROSSPYTHONPATH = "${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/:${B}/build/lib.linux-${TARGET_ARCH}-${PYTHON_MAJMIN}:${S}/Lib:${S}/Lib/plat-linux" + +# No ctypes option for python 3 +PYTHONLSBOPTS = "" + +do_configure_append() { + rm -f ${S}/Makefile.orig + autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi +} + +do_compile() { + # regenerate platform specific files, because they depend on system headers + cd ${S}/Lib/plat-linux* + include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python3-native/python3 \ + ${S}/Tools/scripts/h2py.py -i '(u_long)' \ + ${STAGING_INCDIR}/dlfcn.h \ + ${STAGING_INCDIR}/linux/cdrom.h \ + ${STAGING_INCDIR}/netinet/in.h \ + ${STAGING_INCDIR}/sys/types.h + sed -e 's,${STAGING_DIR_HOST},,g' -i *.py + cd - + + + # remove any bogus LD_LIBRARY_PATH + sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile + + if [ ! -f Makefile.orig ]; then + install -m 0644 Makefile Makefile.orig + fi + sed -i -e 's,^CONFIGURE_LDFLAGS=.*,CONFIGURE_LDFLAGS=-L. -L${STAGING_LIBDIR},g' \ + -e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \ + -e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \ + -e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \ + -e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \ + -e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \ + -e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \ + Makefile + # save copy of it now, because if we do it in do_install and + # then call do_install twice we get Makefile.orig == Makefile.sysroot + install -m 0644 Makefile Makefile.sysroot + + oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \ + HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \ + STAGING_LIBDIR=${STAGING_LIBDIR} \ + STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ + STAGING_INCDIR=${STAGING_INCDIR} \ + LIB=${baselib} \ + ARCH=${TARGET_ARCH} \ + OPT="${CFLAGS}" libpython3.so + + oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \ + HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \ + STAGING_LIBDIR=${STAGING_LIBDIR} \ + STAGING_INCDIR=${STAGING_INCDIR} \ + STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ + LIB=${baselib} \ + ARCH=${TARGET_ARCH} \ + OPT="${CFLAGS}" +} + +do_install() { + # make install needs the original Makefile, or otherwise the inclues would + # go to ${D}${STAGING...}/... + install -m 0644 Makefile.orig Makefile + + install -d ${D}${libdir}/pkgconfig + install -d ${D}${libdir}/python${PYTHON_MAJMIN}/config + + # rerun the build once again with original makefile this time + # run install in a separate step to avoid compile/install race + oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \ + HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \ + STAGING_LIBDIR=${STAGING_LIBDIR} \ + STAGING_INCDIR=${STAGING_INCDIR} \ + STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ + LIB=${baselib} \ + ARCH=${TARGET_ARCH} \ + DESTDIR=${D} LIBDIR=${libdir} + + oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \ + HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \ + STAGING_LIBDIR=${STAGING_LIBDIR} \ + STAGING_INCDIR=${STAGING_INCDIR} \ + STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ + LIB=${baselib} \ + ARCH=${TARGET_ARCH} \ + DESTDIR=${D} LIBDIR=${libdir} install + + # avoid conflict with 2to3 from Python 2 + rm -f ${D}/${bindir}/2to3 + + install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile + install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile + + if [ -e ${WORKDIR}/sitecustomize.py ]; then + install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN} + fi + + oe_multilib_header python${PYTHON_BINABI}/pyconfig.h +} + +do_install_append_class-nativesdk () { + create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' +} + +SSTATE_SCAN_FILES += "Makefile" +PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess" + +py_package_preprocess () { + # copy back the old Makefile to fix target package + install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile + install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile + # Remove references to buildmachine paths in target Makefile and _sysconfigdata + sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \ + ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \ + ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile \ + ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py +} + +require python-${PYTHON_MAJMIN}-manifest.inc + +# manual dependency additions +RPROVIDES_${PN}-core = "${PN}" +RRECOMMENDS_${PN}-core = "${PN}-readline" +RRECOMMENDS_${PN}-crypt = "openssl" +RRECOMMENDS_${PN}-crypt_class-nativesdk = "nativesdk-openssl" + +FILES_${PN}-2to3 += "${bindir}/2to3-${PYTHON_MAJMIN}" +FILES_${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3" +FILES_${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}" + +PACKAGES =+ "${PN}-pyvenv" +FILES_${PN}-pyvenv += "${bindir}/pyvenv-${PYTHON_MAJMIN} ${bindir}/pyvenv" + +# package libpython3 +PACKAGES =+ "libpython3 libpython3-staticdev" +FILES_libpython3 = "${libdir}/libpython*.so.*" +FILES_libpython3-staticdev += "${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_BINABI}/libpython${PYTHON_BINABI}.a" +INSANE_SKIP_${PN}-dev += "dev-elf" + +# catch all the rest (unsorted) +PACKAGES += "${PN}-misc" +RDEPENDS_${PN}-misc += "${PN}-core ${PN}-email ${PN}-codecs ${PN}-textutils ${PN}-argparse" +RDEPENDS_${PN}-modules += "${PN}-misc" +FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}" + +# catch manpage +PACKAGES += "${PN}-man" +FILES_${PN}-man = "${datadir}/man" + +BBCLASSEXTEND = "nativesdk" diff --git a/meta/recipes-devtools/python/python_2.6.6.bb b/meta/recipes-devtools/python/python_2.6.6.bb deleted file mode 100644 index 24f1d33166..0000000000 --- a/meta/recipes-devtools/python/python_2.6.6.bb +++ /dev/null @@ -1,144 +0,0 @@ -require python.inc -DEPENDS = "python-native db gdbm openssl readline sqlite3 zlib" -DEPENDS_sharprom = "python-native db readline zlib gdbm openssl" -PR = "${INC_PR}.4" -LIC_FILES_CHKSUM = "file://LICENSE;md5=38fdd546420fab09ac6bd3d8a1c83eb6" - -DISTRO_SRC_URI ?= "file://sitecustomize.py" -DISTRO_SRC_URI_linuxstdbase = "" -SRC_URI = "\ - http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \ - file://01-use-proper-tools-for-cross-build.patch \ - file://02-remove-test-for-cross.patch \ - file://03-fix-tkinter-detection.patch \ - file://04-default-is-optimized.patch \ - file://05-enable-ctypes-cross-build.patch \ - file://06-ctypes-libffi-fix-configure.patch \ - file://06-avoid_usr_lib_termcap_path_in_linking.patch \ - file://99-ignore-optimization-flag.patch \ - ${DISTRO_SRC_URI} \ -" - -SRC_URI[md5sum] = "cf4e6881bb84a7ce6089e4a307f71f14" -SRC_URI[sha256sum] = "134c5e0736bae2e5570d0b915693374f11108ded63c35a23a35d282737d2ce83" -S = "${WORKDIR}/Python-${PV}" - -inherit autotools - -# 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 :( -TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__" -TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__" - -do_configure_prepend() { - autoreconf -Wcross --verbose --install --force --exclude=autopoint Modules/_ctypes/libffi || bbnote "_ctypes failed to autoreconf" -} - -do_compile() { - # - # Copy config.h and an appropriate Makefile for distutils.sysconfig, - # which laters uses the information out of these to compile extensions - # - # The following part (until python compilation) should probably moved to an - # -initial recipe to handle staging better - # - install -d ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/ - install -d ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/ - install -m 0644 pyconfig.h ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/ - - # remove hardcoded ccache, see http://bugs.openembedded.net/show_bug.cgi?id=4144 - sed -i -e s,ccache,'$(CCACHE)', Makefile - - install -m 0644 Makefile Makefile.orig - sed -i -e 's,${includedir},${STAGING_INCDIR},' Makefile - sed -i -e 's,${libdir},${STAGING_LIBDIR},' Makefile - install -m 0644 Makefile ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/ - - oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \ - HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \ - STAGING_LIBDIR=${STAGING_LIBDIR} \ - STAGING_INCDIR=${STAGING_INCDIR} \ - BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ - OPT="${CFLAGS}" libpython${PYTHON_MAJMIN}.so - - oe_libinstall -so libpython${PYTHON_MAJMIN} ${STAGING_LIBDIR} - - oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \ - HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \ - STAGING_LIBDIR=${STAGING_LIBDIR} \ - STAGING_INCDIR=${STAGING_INCDIR} \ - BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ - OPT="${CFLAGS}" -} - -do_install() { - # make install needs the original Makefile, or otherwise the inclues would - # go to ${D}${STAGING...}/... - install -m 0644 Makefile Makefile.sysroot - install -m 0644 Makefile.orig Makefile - - oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \ - HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \ - STAGING_LIBDIR=${STAGING_LIBDIR} \ - STAGING_INCDIR=${STAGING_INCDIR} \ - BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ - DESTDIR=${D} LIBDIR=${libdir} install - - install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile - rm Makefile.sysroot - - if [ -e ${WORKDIR}/sitecustomize.py ]; then - install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN} - fi -} - -PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess" - -py_package_preprocess () { - # copy back the old Makefile to fix target package - install -m 0644 Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile -} - -require python-${PYTHON_MAJMIN}-manifest.inc - -# manual dependency additions -RPROVIDES_${PN}-core = "${PN}" -RRECOMMENDS_${PN}-core = "${PN}-readline" -RRECOMMENDS_${PN}-crypt = "openssl" - -# add sitecustomize -FILES_${PN}-core += "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py" -# ship 2to3 -FILES_${PN}-core += "${bindir}/2to3" - -# package libpython2 -PACKAGES =+ "lib${PN}2" -FILES_lib${PN}2 = "${libdir}/libpython*.so*" - -# additional stuff -dev - -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 \ -" - -# catch debug extensions (isn't that already in python-core-dbg?) -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}" - -# catch manpage -PACKAGES += "${PN}-man" -FILES_${PN}-man = "${datadir}/man" - -BBCLASSEXTEND = "nativesdk" diff --git a/meta/recipes-devtools/python/python_2.7.13.bb b/meta/recipes-devtools/python/python_2.7.13.bb new file mode 100644 index 0000000000..4ef99523e0 --- /dev/null +++ b/meta/recipes-devtools/python/python_2.7.13.bb @@ -0,0 +1,171 @@ +require python.inc +DEPENDS = "python-native libffi bzip2 db gdbm openssl readline sqlite3 zlib" +PR = "${INC_PR}" + +DISTRO_SRC_URI ?= "file://sitecustomize.py" +DISTRO_SRC_URI_linuxstdbase = "" +SRC_URI += "\ + file://01-use-proper-tools-for-cross-build.patch \ + file://03-fix-tkinter-detection.patch \ + file://06-avoid_usr_lib_termcap_path_in_linking.patch \ + ${DISTRO_SRC_URI} \ + file://multilib.patch \ + file://cgi_py.patch \ + file://setup_py_skip_cross_import_check.patch \ + file://add-md5module-support.patch \ + file://host_include_contamination.patch \ + file://fix_for_using_different_libdir.patch \ + file://setuptweaks.patch \ + file://check-if-target-is-64b-not-host.patch \ + file://search_db_h_in_inc_dirs_and_avoid_warning.patch \ + file://avoid_warning_about_tkinter.patch \ + file://avoid_warning_for_sunos_specific_module.patch \ + file://python-2.7.3-remove-bsdb-rpath.patch \ + file://fix-makefile-for-ptest.patch \ + file://run-ptest \ + file://parallel-makeinst-create-bindir.patch \ + file://use_sysroot_ncurses_instead_of_host.patch \ + file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \ + file://Don-t-use-getentropy-on-Linux.patch \ +" + +S = "${WORKDIR}/Python-${PV}" + +inherit autotools multilib_header python-dir pythonnative + +CONFIGUREOPTS += " --with-system-ffi " + +EXTRA_OECONF += "ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no" + +do_configure_append() { + rm -f ${S}/Makefile.orig + autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi +} + +do_compile() { + # regenerate platform specific files, because they depend on system headers + cd ${S}/Lib/plat-linux2 + include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python-native/python \ + ${S}/Tools/scripts/h2py.py -i '(u_long)' \ + ${STAGING_INCDIR}/dlfcn.h \ + ${STAGING_INCDIR}/linux/cdrom.h \ + ${STAGING_INCDIR}/netinet/in.h \ + ${STAGING_INCDIR}/sys/types.h + sed -e 's,${STAGING_DIR_HOST},,g' -i *.py + cd - + + # remove any bogus LD_LIBRARY_PATH + sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile + + if [ ! -f Makefile.orig ]; then + install -m 0644 Makefile Makefile.orig + fi + sed -i -e 's#^LDFLAGS=.*#LDFLAGS=${LDFLAGS} -L. -L${STAGING_LIBDIR}#g' \ + -e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \ + -e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \ + -e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \ + -e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \ + -e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \ + -e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \ + Makefile + # save copy of it now, because if we do it in do_install and + # then call do_install twice we get Makefile.orig == Makefile.sysroot + install -m 0644 Makefile Makefile.sysroot + + export CROSS_COMPILE="${TARGET_PREFIX}" + export PYTHONBUILDDIR="${B}" + + oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \ + HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \ + STAGING_LIBDIR=${STAGING_LIBDIR} \ + STAGING_INCDIR=${STAGING_INCDIR} \ + STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ + OPT="${CFLAGS}" +} + +do_install() { + # make install needs the original Makefile, or otherwise the inclues would + # go to ${D}${STAGING...}/... + install -m 0644 Makefile.orig Makefile + + export CROSS_COMPILE="${TARGET_PREFIX}" + export PYTHONBUILDDIR="${B}" + + # After swizzling the makefile, we need to run the build again. + # install can race with the build so we have to run this first, then install + oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \ + HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \ + CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \ + STAGING_LIBDIR=${STAGING_LIBDIR} \ + STAGING_INCDIR=${STAGING_INCDIR} \ + STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ + DESTDIR=${D} LIBDIR=${libdir} + + oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \ + HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \ + CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \ + STAGING_LIBDIR=${STAGING_LIBDIR} \ + STAGING_INCDIR=${STAGING_INCDIR} \ + STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ + DESTDIR=${D} LIBDIR=${libdir} install + + install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile + + if [ -e ${WORKDIR}/sitecustomize.py ]; then + install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN} + fi + + oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h +} + +do_install_append_class-nativesdk () { + create_wrapper ${D}${bindir}/python2.7 PYTHONHOME='${prefix}' TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' +} + +SSTATE_SCAN_FILES += "Makefile" +PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess" + +py_package_preprocess () { + # copy back the old Makefile to fix target package + install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile + + # Remove references to buildmachine paths in target Makefile and _sysconfigdata + sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \ + ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \ + ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py + python -m py_compile ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py +} + +require python-${PYTHON_MAJMIN}-manifest.inc + +# manual dependency additions +RPROVIDES_${PN}-core = "${PN}" +RRECOMMENDS_${PN}-core = "${PN}-readline" +RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python-modules" +RRECOMMENDS_${PN}-crypt = "openssl" + +# package libpython2 +PACKAGES =+ "lib${BPN}2" +FILES_lib${BPN}2 = "${libdir}/libpython*.so.*" + +# catch all the rest (unsorted) +PACKAGES += "${PN}-misc" +FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}" +RDEPENDS_${PN}-modules += "${PN}-misc" +RDEPENDS_${PN}-ptest = "${PN}-modules" +#inherit ptest after "require python-${PYTHON_MAJMIN}-manifest.inc" so PACKAGES doesn't get overwritten +inherit ptest + +# This must come after inherit ptest for the override to take effect +do_install_ptest() { + cp ${B}/Makefile ${D}${PTEST_PATH} + sed -e s:LIBDIR/python/ptest:${PTEST_PATH}:g \ + -e s:LIBDIR:${libdir}:g \ + -i ${D}${PTEST_PATH}/run-ptest +} + +# catch manpage +PACKAGES += "${PN}-man" +FILES_${PN}-man = "${datadir}/man" + +BBCLASSEXTEND = "nativesdk" |
