summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-08-18 09:03:44 +0200
committerMichał Górny <mgorny@gentoo.org>2020-08-18 10:03:53 +0200
commit59bf481fe2c9797defd1cf1bc14ebefb32995430 (patch)
tree351e569e221f19640f6fab91adddb19bff0c9ba8
parentdev-python/black: arm64 keyworded (bug #737618) (diff)
downloadgentoo-59bf481f.tar.gz
gentoo-59bf481f.tar.bz2
gentoo-59bf481f.zip
dev-lang/python: Remove 3.9.0 betas
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--dev-lang/python/Manifest7
-rw-r--r--dev-lang/python/python-3.9.0_beta3.ebuild323
-rw-r--r--dev-lang/python/python-3.9.0_beta4-r1.ebuild323
-rw-r--r--dev-lang/python/python-3.9.0_beta4.ebuild323
-rw-r--r--dev-lang/python/python-3.9.0_beta5.ebuild323
5 files changed, 0 insertions, 1299 deletions
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index 4da749100baf..4c0d51186071 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -3,17 +3,10 @@ DIST Python-3.6.11.tar.xz 17213036 BLAKE2B 4dae9d9c5eb7e97a8990b0b5739d40ba8a850
DIST Python-3.7.8.tar.xz 17399552 BLAKE2B 4bf6c47b1132b6d31a79232002c4d38e2cd123ac05d52b21d6bfba5a4e19ec9130b8df8698d5ce6627e4297c4cf756643f036e694e36364c235306c72ef34bf8 SHA512 d2ba299e3cf8ed0f8fed9317f42bcd8d9af7e0e6175939b4be1be289c1658418bed17899e2608d762ffb15575021956cf6bf2054d7863c04b3bd7642f5b8c7ea
DIST Python-3.8.4.tar.xz 18020412 BLAKE2B cfcfb293c413b25fc3ca48116cf8ffaba7bee18e9af9accf26be9b4373a0c62dd8e9da70e5a8a38ba6da4d1afbdbd589ae5ea4b618b65130ae061698b445908c SHA512 37a36d014a8372742be9d0bd9dd3a275e100dc21b1515c145bc62425d4d157327b6e63ad99bc888c0b36c1da4c05676c40eb086e75072d1906e3210ec3043dcb
DIST Python-3.8.5.tar.xz 18019640 BLAKE2B bb3e0566afe28759e4ab129ad0986a0fc5103514f2e2b22ff4aa3973c3173ebdd24d4267fbaf903841814a611fd9ea122673e5a1918934366e5c0efaef9d7517 SHA512 460cee65d7df7150694590575502d7f22e548ebfc99c8f8b363eef8bf30ee72e58d8ffacb1d607824f877f880eb9fd6775a508388029583e1e1df3380f3f9587
-DIST Python-3.9.0b3.tar.xz 18518204 BLAKE2B fa1707f0d55a83e739e9ad51979f8aff9720588a8a77b7ce8beb9ecf599955677758dec1551a0549b010f86c1f8fbc5915cef34d63097534d1c512c92fad5bd1 SHA512 c06a6b874fbce93ec37402034158a7bab44cab775d6da467eaddc1eb402663415f9d788e657a204f17dffe5fa6f379379f9215b5198ec5071565486b6f0e4a2a
-DIST Python-3.9.0b4.tar.xz 18602256 BLAKE2B 9f260f2b3c6380745c343d2883db430dda1b76b120050df16e53c1021e5a746c7e4a6aa8e83c746c3705c6872e83369a649c48ffdaef972a7049c44f7bc3030b SHA512 1c9bac850159352effb163b41590b3e9c05100b449798b5615f7a51a59a3877fe9558d593bb47c24915226637e3394e7864a1b1555cd6c5b5e5e308972208ecf
-DIST Python-3.9.0b5.tar.xz 18588472 BLAKE2B 4f430c06bce30a5e554f0aa23e56f5eac74d13be4fe88c91c125a7b2df2a390c78942e02c387ed84f369d9c08d4e0960909faaa80f69cd02b6304ede688dd926 SHA512 fd99fe9b3364811512857bcc7963b59b1cf724cbd2174292ba9b16748f1b97949a7d6c5016fb7f4568c366cf9b9fd14d25400773c5240fc31f11086d14e8d3aa
DIST Python-3.9.0rc1.tar.xz 18798364 BLAKE2B 2ebf669720bcc057f7e1056aca6ff42686a8e567a5ea10304f19e53ae80ba6ba60b9157ae401427be4afa1ec296d97bb81a2b55c60a4df3dba39ae545484e0fc SHA512 8fddf940600bdd4096c0144f689fb9e803bdc7a1ee00f46ccfde3566342ed465c7ac6806613e4f61440fb65f8f83057204bd0dc432ac379759cd4d410c151eef
DIST python-gentoo-patches-2.7.18-r1.tar.xz 15500 BLAKE2B 7008b29827dbbd80d4ab8f010ccf9efced99c6b4b9109e4430c0ba269ce53529cb6fedd832502c8d2d3aa21938749cc3591c2545b21c0a59a6e60f8598e84ccc SHA512 e656ab07281fd932b92165674619bbf55ecf410d2937ae4ae771d490b4532540498cc731d30d19c1e8aafd1f64df8a406bbfbb46ea985b3dcd8edb89a0b7f20f
DIST python-gentoo-patches-3.6.11-r3.tar.xz 14064 BLAKE2B 416780c15ee12cfc06bfd1397d510dd42fea61abcaafd9cf54f27d843342debf0caa93c9700686feb14f04239ad4ea8f20ce8736029638abe7d7b9c57b9d659d SHA512 de6a4a5bec89e6149b85b383991c99bd9460a8f59f52a700d54edd0154557727ccc79daaa90336dff434b222657c3f28dda1228d2d474002d0a28f31c9ed0b10
DIST python-gentoo-patches-3.7.8-r3.tar.xz 13232 BLAKE2B 9df47b1f61d08f62a80221bc48d73ec27cd74a9ade8219912c5b02eaea919b70d91b1154837cd03c0129a5839186e9c970167ca3398129c044c25c7853f1f920 SHA512 e1477d425cb6125ca2286d816f4aa4e9e3c789d6a4f4907bd7b78549598356cae5766f642e2cad9e7c3abe2e82c12cf3cb7db3513be68aa213cb64cc0abc678a
DIST python-gentoo-patches-3.8.4-r2.tar.xz 12660 BLAKE2B 3197edc6beb2b1be05399f268ff9b337ed67f699e3867160fea8e50f763a62b184ddd7adcdfa55dafc8c14f91e020b409461027361d04858db667992794b1168 SHA512 c56adbec04bfb950f7fb65f38cc0b78eaae9783800c755b7ac934b07725fcf4d69bbc2c29f7d1255acd6e88559a216dc8a6088042a479aa0d453b706e318c0cf
DIST python-gentoo-patches-3.8.5.tar.xz 11280 BLAKE2B 163c577da75f4ec0ebe86b5a08bea96d5ae406020bd211439b1405c0f8a5dddc9422a9ea5b16eed195433cbec010d9def3126a578d3f9716325482216b9e4d62 SHA512 6b7f72b8deb87fb7a169e97391185823984b5e9c99ec5232504c670843fbe0ca76afe32fc3fbe1f850ec6c42e9325cf4697022f36f7b00a4028b324069dd4d5b
-DIST python-gentoo-patches-3.9.0b3-r1.tar.xz 8860 BLAKE2B 87636ad5f1e2e92b2b12f46384d89b2f478861b320687edd257b4a157afb86a5a9d2bf55e7b51e1e612013e974689c64082012243c5c27afe65f5cb3bb03d562 SHA512 266f0925c1b62bfa38fd05f1fc4bc953d87ae44f0cb54ac415e374ef508e88b5cd07f52dba470f418fa7db74f9c06975778a95e21a50110859f88695a65265cb
-DIST python-gentoo-patches-3.9.0b3.tar.xz 8592 BLAKE2B 261dc9a5c7b370eb3f693f5bfb15562a5ee8b24b038db1b16571f096ff0d451ef8830c7f51db53366ebcf6e378dfab57e186f1789dc3ecc95e65595708f4428e SHA512 4c630b1b15e752ae154bfc9d0f5c8a17ac02127f96ccf114469bb92d02fe7d2ac13acd2415bfe6af0169c823b4aec09e2d6886c031df8e8c809ccb94efa60b62
-DIST python-gentoo-patches-3.9.0b4.tar.xz 10640 BLAKE2B af433fee46ff3eca0ef23cea2ed838cb5a4337a646f3b9a662f7ecf2e75d5fef81437daf88c920b6459160d328b3fa976f7611d1a34084b67e93fc72340fd070 SHA512 dc7cc77fc72c701d09a85dec2a2172ae71223e7a55455f689967d3246bb6e2815c9e4f45493545c03bc949d54a1e9ff354de88c785bc6c215b736862a21dea19
-DIST python-gentoo-patches-3.9.0b5.tar.xz 9180 BLAKE2B 49ce1f4dc4647829037a288677e99f27dfefa23ef4a2930d19e79614e7dbe6bd5c8074f73b452c1092fd3ae9d0ed573a8a3549f0ebd0c95b7fa0cac127ddedac SHA512 7d99090ea08165640915c4299ec9a1d985c6f896b11059063889faa7fb6cfe2ff3aefee5718470e4bb09fbdbc9f4867c9b189ac99596d4637e5aea63a493575b
DIST python-gentoo-patches-3.9.0rc1.tar.xz 8856 BLAKE2B 7bd032dfd047640c6a53633b5b9ee7b24199106b985230f772dda978d3b79fe0406eea64c4a842603a20afb71a90469befa7ec59a5ef1f793e4c901aa85952d1 SHA512 85a7d4397abf2a0f3c3d07a94a3e184ba3dcb347f3b70ee2cb77e81aac63846b01323a0228afd0fd1d32b3cafb64b18f82e6f5bfd88e4d564261ddae11e747eb
diff --git a/dev-lang/python/python-3.9.0_beta3.ebuild b/dev-lang/python/python-3.9.0_beta3.ebuild
deleted file mode 100644
index 8a98fd0b0c77..000000000000
--- a/dev-lang/python/python-3.9.0_beta3.ebuild
+++ /dev/null
@@ -1,323 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools check-reqs flag-o-matic pax-utils python-utils-r1 \
- toolchain-funcs
-
-MY_P="Python-${PV/_beta/b}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-3.9.0b3"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="https://www.python.org/"
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml"
-RESTRICT="!test? ( test )"
-
-# Do not add a dependency on dev-lang/python to this ebuild.
-# If you need to apply a patch which requires python for bootstrapping, please
-# run the bootstrap code on your dev box and include the results in the
-# patchset. See bug 447752.
-
-RDEPEND="app-arch/bzip2:=
- app-arch/xz-utils:=
- dev-libs/libffi:=
- sys-apps/util-linux:=
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- virtual/libintl
- gdbm? ( sys-libs/gdbm:=[berkdb] )
- ncurses? ( >=sys-libs/ncurses-5.2:= )
- readline? ( >=sys-libs/readline-4.1:= )
- sqlite? ( >=dev-db/sqlite-3.3.8:3= )
- ssl? (
- !libressl? ( dev-libs/openssl:= )
- libressl? ( dev-libs/libressl:= )
- )
- tk? (
- >=dev-lang/tcl-8.0:=
- >=dev-lang/tk-8.0:=
- dev-tcltk/blt:=
- dev-tcltk/tix
- )
- xml? ( >=dev-libs/expat-2.1:= )"
-# bluetooth requires headers from bluez
-DEPEND="${RDEPEND}
- bluetooth? ( net-wireless/bluez )
- test? ( app-arch/xz-utils[extra-filters(+)] )
- virtual/pkgconfig
- !sys-devel/gcc[libffi(-)]"
-RDEPEND+=" !build? ( app-misc/mime-types )"
-PDEPEND=">=app-eselect/eselect-python-20140125-r1"
-
-# large file tests involve a 2.5G file being copied (duplicated)
-CHECKREQS_DISK_BUILD=5500M
-
-pkg_pretend() {
- use test && check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- use test && check-reqs_pkg_setup
-}
-
-src_prepare() {
- # Ensure that internal copies of expat, libffi and zlib are not used.
- rm -fr Modules/expat || die
- rm -fr Modules/_ctypes/libffi* || die
- rm -fr Modules/zlib || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
-
- eautoreconf
-}
-
-src_configure() {
- local disable
- # disable automagic bluetooth headers detection
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
- use gdbm || disable+=" gdbm"
- use ncurses || disable+=" _curses _curses_panel"
- use readline || disable+=" readline"
- use sqlite || disable+=" _sqlite3"
- use ssl || export PYTHON_DISABLE_SSL="1"
- use tk || disable+=" _tkinter"
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
- export PYTHON_DISABLE_MODULES="${disable}"
-
- if ! use xml; then
- ewarn "You have configured Python without XML support."
- ewarn "This is NOT a recommended configuration as you"
- ewarn "may face problems parsing any XML documents."
- fi
-
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
- fi
-
- if [[ "$(gcc-major-version)" -ge 4 ]]; then
- append-flags -fwrapv
- fi
-
- filter-flags -malign-double
-
- # https://bugs.gentoo.org/show_bug.cgi?id=50309
- if is-flagq -O3; then
- is-flagq -fstack-protector-all && replace-flags -O3 -O2
- use hardened && replace-flags -O3 -O2
- fi
-
- # https://bugs.gentoo.org/700012
- if is-flagq -flto || is-flagq '-flto=*'; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- fi
-
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
- tc-export CXX
-
- # Set LDFLAGS so we link modules with -lpython3.2 correctly.
- # Needed on FreeBSD unless Python 3.2 is already installed.
- # Please query BSD team before removing this!
- append-ldflags "-L."
-
- # Fix implicit declarations on cross and prefix builds. Bug #674070.
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
-
- local dbmliborder
- if use gdbm; then
- dbmliborder+="${dbmliborder:+:}gdbm"
- fi
-
- local myeconfargs=(
- # glibc-2.30 removes it; since we can't cleanly force-rebuild
- # Python on glibc upgrade, remove it proactively to give
- # a chance for users rebuilding python before glibc
- ac_cv_header_stropts_h=no
-
- --enable-shared
- $(use_enable ipv6)
- --infodir='${prefix}/share/info'
- --mandir='${prefix}/share/man'
- --with-computed-gotos
- --with-dbmliborder="${dbmliborder}"
- --with-libc=
- --enable-loadable-sqlite-extensions
- --without-ensurepip
- --with-system-expat
- --with-system-ffi
- )
-
- OPT="" econf "${myeconfargs[@]}"
-}
-
-src_compile() {
- # Ensure sed works as expected
- # https://bugs.gentoo.org/594768
- local -x LC_ALL=C
-
- emake CPPFLAGS= CFLAGS= LDFLAGS=
-
- # Work around bug 329499. See also bug 413751 and 457194.
- if has_version dev-libs/libffi[pax_kernel]; then
- pax-mark E python
- else
- pax-mark m python
- fi
-}
-
-src_test() {
- # Tests will not work when cross compiling.
- if tc-is-cross-compiler; then
- elog "Disabling tests due to crosscompiling."
- return
- fi
-
- # Skip failing tests.
- local skipped_tests="gdb"
-
- for test in ${skipped_tests}; do
- mv "${S}"/Lib/test/test_${test}.py "${T}"
- done
-
- # bug 660358
- local -x COLUMNS=80
-
- local -x PYTHONDONTWRITEBYTECODE=
-
- emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local result=$?
-
- for test in ${skipped_tests}; do
- mv "${T}/test_${test}.py" "${S}"/Lib/test
- done
-
- elog "The following tests have been skipped:"
- for test in ${skipped_tests}; do
- elog "test_${test}.py"
- done
-
- elog "If you would like to run them, you may:"
- elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'"
- elog "and run the tests separately."
-
- if [[ ${result} -ne 0 ]]; then
- die "emake test failed"
- fi
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- emake DESTDIR="${D}" altinstall
-
- # Remove static library
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
-
- sed \
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
- -e "s/\(PY_LDFLAGS=\).*/\1/" \
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
-
- # Fix collisions between different slots of Python.
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
-
- # Cheap hack to get version with ABIFLAGS
- local abiver=$(cd "${ED}/usr/include"; echo python*)
- if [[ ${abiver} != python${PYVER} ]]; then
- # Replace python3.X with a symlink to python3.Xm
- rm "${ED}/usr/bin/python${PYVER}" || die
- dosym "${abiver}" "/usr/bin/python${PYVER}"
- # Create python3.X-config symlink
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
- # Create python-3.5m.pc symlink
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
- fi
-
- # python seems to get rebuilt in src_install (bug 569908)
- # Work around it for now.
- if has_version dev-libs/libffi[pax_kernel]; then
- pax-mark E "${ED}/usr/bin/${abiver}"
- else
- pax-mark m "${ED}/usr/bin/${abiver}"
- fi
-
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
-
- dodoc Misc/{ACKS,HISTORY,NEWS}
-
- if use examples; then
- docinto examples
- find Tools -name __pycache__ -exec rm -fr {} + || die
- dodoc -r Tools
- fi
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
- emake --no-print-directory -s -f - 2>/dev/null)
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
-
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
- sed \
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
- -e "s:@PYDOC@:pydoc${PYVER}:" \
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
-
- local -x EPYTHON=python${PYVER}
- # if not using a cross-compiler, use the fresh binary
- if ! tc-is-cross-compiler; then
- local -x PYTHON=./python
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
- else
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
- fi
-
- echo "EPYTHON='${EPYTHON}'" > epython.py || die
- python_domodule epython.py
-
- # python-exec wrapping support
- local pymajor=${PYVER%.*}
- local scriptdir=${D}$(python_get_scriptdir)
- mkdir -p "${scriptdir}" || die
- # python and pythonX
- ln -s "../../../bin/${abiver}" \
- "${scriptdir}/python${pymajor}" || die
- ln -s "python${pymajor}" "${scriptdir}/python" || die
- # python-config and pythonX-config
- # note: we need to create a wrapper rather than symlinking it due
- # to some random dirname(argv[0]) magic performed by python-config
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
- #!/bin/sh
- exec "${abiver}-config" "\${@}"
- EOF
- chmod +x "${scriptdir}/python${pymajor}-config" || die
- ln -s "python${pymajor}-config" \
- "${scriptdir}/python-config" || die
- # 2to3, pydoc
- ln -s "../../../bin/2to3-${PYVER}" \
- "${scriptdir}/2to3" || die
- ln -s "../../../bin/pydoc${PYVER}" \
- "${scriptdir}/pydoc" || die
- # idle
- if use tk; then
- ln -s "../../../bin/idle${PYVER}" \
- "${scriptdir}/idle" || die
- fi
-}
diff --git a/dev-lang/python/python-3.9.0_beta4-r1.ebuild b/dev-lang/python/python-3.9.0_beta4-r1.ebuild
deleted file mode 100644
index 1c5a83a1d9a9..000000000000
--- a/dev-lang/python/python-3.9.0_beta4-r1.ebuild
+++ /dev/null
@@ -1,323 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools check-reqs flag-o-matic pax-utils python-utils-r1 \
- toolchain-funcs
-
-MY_P="Python-${PV/_beta/b}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-3.9.0b4"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="https://www.python.org/"
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml"
-RESTRICT="!test? ( test )"
-
-# Do not add a dependency on dev-lang/python to this ebuild.
-# If you need to apply a patch which requires python for bootstrapping, please
-# run the bootstrap code on your dev box and include the results in the
-# patchset. See bug 447752.
-
-RDEPEND="app-arch/bzip2:=
- app-arch/xz-utils:=
- dev-libs/libffi:=
- sys-apps/util-linux:=
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- virtual/libintl
- gdbm? ( sys-libs/gdbm:=[berkdb] )
- ncurses? ( >=sys-libs/ncurses-5.2:= )
- readline? ( >=sys-libs/readline-4.1:= )
- sqlite? ( >=dev-db/sqlite-3.3.8:3= )
- ssl? (
- !libressl? ( dev-libs/openssl:= )
- libressl? ( dev-libs/libressl:= )
- )
- tk? (
- >=dev-lang/tcl-8.0:=
- >=dev-lang/tk-8.0:=
- dev-tcltk/blt:=
- dev-tcltk/tix
- )
- xml? ( >=dev-libs/expat-2.1:= )"
-# bluetooth requires headers from bluez
-DEPEND="${RDEPEND}
- bluetooth? ( net-wireless/bluez )
- test? ( app-arch/xz-utils[extra-filters(+)] )
- virtual/pkgconfig
- !sys-devel/gcc[libffi(-)]"
-RDEPEND+=" !build? ( app-misc/mime-types )"
-PDEPEND=">=app-eselect/eselect-python-20140125-r1"
-
-# large file tests involve a 2.5G file being copied (duplicated)
-CHECKREQS_DISK_BUILD=5500M
-
-pkg_pretend() {
- use test && check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- use test && check-reqs_pkg_setup
-}
-
-src_prepare() {
- # Ensure that internal copies of expat, libffi and zlib are not used.
- rm -fr Modules/expat || die
- rm -fr Modules/_ctypes/libffi* || die
- rm -fr Modules/zlib || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
-
- eautoreconf
-}
-
-src_configure() {
- local disable
- # disable automagic bluetooth headers detection
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
- use gdbm || disable+=" gdbm"
- use ncurses || disable+=" _curses _curses_panel"
- use readline || disable+=" readline"
- use sqlite || disable+=" _sqlite3"
- use ssl || export PYTHON_DISABLE_SSL="1"
- use tk || disable+=" _tkinter"
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
- export PYTHON_DISABLE_MODULES="${disable}"
-
- if ! use xml; then
- ewarn "You have configured Python without XML support."
- ewarn "This is NOT a recommended configuration as you"
- ewarn "may face problems parsing any XML documents."
- fi
-
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
- fi
-
- if [[ "$(gcc-major-version)" -ge 4 ]]; then
- append-flags -fwrapv
- fi
-
- filter-flags -malign-double
-
- # https://bugs.gentoo.org/show_bug.cgi?id=50309
- if is-flagq -O3; then
- is-flagq -fstack-protector-all && replace-flags -O3 -O2
- use hardened && replace-flags -O3 -O2
- fi
-
- # https://bugs.gentoo.org/700012
- if is-flagq -flto || is-flagq '-flto=*'; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- fi
-
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
- tc-export CXX
-
- # Set LDFLAGS so we link modules with -lpython3.2 correctly.
- # Needed on FreeBSD unless Python 3.2 is already installed.
- # Please query BSD team before removing this!
- append-ldflags "-L."
-
- # Fix implicit declarations on cross and prefix builds. Bug #674070.
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
-
- local dbmliborder
- if use gdbm; then
- dbmliborder+="${dbmliborder:+:}gdbm"
- fi
-
- local myeconfargs=(
- # glibc-2.30 removes it; since we can't cleanly force-rebuild
- # Python on glibc upgrade, remove it proactively to give
- # a chance for users rebuilding python before glibc
- ac_cv_header_stropts_h=no
-
- --enable-shared
- $(use_enable ipv6)
- --infodir='${prefix}/share/info'
- --mandir='${prefix}/share/man'
- --with-computed-gotos
- --with-dbmliborder="${dbmliborder}"
- --with-libc=
- --enable-loadable-sqlite-extensions
- --without-ensurepip
- --with-system-expat
- --with-system-ffi
- )
-
- OPT="" econf "${myeconfargs[@]}"
-}
-
-src_compile() {
- # Ensure sed works as expected
- # https://bugs.gentoo.org/594768
- local -x LC_ALL=C
-
- emake CPPFLAGS= CFLAGS= LDFLAGS=
-
- # Work around bug 329499. See also bug 413751 and 457194.
- if has_version dev-libs/libffi[pax_kernel]; then
- pax-mark E python
- else
- pax-mark m python
- fi
-}
-
-src_test() {
- # Tests will not work when cross compiling.
- if tc-is-cross-compiler; then
- elog "Disabling tests due to crosscompiling."
- return
- fi
-
- # Skip failing tests.
- local skipped_tests="gdb"
-
- for test in ${skipped_tests}; do
- mv "${S}"/Lib/test/test_${test}.py "${T}"
- done
-
- # bug 660358
- local -x COLUMNS=80
-
- local -x PYTHONDONTWRITEBYTECODE=
-
- emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local result=$?
-
- for test in ${skipped_tests}; do
- mv "${T}/test_${test}.py" "${S}"/Lib/test
- done
-
- elog "The following tests have been skipped:"
- for test in ${skipped_tests}; do
- elog "test_${test}.py"
- done
-
- elog "If you would like to run them, you may:"
- elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'"
- elog "and run the tests separately."
-
- if [[ ${result} -ne 0 ]]; then
- die "emake test failed"
- fi
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- emake DESTDIR="${D}" altinstall
-
- # Remove static library
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
-
- sed \
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
- -e "s/\(PY_LDFLAGS=\).*/\1/" \
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
-
- # Fix collisions between different slots of Python.
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
-
- # Cheap hack to get version with ABIFLAGS
- local abiver=$(cd "${ED}/usr/include"; echo python*)
- if [[ ${abiver} != python${PYVER} ]]; then
- # Replace python3.X with a symlink to python3.Xm
- rm "${ED}/usr/bin/python${PYVER}" || die
- dosym "${abiver}" "/usr/bin/python${PYVER}"
- # Create python3.X-config symlink
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
- # Create python-3.5m.pc symlink
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
- fi
-
- # python seems to get rebuilt in src_install (bug 569908)
- # Work around it for now.
- if has_version dev-libs/libffi[pax_kernel]; then
- pax-mark E "${ED}/usr/bin/${abiver}"
- else
- pax-mark m "${ED}/usr/bin/${abiver}"
- fi
-
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
-
- dodoc Misc/{ACKS,HISTORY,NEWS}
-
- if use examples; then
- docinto examples
- find Tools -name __pycache__ -exec rm -fr {} + || die
- dodoc -r Tools
- fi
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
- emake --no-print-directory -s -f - 2>/dev/null)
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
-
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
- sed \
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
- -e "s:@PYDOC@:pydoc${PYVER}:" \
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
-
- local -x EPYTHON=python${PYVER}
- # if not using a cross-compiler, use the fresh binary
- if ! tc-is-cross-compiler; then
- local -x PYTHON=./python
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
- else
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
- fi
-
- echo "EPYTHON='${EPYTHON}'" > epython.py || die
- python_domodule epython.py
-
- # python-exec wrapping support
- local pymajor=${PYVER%.*}
- local scriptdir=${D}$(python_get_scriptdir)
- mkdir -p "${scriptdir}" || die
- # python and pythonX
- ln -s "../../../bin/${abiver}" \
- "${scriptdir}/python${pymajor}" || die
- ln -s "python${pymajor}" "${scriptdir}/python" || die
- # python-config and pythonX-config
- # note: we need to create a wrapper rather than symlinking it due
- # to some random dirname(argv[0]) magic performed by python-config
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
- #!/bin/sh
- exec "${abiver}-config" "\${@}"
- EOF
- chmod +x "${scriptdir}/python${pymajor}-config" || die
- ln -s "python${pymajor}-config" \
- "${scriptdir}/python-config" || die
- # 2to3, pydoc
- ln -s "../../../bin/2to3-${PYVER}" \
- "${scriptdir}/2to3" || die
- ln -s "../../../bin/pydoc${PYVER}" \
- "${scriptdir}/pydoc" || die
- # idle
- if use tk; then
- ln -s "../../../bin/idle${PYVER}" \
- "${scriptdir}/idle" || die
- fi
-}
diff --git a/dev-lang/python/python-3.9.0_beta4.ebuild b/dev-lang/python/python-3.9.0_beta4.ebuild
deleted file mode 100644
index d59da139774d..000000000000
--- a/dev-lang/python/python-3.9.0_beta4.ebuild
+++ /dev/null
@@ -1,323 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools check-reqs flag-o-matic pax-utils python-utils-r1 \
- toolchain-funcs
-
-MY_P="Python-${PV/_beta/b}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-3.9.0b3-r1"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="https://www.python.org/"
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml"
-RESTRICT="!test? ( test )"
-
-# Do not add a dependency on dev-lang/python to this ebuild.
-# If you need to apply a patch which requires python for bootstrapping, please
-# run the bootstrap code on your dev box and include the results in the
-# patchset. See bug 447752.
-
-RDEPEND="app-arch/bzip2:=
- app-arch/xz-utils:=
- dev-libs/libffi:=
- sys-apps/util-linux:=
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- virtual/libintl
- gdbm? ( sys-libs/gdbm:=[berkdb] )
- ncurses? ( >=sys-libs/ncurses-5.2:= )
- readline? ( >=sys-libs/readline-4.1:= )
- sqlite? ( >=dev-db/sqlite-3.3.8:3= )
- ssl? (
- !libressl? ( dev-libs/openssl:= )
- libressl? ( dev-libs/libressl:= )
- )
- tk? (
- >=dev-lang/tcl-8.0:=
- >=dev-lang/tk-8.0:=
- dev-tcltk/blt:=
- dev-tcltk/tix
- )
- xml? ( >=dev-libs/expat-2.1:= )"
-# bluetooth requires headers from bluez
-DEPEND="${RDEPEND}
- bluetooth? ( net-wireless/bluez )
- test? ( app-arch/xz-utils[extra-filters(+)] )
- virtual/pkgconfig
- !sys-devel/gcc[libffi(-)]"
-RDEPEND+=" !build? ( app-misc/mime-types )"
-PDEPEND=">=app-eselect/eselect-python-20140125-r1"
-
-# large file tests involve a 2.5G file being copied (duplicated)
-CHECKREQS_DISK_BUILD=5500M
-
-pkg_pretend() {
- use test && check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- use test && check-reqs_pkg_setup
-}
-
-src_prepare() {
- # Ensure that internal copies of expat, libffi and zlib are not used.
- rm -fr Modules/expat || die
- rm -fr Modules/_ctypes/libffi* || die
- rm -fr Modules/zlib || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
-
- eautoreconf
-}
-
-src_configure() {
- local disable
- # disable automagic bluetooth headers detection
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
- use gdbm || disable+=" gdbm"
- use ncurses || disable+=" _curses _curses_panel"
- use readline || disable+=" readline"
- use sqlite || disable+=" _sqlite3"
- use ssl || export PYTHON_DISABLE_SSL="1"
- use tk || disable+=" _tkinter"
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
- export PYTHON_DISABLE_MODULES="${disable}"
-
- if ! use xml; then
- ewarn "You have configured Python without XML support."
- ewarn "This is NOT a recommended configuration as you"
- ewarn "may face problems parsing any XML documents."
- fi
-
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
- fi
-
- if [[ "$(gcc-major-version)" -ge 4 ]]; then
- append-flags -fwrapv
- fi
-
- filter-flags -malign-double
-
- # https://bugs.gentoo.org/show_bug.cgi?id=50309
- if is-flagq -O3; then
- is-flagq -fstack-protector-all && replace-flags -O3 -O2
- use hardened && replace-flags -O3 -O2
- fi
-
- # https://bugs.gentoo.org/700012
- if is-flagq -flto || is-flagq '-flto=*'; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- fi
-
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
- tc-export CXX
-
- # Set LDFLAGS so we link modules with -lpython3.2 correctly.
- # Needed on FreeBSD unless Python 3.2 is already installed.
- # Please query BSD team before removing this!
- append-ldflags "-L."
-
- # Fix implicit declarations on cross and prefix builds. Bug #674070.
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
-
- local dbmliborder
- if use gdbm; then
- dbmliborder+="${dbmliborder:+:}gdbm"
- fi
-
- local myeconfargs=(
- # glibc-2.30 removes it; since we can't cleanly force-rebuild
- # Python on glibc upgrade, remove it proactively to give
- # a chance for users rebuilding python before glibc
- ac_cv_header_stropts_h=no
-
- --enable-shared
- $(use_enable ipv6)
- --infodir='${prefix}/share/info'
- --mandir='${prefix}/share/man'
- --with-computed-gotos
- --with-dbmliborder="${dbmliborder}"
- --with-libc=
- --enable-loadable-sqlite-extensions
- --without-ensurepip
- --with-system-expat
- --with-system-ffi
- )
-
- OPT="" econf "${myeconfargs[@]}"
-}
-
-src_compile() {
- # Ensure sed works as expected
- # https://bugs.gentoo.org/594768
- local -x LC_ALL=C
-
- emake CPPFLAGS= CFLAGS= LDFLAGS=
-
- # Work around bug 329499. See also bug 413751 and 457194.
- if has_version dev-libs/libffi[pax_kernel]; then
- pax-mark E python
- else
- pax-mark m python
- fi
-}
-
-src_test() {
- # Tests will not work when cross compiling.
- if tc-is-cross-compiler; then
- elog "Disabling tests due to crosscompiling."
- return
- fi
-
- # Skip failing tests.
- local skipped_tests="gdb"
-
- for test in ${skipped_tests}; do
- mv "${S}"/Lib/test/test_${test}.py "${T}"
- done
-
- # bug 660358
- local -x COLUMNS=80
-
- local -x PYTHONDONTWRITEBYTECODE=
-
- emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local result=$?
-
- for test in ${skipped_tests}; do
- mv "${T}/test_${test}.py" "${S}"/Lib/test
- done
-
- elog "The following tests have been skipped:"
- for test in ${skipped_tests}; do
- elog "test_${test}.py"
- done
-
- elog "If you would like to run them, you may:"
- elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'"
- elog "and run the tests separately."
-
- if [[ ${result} -ne 0 ]]; then
- die "emake test failed"
- fi
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- emake DESTDIR="${D}" altinstall
-
- # Remove static library
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
-
- sed \
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
- -e "s/\(PY_LDFLAGS=\).*/\1/" \
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
-
- # Fix collisions between different slots of Python.
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
-
- # Cheap hack to get version with ABIFLAGS
- local abiver=$(cd "${ED}/usr/include"; echo python*)
- if [[ ${abiver} != python${PYVER} ]]; then
- # Replace python3.X with a symlink to python3.Xm
- rm "${ED}/usr/bin/python${PYVER}" || die
- dosym "${abiver}" "/usr/bin/python${PYVER}"
- # Create python3.X-config symlink
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
- # Create python-3.5m.pc symlink
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
- fi
-
- # python seems to get rebuilt in src_install (bug 569908)
- # Work around it for now.
- if has_version dev-libs/libffi[pax_kernel]; then
- pax-mark E "${ED}/usr/bin/${abiver}"
- else
- pax-mark m "${ED}/usr/bin/${abiver}"
- fi
-
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
-
- dodoc Misc/{ACKS,HISTORY,NEWS}
-
- if use examples; then
- docinto examples
- find Tools -name __pycache__ -exec rm -fr {} + || die
- dodoc -r Tools
- fi
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
- emake --no-print-directory -s -f - 2>/dev/null)
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
-
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
- sed \
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
- -e "s:@PYDOC@:pydoc${PYVER}:" \
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
-
- local -x EPYTHON=python${PYVER}
- # if not using a cross-compiler, use the fresh binary
- if ! tc-is-cross-compiler; then
- local -x PYTHON=./python
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
- else
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
- fi
-
- echo "EPYTHON='${EPYTHON}'" > epython.py || die
- python_domodule epython.py
-
- # python-exec wrapping support
- local pymajor=${PYVER%.*}
- local scriptdir=${D}$(python_get_scriptdir)
- mkdir -p "${scriptdir}" || die
- # python and pythonX
- ln -s "../../../bin/${abiver}" \
- "${scriptdir}/python${pymajor}" || die
- ln -s "python${pymajor}" "${scriptdir}/python" || die
- # python-config and pythonX-config
- # note: we need to create a wrapper rather than symlinking it due
- # to some random dirname(argv[0]) magic performed by python-config
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
- #!/bin/sh
- exec "${abiver}-config" "\${@}"
- EOF
- chmod +x "${scriptdir}/python${pymajor}-config" || die
- ln -s "python${pymajor}-config" \
- "${scriptdir}/python-config" || die
- # 2to3, pydoc
- ln -s "../../../bin/2to3-${PYVER}" \
- "${scriptdir}/2to3" || die
- ln -s "../../../bin/pydoc${PYVER}" \
- "${scriptdir}/pydoc" || die
- # idle
- if use tk; then
- ln -s "../../../bin/idle${PYVER}" \
- "${scriptdir}/idle" || die
- fi
-}
diff --git a/dev-lang/python/python-3.9.0_beta5.ebuild b/dev-lang/python/python-3.9.0_beta5.ebuild
deleted file mode 100644
index aaf7ebbbf1eb..000000000000
--- a/dev-lang/python/python-3.9.0_beta5.ebuild
+++ /dev/null
@@ -1,323 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools check-reqs flag-o-matic pax-utils python-utils-r1 \
- toolchain-funcs
-
-MY_P="Python-${PV/_beta/b}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${PV/_beta/b}"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="https://www.python.org/"
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml"
-RESTRICT="!test? ( test )"
-
-# Do not add a dependency on dev-lang/python to this ebuild.
-# If you need to apply a patch which requires python for bootstrapping, please
-# run the bootstrap code on your dev box and include the results in the
-# patchset. See bug 447752.
-
-RDEPEND="app-arch/bzip2:=
- app-arch/xz-utils:=
- dev-libs/libffi:=
- sys-apps/util-linux:=
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- virtual/libintl
- gdbm? ( sys-libs/gdbm:=[berkdb] )
- ncurses? ( >=sys-libs/ncurses-5.2:= )
- readline? ( >=sys-libs/readline-4.1:= )
- sqlite? ( >=dev-db/sqlite-3.3.8:3= )
- ssl? (
- !libressl? ( dev-libs/openssl:= )
- libressl? ( dev-libs/libressl:= )
- )
- tk? (
- >=dev-lang/tcl-8.0:=
- >=dev-lang/tk-8.0:=
- dev-tcltk/blt:=
- dev-tcltk/tix
- )
- xml? ( >=dev-libs/expat-2.1:= )"
-# bluetooth requires headers from bluez
-DEPEND="${RDEPEND}
- bluetooth? ( net-wireless/bluez )
- test? ( app-arch/xz-utils[extra-filters(+)] )
- virtual/pkgconfig
- !sys-devel/gcc[libffi(-)]"
-RDEPEND+=" !build? ( app-misc/mime-types )"
-PDEPEND=">=app-eselect/eselect-python-20140125-r1"
-
-# large file tests involve a 2.5G file being copied (duplicated)
-CHECKREQS_DISK_BUILD=5500M
-
-pkg_pretend() {
- use test && check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- use test && check-reqs_pkg_setup
-}
-
-src_prepare() {
- # Ensure that internal copies of expat, libffi and zlib are not used.
- rm -fr Modules/expat || die
- rm -fr Modules/_ctypes/libffi* || die
- rm -fr Modules/zlib || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
-
- eautoreconf
-}
-
-src_configure() {
- local disable
- # disable automagic bluetooth headers detection
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
- use gdbm || disable+=" gdbm"
- use ncurses || disable+=" _curses _curses_panel"
- use readline || disable+=" readline"
- use sqlite || disable+=" _sqlite3"
- use ssl || export PYTHON_DISABLE_SSL="1"
- use tk || disable+=" _tkinter"
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
- export PYTHON_DISABLE_MODULES="${disable}"
-
- if ! use xml; then
- ewarn "You have configured Python without XML support."
- ewarn "This is NOT a recommended configuration as you"
- ewarn "may face problems parsing any XML documents."
- fi
-
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
- fi
-
- if [[ "$(gcc-major-version)" -ge 4 ]]; then
- append-flags -fwrapv
- fi
-
- filter-flags -malign-double
-
- # https://bugs.gentoo.org/show_bug.cgi?id=50309
- if is-flagq -O3; then
- is-flagq -fstack-protector-all && replace-flags -O3 -O2
- use hardened && replace-flags -O3 -O2
- fi
-
- # https://bugs.gentoo.org/700012
- if is-flagq -flto || is-flagq '-flto=*'; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- fi
-
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
- tc-export CXX
-
- # Set LDFLAGS so we link modules with -lpython3.2 correctly.
- # Needed on FreeBSD unless Python 3.2 is already installed.
- # Please query BSD team before removing this!
- append-ldflags "-L."
-
- # Fix implicit declarations on cross and prefix builds. Bug #674070.
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
-
- local dbmliborder
- if use gdbm; then
- dbmliborder+="${dbmliborder:+:}gdbm"
- fi
-
- local myeconfargs=(
- # glibc-2.30 removes it; since we can't cleanly force-rebuild
- # Python on glibc upgrade, remove it proactively to give
- # a chance for users rebuilding python before glibc
- ac_cv_header_stropts_h=no
-
- --enable-shared
- $(use_enable ipv6)
- --infodir='${prefix}/share/info'
- --mandir='${prefix}/share/man'
- --with-computed-gotos
- --with-dbmliborder="${dbmliborder}"
- --with-libc=
- --enable-loadable-sqlite-extensions
- --without-ensurepip
- --with-system-expat
- --with-system-ffi
- )
-
- OPT="" econf "${myeconfargs[@]}"
-}
-
-src_compile() {
- # Ensure sed works as expected
- # https://bugs.gentoo.org/594768
- local -x LC_ALL=C
-
- emake CPPFLAGS= CFLAGS= LDFLAGS=
-
- # Work around bug 329499. See also bug 413751 and 457194.
- if has_version dev-libs/libffi[pax_kernel]; then
- pax-mark E python
- else
- pax-mark m python
- fi
-}
-
-src_test() {
- # Tests will not work when cross compiling.
- if tc-is-cross-compiler; then
- elog "Disabling tests due to crosscompiling."
- return
- fi
-
- # Skip failing tests.
- local skipped_tests="gdb"
-
- for test in ${skipped_tests}; do
- mv "${S}"/Lib/test/test_${test}.py "${T}"
- done
-
- # bug 660358
- local -x COLUMNS=80
-
- local -x PYTHONDONTWRITEBYTECODE=
-
- emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local result=$?
-
- for test in ${skipped_tests}; do
- mv "${T}/test_${test}.py" "${S}"/Lib/test
- done
-
- elog "The following tests have been skipped:"
- for test in ${skipped_tests}; do
- elog "test_${test}.py"
- done
-
- elog "If you would like to run them, you may:"
- elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'"
- elog "and run the tests separately."
-
- if [[ ${result} -ne 0 ]]; then
- die "emake test failed"
- fi
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- emake DESTDIR="${D}" altinstall
-
- # Remove static library
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
-
- sed \
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
- -e "s/\(PY_LDFLAGS=\).*/\1/" \
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
-
- # Fix collisions between different slots of Python.
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
-
- # Cheap hack to get version with ABIFLAGS
- local abiver=$(cd "${ED}/usr/include"; echo python*)
- if [[ ${abiver} != python${PYVER} ]]; then
- # Replace python3.X with a symlink to python3.Xm
- rm "${ED}/usr/bin/python${PYVER}" || die
- dosym "${abiver}" "/usr/bin/python${PYVER}"
- # Create python3.X-config symlink
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
- # Create python-3.5m.pc symlink
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
- fi
-
- # python seems to get rebuilt in src_install (bug 569908)
- # Work around it for now.
- if has_version dev-libs/libffi[pax_kernel]; then
- pax-mark E "${ED}/usr/bin/${abiver}"
- else
- pax-mark m "${ED}/usr/bin/${abiver}"
- fi
-
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
-
- dodoc Misc/{ACKS,HISTORY,NEWS}
-
- if use examples; then
- docinto examples
- find Tools -name __pycache__ -exec rm -fr {} + || die
- dodoc -r Tools
- fi
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
- emake --no-print-directory -s -f - 2>/dev/null)
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
-
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
- sed \
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
- -e "s:@PYDOC@:pydoc${PYVER}:" \
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
-
- local -x EPYTHON=python${PYVER}
- # if not using a cross-compiler, use the fresh binary
- if ! tc-is-cross-compiler; then
- local -x PYTHON=./python
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
- else
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
- fi
-
- echo "EPYTHON='${EPYTHON}'" > epython.py || die
- python_domodule epython.py
-
- # python-exec wrapping support
- local pymajor=${PYVER%.*}
- local scriptdir=${D}$(python_get_scriptdir)
- mkdir -p "${scriptdir}" || die
- # python and pythonX
- ln -s "../../../bin/${abiver}" \
- "${scriptdir}/python${pymajor}" || die
- ln -s "python${pymajor}" "${scriptdir}/python" || die
- # python-config and pythonX-config
- # note: we need to create a wrapper rather than symlinking it due
- # to some random dirname(argv[0]) magic performed by python-config
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
- #!/bin/sh
- exec "${abiver}-config" "\${@}"
- EOF
- chmod +x "${scriptdir}/python${pymajor}-config" || die
- ln -s "python${pymajor}-config" \
- "${scriptdir}/python-config" || die
- # 2to3, pydoc
- ln -s "../../../bin/2to3-${PYVER}" \
- "${scriptdir}/2to3" || die
- ln -s "../../../bin/pydoc${PYVER}" \
- "${scriptdir}/pydoc" || die
- # idle
- if use tk; then
- ln -s "../../../bin/idle${PYVER}" \
- "${scriptdir}/idle" || die
- fi
-}