diff options
Diffstat (limited to 'meta/recipes-devtools/python')
59 files changed, 2900 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/fix-path.inc b/meta/recipes-devtools/python/fix-path.inc new file mode 100644 index 000000000..0738c59ad --- /dev/null +++ b/meta/recipes-devtools/python/fix-path.inc @@ -0,0 +1,22 @@ +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.7-manifest.inc b/meta/recipes-devtools/python/python-2.7-manifest.inc new file mode 100644 index 000000000..1e16c6b4e --- /dev/null +++ b/meta/recipes-devtools/python/python-2.7-manifest.inc @@ -0,0 +1,277 @@ + +# 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> +# Visit the Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy + + + +PROVIDES+="${PN}-2to3 ${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}-distutils-staticdev ${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}-dbg ${PN}-2to3 ${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-staticdev ${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}-2to3="Python Automated Python 2 to 3 code translation" +RDEPENDS_${PN}-2to3="${PN}-core" +FILES_${PN}-2to3="${bindir}/2to3 ${libdir}/python2.7/lib2to3 " + +DESCRIPTION_${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.* " + +DESCRIPTION_${PN}-bsddb="Python Berkeley Database Bindings" +RDEPENDS_${PN}-bsddb="${PN}-core" +FILES_${PN}-bsddb="${libdir}/python2.7/bsddb ${libdir}/python2.7/lib-dynload/_bsddb.so " + +DESCRIPTION_${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.* " + +DESCRIPTION_${PN}-compile="Python Bytecode Compilation Support" +RDEPENDS_${PN}-compile="${PN}-core" +FILES_${PN}-compile="${libdir}/python2.7/py_compile.* ${libdir}/python2.7/compileall.* " + +DESCRIPTION_${PN}-compiler="Python Compiler Support" +RDEPENDS_${PN}-compiler="${PN}-core" +FILES_${PN}-compiler="${libdir}/python2.7/compiler " + +DESCRIPTION_${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 " + +DESCRIPTION_${PN}-core="Python Interpreter and core modules (needed!)" +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/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/config/Makefile ${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py " + +DESCRIPTION_${PN}-crypt="Python Basic Cryptographic and Hashing Support" +RDEPENDS_${PN}-crypt="${PN}-core" +FILES_${PN}-crypt="${libdir}/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 " + +DESCRIPTION_${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 " + +DESCRIPTION_${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 " + +DESCRIPTION_${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 " + +DESCRIPTION_${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.* " + +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.7/bdb.* ${libdir}/python2.7/pdb.* " + +DESCRIPTION_${PN}-dev="Python Development Package" +RDEPENDS_${PN}-dev="${PN}-core" +FILES_${PN}-dev="${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la ${libdir}/*.a ${libdir}/*.o ${libdir}/pkgconfig ${base_libdir}/*.a ${base_libdir}/*.o ${datadir}/aclocal ${datadir}/pkgconfig " + +DESCRIPTION_${PN}-difflib="Python helpers for computing deltas between objects." +RDEPENDS_${PN}-difflib="${PN}-lang ${PN}-re" +FILES_${PN}-difflib="${libdir}/python2.7/difflib.* " + +DESCRIPTION_${PN}-distutils="Python Distribution Utilities" +RDEPENDS_${PN}-distutils="${PN}-core" +FILES_${PN}-distutils="${libdir}/python2.7/config ${libdir}/python2.7/distutils " + +DESCRIPTION_${PN}-distutils-staticdev="Python Distribution Utilities (Static Libraries)" +RDEPENDS_${PN}-distutils-staticdev="${PN}-distutils" +FILES_${PN}-distutils-staticdev="${libdir}/python2.7/config/lib*.a " + +DESCRIPTION_${PN}-doctest="Python framework for running examples in docstrings." +RDEPENDS_${PN}-doctest="${PN}-core ${PN}-lang ${PN}-io ${PN}-re ${PN}-unittest ${PN}-debugger ${PN}-difflib" +FILES_${PN}-doctest="${libdir}/python2.7/doctest.* " + +DESCRIPTION_${PN}-elementtree="Python elementree" +RDEPENDS_${PN}-elementtree="${PN}-core" +FILES_${PN}-elementtree="${libdir}/python2.7/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.7/imaplib.* ${libdir}/python2.7/email " + +DESCRIPTION_${PN}-fcntl="Python's fcntl Interface" +RDEPENDS_${PN}-fcntl="${PN}-core" +FILES_${PN}-fcntl="${libdir}/python2.7/lib-dynload/fcntl.so " + +DESCRIPTION_${PN}-gdbm="Python GNU Database Support" +RDEPENDS_${PN}-gdbm="${PN}-core" +FILES_${PN}-gdbm="${libdir}/python2.7/lib-dynload/gdbm.so " + +DESCRIPTION_${PN}-hotshot="Python Hotshot Profiler" +RDEPENDS_${PN}-hotshot="${PN}-core" +FILES_${PN}-hotshot="${libdir}/python2.7/hotshot ${libdir}/python2.7/lib-dynload/_hotshot.so " + +DESCRIPTION_${PN}-html="Python HTML Processing" +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.* " + +DESCRIPTION_${PN}-idle="Python Integrated Development Environment" +RDEPENDS_${PN}-idle="${PN}-core ${PN}-tkinter" +FILES_${PN}-idle="${bindir}/idle ${libdir}/python2.7/idlelib " + +DESCRIPTION_${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 " + +DESCRIPTION_${PN}-io="Python Low-Level I/O" +RDEPENDS_${PN}-io="${PN}-core ${PN}-math" +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.* " + +DESCRIPTION_${PN}-json="Python JSON Support" +RDEPENDS_${PN}-json="${PN}-core ${PN}-math ${PN}-re" +FILES_${PN}-json="${libdir}/python2.7/json ${libdir}/python2.7/lib-dynload/_json.so " + +DESCRIPTION_${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.* " + +DESCRIPTION_${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 " + +DESCRIPTION_${PN}-mailbox="Python Mailbox Format Support" +RDEPENDS_${PN}-mailbox="${PN}-core ${PN}-mime" +FILES_${PN}-mailbox="${libdir}/python2.7/mailbox.* " + +DESCRIPTION_${PN}-math="Python Math Support" +RDEPENDS_${PN}-math="${PN}-core" +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.* " + +DESCRIPTION_${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.* " + +DESCRIPTION_${PN}-mmap="Python Memory-Mapped-File Support" +RDEPENDS_${PN}-mmap="${PN}-core ${PN}-io" +FILES_${PN}-mmap="${libdir}/python2.7/lib-dynload/mmap.so " + +DESCRIPTION_${PN}-multiprocessing="Python Multiprocessing Support" +RDEPENDS_${PN}-multiprocessing="${PN}-core ${PN}-io ${PN}-lang" +FILES_${PN}-multiprocessing="${libdir}/python2.7/lib-dynload/_multiprocessing.so ${libdir}/python2.7/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.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.* " + +DESCRIPTION_${PN}-netserver="Python Internet Protocol Servers" +RDEPENDS_${PN}-netserver="${PN}-core ${PN}-netclient" +FILES_${PN}-netserver="${libdir}/python2.7/cgi.* ${libdir}/python2.7/*HTTPServer.* ${libdir}/python2.7/SocketServer.* " + +DESCRIPTION_${PN}-numbers="Python Number APIs" +RDEPENDS_${PN}-numbers="${PN}-core ${PN}-lang ${PN}-re" +FILES_${PN}-numbers="${libdir}/python2.7/decimal.* ${libdir}/python2.7/numbers.* " + +DESCRIPTION_${PN}-pickle="Python 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.* " + +DESCRIPTION_${PN}-pkgutil="Python Package Extension Utility Support" +RDEPENDS_${PN}-pkgutil="${PN}-core" +FILES_${PN}-pkgutil="${libdir}/python2.7/pkgutil.* " + +DESCRIPTION_${PN}-pprint="Python Pretty-Print Support" +RDEPENDS_${PN}-pprint="${PN}-core" +FILES_${PN}-pprint="${libdir}/python2.7/pprint.* " + +DESCRIPTION_${PN}-profile="Python Basic 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 " + +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.7/pydoc.* ${libdir}/python2.7/pydoc_data " + +DESCRIPTION_${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.* " + +DESCRIPTION_${PN}-readline="Python Readline Support" +RDEPENDS_${PN}-readline="${PN}-core" +FILES_${PN}-readline="${libdir}/python2.7/lib-dynload/readline.so ${libdir}/python2.7/rlcompleter.* " + +DESCRIPTION_${PN}-resource="Python Resource Control Interface" +RDEPENDS_${PN}-resource="${PN}-core" +FILES_${PN}-resource="${libdir}/python2.7/lib-dynload/resource.so " + +DESCRIPTION_${PN}-robotparser="Python robots.txt parser" +RDEPENDS_${PN}-robotparser="${PN}-core ${PN}-netclient" +FILES_${PN}-robotparser="${libdir}/python2.7/robotparser.* " + +DESCRIPTION_${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.* " + +DESCRIPTION_${PN}-smtpd="Python Simple Mail Transport Daemon" +RDEPENDS_${PN}-smtpd="${PN}-core ${PN}-netserver ${PN}-email ${PN}-mime" +FILES_${PN}-smtpd="${bindir}/smtpd.* ${libdir}/python2.7/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.7/lib-dynload/_sqlite3.so ${libdir}/python2.7/sqlite3/dbapi2.* ${libdir}/python2.7/sqlite3/__init__.* ${libdir}/python2.7/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.7/sqlite3/test " + +DESCRIPTION_${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.* " + +DESCRIPTION_${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.* " + +DESCRIPTION_${PN}-syslog="Python Syslog Interface" +RDEPENDS_${PN}-syslog="${PN}-core" +FILES_${PN}-syslog="${libdir}/python2.7/lib-dynload/syslog.so " + +DESCRIPTION_${PN}-terminal="Python Terminal Controlling Support" +RDEPENDS_${PN}-terminal="${PN}-core ${PN}-io" +FILES_${PN}-terminal="${libdir}/python2.7/pty.* ${libdir}/python2.7/tty.* " + +DESCRIPTION_${PN}-tests="Python Tests" +RDEPENDS_${PN}-tests="${PN}-core" +FILES_${PN}-tests="${libdir}/python2.7/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.7/lib-dynload/_csv.so ${libdir}/python2.7/csv.* ${libdir}/python2.7/optparse.* ${libdir}/python2.7/textwrap.* " + +DESCRIPTION_${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.* " + +DESCRIPTION_${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 " + +DESCRIPTION_${PN}-unittest="Python Unit Testing Framework" +RDEPENDS_${PN}-unittest="${PN}-core ${PN}-stringold ${PN}-lang" +FILES_${PN}-unittest="${libdir}/python2.7/unittest/ " + +DESCRIPTION_${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.* " + +DESCRIPTION_${PN}-xml="Python basic XML support." +RDEPENDS_${PN}-xml="${PN}-core ${PN}-elementtree ${PN}-re" +FILES_${PN}-xml="${libdir}/python2.7/lib-dynload/pyexpat.so ${libdir}/python2.7/xml ${libdir}/python2.7/xmllib.* " + +DESCRIPTION_${PN}-xmlrpc="Python XMLRPC 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.* " + +DESCRIPTION_${PN}-zlib="Python zlib Support." +RDEPENDS_${PN}-zlib="${PN}-core" +FILES_${PN}-zlib="${libdir}/python2.7/lib-dynload/zlib.so " + +DESCRIPTION_${PN}-modules="All Python modules" +RDEPENDS_${PN}-modules="${PN}-2to3 ${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-argparse_1.2.1.bb b/meta/recipes-devtools/python/python-argparse_1.2.1.bb new file mode 100644 index 000000000..789cee110 --- /dev/null +++ b/meta/recipes-devtools/python/python-argparse_1.2.1.bb @@ -0,0 +1,16 @@ +DESCRIPTION = "Python command-line parsing library" +SECTION = "devel/python" +LICENSE = "PSF" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=09d08bb5b7047e2688ea3faad6408aa8" +SRCNAME = "argparse" +PR = "r1" + +SRC_URI = "http://argparse.googlecode.com/files/${SRCNAME}-${PV}.tar.gz" +SRC_URI[md5sum] = "2fbef8cb61e506c706957ab6e135840c" +SRC_URI[sha256sum] = "ddaf4b0a618335a32b6664d4ae038a1de8fbada3b25033f9021510ed2b3941a4" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit setuptools + +BBCLASSEXTEND = "native" diff --git a/meta/recipes-devtools/python/python-dbus_1.0.0.bb b/meta/recipes-devtools/python/python-dbus_1.0.0.bb new file mode 100644 index 000000000..1b174ebd9 --- /dev/null +++ b/meta/recipes-devtools/python/python-dbus_1.0.0.bb @@ -0,0 +1,25 @@ +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 = "r1" + +SRC_URI = "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${PV}.tar.gz" + +SRC_URI[md5sum] = "775a8235736bf760cdd96e2d76546469" +SRC_URI[sha256sum] = "9e46f97d739dde8a5ab33ec6b11da58794c4c20804aacdad2880b7d3bc05187a" +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-gst/python-path.patch b/meta/recipes-devtools/python/python-gst/python-path.patch new file mode 100644 index 000000000..21b5bbfcf --- /dev/null +++ b/meta/recipes-devtools/python/python-gst/python-path.patch @@ -0,0 +1,28 @@ +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.22.bb b/meta/recipes-devtools/python/python-gst_0.10.22.bb new file mode 100644 index 000000000..7bd6d0671 --- /dev/null +++ b/meta/recipes-devtools/python/python-gst_0.10.22.bb @@ -0,0 +1,23 @@ +DESCRIPTION = "Python Gstreamer bindings" +SECTION = "devel/python" +LICENSE = "LGPLv2.1" +DEPENDS = "gstreamer gst-plugins-base python-pygobject" +RDEPENDS_${PN} += "python-pygtk" +PR = "r1" + +SRC_URI = "http://gstreamer.freedesktop.org/src/gst-python/gst-python-${PV}.tar.bz2 \ + file://python-path.patch" + +SRC_URI[md5sum] = "937152fe896241f827689f4b53e79b22" +SRC_URI[sha256sum] = "8f26f519a5bccd770864317e098e5e307fc5ad1201eb96329634b6508b253178" +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/ ${libdir}/gstreamer-0.10/.debug/" diff --git a/meta/recipes-devtools/python/python-imaging/0001-python-imaging-setup.py-force-paths-for-zlib-freetyp.patch b/meta/recipes-devtools/python/python-imaging/0001-python-imaging-setup.py-force-paths-for-zlib-freetyp.patch new file mode 100644 index 000000000..2575306be --- /dev/null +++ b/meta/recipes-devtools/python/python-imaging/0001-python-imaging-setup.py-force-paths-for-zlib-freetyp.patch @@ -0,0 +1,55 @@ +From 07d4f095a9e22ae676a8d68073101131e65012dc Mon Sep 17 00:00:00 2001 +From: Koen Kooi <koen@dominion.thruhere.net> +Date: Tue, 15 Nov 2011 13:16:54 +0100 +Subject: [PATCH] python imaging setup.py: force paths for zlib, freetype and jpeg and don't add host paths + +Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> + +Upstream-Status: Inappropriate [embedded specific] +--- + setup.py | 14 +++----------- + 1 files changed, 3 insertions(+), 11 deletions(-) + +diff --git a/setup.py b/setup.py +index 5d4d53a..b1a22ec 100644 +--- a/setup.py ++++ b/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 +@@ -147,7 +147,6 @@ class pil_build_ext(build_ext): + add_directory(library_dirs, "/opt/local/lib") + add_directory(include_dirs, "/opt/local/include") + +- add_directory(library_dirs, "/usr/local/lib") + # FIXME: check /opt/stuff directories here? + + prefix = sysconfig.get_config_var("prefix") +@@ -207,13 +206,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 +-- +1.7.2.5 + diff --git a/meta/recipes-devtools/python/python-imaging_1.1.7.bb b/meta/recipes-devtools/python/python-imaging_1.1.7.bb new file mode 100644 index 000000000..6d9743e4b --- /dev/null +++ b/meta/recipes-devtools/python/python-imaging_1.1.7.bb @@ -0,0 +1,36 @@ +DESCRIPTION = "Python Imaging Library" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://README;beginline=92;endline=120;md5=c4371af4579f1e489cf881c1443dd4ec" +DEPENDS = "freetype jpeg tiff" +SRCNAME = "Imaging" +PR = "r3" + +SRC_URI = "http://effbot.org/downloads/Imaging-${PV}.tar.gz \ + file://0001-python-imaging-setup.py-force-paths-for-zlib-freetyp.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/ + + # get rid of #!/usr/local/bin/python + sed -i -e 's:/usr/local/bin/:${bindir}/env :g' ${D}${bindir}/* +} + +RDEPENDS_${PN} += "python-lang python-stringold" 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 new file mode 100644 index 000000000..8fe147e0e --- /dev/null +++ b/meta/recipes-devtools/python/python-native/04-default-is-optimized.patch @@ -0,0 +1,20 @@ +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/10-distutils-fix-swig-parameter.patch b/meta/recipes-devtools/python/python-native/10-distutils-fix-swig-parameter.patch new file mode 100644 index 000000000..a39247ce7 --- /dev/null +++ b/meta/recipes-devtools/python/python-native/10-distutils-fix-swig-parameter.patch @@ -0,0 +1,18 @@ +Upstream-Status: Pending + +# Some versions of SWIG do not use the extension parameter. +# Make it optional. +# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de> +Index: Python-2.6.1/Lib/distutils/command/build_ext.py +=================================================================== +--- Python-2.6.1.orig/Lib/distutils/command/build_ext.py ++++ Python-2.6.1/Lib/distutils/command/build_ext.py +@@ -566,7 +566,7 @@ class build_ext (Command): + target_lang=language) + + +- def swig_sources (self, sources, extension): ++ def swig_sources (self, sources, extension=None): + + """Walk the list of source files in 'sources', looking for SWIG + interface (.i) files. Run SWIG on all that are found, and diff --git a/meta/recipes-devtools/python/python-native/11-distutils-never-modify-shebang-line.patch b/meta/recipes-devtools/python/python-native/11-distutils-never-modify-shebang-line.patch new file mode 100644 index 000000000..c92469b9b --- /dev/null +++ b/meta/recipes-devtools/python/python-native/11-distutils-never-modify-shebang-line.patch @@ -0,0 +1,20 @@ +Upstream-Status: Pending + +# Don't modify the she-bang line for a cross-build. +# Otherwise it points to our hostpython (which we do not want) +# +# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de> + +Index: Python-2.6.1/Lib/distutils/command/build_scripts.py +=================================================================== +--- Python-2.6.1.orig/Lib/distutils/command/build_scripts.py ++++ Python-2.6.1/Lib/distutils/command/build_scripts.py +@@ -87,7 +87,7 @@ class build_scripts (Command): + continue + + match = first_line_re.match(first_line) +- if match: ++ if False: #match: + adjust = 1 + post_interp = match.group(1) or '' + 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 new file mode 100644 index 000000000..f89aaff7b --- /dev/null +++ b/meta/recipes-devtools/python/python-native/12-distutils-prefix-is-inside-staging-area.patch @@ -0,0 +1,65 @@ +Upstream-Status: Inappropriate [embedded specific] + +# 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> + +--- Python-2.6.6/Lib/distutils/sysconfig.py.orig 2012-01-03 14:02:03.027005296 +0000 ++++ Python-2.6.6/Lib/distutils/sysconfig.py 2012-01-03 14:02:31.517601081 +0000 +@@ -19,8 +19,8 @@ + 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,7 @@ + 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 @@ + 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: +@@ -216,7 +220,7 @@ + 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 +229,7 @@ + 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 new file mode 100644 index 000000000..5ec10d6b2 --- /dev/null +++ b/meta/recipes-devtools/python/python-native/debug.patch @@ -0,0 +1,29 @@ +Upstream-Status: Pending + +Index: Python-2.6.1/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') + ++ 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 @@ + # 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(shared): ++ print "Found %s" % (shared) + return shared + elif os.path.exists(static): ++ print "Found %s" % (static) + return static + + # Oops, didn't find it in *any* of 'dirs' 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 000000000..0526031ad --- /dev/null +++ b/meta/recipes-devtools/python/python-native/multilib.patch @@ -0,0 +1,243 @@ +commit 248279e54467a8cd5cde98fc124d1d1384703513 +Author: Yu Ke <ke.yu@intel.com> +Date: Tue Jun 28 21:21:29 2011 +0800 + + SUSE patch for the lib64 issue + + see detail in http://bugs.python.org/issue1294959 + + also rebased a bit for Yocto python 2.6.6 + + Picked-by: Yu Ke <ke.yu@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.2/Include/pythonrun.h +=================================================================== +--- Python-2.7.2.orig/Include/pythonrun.h ++++ Python-2.7.2/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.2/Lib/distutils/command/install.py +=================================================================== +--- Python-2.7.2.orig/Lib/distutils/command/install.py ++++ Python-2.7.2/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.2/Lib/pydoc.py +=================================================================== +--- Python-2.7.2.orig/Lib/pydoc.py ++++ Python-2.7.2/Lib/pydoc.py +@@ -352,7 +352,7 @@ class Doc: + + docloc = os.environ.get("PYTHONDOCS", + "http://docs.python.org/library") +- basedir = os.path.join(sys.exec_prefix, "lib", ++ basedir = os.path.join(sys.exec_prefix, sys.lib, + "python"+sys.version[0:3]) + if (isinstance(object, type(os)) and + (object.__name__ in ('errno', 'exceptions', 'gc', 'imp', +Index: Python-2.7.2/Lib/site.py +=================================================================== +--- Python-2.7.2.orig/Lib/site.py ++++ Python-2.7.2/Lib/site.py +@@ -300,13 +300,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")) + if sys.platform == "darwin": + # for framework builds *only* we add the standard Apple + # locations. +Index: Python-2.7.2/Lib/test/test_dl.py +=================================================================== +--- Python-2.7.2.orig/Lib/test/test_dl.py ++++ Python-2.7.2/Lib/test/test_dl.py +@@ -5,10 +5,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.2/Lib/trace.py +=================================================================== +--- Python-2.7.2.orig/Lib/trace.py ++++ Python-2.7.2/Lib/trace.py +@@ -762,10 +762,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.2/Makefile.pre.in +=================================================================== +--- Python-2.7.2.orig/Makefile.pre.in ++++ Python-2.7.2/Makefile.pre.in +@@ -81,6 +81,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG + + # Machine-dependent subdirectories + MACHDEP= @MACHDEP@ ++LIB= @LIB@ + + # Install prefix for architecture-independent files + prefix= @prefix@ +@@ -97,7 +98,7 @@ LIBDIR= @libdir@ + MANDIR= @mandir@ + INCLUDEDIR= @includedir@ + CONFINCLUDEDIR= $(exec_prefix)/include +-SCRIPTDIR= $(prefix)/lib ++SCRIPTDIR= $(prefix)/@LIB@ + + # Detailed destination directories + BINLIBDEST= $(LIBDIR)/python$(VERSION) +@@ -532,6 +533,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 +@@ -566,7 +568,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.2/Modules/getpath.c +=================================================================== +--- Python-2.7.2.orig/Modules/getpath.c ++++ Python-2.7.2/Modules/getpath.c +@@ -116,9 +116,11 @@ + #define EXEC_PREFIX PREFIX + #endif + ++#define LIB_PYTHON LIB "/python" VERSION ++ + #ifndef PYTHONPATH +-#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \ +- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload" ++#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \ ++ EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload" + #endif + + #ifndef LANDMARK +@@ -129,7 +131,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.2/Python/getplatform.c +=================================================================== +--- Python-2.7.2.orig/Python/getplatform.c ++++ Python-2.7.2/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.2/Python/sysmodule.c +=================================================================== +--- Python-2.7.2.orig/Python/sysmodule.c ++++ Python-2.7.2/Python/sysmodule.c +@@ -1416,6 +1416,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.2/configure.in +=================================================================== +--- Python-2.7.2.orig/configure.in ++++ Python-2.7.2/configure.in +@@ -629,6 +629,10 @@ 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 new file mode 100644 index 000000000..09c3fb808 --- /dev/null +++ b/meta/recipes-devtools/python/python-native/nohostlibs.patch @@ -0,0 +1,67 @@ +Upstream-Status: Inappropriate [embedded specific] + +2011/09/29 +rebased for python-2.7.2 +Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> + +Index: Python-2.7.2/setup.py +=================================================================== +--- Python-2.7.2.orig/setup.py ++++ Python-2.7.2/setup.py +@@ -369,8 +369,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') + self.add_multiarch_paths() + + # Add paths specified in the environment variables LDFLAGS and +@@ -407,15 +407,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' \ +- 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, ++ add_dir_to_list(self.compiler.include_dirs, + sysconfig.get_config_var("INCLUDEDIR")) + + try: +@@ -426,11 +426,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 = [] + +@@ -676,9 +673,8 @@ 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'], +- 'termcap'): ++ elif self.compiler.find_library_file(lib_dirs, ++ 'termcap'): + readline_libs.append('termcap') + exts.append( Extension('readline', ['readline.c'], + library_dirs=['/usr/lib/termcap'], diff --git a/meta/recipes-devtools/python/python-native/sitecustomize.py b/meta/recipes-devtools/python/python-native/sitecustomize.py new file mode 100644 index 000000000..273901898 --- /dev/null +++ b/meta/recipes-devtools/python/python-native/sitecustomize.py @@ -0,0 +1,45 @@ +# OpenEmbedded sitecustomize.py (C) 2002-2008 Michael 'Mickey' Lauer <mlauer@vanille-media.de> +# GPLv2 or later +# Version: 20081123 +# Features: +# * set proper default encoding +# * enable readline completion in the interactive interpreter +# * load command line history on startup +# * save command line history on exit + +import os + +def __exithandler(): + try: + readline.write_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) ) + except IOError: + pass + +def __registerExitHandler(): + import atexit + atexit.register( __exithandler ) + +def __enableReadlineSupport(): + readline.set_history_length( 1000 ) + readline.parse_and_bind( "tab: complete" ) + try: + readline.read_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) ) + except IOError: + pass + +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/python-native/sys_platform_is_now_always_linux2.patch b/meta/recipes-devtools/python/python-native/sys_platform_is_now_always_linux2.patch new file mode 100644 index 000000000..1cb8fea50 --- /dev/null +++ b/meta/recipes-devtools/python/python-native/sys_platform_is_now_always_linux2.patch @@ -0,0 +1,28 @@ +Upstream-Status: Accepted [http://hg.python.org/cpython/rev/c816479f6aaf/] +Bugtracker: http://bugs.python.org/issue12326 + +[Removed "Misc/NEWS" hunk] + +Signed-off-by: Andreas Oberritter <obi@opendreambox.org> + +# HG changeset patch +# User Victor Stinner <victor.stinner@haypocalc.com> +# Date 1313841758 -7200 +# Node ID c816479f6aaf71dbd3f3fe4b239186d60c55ce48 +# Parent 3e093590ac57fdda428c7da3f72ddf0c475ecf2b +Issue #12326: sys.platform is now always 'linux2' on Linux + +Even if Python is compiled on Linux 3. + +diff --git a/configure.in b/configure.in +--- a/configure.in ++++ b/configure.in +@@ -293,6 +293,7 @@ then + MACHDEP="$ac_md_system$ac_md_release" + + case $MACHDEP in ++ linux*) MACHDEP="linux2";; + cygwin*) MACHDEP="cygwin";; + darwin*) MACHDEP="darwin";; + atheos*) MACHDEP="atheos";; + 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 000000000..450282912 --- /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.7.3.bb b/meta/recipes-devtools/python/python-native_2.7.3.bb new file mode 100644 index 000000000..50bf894d0 --- /dev/null +++ b/meta/recipes-devtools/python/python-native_2.7.3.bb @@ -0,0 +1,44 @@ +require python.inc +DEPENDS = "openssl-native bzip2-full-native zlib-native readline-native sqlite3-native" +PR = "${INC_PR}.0" + +SRC_URI += "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://unixccompiler.patch \ + file://nohostlibs.patch \ + file://multilib.patch \ + file://add-md5module-support.patch \ + " +S = "${WORKDIR}/Python-${PV}" + +inherit native + +RPROVIDES += "python-distutils-native python-compression-native python-textutils-native python-core-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}/ + + # Make sure we use /usr/bin/env python + for PYTHSCRIPT in `grep -rIl ${bindir}/python ${D}${bindir}`; do + sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT + done +} diff --git a/meta/recipes-devtools/python/python-pycairo_1.10.0.bb b/meta/recipes-devtools/python/python-pycairo_1.10.0.bb new file mode 100644 index 000000000..dc009b3ed --- /dev/null +++ b/meta/recipes-devtools/python/python-pycairo_1.10.0.bb @@ -0,0 +1,39 @@ +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.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=f2e071ab72978431b294a0d696327421 \ + file://COPYING-LGPL-2.1;md5=fad9b3332be894bab9bc501572864b29 \ + file://COPYING-MPL-1.1;md5=bfe1f75d606912a4111c90743d6c7325" + +# cairo >= 1.8.8 +DEPENDS = "cairo" +PR = "r2" + +SRC_URI = "http://cairographics.org/releases/py2cairo-${PV}.tar.bz2" + +SRC_URI[md5sum] = "20337132c4ab06c1146ad384d55372c5" +SRC_URI[sha256sum] = "d30439f06c2ec1a39e27464c6c828b6eface3b22ee17b2de05dc409e429a7431" + +S = "${WORKDIR}/py2cairo-${PV}" + +inherit distutils pkgconfig + +do_configure() { + BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} ./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}:' \ + pycairo.pc.in > pycairo.pc + install -m 0644 pycairo.pc ${D}${libdir}/pkgconfig/ +} diff --git a/meta/recipes-devtools/python/python-pycurl/no-static-link.patch b/meta/recipes-devtools/python/python-pycurl/no-static-link.patch new file mode 100644 index 000000000..c97f5dc02 --- /dev/null +++ b/meta/recipes-devtools/python/python-pycurl/no-static-link.patch @@ -0,0 +1,16 @@ +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:]) diff --git a/meta/recipes-devtools/python/python-pycurl_7.19.0.bb b/meta/recipes-devtools/python/python-pycurl_7.19.0.bb new file mode 100644 index 000000000..8b849d7a3 --- /dev/null +++ b/meta/recipes-devtools/python/python-pycurl_7.19.0.bb @@ -0,0 +1,35 @@ +DESCRIPTION = "libcurl python bindings." +HOMEPAGE = "http://pycurl.sourceforge.net/" +SECTION = "devel/python" +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 = "r2" + +SRC_URI = "\ + http://${SRCNAME}.sourceforge.net/download/${SRCNAME}-${PV}.tar.gz;name=archive \ + file://no-static-link.patch \ +" + +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" + +do_install_append() { + rm -rf ${D}${datadir}/share +} diff --git a/meta/recipes-devtools/python/python-pygobject/generate-constants.patch b/meta/recipes-devtools/python/python-pygobject/generate-constants.patch new file mode 100644 index 000000000..be2ecd3b7 --- /dev/null +++ b/meta/recipes-devtools/python/python-pygobject/generate-constants.patch @@ -0,0 +1,20 @@ +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 new file mode 100644 index 000000000..d79ab2f90 --- /dev/null +++ b/meta/recipes-devtools/python/python-pygobject_2.27.91.bb @@ -0,0 +1,37 @@ +DESCRIPTION = "Python GObject bindings" +SECTION = "devel/python" +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7" +DEPENDS = "python python-pygobject-native glib-2.0" +DEPENDS_virtclass-native = "glib-2.0-native" +RDEPENDS_virtclass-native = "" +PR = "r4" + +MAJ_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',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}" + +BBCLASSEXTEND = "native" diff --git a/meta/recipes-devtools/python/python-pygtk/acinclude.m4 b/meta/recipes-devtools/python/python-pygtk/acinclude.m4 new file mode 100644 index 000000000..53518fb2e --- /dev/null +++ b/meta/recipes-devtools/python/python-pygtk/acinclude.m4 @@ -0,0 +1,90 @@ +## 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 new file mode 100644 index 000000000..6d2f64b41 --- /dev/null +++ b/meta/recipes-devtools/python/python-pygtk/fix-gtkunixprint.patch @@ -0,0 +1,18 @@ +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 new file mode 100644 index 000000000..f07309a7b --- /dev/null +++ b/meta/recipes-devtools/python/python-pygtk/nodocs.patch @@ -0,0 +1,15 @@ +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 new file mode 100644 index 000000000..833038e7f --- /dev/null +++ b/meta/recipes-devtools/python/python-pygtk/prevent_to_get_display_during_import.patch @@ -0,0 +1,16 @@ +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 new file mode 100644 index 000000000..53518fb2e --- /dev/null +++ b/meta/recipes-devtools/python/python-pygtk/python-pygtk2/acinclude.m4 @@ -0,0 +1,90 @@ +## 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 new file mode 100644 index 000000000..603ec5b6f --- /dev/null +++ b/meta/recipes-devtools/python/python-pygtk_2.17.0.bb @@ -0,0 +1,54 @@ +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 = "ml10" + +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 new file mode 100644 index 000000000..dcfc3f527 --- /dev/null +++ b/meta/recipes-devtools/python/python-pyrex-native_0.9.9.bb @@ -0,0 +1,5 @@ +require python-pyrex_${PV}.bb +inherit native +DEPENDS = "python-native" +RDEPENDS_${PN} = "" +PR = "r2" 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 new file mode 100644 index 000000000..c58c3280e --- /dev/null +++ b/meta/recipes-devtools/python/python-pyrex/pyrex-fix-optimized-mode.patch @@ -0,0 +1,15 @@ +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 new file mode 100644 index 000000000..568fb0d53 --- /dev/null +++ b/meta/recipes-devtools/python/python-pyrex_0.9.9.bb @@ -0,0 +1,21 @@ +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" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=771d472f53f933033f57eeee7808e5bd" +SRCNAME = "Pyrex" +PR = "r3" + +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 + +FILES_${PN} += "${datadir}${base_libdir}/${PYTHON_DIR}/site-packages/Pyrex/Compiler/Lexicon.pickle" diff --git a/meta/recipes-devtools/python/python-scons-native_2.1.0.bb b/meta/recipes-devtools/python/python-scons-native_2.1.0.bb new file mode 100644 index 000000000..ff94cf69d --- /dev/null +++ b/meta/recipes-devtools/python/python-scons-native_2.1.0.bb @@ -0,0 +1,5 @@ +require python-scons_${PV}.bb +inherit native +DEPENDS = "python-native" +RDEPENDS_${PN} = "" +PR = "r1" diff --git a/meta/recipes-devtools/python/python-scons_2.1.0.bb b/meta/recipes-devtools/python/python-scons_2.1.0.bb new file mode 100644 index 000000000..f0b5b1ffe --- /dev/null +++ b/meta/recipes-devtools/python/python-scons_2.1.0.bb @@ -0,0 +1,15 @@ +DESCRIPTION = "A Software Construction Tool" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=ab8b65435c2e520ed18e67459f1f9bb9" +SRCNAME = "scons" + +PR = "r1" + +SRC_URI = "${SOURCEFORGE_MIRROR}/scons/scons-${PV}.tar.gz" + +SRC_URI[md5sum] = "47daf989e303a045b76c11236df719df" +SRC_URI[sha256sum] = "4139ed14f60dd2ebcd47c59984d14705636180eb27b3d1b2949489e514b1921d" +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit distutils diff --git a/meta/recipes-devtools/python/python-setuptools_0.6c11.bb b/meta/recipes-devtools/python/python-setuptools_0.6c11.bb new file mode 100644 index 000000000..5dd5f31bf --- /dev/null +++ b/meta/recipes-devtools/python/python-setuptools_0.6c11.bb @@ -0,0 +1,31 @@ +DESCRIPTION = "Download, build, install, upgrade, and uninstall Python packages" +HOMEPAGE = "http://cheeseshop.python.org/pypi/setuptools" +SECTION = "devel/python" +LICENSE = "PSF" +LIC_FILES_CHKSUM = "file://setup.py;beginline=23;endline=23;md5=8a314270dd7a8dbca741775415f1716e" + +SRCNAME = "setuptools" +PR = "ml3" +DEPENDS += "python" +DEPENDS_virtclass-native += "python-native" + +SRC_URI = "\ + http://cheeseshop.python.org/packages/source/s/setuptools/${SRCNAME}-${PV}.tar.gz\ +" +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit distutils + +do_install_prepend() { + install -d ${D}/${libdir}/${PYTHON_DIR}/site-packages +} + +RDEPENDS_${PN} = "\ + python-distutils \ + python-compression \ +" + +SRC_URI[md5sum] = "7df2a529a074f613b509fb44feefe74e" +SRC_URI[sha256sum] = "630fea9b726320b73ee3ca6ff61732cb32675b0389be658080fe46383b87a1d3" + +BBCLASSEXTEND = "native" diff --git a/meta/recipes-devtools/python/python.inc b/meta/recipes-devtools/python/python.inc new file mode 100644 index 000000000..eee7a6437 --- /dev/null +++ b/meta/recipes-devtools/python/python.inc @@ -0,0 +1,37 @@ +DESCRIPTION = "The Python Programming Language" +HOMEPAGE = "http://www.python.org" +LICENSE = "PSFv2" +SECTION = "devel/python" +# bump this on every change in contrib/python/generate-manifest-2.7.py +INC_PR = "r0" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=ed3abfd1059e2d3a36a8cff3986f9bb6" + +SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2" + +SRC_URI[md5sum] = "c57477edd6d18bd9eeca2f21add73919" +SRC_URI[sha256sum] = "726457e11cb153adc3f428aaf1901fc561a374c30e5e7da6742c0742a338663c" + +PYTHON_MAJMIN = "2.7" + +inherit autotools + +EXTRA_OECONF = "\ + --with-threads \ + --with-pymalloc \ + --with-cyclic-gc \ + --without-cxx \ + --with-signal-module \ + --with-wctype-functions \ + --enable-shared \ +" + +EXTRA_OECONF_linuxstdbase = "\ + --with-threads \ + --with-pymalloc \ + --with-cyclic-gc \ + --without-cxx \ + --with-signal-module \ + --enable-shared \ + ac_cv_sizeof_off_t=8 \ +" 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 new file mode 100644 index 000000000..691beada0 --- /dev/null +++ b/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch @@ -0,0 +1,138 @@ +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> + +Index: Python-2.7.2/Makefile.pre.in +=================================================================== +--- Python-2.7.2.orig/Makefile.pre.in ++++ Python-2.7.2/Makefile.pre.in +@@ -182,6 +182,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 +@@ -214,7 +215,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@ + ########################################################################## + # Parser + PGEN= Parser/pgen$(EXE) +- ++HOSTPGEN= $(PGEN)$(EXE) + POBJS= \ + Parser/acceler.o \ + Parser/grammar1.o \ +@@ -401,14 +402,14 @@ $(BUILDPYTHON): Modules/python.o $(LIBRA + $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) + + platform: $(BUILDPYTHON) +- $(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from sysconfig import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform ++ $(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform + + + # Build the shared modules + sharedmods: $(BUILDPYTHON) + @case $$MAKEFLAGS in \ +- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \ +- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \ ++ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \ ++ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \ + esac + + # Build static library +@@ -542,7 +543,7 @@ Modules/python.o: $(srcdir)/Modules/pyth + $(GRAMMAR_H) $(GRAMMAR_C): Parser/pgen.stamp + Parser/pgen.stamp: $(PGEN) $(GRAMMAR_INPUT) + -@$(INSTALL) -d Include +- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) ++ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) + -touch Parser/pgen.stamp + + $(PGEN): $(PGENOBJS) +@@ -926,25 +927,25 @@ libinstall: build_all $(srcdir)/Lib/$(PL + done + $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt + PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ ++ $(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) \ +- ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ ++ $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST) -f \ + -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 \ + -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 \ + -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()" + + # Create the PLATDIR source directory, if one wasn't distributed.. + $(srcdir)/Lib/$(PLATDIR): +@@ -1049,7 +1050,7 @@ libainstall: all python-config + # Install the dynamically loadable modules + # This goes into $(exec_prefix) + sharedinstall: sharedmods +- $(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.7.2/setup.py +=================================================================== +--- Python-2.7.2.orig/setup.py ++++ Python-2.7.2/setup.py +@@ -313,6 +313,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) ++ return + assert not self.inplace + basename, tail = os.path.splitext(ext_filename) + newname = basename + "_failed" + tail +@@ -369,8 +370,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') + self.add_multiarch_paths() + + # Add paths specified in the environment variables LDFLAGS and +@@ -475,6 +476,9 @@ class PyBuildExt(build_ext): + + # XXX Omitted modules: gl, pure, dl, SGI-specific modules + ++ 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 + # on pretty much any POSIXish platform. +@@ -677,8 +681,8 @@ class PyBuildExt(build_ext): + elif curses_library: + readline_libs.append(curses_library) + elif self.compiler.find_library_file(lib_dirs + +- ['/usr/lib/termcap'], +- 'termcap'): ++ ['/usr/lib/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/03-fix-tkinter-detection.patch b/meta/recipes-devtools/python/python/03-fix-tkinter-detection.patch new file mode 100644 index 000000000..d74e4b177 --- /dev/null +++ b/meta/recipes-devtools/python/python/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-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): + 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 +@@ -1562,22 +1562,6 @@ class PyBuildExt(build_ext): + if dir not in include_dirs: + include_dirs.append(dir) + +- # Check for various platform-specific directories +- if 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 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 new file mode 100644 index 000000000..7ce819a3c --- /dev/null +++ b/meta/recipes-devtools/python/python/04-default-is-optimized.patch @@ -0,0 +1,60 @@ +Upstream-Status: Inappropriate [embedded specific] + +Updated original patch for python 2.7.3 + +Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> +2012/05/01 + + +# 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.7.3/Python/compile.c +=================================================================== +--- Python-2.7.3.orig/Python/compile.c ++++ Python-2.7.3/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.7.3/Modules/main.c +=================================================================== +--- Python-2.7.3.orig/Modules/main.c ++++ Python-2.7.3/Modules/main.c +@@ -40,7 +40,7 @@ static char **orig_argv; + static int orig_argc; + + /* command line options */ +-#define BASE_OPTS "3bBc:dEhiJm:OQ:RsStuUvVW:xX?" ++#define BASE_OPTS "3bBc:dEhiJm:NOQ:RsStuUvVW: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\ + -R : use a pseudo-random salt to make hash() values of various types be\n\ + unpredictable between separate invocations of the interpreter, as\n\ + a defense against denial-of-service attacks\n\ +@@ -365,8 +364,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 new file mode 100644 index 000000000..a68a20620 --- /dev/null +++ b/meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch @@ -0,0 +1,30 @@ +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 +=================================================================== +--- 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"], ] + + # 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)) + + res = os.system(cmd) + if res or not os.path.exists(ffi_configfile): +- print "Failed to configure _ctypes module" ++ print "Failed to configure _ctypes module (res=%d) or missing conffile=%s" % ( res, ffi_configfile ) + return False + + fficonfig = {} 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 new file mode 100644 index 000000000..f8ab0e71e --- /dev/null +++ b/meta/recipes-devtools/python/python/06-avoid_usr_lib_termcap_path_in_linking.patch @@ -0,0 +1,33 @@ +Upstream-Status: Pending + +The poison directories patch has detected library path issue while +compiling the python in cross environment, as seen bellow. + +warning: library search path "/usr/lib/termcap" is unsafe for cross-compilation + +This Patch fixes this issue in the python build environment. +11 Oct 2010 +Nitin A Kamble <nitin.a.kamble@intel.com> + +2011/09/29 +Rebased for python 2.7.2 +Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> + +Index: Python-2.7.2/setup.py +=================================================================== +--- Python-2.7.2.orig/setup.py ++++ Python-2.7.2/setup.py +@@ -680,12 +680,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'], ++ elif self.compiler.find_library_file(lib_dirs, + 'termcap'): + readline_libs.append('termcap') + exts.append( Extension('readline', ['readline.c'], +- library_dirs=['/usr/lib/termcap'], + extra_link_args=readline_extra_link_args, + libraries=readline_libs) ) + else: 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 new file mode 100644 index 000000000..abd63d2a9 --- /dev/null +++ b/meta/recipes-devtools/python/python/06-ctypes-libffi-fix-configure.patch @@ -0,0 +1,44 @@ +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> + + +2011/09/29 +Rebased for python 2.7.2 +Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> + + +Index: Python-2.7.2/Modules/_ctypes/libffi/Makefile.am +=================================================================== +--- Python-2.7.2.orig/Modules/_ctypes/libffi/Makefile.am ++++ Python-2.7.2/Modules/_ctypes/libffi/Makefile.am +@@ -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 \ +@@ -34,8 +34,6 @@ EXTRA_DIST = LICENSE ChangeLog.v1 Change + libtool-version ChangeLog.libffi m4/libtool.m4 \ + m4/lt~obsolete.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 + +-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 new file mode 100644 index 000000000..a5d9812ca --- /dev/null +++ b/meta/recipes-devtools/python/python/99-ignore-optimization-flag.patch @@ -0,0 +1,21 @@ +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/add-md5module-support.patch b/meta/recipes-devtools/python/python/add-md5module-support.patch new file mode 100644 index 000000000..33fea7755 --- /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_bsddb.patch b/meta/recipes-devtools/python/python/avoid_warning_about_bsddb.patch new file mode 100644 index 000000000..4968744cb --- /dev/null +++ b/meta/recipes-devtools/python/python/avoid_warning_about_bsddb.patch @@ -0,0 +1,23 @@ +_bsddb module can be built only with db version between 4.1 and 4.7. +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 23:16:49.268139840 +0300 ++++ Python-2.7.2/setup.py 2012-04-05 23:17:30.912138622 +0300 +@@ -1024,7 +1024,9 @@ + db_incs = None + dblibs = [] + dblib_dir = None +- missing.append('_bsddb') ++ # We need db version between 4.1 and 4.7 ++ # Avoid this warning ++ #missing.append('_bsddb') + + # The sqlite interface + sqlite_setup_debug = False # verbose debug prints from this script? 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 000000000..208c57c82 --- /dev/null +++ b/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch @@ -0,0 +1,25 @@ +_tkinter module needs tk module along with tcl. tk is not yet integrated +in yocto so we skip the check for this module. +Avoid a warning by not adding this module to missing variable. + +Upstream-Status: Inappropriate [distribution] + +Signed-off-by: Andrei Gherzan <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 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 000000000..337e0e3e2 --- /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/cgi_py.patch b/meta/recipes-devtools/python/python/cgi_py.patch new file mode 100644 index 000000000..de504f9dc --- /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 000000000..2b62db382 --- /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.2/setup.py +=================================================================== +--- Python-2.7.2.orig/setup.py 2012-03-25 01:10:41.540163187 +0200 ++++ Python-2.7.2/setup.py 2012-03-25 01:26:06.092539990 +0200 +@@ -23,6 +23,21 @@ + # 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' +@@ -628,7 +643,7 @@ + exts.append( Extension('audioop', ['audioop.c']) ) + + # Disabled on 64-bit platforms +- if sys.maxint != 9223372036854775807L: ++ if not target_is_64bit_platform(): + # Operations on images + exts.append( Extension('imageop', ['imageop.c']) ) + else: +@@ -1418,7 +1433,7 @@ + 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 (platform not in ['atheos']): 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 000000000..50d391542 --- /dev/null +++ b/meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch @@ -0,0 +1,82 @@ +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-2.7.3/Lib/sysconfig.py +=================================================================== +--- Python-2.7.3.orig/Lib/sysconfig.py ++++ Python-2.7.3/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}', +- 'purelib': '{base}/lib/python{py_version_short}/site-packages', +- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages', ++ 'stdlib': '{base}/'+sys.lib+'/python{py_version_short}', ++ 'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}', ++ '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}', + '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}', +- 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', +- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages', ++ 'stdlib': '{userbase}/'+sys.lib+'/python{py_version_short}', ++ 'platstdlib': '{userbase}/'+sys.lib+'/python{py_version_short}', ++ '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', + 'data' : '{userbase}', +Index: Python-2.7.3/Makefile.pre.in +=================================================================== +--- Python-2.7.3.orig/Makefile.pre.in ++++ Python-2.7.3/Makefile.pre.in +@@ -941,25 +941,25 @@ 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 -O $(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 -t $(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 -t -O $(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 -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()" + + # 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 000000000..62cb8b16d --- /dev/null +++ b/meta/recipes-devtools/python/python/host_include_contamination.patch @@ -0,0 +1,27 @@ +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-2.7.2/setup.py +=================================================================== +--- Python-2.7.2.orig/setup.py 2012-02-03 12:10:42.307057756 -0800 ++++ Python-2.7.2/setup.py 2012-02-03 12:11:12.363059210 -0800 +@@ -360,6 +360,8 @@ + # https://wiki.ubuntu.com/MultiarchSpec + if not find_executable('dpkg-architecture'): + return ++ if os.environ.get('CROSS_COMPILE') is not None: ++ return + tmpfile = os.path.join(self.build_temp, 'multiarch') + if not os.path.exists(self.build_temp): + os.makedirs(self.build_temp) diff --git a/meta/recipes-devtools/python/python/multilib.patch b/meta/recipes-devtools/python/python/multilib.patch new file mode 100644 index 000000000..df470f7c0 --- /dev/null +++ b/meta/recipes-devtools/python/python/multilib.patch @@ -0,0 +1,257 @@ +commit 248279e54467a8cd5cde98fc124d1d1384703513 +Author: Yu Ke <ke.yu@intel.com> +Date: Tue Jun 28 21:21:29 2011 +0800 + + SUSE patch for the lib64 issue + + see detail in http://bugs.python.org/issue1294959 + + also rebased a bit for Yocto python 2.6.6 + + Picked-by: Yu Ke <ke.yu@intel.com> + +2011/09/29 +Rebased for python 2.7.2 + +Upstream-Status: Inappropriate [configuration] + +Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> + +Index: Python-2.7.2/Include/pythonrun.h +=================================================================== +--- Python-2.7.2.orig/Include/pythonrun.h ++++ Python-2.7.2/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.2/Lib/distutils/command/install.py +=================================================================== +--- Python-2.7.2.orig/Lib/distutils/command/install.py ++++ Python-2.7.2/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.2/Lib/distutils/sysconfig.py +=================================================================== +--- Python-2.7.2.orig/Lib/distutils/sysconfig.py ++++ Python-2.7.2/Lib/distutils/sysconfig.py +@@ -114,8 +114,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.2/Lib/pydoc.py +=================================================================== +--- Python-2.7.2.orig/Lib/pydoc.py ++++ Python-2.7.2/Lib/pydoc.py +@@ -352,7 +352,7 @@ class Doc: + + docloc = os.environ.get("PYTHONDOCS", + "http://docs.python.org/library") +- basedir = os.path.join(sys.exec_prefix, "lib", ++ basedir = os.path.join(sys.exec_prefix, sys.lib, + "python"+sys.version[0:3]) + if (isinstance(object, type(os)) and + (object.__name__ in ('errno', 'exceptions', 'gc', 'imp', +Index: Python-2.7.2/Lib/site.py +=================================================================== +--- Python-2.7.2.orig/Lib/site.py ++++ Python-2.7.2/Lib/site.py +@@ -300,13 +300,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")) + if sys.platform == "darwin": + # for framework builds *only* we add the standard Apple + # locations. +Index: Python-2.7.2/Lib/test/test_dl.py +=================================================================== +--- Python-2.7.2.orig/Lib/test/test_dl.py ++++ Python-2.7.2/Lib/test/test_dl.py +@@ -5,10 +5,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.2/Lib/trace.py +=================================================================== +--- Python-2.7.2.orig/Lib/trace.py ++++ Python-2.7.2/Lib/trace.py +@@ -762,10 +762,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.2/Makefile.pre.in +=================================================================== +--- Python-2.7.2.orig/Makefile.pre.in ++++ Python-2.7.2/Makefile.pre.in +@@ -81,6 +81,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG + + # Machine-dependent subdirectories + MACHDEP= @MACHDEP@ ++LIB= @LIB@ + + # Install prefix for architecture-independent files + prefix= @prefix@ +@@ -97,7 +98,7 @@ LIBDIR= @libdir@ + MANDIR= @mandir@ + INCLUDEDIR= @includedir@ + CONFINCLUDEDIR= $(exec_prefix)/include +-SCRIPTDIR= $(prefix)/lib ++SCRIPTDIR= $(prefix)/@LIB@ + + # Detailed destination directories + BINLIBDEST= $(LIBDIR)/python$(VERSION) +@@ -533,6 +534,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 +@@ -567,7 +569,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.2/Modules/getpath.c +=================================================================== +--- Python-2.7.2.orig/Modules/getpath.c ++++ Python-2.7.2/Modules/getpath.c +@@ -116,9 +116,11 @@ + #define EXEC_PREFIX PREFIX + #endif + ++#define LIB_PYTHON LIB "/python" VERSION ++ + #ifndef PYTHONPATH +-#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \ +- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload" ++#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \ ++ EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload" + #endif + + #ifndef LANDMARK +@@ -129,7 +131,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.2/Python/getplatform.c +=================================================================== +--- Python-2.7.2.orig/Python/getplatform.c ++++ Python-2.7.2/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.2/Python/sysmodule.c +=================================================================== +--- Python-2.7.2.orig/Python/sysmodule.c ++++ Python-2.7.2/Python/sysmodule.c +@@ -1416,6 +1416,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.2/configure.in +=================================================================== +--- Python-2.7.2.orig/configure.in ++++ Python-2.7.2/configure.in +@@ -629,6 +629,10 @@ 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/remove_sqlite_rpath.patch b/meta/recipes-devtools/python/python/remove_sqlite_rpath.patch new file mode 100644 index 000000000..4ec627ea5 --- /dev/null +++ b/meta/recipes-devtools/python/python/remove_sqlite_rpath.patch @@ -0,0 +1,19 @@ +This patch removes the RPATH setting which contains a pointer to +the target relocated sysroot, which is incorrect. + +Upstream-Status: Inappropriate [Embedded Specific] + +Signed-off-by: Saul Wold <sgw@linux.intel.com> + +Index: Python-2.6.6/setup.py +=================================================================== +--- Python-2.6.6.orig/setup.py 2011-09-28 14:22:57.000000000 -0700 ++++ Python-2.6.6/setup.py 2011-09-28 16:11:25.147279633 -0700 +@@ -1079,7 +1079,6 @@ + include_dirs=["Modules/_sqlite", + sqlite_incdir], + library_dirs=sqlite_libdir, +- runtime_library_dirs=sqlite_libdir, + extra_link_args=sqlite_extra_link_args, + libraries=["sqlite3",])) + else: 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 000000000..0c1f1741c --- /dev/null +++ b/meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch @@ -0,0 +1,40 @@ +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> + +Index: Python-2.7.2/setup.py +=================================================================== +--- Python-2.7.2.orig/setup.py 2012-04-05 22:27:22.437199989 +0300 ++++ Python-2.7.2/setup.py 2012-04-05 22:26:38.000000000 +0300 +@@ -1141,12 +1141,12 @@ + # 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 sys.platform == 'darwin': + if is_macosx_sdk_path(f): + sysroot = macosx_sdk_root() + f = os.path.join(sysroot, f[1:]) +- + if os.path.exists(f) and not db_incs: + data = open(f).read() + m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data) +@@ -1161,8 +1161,10 @@ + 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 000000000..6ccdb948b --- /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 000000000..c34ef160d --- /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: Configuration [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/sitecustomize.py b/meta/recipes-devtools/python/python/sitecustomize.py new file mode 100644 index 000000000..273901898 --- /dev/null +++ b/meta/recipes-devtools/python/python/sitecustomize.py @@ -0,0 +1,45 @@ +# OpenEmbedded sitecustomize.py (C) 2002-2008 Michael 'Mickey' Lauer <mlauer@vanille-media.de> +# GPLv2 or later +# Version: 20081123 +# Features: +# * set proper default encoding +# * enable readline completion in the interactive interpreter +# * load command line history on startup +# * save command line history on exit + +import os + +def __exithandler(): + try: + readline.write_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) ) + except IOError: + pass + +def __registerExitHandler(): + import atexit + atexit.register( __exithandler ) + +def __enableReadlineSupport(): + readline.set_history_length( 1000 ) + readline.parse_and_bind( "tab: complete" ) + try: + readline.read_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) ) + except IOError: + pass + +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/python_2.7.3.bb b/meta/recipes-devtools/python/python_2.7.3.bb new file mode 100644 index 000000000..b06d7b7f9 --- /dev/null +++ b/meta/recipes-devtools/python/python_2.7.3.bb @@ -0,0 +1,169 @@ +require python.inc +DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib" +PR = "${INC_PR}.0" + +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://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} \ + file://multilib.patch \ + file://cgi_py.patch \ + file://remove_sqlite_rpath.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_bsddb.patch \ + file://avoid_warning_about_tkinter.patch \ + file://avoid_warning_for_sunos_specific_module.patch \ +" + +S = "${WORKDIR}/Python-${PV}" + +inherit autotools multilib_header + +# 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() { + rm -f ${S}/Makefile.orig + autoreconf -Wcross --verbose --install --force --exclude=autopoint Modules/_ctypes/libffi || bbnote "_ctypes failed to autoreconf" +} + +do_compile() { + # regenerate platform specific files, because they depend on system headers + cd Lib/plat-linux2 + include=${STAGING_INCDIR} ${STAGING_BINDIR_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 - + + # + # 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 + + # 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=-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 + install -m 0644 Makefile ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/ + # 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}" + + oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \ + HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \ + STAGING_LIBDIR=${STAGING_LIBDIR} \ + STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ + 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} \ + STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ + 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.orig Makefile + + export CROSS_COMPILE="${TARGET_PREFIX}" + + oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \ + HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \ + CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \ + STAGING_LIBDIR=${STAGING_LIBDIR} \ + STAGING_INCDIR=${STAGING_INCDIR} \ + STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ + 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 + + 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 +} + +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 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" + +# package libpython2 +PACKAGES =+ "lib${BPN}2${PKGSUFFIX}" +FILES_lib${BPN}2${PKGSUFFIX} = "${libdir}/libpython*.so.*" + +# 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" + +PKGSUFFIX = "" +PKGSUFFIX_virtclass-nativesdk = "-nativesdk" |
