summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-07-10 08:27:43 +0200
committerMichał Górny <mgorny@gentoo.org>2021-07-10 09:34:02 +0200
commita5897bf8bae952b5282e4e112341d77961807f5e (patch)
treeaa74739459a335146a56c33a80524d0ea47651bf /dev-lang/python
parentdev-vcs/mercurial: remove olds (diff)
downloadgentoo-a5897bf8bae952b5282e4e112341d77961807f5e.tar.gz
gentoo-a5897bf8bae952b5282e4e112341d77961807f5e.tar.bz2
gentoo-a5897bf8bae952b5282e4e112341d77961807f5e.zip
dev-lang/python: Bump to 3.10.0b4
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-lang/python')
-rw-r--r--dev-lang/python/Manifest3
-rw-r--r--dev-lang/python/python-3.10.0_beta4.ebuild346
2 files changed, 349 insertions, 0 deletions
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index 4b962b80c6ee..97f206d56b97 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -4,6 +4,8 @@ DIST Python-3.10.0b2.tar.xz 18651420 BLAKE2B 6433723e789c04cfe09e7b966b1d5ad1687
DIST Python-3.10.0b2.tar.xz.asc 833 BLAKE2B 7fe4061350b27e0d0dd466cc80804a56126620649b4753cfe0ed1fc3a292aad30ab07f177f5bf893cd51112b6a54232a64b30d2bc2f8f66a9c2621efce3ae6da SHA512 9a84ab98a5215f13302c7a983e9224096d15c07d9a7899b28daff49405c46efdf7770263ca57e6e0f85ce1cbc0cafec373baf1675ade6ddb0eb268e99753907d
DIST Python-3.10.0b3.tar.xz 18640292 BLAKE2B 29af2d0e042714d6cfed08f6ecc5846dded1bec9a3efce01cca740e7dbfb036c06389ba638cd984410613067021bdd4291cb8f1fda353ed21444ee4dc4404a89 SHA512 ef0dc5eddb5f9702ab88faa2827455347caa81ab6c03192d6e37c968a40c53ab485d5c923905c511d19bc35e10129aa302f6733e0a7d296da8f725367dd1b258
DIST Python-3.10.0b3.tar.xz.asc 833 BLAKE2B 8978db8f2443e4a9d8f8997b64a731f7d8d5cdc9028dfc8812c3363298777aa227d9dd896a518e08f2793fbcc93a71bac4b422277b3ecd2ee4210b03e665385f SHA512 6b8d2caf753f0d92019e18d1441e323a44aff06ee8bdc272572a67359dc4bece833db56b9318c91962d39ee4d09bf701b548d71ae02c4b64f3c21f1c23ed1d36
+DIST Python-3.10.0b4.tar.xz 18652712 BLAKE2B 227a6e6ce5b8ddec7b3cf39a65e0287cb541185a1b58a4f4ae9dbc83bbd5d7bdceff2992d3e7c2ec4cda7fb492123e54f8cc60b6b259bbe776e1414a8e6753f7 SHA512 deb5ce510c381ce7fcdc7056754b3afccdbc4610cb77b85115859a5e636065584f517e0931a31f77723c09229b2fd751011b1cf16967c075f629018f0a7975a4
+DIST Python-3.10.0b4.tar.xz.asc 833 BLAKE2B 0aaabe7aca916bd3e80dee979cf6466b0fd0f25aa48a2955d1bfe84be8903988ccd2c5030433fdb5165b342a3acdc3ec958827028260b59bb105f41ceb5852b1 SHA512 55ef4265d9217f35e5f1da3b8b560f711c3f118230ff5fb7fe3ab5e189c22c331cecb9783465234ac0df8a1e075887b5fedfbc181cab6e571e5e2f8403d9720d
DIST Python-3.6.13.tar.xz 17213520 BLAKE2B 7c1938f92616d428d107a70397a9f7fc82377d0e3d26c2da4f5bcb79a54115f71498a5e7b5f601b6cff6f362ec1f689c3ac920eb248956e1e4f6c21602514dd1 SHA512 0482b3e7eea22b0635b61f06753e77c832c9431385c5ea1ecb8f60868262afd2b45c239badb8e906a33f035ffbf347b4a499fe6f0f008f1fa9ecc9de66c63947
DIST Python-3.6.13.tar.xz.asc 833 BLAKE2B bc1df46c2e460c2d237647ecff84e12c75f6ed24a432d2f9cbefdead8a77d4468e5e4ed9f4debac593c63cf95d27c9f7d0f94dce69af8746cc71f0d0b1810245 SHA512 f6e8936a5e5b45d3ad41184717f5ed75debe29f81138fd1b75b53bc7d2905edff42b42dd7995b11ba6d80233c5c3755521edb19d7ac28d414bfebb2d1dfc0c86
DIST Python-3.6.14.tar.xz 17218148 BLAKE2B efe655cb907ffa678ca135f88ba9d867e523969ad82dbc09ffb6d8d383824a4b43c525e156a3c35484a526b4b3ea755109e5ef15d17852d44e3351c307fc5e91 SHA512 15b82b7285db97cb27a6fcd57ce9e258fdf8dbdb2f00e22e4331161b8557c8244342546c4143e84c72730759e0276770396b6ca5bb7cf87310cca8e175423006
@@ -24,6 +26,7 @@ DIST python-gentoo-patches-2.7.18_p10.tar.xz 30436 BLAKE2B 24610a09037ce43a4cdb9
DIST python-gentoo-patches-2.7.18_p11.tar.xz 31340 BLAKE2B bdc097b971ab8ec0b60f944002af34f3fff6b681c43515a4fec2fcac1a2c731bf4fcfae2178463103911e2f8cd6bc84d3b56cd0ad61da5c8276278ec9b85a242 SHA512 2a2388c4543267bfb0167f963a22f5141442c9347d9a8806ad6917843e6958d47c8f1933244651c870101b21408c920408fe056efb7a148117c24ab391151d88
DIST python-gentoo-patches-3.10.0b2.tar.xz 8124 BLAKE2B 6b707ef911c0573e6e87792b4ba1d37e5620723c7b22759c78ac20d88414390a7317546c41d867cd9decb6247c004a9df8eb25ab0999db9c7b431b03b64609e9 SHA512 9a95a1f8a6e4461107e9580e6017956ade47be90fbcd94cbb2eb83a871702308058a402c1eafc8e0d54c2a1910b9030edd9f71b051e846b1219e9f7bd11274b6
DIST python-gentoo-patches-3.10.0b3.tar.xz 8112 BLAKE2B c6a0517323c5c0d8af998915ccb675a51df19893b9252f9ad195b62f8988fa65ca73894fc8089c37a44f22976f57c49c24c0bf9469b1edb6c3422c4a7be832d8 SHA512 fbc770430259ff482c0a4b89859e2a747fde0f34037829f9cc5a2972345d0b073612db7ef84f382248902e0f9e203f8d8dc07165942356b01f48b23dd4412f64
+DIST python-gentoo-patches-3.10.0b4.tar.xz 8128 BLAKE2B d6357464f540db255d97e0135676b1a3188ab595b01192c0ba24917a08f24fdda64528de788a942cbff79e8eb8e0e21d509152c18a94dfb629c898ac06f1a408 SHA512 8ee4ced4631335341277b10d38c9c86a53f7098669ca6aacb9fe94d6751df0694f4238068867a951f53740ea1bb4f7fb90aae4f2e1151681b7a215d406eaefd0
DIST python-gentoo-patches-3.6.13_p5.tar.xz 21940 BLAKE2B f6753f2c4383fbf0de0433040dae812f35bf550c60ac4a042c62afcff158619ebdc47d013dfa62d9b3dd446e8401ad50aaaeb212fb048a884a1c436b73b7afe2 SHA512 260d6abb2c24726fcddbe3ae828e96e315f90b6d486c11868066a25635968214a8c25a89737a9737c32ca110892a28f6b12badbeceb5e4d8d4a2a996b3ce7352
DIST python-gentoo-patches-3.6.14.tar.xz 14744 BLAKE2B b9482f9d2b7ada60eff9a5672ed21556c00b473a7cfdb543dce8253fb0ff1539e635a35569478c496012ecde4eef78a257da28f7a80bff99da10249708262229 SHA512 246f83911c8e52ea83a9bf453faa0bc0ea0c29bbf3b666a938e3790c6147f71e617ff9cb27501c5f0b89172eb9e7819e3f2ef0a5bae271cc938d2c0c2b93f7ae
DIST python-gentoo-patches-3.7.10_p6.tar.xz 23868 BLAKE2B 3b3786030a461d06a96dbe0987d05c35215bb5e7b0b95e1337a05a311ad6f3c6db68cc7082128c56eea3eff4b98f74d213dde1f48517e07791815b73dcdcd5b8 SHA512 b817a9bc1469675c14555ce50bb004e8c1426465997a72a94859ab10df7c2a036b33b332c9e6b9f49df1addd899a37afd28fe60bf6ce90b4b21f4a28a27aca25
diff --git a/dev-lang/python/python-3.10.0_beta4.ebuild b/dev-lang/python/python-3.10.0_beta4.ebuild
new file mode 100644
index 000000000000..e7e3f59b1da7
--- /dev/null
+++ b/dev-lang/python/python-3.10.0_beta4.ebuild
@@ -0,0 +1,346 @@
+# Copyright 1999-2021 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 multiprocessing pax-utils \
+ python-utils-r1 toolchain-funcs verify-sig
+
+MY_PV=${PV/_beta/b}
+MY_P="Python-${MY_PV%_p*}"
+PYVER=$(ver_cut 1-2)
+PATCHSET="python-gentoo-patches-${MY_PV}"
+
+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
+ verify-sig? (
+ https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
+ )"
+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 +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? ( dev-libs/openssl:= )
+ tk? (
+ >=dev-lang/tcl-8.0:=
+ >=dev-lang/tk-8.0:=
+ dev-tcltk/blt:=
+ dev-tcltk/tix
+ )
+ xml? ( >=dev-libs/expat-2.1:= )
+ !!<sys-apps/sandbox-2.21"
+# bluetooth requires headers from bluez
+DEPEND="${RDEPEND}
+ bluetooth? ( net-wireless/bluez )
+ test? ( app-arch/xz-utils[extra-filters(+)] )"
+# autoconf-archive needed to eautoreconf
+BDEPEND="
+ sys-devel/autoconf-archive
+ virtual/pkgconfig
+ verify-sig? ( app-crypt/openpgp-keys-python )
+ !sys-devel/gcc[libffi(-)]"
+RDEPEND+=" !build? ( app-misc/mime-types )"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
+
+# 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_unpack() {
+ if use verify-sig; then
+ verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
+ fi
+ default
+}
+
+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@@"
+
+ # force correct number of jobs
+ # https://bugs.gentoo.org/737660
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
+ sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
+ sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
+
+ 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
+
+ # 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
+ --without-static-libpython
+ $(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[@]}"
+
+ if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
+ eerror "configure has detected that the sem_open function is broken."
+ eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
+ die "Broken sem_open function (bug 496328)"
+ fi
+}
+
+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=
+ # workaround https://bugs.gentoo.org/775416
+ addwrite /usr/lib/python3.10/site-packages
+
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
+
+ emake test EXTRATESTOPTS="-u-network -j${jobs}" \
+ 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
+
+ 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
+}