commit:     742eeca02a0d06a56f6a69af55bcbcdf42f18ba1
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 31 08:22:13 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Aug 31 08:43:27 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=742eeca0

dev-lang/python: Enable threads unconditionally in <3.7 too

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-lang/python/python-2.7.18_p12.ebuild | 7 +++----
 dev-lang/python/python-3.6.14_p1.ebuild  | 7 +++----
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/dev-lang/python/python-2.7.18_p12.ebuild 
b/dev-lang/python/python-2.7.18_p12.ebuild
index 8d7d4c785d8..0c975e2caf7 100644
--- a/dev-lang/python/python-2.7.18_p12.ebuild
+++ b/dev-lang/python/python-2.7.18_p12.ebuild
@@ -23,7 +23,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"
-IUSE="berkdb bluetooth build elibc_uclibc examples gdbm hardened +ncurses 
+readline +sqlite +ssl +threads tk +wide-unicode wininst +xml"
+IUSE="berkdb bluetooth build elibc_uclibc examples gdbm hardened +ncurses 
+readline +sqlite +ssl tk +wide-unicode wininst +xml"
 
 # 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
@@ -191,7 +191,7 @@ src_configure() {
                --with-fpectl
                --enable-shared
                --enable-ipv6
-               $(use_with threads)
+               --with-threads
                $(use wide-unicode && echo "--enable-unicode=ucs4" || echo 
"--enable-unicode=ucs2")
                --infodir='${prefix}/share/info'
                --mandir='${prefix}/share/man'
@@ -206,7 +206,7 @@ src_configure() {
 
        OPT="" econf "${myeconfargs[@]}"
 
-       if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" 
pyconfig.h; then
+       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)"
@@ -293,7 +293,6 @@ src_install() {
        use tk || rm -r "${ED}/usr/bin/idle${PYVER}" 
"${libdir}/"{idlelib,lib-tk} || die
        use elibc_uclibc && rm -fr "${libdir}/"{bsddb/test,test}
 
-       use threads || rm -r "${libdir}/multiprocessing" || die
        use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die
 
        dodoc Misc/{ACKS,HISTORY,NEWS}

diff --git a/dev-lang/python/python-3.6.14_p1.ebuild 
b/dev-lang/python/python-3.6.14_p1.ebuild
index cba6bb86484..54ae5943f02 100644
--- a/dev-lang/python/python-3.6.14_p1.ebuild
+++ b/dev-lang/python/python-3.6.14_p1.ebuild
@@ -23,7 +23,7 @@ S="${WORKDIR}/${MY_P}"
 LICENSE="PSF-2"
 SLOT="${PYVER}/${PYVER}m"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sparc ~x86"
-IUSE="bluetooth build examples gdbm hardened +ncurses +readline +sqlite +ssl 
test +threads tk wininst +xml"
+IUSE="bluetooth build examples gdbm hardened +ncurses +readline +sqlite +ssl 
test tk wininst +xml"
 RESTRICT="!test? ( test )"
 
 # Do not add a dependency on dev-lang/python to this ebuild.
@@ -152,7 +152,7 @@ src_configure() {
                --with-fpectl
                --enable-shared
                --enable-ipv6
-               $(use_with threads)
+               --with-threads
                --infodir='${prefix}/share/info'
                --mandir='${prefix}/share/man'
                --with-computed-gotos
@@ -166,7 +166,7 @@ src_configure() {
 
        OPT="" econf "${myeconfargs[@]}"
 
-       if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" 
pyconfig.h; then
+       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)"
@@ -269,7 +269,6 @@ src_install() {
        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
 
-       use threads || rm -r "${libdir}/multiprocessing" || die
        use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die
 
        dodoc Misc/{ACKS,HISTORY,NEWS}

Reply via email to