From cdf1a97217d64d545fdc6f6d6271a5b4de6ff732 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sun, 9 Nov 2014 08:29:10 +0000 Subject: [PATCH] Introduce the binary packages for PyPy3. Package-Manager: portage-2.2.14/cvs/Linux x86_64 Manifest-Sign-Key: 0xEFB4464E! --- dev-python/pypy3-bin/ChangeLog | 11 ++ dev-python/pypy3-bin/Manifest | 36 ++++ ...CCompiler.runtime_library_dir_option.patch | 11 ++ .../files/1.9-scripts-location.patch | 11 ++ .../pypy3-bin/files/2.3.1-shared-lib.patch | 11 ++ dev-python/pypy3-bin/metadata.xml | 16 ++ dev-python/pypy3-bin/pypy3-bin-2.4.0.ebuild | 173 ++++++++++++++++++ 7 files changed, 269 insertions(+) create mode 100644 dev-python/pypy3-bin/ChangeLog create mode 100644 dev-python/pypy3-bin/Manifest create mode 100644 dev-python/pypy3-bin/files/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch create mode 100644 dev-python/pypy3-bin/files/1.9-scripts-location.patch create mode 100644 dev-python/pypy3-bin/files/2.3.1-shared-lib.patch create mode 100644 dev-python/pypy3-bin/metadata.xml create mode 100644 dev-python/pypy3-bin/pypy3-bin-2.4.0.ebuild diff --git a/dev-python/pypy3-bin/ChangeLog b/dev-python/pypy3-bin/ChangeLog new file mode 100644 index 000000000000..6b480a470f52 --- /dev/null +++ b/dev-python/pypy3-bin/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for dev-python/pypy3-bin +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/pypy3-bin/ChangeLog,v 1.1 2014/11/09 08:29:03 mgorny Exp $ + +*pypy3-bin-2.4.0 (09 Nov 2014) + + 09 Nov 2014; Michał Górny +files/1.9-distutils.unixccompil + er.UnixCCompiler.runtime_library_dir_option.patch, + +files/1.9-scripts-location.patch, +files/2.3.1-shared-lib.patch, + +metadata.xml, +pypy3-bin-2.4.0.ebuild: + Introduce the binary packages for PyPy3. diff --git a/dev-python/pypy3-bin/Manifest b/dev-python/pypy3-bin/Manifest new file mode 100644 index 000000000000..63259a425cb9 --- /dev/null +++ b/dev-python/pypy3-bin/Manifest @@ -0,0 +1,36 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +AUX 1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch 551 SHA256 831bacb5d5c7b23699971aedf7b07a93654ba0cf8d700babe369330115c29896 SHA512 9b6b5ede218cea96a424376677d52cbd7c23cd7f569756403849523fc79f8db27190e0bd80501a9e428688fd393397d2fa4e59a59607212993f4ac6d93b18733 WHIRLPOOL 7124a9a1ec1a65bf1488060189306780e8e6890381a20fab27b00e031e59096b80d0fcd5193d1cd48393d51f4619bb294b846da6190b784aef92f1b09ff2acb8 +AUX 1.9-scripts-location.patch 350 SHA256 4b6fd589db5a13e0d4af4a5be762e4409b55226cb45ac984e7b162a309f3a022 SHA512 d664642e85ef64058cfc21563e3f85cc6cd70225fab4752672f172c74724eaa7d327b240eaa943c41445fabb241879b27bfe3a7bfb881bcbf08041af149e4114 WHIRLPOOL 5029a7737aabac5835e2deef046ac75bbdb700272e9d57e66af909d81134f763ab6b735682b767ac79d3926f49b82c5c623017def5d889c3e0c752f2d00f4e34 +AUX 2.3.1-shared-lib.patch 525 SHA256 865514044a180aaf707054aafbf78f8b834aedd4cee96f2fbafdff5360dd219a SHA512 e7c5e4a6ed36e4fe74ea30fc5c936a7ff147a25b275cad5713b6f492b042ac64950086430cee0c89baf1b1e084858a40f61b884c88fdd5a39addc3a452f41b83 WHIRLPOOL 5ac8d50805b16eec50b309f3812011ede31564b16d2c782dce4eb006b37accc2c4818134cc562da5fea5c77fa3fdb909bbba707bef1ee0c440b5cce039d2ba94 +DIST pypy3-2.4.0-src.tar.bz2 14693194 SHA256 d9ba207d6eecf8a0dc4414e9f4e92db1abd143e8cc6ec4a6bdcac75b29f104f3 SHA512 7e2b0c21f1833b8cd61251c2d58c6a9f99207e5d582618f0036886ff28dcb313541dce1c36bd1b57b332a36a94b13e416bb7b67110be7c8ece8283749ba712be WHIRLPOOL bd02009c828b7b491b46b260d687d268561e5372766adccbcb58e87a3f1c545f293c54e5cdd6e6b7fb95feb678677137211ee890f106140ce1bc256f8563d2cd +DIST pypy3-bin-2.4.0-amd64+bzip2+jit+ncurses+shadowstack.tar.xz 9687272 SHA256 8f03fc87ec796877e5a13111f509a5d1c06284bc31133d25c4c9cca6a82f7039 SHA512 ec5e3ef4f2f4b06c31df5ab9fc4a9f7a2a08f744a0128e6ab8215767d4fba7a3e35e319ff9d9a0de4d018ed35eed24809c82928972a860a220ea45f284087770 WHIRLPOOL 15ba1d18ae4fc5d0968fa5c6cadfcb8762b258d683c770530ac35067ca91210f8d825facd775602a9d2b578542a4b760a0a11a9b0a6d59f539d4e7043fcad734 +DIST pypy3-bin-2.4.0-amd64+bzip2+jit+ncurses.tar.xz 11047984 SHA256 558176dacd1e3222fb56b8c3226077288281ee2a131149fdbb2a54561d5bc7d9 SHA512 cde76c37bf9c043a4fde4a2d07a04366f3c906562e6ed640544ac0228b511729b481c6cd6b7b25b80c02a69cdd02707d427edcd8e46e41313b31161313c6c5fb WHIRLPOOL 9eb8dc5d3319bf2c09baae38ecaa23c1f7ee38b4ea20f72a9fde3f68004ac4f3cbe807ff93e6cba5318745a251d09d2f951cb5a86f04c41b2e05d151d1f6cd03 +DIST pypy3-bin-2.4.0-amd64+bzip2+ncurses.tar.xz 6281232 SHA256 326115bcd7ad2d659b69842182dee4fc2adb558f20a3e44ab4b803fa70c43a21 SHA512 f938aa797e352f80a99095a15bf83a758f0c203adc402cf92494f909ad870457a28ae14b5959880e55898c2ce92ce0b08b05e3d691133758bca52f524c8aad73 WHIRLPOOL b0aa4c24d645aa914aa439646b813dfcae14e6731af86d4348d24637bbdb7f88a26d3a63ff5262749ee654715eaf5312beb4879341d222aaedfcd3e81acd2426 +DIST pypy3-bin-2.4.0-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.xz 8159232 SHA256 65bb567693048894d13c7ffecda126a222ebb641dc6c6e0a899197da8f0844d8 SHA512 734e42d6962b4411d9beab55013454dd27bd18c342ed334e07f85e217cd7d992cbaffb36ee3e74469662860f130d1065a381e49a6b8287fa83736ffe75cb8a5a WHIRLPOOL a5b7ed4a177dc5c1322e79551166d3be8e478e969b223db4fe6a2e9fddaf2e4c22633726a667e3deca19763f44edd4e3f4c20c477da5d7e26c88f21d4ce70544 +DIST pypy3-bin-2.4.0-x86+bzip2+jit+ncurses+sse2.tar.xz 9121216 SHA256 5f03284815a313065b99da0154a08831e3ae2c6e43c4ce515de1aff60c4537ad SHA512 f069ece90666385eb8aade97ad81c4c6c2480dee1bf3b1cb520c4fc1d123d17f7ef2cbf7ed25b72b24e56165c08ded671c8bce74ed2ea2f1b6e57ca9fdd214ae WHIRLPOOL 8cf368e0efa416d3cba06ea61bc97ed7ead0e25f5008c948d1bec8d0494fd9908d1e6640414ffe7c6b6260badef41da114370f2a5ef28a63234203a604e1be4e +DIST pypy3-bin-2.4.0-x86+bzip2+ncurses+sse2.tar.xz 5366816 SHA256 bff57d563dbce1b4858d87161c2338e5ed6ed20008a8dc4fb78cbb9e320d1188 SHA512 afb395257b0259b096a9fdbae405ffb021950dfda39ddc490777662ab77d0573b5b51e6381241c09debbca0a706637dba39c8644c878e541b83d68a94fc9ad1e WHIRLPOOL a1e1079a68b03b65a0680c65080d6c6dc48e4a652dd634bfaa805a6117c67da84bcc65ee2fe6711a61ab86a905bd2a6993e0ac88547a807eca3722f70ca890fb +DIST pypy3-bin-2.4.0-x86+bzip2+ncurses.tar.xz 5439032 SHA256 3bd4e476ff76da1f3c111a11abe0ef72683ba719934ede1252c32de6200beb25 SHA512 d11805b704baa51097261f0886bd160f9d1a3e220ceeeaa5741c3aaf9ee8437479b2f371889dbe2ad72f16559de86c1e71bfd17f45375071cafc535d7c30b3cc WHIRLPOOL 41ef35df997da9aca90be8442001b6807c1a8dd0a7d4e66c0c925dc74546db35e6d54a2bf292c8bca732427786019e7e5041d19e6169e2573a058f269a0332ce +EBUILD pypy3-bin-2.4.0.ebuild 5211 SHA256 6925612cc0b0e66bfcdd4683988fb7a49cddb941c00e70b37371f9c0aa81c25b SHA512 bdc6899a747bdea4d96c61fbcde06530d155b85d25cc9a82913f9de9ab2560abb236c30017177c446b2600ce6cb4724965e23ad67f69bb342f4edcbf2727b332 WHIRLPOOL 392044f0bf3e3ef9af12ad6183a81d9c3b3ab7f8748177e5eeb9ea0e0401be2a01619be0ebd8275966fa72a3c21751cdb51ad44ff466f195cc36b6d7be727973 +MISC ChangeLog 534 SHA256 d74939055fb373cd4f7591be3fb654bc31777a40742fdeb174889fcbdf7ed346 SHA512 c470d75dc49a4adeab37d70074b6e36038df3bf9015ca003d34d8848f3b2f452199f65058fa1debbf60a4031dbb86f202c9caad7235dd157da26a277cc5eec66 WHIRLPOOL fd262583c6fdbb1c93e0329be8b5fb00941c1232a94743ff138f36f4594fab97f78f541f2cdf622a7072eb414169c414cd69fab410e61503d9b550db801479af +MISC metadata.xml 886 SHA256 90dfb3efc5ed246caf98dcf6b97d6b9106a71c9851592b1ae67d002930cc6704 SHA512 6d4b2898758739a8bb4aedc7b3d6a47f4223bd6c2403de65e7e913d6e1695afb94dd272dd05a239234fda5febdc78e62022d4f36cbfcaf87f4083a2720704304 WHIRLPOOL cbb63a846ca9e6ef5ce23d7165cdbdfe052a1ce559fdb2933db04d4081e3515a880672f9dda0759dc566e924b1375c21c7191a2c1ba11a61d0121923363567f1 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iQJ8BAEBCABmBQJUXyXWXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w +ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2REJCMDdDQzRGMERBRDA2RUEwQUZFNDFC +MDdBMUFFQUVGQjQ0NjRFAAoJELB6GurvtEZOE8wP/1lhY0xbVR3maXG0RNuXM5n7 +uRxcalzkrB6IyZcESAQYv0vNWLxwRx6ovewx59z+49yKNLbxEvc51wnbljJVyOkk +c57v+By5cHmwEEBe++fooOkOCOybpfWsyW2utV+318iHYXlmMSy8Y3ZqFHPkRxGM +ekFla+ubf2CLMiwg4xeRdl9mftDu6G0E3M7JHg4xYQXVWID1zANuJw7XuGQrDliF ++EOw+O7kTmZg3gvqg8+BguA1zvoXyBtpyeWCJfTHU2ZpE4JhD3k9BDom7uV2iii9 +aspkn81mykLP7KfTcXRCiY1v1pdEL+gi0st14kVwDGRhsvcThx59cYBknZ1RQcBV +ZKyLfBQU1m1s1XCMnnwN78No5aVc5c2DxkowWr3HO3+Tp7vWYqyct5eZlbH640NM +CV6+BH05KbHNyaQrHPRgNokoiMIbULvCwmhYytXfQR9mU4/cPi4oMDDbQtMJhZvD +eoOC4x1IW6M0Wo6g9ekoitjHMrCmtrvzkbQ9s7y0EplHEx8Xswrh+dYg/bIy2euX +onUuVEvDyTUhu4wdNwgf1KTSlvs4FllmjhV2s7gFe50dReb5vRiXgJWq7k9K9pdU +kjkqHt9Cbl0YZgZNYXBqJP/pWoKzVPzW7bKFtgPpIDpX6l9/APz8/PtbU02XcwJ+ +NKdDDjC/viAfJdL6wDsG +=ea5/ +-----END PGP SIGNATURE----- diff --git a/dev-python/pypy3-bin/files/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch b/dev-python/pypy3-bin/files/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch new file mode 100644 index 000000000000..29d99dcfdb73 --- /dev/null +++ b/dev-python/pypy3-bin/files/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch @@ -0,0 +1,11 @@ +--- a/lib-python/3/distutils/unixccompiler.py ++++ b/lib-python/3/distutils/unixccompiler.py +@@ -297,7 +297,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 = os.path.basename(self.compiler[0]) + if sys.platform[:6] == "darwin": + # MacOSX's linker doesn't understand the -R flag at all + return "-L" + dir diff --git a/dev-python/pypy3-bin/files/1.9-scripts-location.patch b/dev-python/pypy3-bin/files/1.9-scripts-location.patch new file mode 100644 index 000000000000..6ed12856509e --- /dev/null +++ b/dev-python/pypy3-bin/files/1.9-scripts-location.patch @@ -0,0 +1,11 @@ +--- a/lib-python/3/distutils/command/install.py ++++ b/lib-python/3/distutils/command/install.py +@@ -87,7 +87,7 @@ + 'purelib': '$base/site-packages', + 'platlib': '$base/site-packages', + 'headers': '$base/include', +- 'scripts': '$base/bin', ++ 'scripts': '/usr/bin', + 'data' : '$base', + }, + } diff --git a/dev-python/pypy3-bin/files/2.3.1-shared-lib.patch b/dev-python/pypy3-bin/files/2.3.1-shared-lib.patch new file mode 100644 index 000000000000..ae1139f89867 --- /dev/null +++ b/dev-python/pypy3-bin/files/2.3.1-shared-lib.patch @@ -0,0 +1,11 @@ +--- rpython/translator/platform/posix.py ++++ rpython/translator/platform/posix.py +@@ -180,7 +180,7 @@ + 'int main(int argc, char* argv[]) ' + '{ return $(PYPY_MAIN_FUNCTION)(argc, argv); }" > $@') + m.rule('$(DEFAULT_TARGET)', ['$(TARGET)', 'main.o'], +- '$(CC_LINK) $(LDFLAGS_LINK) main.o -L. -l$(SHARED_IMPORT_LIB) -o $@') ++ '$(CC_LINK) $(LDFLAGS_LINK) main.o -L. -l$(SHARED_IMPORT_LIB) \'-Wl,-rpath,$$ORIGIN\' -o $@') + + return m + diff --git a/dev-python/pypy3-bin/metadata.xml b/dev-python/pypy3-bin/metadata.xml new file mode 100644 index 000000000000..89df80516eb6 --- /dev/null +++ b/dev-python/pypy3-bin/metadata.xml @@ -0,0 +1,16 @@ + + + + python + proxy-maintainers + + alice.ferrazzi@gmail.com + Alice Ferrazzi + Proxy maintainer + + + Build using PyPy with the engine configured towards low memory footprint. This makes it possible to build PyPy using ~3.5G of RAM on amd64 and ~half of that on x86, at the cost of lengthened build time. Please note that you will need an extra ~1G of extra RAM or swap since the translation memory (unused at the time) is not freed when the C compiler is spawned. + Enable sandboxing functionality + Use a shadow stack for finding GC roots + + diff --git a/dev-python/pypy3-bin/pypy3-bin-2.4.0.ebuild b/dev-python/pypy3-bin/pypy3-bin-2.4.0.ebuild new file mode 100644 index 000000000000..c034c070c2f3 --- /dev/null +++ b/dev-python/pypy3-bin/pypy3-bin-2.4.0.ebuild @@ -0,0 +1,173 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/pypy3-bin/pypy3-bin-2.4.0.ebuild,v 1.1 2014/11/09 08:29:03 mgorny Exp $ + +EAPI=5 + +# some random parts need python 2... +PYTHON_COMPAT=( python2_7 pypy ) +inherit eutils multilib pax-utils python-any-r1 versionator + +BINHOST="http://dev.gentoo.org/~mgorny/dist/pypy-bin/${PV}" + +DESCRIPTION="A fast, compliant alternative implementation of Python 3 (binary package)" +HOMEPAGE="http://pypy.org/" +SRC_URI="https://bitbucket.org/pypy/pypy/downloads/pypy3-${PV}-src.tar.bz2 + amd64? ( + jit? ( shadowstack? ( + ${BINHOST}/${P}-amd64+bzip2+jit+ncurses+shadowstack.tar.xz + ) ) + jit? ( !shadowstack? ( + ${BINHOST}/${P}-amd64+bzip2+jit+ncurses.tar.xz + ) ) + !jit? ( !shadowstack? ( + ${BINHOST}/${P}-amd64+bzip2+ncurses.tar.xz + ) ) + ) + x86? ( + sse2? ( + jit? ( shadowstack? ( + ${BINHOST}/${P}-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.xz + ) ) + jit? ( !shadowstack? ( + ${BINHOST}/${P}-x86+bzip2+jit+ncurses+sse2.tar.xz + ) ) + !jit? ( !shadowstack? ( + ${BINHOST}/${P}-x86+bzip2+ncurses+sse2.tar.xz + ) ) + ) + !sse2? ( + !jit? ( !shadowstack? ( + ${BINHOST}/${P}-x86+bzip2+ncurses.tar.xz + ) ) + ) + )" + +# Supported variants +REQUIRED_USE="!jit? ( !shadowstack ) + x86? ( !sse2? ( !jit !shadowstack ) )" + +LICENSE="MIT" +SLOT="0/$(get_version_component_range 1-2 ${PV})" +KEYWORDS="~amd64 ~x86" +IUSE="gdbm +jit shadowstack sqlite sse2 test tk" + +# yep, world would be easier if people started filling subslots... +RDEPEND=" + app-arch/bzip2:0 + dev-libs/expat:0 + dev-libs/libffi:0 + dev-libs/openssl:0 + sys-libs/glibc:2.2 + sys-libs/ncurses:5 + sys-libs/zlib:0 + gdbm? ( sys-libs/gdbm:0= ) + sqlite? ( dev-db/sqlite:3= ) + tk? ( + dev-lang/tk:0= + dev-tcltk/tix:0= + ) + !dev-python/pypy:0" +DEPEND="app-arch/xz-utils + test? ( ${RDEPEND} + ${PYTHON_DEPS} )" +# doc? ( ${PYTHON_DEPS} +# dev-python/sphinx ) +PDEPEND="app-admin/python-updater" + +S=${WORKDIR}/pypy3-${PV}-src + +src_prepare() { + epatch "${FILESDIR}/1.9-scripts-location.patch" \ + "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" + + epatch_user +} + +src_compile() { + # Tadaam! PyPy compiled! + mv "${WORKDIR}"/${P}*/{libpypy-c.so,pypy-c} . || die + mv "${WORKDIR}"/${P}*/include/*.h include/ || die + mv pypy/module/cpyext/include/*.h include/ || die + mv pypy/module/cpyext/include/numpy include/ || die + + #use doc && emake -C pypy/doc/ html + #needed even without jit :( also needed in both compile and install phases + pax-mark m pypy-c + + # ctypes config cache + # this one we need to do with python2 too... + "${PYTHON}" lib_pypy/ctypes_config_cache/rebuild.py \ + || die "Failed to rebuild ctypes config cache" +} + +src_test() { + # (unset) + local -x PYTHONDONTWRITEBYTECODE + + # Test runner requires Python 2 too. However, it spawns PyPy3 + # internally so that we end up testing the correct interpreter. + "${PYTHON}" ./pypy/test_all.py --pypy=./pypy-c lib-python || die +} + +src_install() { + einfo "Installing PyPy ..." + insinto "/usr/$(get_libdir)/pypy3" + doins -r include lib_pypy lib-python pypy-c libpypy-c.so + fperms a+x ${INSDESTTREE}/pypy-c ${INSDESTTREE}/libpypy-c.so + pax-mark m "${ED%/}${INSDESTTREE}/pypy-c" "${ED%/}${INSDESTTREE}/libpypy-c.so" + dosym ../$(get_libdir)/pypy3/pypy-c /usr/bin/pypy3 + dodoc README.rst + + if ! use gdbm; then + rm -r "${ED%/}${INSDESTTREE}"/lib_pypy/gdbm.py \ + "${ED%/}${INSDESTTREE}"/lib-python/*3/test/test_gdbm.py || die + fi + if ! use sqlite; then + rm -r "${ED%/}${INSDESTTREE}"/lib-python/*3/sqlite3 \ + "${ED%/}${INSDESTTREE}"/lib_pypy/_sqlite3.py \ + "${ED%/}${INSDESTTREE}"/lib-python/*3/test/test_sqlite.py || die + fi + if ! use tk; then + rm -r "${ED%/}${INSDESTTREE}"/lib-python/*3/{idlelib,tkinter} \ + "${ED%/}${INSDESTTREE}"/lib_pypy/_tkinter \ + "${ED%/}${INSDESTTREE}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die + fi + + # Install docs + #use doc && dohtml -r pypy/doc/_build/html/ + + einfo "Generating caches and byte-compiling ..." + + python_export pypy3 EPYTHON PYTHON PYTHON_SITEDIR + local PYTHON=${ED%/}${INSDESTTREE}/pypy-c + local -x LD_LIBRARY_PATH="${ED%/}${INSDESTTREE}" + + echo "EPYTHON='${EPYTHON}'" > epython.py + python_domodule epython.py + + # Generate Grammar and PatternGrammar pickles. + "${PYTHON}" -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \ + || die "Generation of Grammar and PatternGrammar pickles failed" + + # Generate cffi cache + # Please keep in sync with pypy/tool/release/package.py! + "${PYTHON}" -c "import _curses" || die "Failed to import _curses (cffi)" + "${PYTHON}" -c "import syslog" || die "Failed to import syslog (cffi)" + if use gdbm; then + "${PYTHON}" -c "import _gdbm" || die "Failed to import gdbm (cffi)" + fi + if use sqlite; then + "${PYTHON}" -c "import _sqlite3" || die "Failed to import _sqlite3 (cffi)" + fi + if use tk; then + "${PYTHON}" -c "import _tkinter" || die "Failed to import _tkinter (cffi)" + fi + + # Cleanup temporary objects + find "${ED%/}${INSDESTTREE}" -name "_cffi_*.[co]" -delete || die + find "${ED%/}${INSDESTTREE}" -type d -empty -delete || die + + # compile the installed modules + python_optimize "${ED%/}${INSDESTTREE}" +} -- 2.26.2