NAME="python3" VERSION=3.3.2 RELEASE=3 CATEGORY="Python Interpreters" SUMMARY="Py3K language interpreter" DESCRIPTION="Python is an interpreted, interactive object-oriented programming language suitable (amongst other uses) for distributed application development, scripting, numeric computing and system testing. Python is often compared to Tcl, Perl, Java, JavaScript, Visual Basic or Scheme." HOMEPAGE="http://www.python.org/" SRC_URI="http://www.python.org/ftp/python/${VERSION}/Python-${VERSION}.tar.xz" SRC_DIR="Python-${VERSION}" PATCH_URI=" http://bugs.python.org/file31331/CVE-2013-4238-py32.patch 3.3-dbm.patch 3.1-enable-new-dtags.patch 3.3-tkinter.patch 3.0rc3-ctypes-util-find_library.patch 3.1-PATH_MAX.patch 3.1-ssl-threads.patch 3.1-ncurses-abi6.patch 3.2-export-PySignal_SetWakeupFd.patch 3.2-cygwin-soname.patch 3.2-distutils-shlibext.patch 3.2-ctypes-libpython.patch 3.3-pep3149.patch 3.2-export-PyNode_SizeOf.patch 3.2-thread-cygwin64.patch 3.3-si_band.patch " # 3.0b3-ossaudio.patch # http://bugs.python.org/file31377/uuid.patch # 3.2-format-parsetuple.patch slot=${PV:0:3} abi=${slot}m pyrootdir=/usr/lib/python${slot} pyconfdir=${pyrootdir}/config-${abi} pydylddir=${pyrootdir}/lib-dynload PKG_NAMES="${NAME} ${NAME}-test ${NAME}-tkinter idle3" python3_CONTENTS="--exclude=idle3* --exclude=idlelib --exclude=_tkinter*.dll --exclude=tkinter --exclude=test --exclude=tests --exclude=turtle* usr/" idle3_SUMMARY="Py3K Tkinter_based IDE" idle3_CONTENTS="usr/bin/idle3* ${pyrootdir#/}/idlelib/" python3_test_SUMMARY="Py3K tests" python3_test_CONTENTS="${pyrootdir#/}/*/test*/ ${pyrootdir#/}/test/ ${pyrootdir#/}/turtledemo/" python3_tkinter_SUMMARY="Py3K Tkinter GUI module" python3_tkinter_REQUIRES="tcl-tix" python3_tkinter_CONTENTS="--exclude=test ${pydylddir#/}/_tkinter* ${pyrootdir#/}/tkinter/ ${pyrootdir#/}/turtle.py ${pyrootdir#/}/__pycache__/turtle.*" DIFF_EXCLUDES="plat-cygwin pyconfig.h.in" NO_AUTOHEADER=1 CPPFLAGS+=" -I/usr/include/ncursesw" CYGCONF_ARGS=" --enable-shared --enable-ipv6 --with-dbmliborder=gdbm --with-libc= --with-libm= --with-system-expat --with-system-ffi ac_cv_func_bind_textdomain_codeset=yes " src_install() { cd ${B} dodir /usr cygmake -j1 DESTDIR=${D} altinstall maninstall dosym python${abi}.exe /usr/bin/python3 dosym python${abi}-config /usr/bin/python3-config dosym python-${slot}.pc /usr/lib/pkgconfig/python3.pc dosym ${pyconfdir#/usr/lib/}/libpython${abi}.dll.a /usr/lib/libpython${abi}.dll.a dosym idle${slot} /usr/bin/idle3 dosym pydoc${slot} /usr/bin/pydoc3 sed -i -e '1 s/\.exe//' ${D}/usr/bin/*${slot} }