summaryrefslogtreecommitdiff
path: root/dev-lang/python
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-06-13 10:39:22 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-06-13 10:39:22 +0100
commit9452a6e87b6c2c70513bc47a2470bf9f1168920e (patch)
tree8ac67e26b45f34d71c5aab3621813b100a0d5f00 /dev-lang/python
parentf516638b7fe9592837389826a6152a7e1b251c54 (diff)
gentoo resync : 13.06.2020
Diffstat (limited to 'dev-lang/python')
-rw-r--r--dev-lang/python/Manifest9
-rw-r--r--dev-lang/python/python-2.7.18.ebuild2
-rw-r--r--dev-lang/python/python-3.8.2-r2.ebuild2
-rw-r--r--dev-lang/python/python-3.9.0_beta2.ebuild323
-rw-r--r--dev-lang/python/python-3.9.0_beta3.ebuild323
5 files changed, 655 insertions, 4 deletions
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index 08b6fd752d7b..9d6167863b7c 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -11,6 +11,8 @@ DIST Python-3.8.2.tar.xz 17869888 BLAKE2B f42b35bea5e65f1f0a3fa6f1fd3d749fba3fa4
DIST Python-3.8.3.tar.xz 17912964 BLAKE2B 9c415823f70bad97936e0472fc53a1b7650cbf0082da714266095dec74e0cd4a48c9477ad03fbb75fdc2cd8e41ef3aa5839e38fc69751720f5cb5c7fc77cce17 SHA512 3103bd8d944f3905eee3a2b52fd1f5c7dee380f9c5a99ad35a401fcba5a9117c3860ecec5cb47a92712c6549442fd2fa553a15c5657241dd09f5d00b9ed4f0f4
DIST Python-3.9.0a6.tar.xz 18202376 BLAKE2B 32f04613a3b11341759eb98fd4b16edcb890a9ce19a4d5031aecdccd985a5462248fcd0e7bf478e2f23490ad85b36c760c14398f2b238e26038a476831f004d2 SHA512 edb71840347ab2b5e18b3a2b831a3d9a26e1af52de9b1c6c088ce2d20f8e96a22c87fc3677b62e49c91a00d8b531028bdc739f00fe220dbdeb343daf17829be4
DIST Python-3.9.0b1.tar.xz 18443584 BLAKE2B 156f128fccb045f7d367f3f7c4c8ba3dc5b0e232c551bc24ed3a8be8b2199a66cde3671d6b1c4b75286618ed7af81ae60bf7db4a05c6de7c799a5f5c48b2f2ac SHA512 ed82ed2ef58940129d940b613c6495517741ebf3d6834b1e2498b294f1c4485d1cb180455d345937fe5a1da529a9df6278a17e7fe6aa5a4c6151745119b866bb
+DIST Python-3.9.0b2.tar.xz 18489152 BLAKE2B e72afe6bd3a338d313a226f9c4055973cb7fb5de5581df48cb48e62bd0762edc712c94eee01465eaf522b5926a0546383bba797f7a7d2dbe09ea01ada843b7f4 SHA512 adf444c2884eab3df3682a0af4f852c375868b6a9718c9fb87fe7419ec46371b1cbd499abae3f04f72d42b864b7ad86f7ae9890658b8ee75987f4cc675d97ab9
+DIST Python-3.9.0b3.tar.xz 18518204 BLAKE2B fa1707f0d55a83e739e9ad51979f8aff9720588a8a77b7ce8beb9ecf599955677758dec1551a0549b010f86c1f8fbc5915cef34d63097534d1c512c92fad5bd1 SHA512 c06a6b874fbce93ec37402034158a7bab44cab775d6da467eaddc1eb402663415f9d788e657a204f17dffe5fa6f379379f9215b5198ec5071565486b6f0e4a2a
DIST python-gentoo-patches-2.7.17-r1.tar.xz 14708 BLAKE2B f6e25236a471649de122d0f29506f7a4f34044a568ead47a68980411d9722b761fe1f9d653d5edccb6978b65c8c1eecbef55f403b94f32b37c0ad68e061505a8 SHA512 ecdde5e38c6fe5e69691fb3a68c8f4f43da7857d4abaff763d3cf6ad864ba43c769c03b186b60f2736a1ffb1e3e4c9982715d1b8a99ff3f5740096153bb8a90f
DIST python-gentoo-patches-2.7.18.tar.xz 15012 BLAKE2B f691e231c793bb8f11fb64c89b90e022af8e0fe0e28839822c2ae6214fdab6c6fd9c07466c4b5797d3964b7db09fd979597774fb7872dc674e8df59321b6bf95 SHA512 a2952b27bfc0a52f322b2f3e177cbe09fa288c9ca5967c13fb9c2d45d3e81033407e30e86bdaaaa258f0b3cfa2cef6eda5502bddb6390f9512a493d145d34e03
DIST python-gentoo-patches-3.6.10-r1.tar.xz 15556 BLAKE2B 3d4755a083172fc878d3454797a4a7fa809c7767b7f2ba0919b95076b8ecba62ac604a7db349d8dd71f83aa44d4580d0c433ae6cd2027078e7779cec79185ba2 SHA512 b361ff3fe9545bb59a7e85f179a094d58219be35d20cef83db02672d0a9a58fccfda62fbe8c2bf64250c4043b8517cbc2091380611c5f1e63bfac9ca7c4e47b0
@@ -21,15 +23,18 @@ DIST python-gentoo-patches-3.8.1-r2.tar.xz 10108 BLAKE2B 02d3e2ae95b5cfa67c0ba4f
DIST python-gentoo-patches-3.8.2-r1.tar.xz 16112 BLAKE2B 9ae197a56bbd96afa11c4312c68ac030138773df22dedc3a3e6fb9e81b366d6522fb2c147946eb604a87d749cbea7e5e5eed8ae0e737294c0949a8c2791dd327 SHA512 00f31c3b7227dd443f05234fbb7744338ce687e1ea4d236a6b1d386d76082acb34259f59442018c9ace54e0004dea9ac822ae2a4470159b83d00112e258baff0
DIST python-gentoo-patches-3.8.3.tar.xz 10704 BLAKE2B 6fdd13139b1132313153af2de774abeca7c1fe9acb34a87e5d96875a4cbe8c22c201acbb11c15eeaf828493c32f6acd89e3b5d4012fa2c9d216da556aadb9f01 SHA512 6f67d77e8240983c0dd749620e5df81df5816b831032e190c82c8d73ea8a995daf2631640234a1350e483bd13276466457d110176612bfde3281d1b6a8bf97bb
DIST python-gentoo-patches-3.9.0_alpha6.tar.xz 8916 BLAKE2B ca611dd96e6fca625def6affeb35daa1c869ffa3b84bd13d5cc2dff7ffe4e0aaf4a76b3ed35d4520fe64f1905a644ecc2dcd80259f88264adeff926d728df76e SHA512 b3cd6619d998db8c828fc05eeba74d644ead60d34c279943725ea94ee9e5d45a07d481af62b8589336c55bb8baa23d6559aa57a73d11bf2364b6e9b839e0a4be
+DIST python-gentoo-patches-3.9.0b3.tar.xz 8592 BLAKE2B 261dc9a5c7b370eb3f693f5bfb15562a5ee8b24b038db1b16571f096ff0d451ef8830c7f51db53366ebcf6e378dfab57e186f1789dc3ecc95e65595708f4428e SHA512 4c630b1b15e752ae154bfc9d0f5c8a17ac02127f96ccf114469bb92d02fe7d2ac13acd2415bfe6af0169c823b4aec09e2d6886c031df8e8c809ccb94efa60b62
EBUILD python-2.7.17-r2.ebuild 10766 BLAKE2B c74dbef430e0078769e09c3641a705771d150d23777cee7f84b38abe1422c2be16520f131b59b97b9377c57acad12fb9051900ed0baf63287f173e4057735324 SHA512 a9bfe80ce8cc52a5147fe69e52d0bb86e8828bd8bd99fda3549302020c6f4496a69f0e5b9d1fffb2882b84d0fc1b947e83751b315de3119a320b52dcf2d580f6
-EBUILD python-2.7.18.ebuild 10594 BLAKE2B e131ef36b19dc5b78f852efebd63c34f631dae453583c9941212fc6c84eaf9299e902873d44ad9e27d52f4b287ac552d82391af2fe945e63dbfd4cf7f472dc03 SHA512 ceff960b1a242efa9c14f71ee2634fef9fba29cdfe089464ea516179f3a2417a26a1e13a0aad0911cedeb9dfd929af5534598ba8e71eff1484d2a8b7118d84f6
+EBUILD python-2.7.18.ebuild 10593 BLAKE2B 8e0f4c58a44ffe10533a7e534bb28a642e258468a4d546a77e39075d1c8ff63d2b3e9d99858eb1d93f84b40101f9cdc2b1db0e45ab6755167da486e5f9468e59 SHA512 5f880a3e0a47efb13d0f9f7f9e7ad01f78c46d772d9de999c3bb67b68adca05a1e01dc2fff8b21b8daaba9e0b9cdb44642c35e04a98217b04d5e2ee3fda2719e
EBUILD python-3.6.10-r1.ebuild 10531 BLAKE2B 435191d126961bb25602dfcbce27e8de9fa61235c2b17e57c04f4e48ba9d149d2836288a5fb68638bd3cbd3a9003a507de57244a27ace2e066ca4d7862e992cc SHA512 f4ab89f202fde399188abb56df1d07a2e9f33829e2bc0b0635ac940612c662e6907d9cb898f23ae6f35eb05667409f69d3d25cbedfe118e5e2af8d0a0fa1f101
EBUILD python-3.6.10-r2.ebuild 10334 BLAKE2B 0c964325ae2741ab5c02b5055dccc2f5fdfa2d5ad30998ae9a6a3c355390e895918b23e5d90cf11fceb01811f886b952aae5439876a2916d5c66e8a0f1d6d484 SHA512 1bfe53dd755e4354e713b4a3bd0fbc1884ad1f580aff3b8de1058bef3b2e7c6b1eb42bfdee0dc2dd742d7c23c93e1e050aa0949ef12a9099cc73376e139f638d
EBUILD python-3.7.7-r1.ebuild 10078 BLAKE2B d696122aedb2f0200242d4c3510fc83daf7d376af507cc83e6d03704988dff5d81c36e9a95eca73d6e6f0a65d125eba38d3b516e4ecb58d288748b5e3b9a90ee SHA512 cbe4ec9db8c13ff906c309cba99ad5aa669807a60da604a083061420ca35455e3f4518427497da33ec17affe3a972b6b06f837427c5b5cc4908306abc110f511
EBUILD python-3.7.7-r2.ebuild 9877 BLAKE2B 182391402d72a38090801f4ea95ddcc26385bfb6174d7fffe6d0acb45fc735ca62d561ba64b324f2e6d64761f51ec18dfc1c4f04abe131138ebe8985b927fd2d SHA512 39fed5b175cf581371ae4150c539e4a2d1a3d5f7f247d92147c49fd8cd7eb231688d7507b1efb10194683834b37697c5f4e6721bffd592ca8698355fe9670a58
EBUILD python-3.8.2-r1.ebuild 10206 BLAKE2B ea5c774f23813cea83a720bc0cf66e6f538954a8a734727695117cdeae656a6760483c10537e90369f7493dbe157f850e1bfb031b68b377f14a686587efb9660 SHA512 6731f18667e3554379ceb7b17bc3c9fd04cd1a83dbdb023286f93e0f89f0a92ccae6346e5bfebf174bd8c96ad02d9029bc6898d404e236c9d43219144a026f63
-EBUILD python-3.8.2-r2.ebuild 9929 BLAKE2B d01a4201f9507305e4837f2d0f6bdbbeef5f562b67dd7d66260af2ec7523f1721622e57dc176eafa947e33f56beac8bbb21d21b3094be7dbcd4d6a19f2d9609c SHA512 a61ae7e53f29a5db3dc88f43d9eb71588c65ea0a3901530a3e8714bf91aa4e6050f39252170ac2fd7869df1e9d9887027081b9cde5a9c4471d4d74670d16ce8d
+EBUILD python-3.8.2-r2.ebuild 9928 BLAKE2B e131852b497fd24ecf3768cfaff2188e499a0ca0700443a146b26a0b2e38c1c83a0438455f22afa45f7eaeb96e744bdce9a1530ad831fe929ed561f3f0cc84a5 SHA512 b43d77bf74b18d4d758df5b6399cc38e5edfd52d1652f5b5c0d6083f22ebd5f880e4e5a12244895300aebd284863e77d0318c053b0e87e7e6572e88ec6b5c15b
EBUILD python-3.8.3.ebuild 9934 BLAKE2B 9319fd3f2283fb848d28e153b25bb771f2f060fa5348a7b6ccbad0c3a706713bc9f05abb1acf928df4df8b00dd77562e814dd6c610bab33a19b738f57c38ee9b SHA512 9a3ff67e6b8105790fe72f9359aa6fedcfb06860d4b67ff3c5bc50c8d84ed5324dc2d581d39c6867bf103414c4db2a2657730a48ff58e85b7665ef5d0dd55a0e
EBUILD python-3.9.0_alpha6.ebuild 9438 BLAKE2B 02ce0897bdc5a82ff90125906e1a5bd07e14ddc44d40e080679c74ea70a9141d0ea0ee07f69994390902688b8b314fcb394ff936ec438aac1cf44ecc9974900c SHA512 e43797ef0801eef5f000a3ce161e523ebb030679cb8cfd6f70c7d53a138eb9f58f4b8e259aa97ee57f4a7047d87ced27635daf82a8f1d28754ae98b98a08b381
EBUILD python-3.9.0_beta1.ebuild 9224 BLAKE2B 13270770524fe949dba945150aff885c860b7c2a0cd175bf4d77c87998d5899c7d067f25624d6b0da53c85f68df80a3bf022e701a907098d6cdabdb8a84e5705 SHA512 7ba5bbbe50afba3fda575b9f831fe7b4a86aecb131947bea113b91ed7b415b07fef1d36b77b373a9929af9fc84707ea86697e139bbada918601bbb4ab1f7e87f
+EBUILD python-3.9.0_beta2.ebuild 9224 BLAKE2B 13270770524fe949dba945150aff885c860b7c2a0cd175bf4d77c87998d5899c7d067f25624d6b0da53c85f68df80a3bf022e701a907098d6cdabdb8a84e5705 SHA512 7ba5bbbe50afba3fda575b9f831fe7b4a86aecb131947bea113b91ed7b415b07fef1d36b77b373a9929af9fc84707ea86697e139bbada918601bbb4ab1f7e87f
+EBUILD python-3.9.0_beta3.ebuild 9219 BLAKE2B 7901178a271e7e6bcb8cdc8d7dfa39475fe1f77c298d6222e0aa1a9dc32f999b49691c14102ebb755bf9fef85717fefe1a10b5bf6d2988f8783b6944cb56c989 SHA512 7d05c62b192e2df79c0ed74ca13054f45ddd9c0f2fa77aea0c0ad805cf70274678f8282a6fe7d7f890cae52a07971497c471510e1f1fb1555ee7177b93ccdefe
MISC metadata.xml 819 BLAKE2B 120c7c65d77488e726c5a0f4aa19469867ea6900e747169fae2f9cf8f14ec2936089d5edfe1935ce610bec26387273e261b1cc4b023680c8c4b229f2141a7223 SHA512 08f45707e5490067a21951b9d37c8ae67064ab67cccc5b8d8c204eab8d4a004fb910627b62989c67b849b89d301618f8f8f7996e99e1ef5bab38a239c49c124d
diff --git a/dev-lang/python/python-2.7.18.ebuild b/dev-lang/python/python-2.7.18.ebuild
index 81f9c26bfdc4..bd043f3e2c6a 100644
--- a/dev-lang/python/python-2.7.18.ebuild
+++ b/dev-lang/python/python-2.7.18.ebuild
@@ -18,7 +18,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 ~sparc x86"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86"
IUSE="-berkdb bluetooth build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml"
# Do not add a dependency on dev-lang/python to this ebuild.
diff --git a/dev-lang/python/python-3.8.2-r2.ebuild b/dev-lang/python/python-3.8.2-r2.ebuild
index 869e40831002..543abfef801c 100644
--- a/dev-lang/python/python-3.8.2-r2.ebuild
+++ b/dev-lang/python/python-3.8.2-r2.ebuild
@@ -18,7 +18,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 ~sparc x86"
+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 )"
diff --git a/dev-lang/python/python-3.9.0_beta2.ebuild b/dev-lang/python/python-3.9.0_beta2.ebuild
new file mode 100644
index 000000000000..b1c8280ab7ae
--- /dev/null
+++ b/dev-lang/python/python-3.9.0_beta2.ebuild
@@ -0,0 +1,323 @@
+# 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.0_alpha6"
+
+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_beta3.ebuild b/dev-lang/python/python-3.9.0_beta3.ebuild
new file mode 100644
index 000000000000..8a98fd0b0c77
--- /dev/null
+++ b/dev-lang/python/python-3.9.0_beta3.ebuild
@@ -0,0 +1,323 @@
+# 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
+}