[MacPorts] #64916: Pythons 3.x for ppc+ppc64 on Leopard: No module named 'msvcrt', '_posixsubprocess' errors, how to fix?
MacPorts
noreply at macports.org
Thu Mar 31 18:46:41 UTC 2022
#64916: Pythons 3.x for ppc+ppc64 on Leopard: No module named 'msvcrt',
'_posixsubprocess' errors, how to fix?
--------------------------------------------+------------------------------
Reporter: barracuda156 | Owner: jmroot
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.7.2
Resolution: | Keywords: powerpc,
Port: python38, python39, python310 | leopard, ppc64
--------------------------------------------+------------------------------
Comment (by barracuda156):
UPD. I have also tried now to use approach from `python27`, changing
relevant section in `python39` portfile to:
{{{
variant universal {
patchfiles-append patch-universal-powerpc.diff
post-patch {
reinplace \
"s|__UNIVERSAL_ARCHFLAGS__|${configure.universal_cflags}|" \
${worksrcpath}/configure
}
if {${configure.sdkroot} ne ""} {
configure.args-append --enable-universalsdk=${configure.sdkroot}
} else {
configure.args-append --enable-universalsdk=/
}
post-configure {
set oldmtime [file mtime ${worksrcpath}/pyconfig.h]
system -W ${worksrcpath} "ed - pyconfig.h <
${filespath}/pyconfig.h-universal.ed"
file mtime ${worksrcpath}/pyconfig.h $oldmtime
}
post-destroot {
foreach unversioned {python3-32 python3-intel64} {
delete ${destroot}${prefix}/bin/${unversioned}
}
}
}
}}}
And then modifying patches; build itself again was successful, but trying
to install any modules again fails:
{{{
---> Building py39-curl
Traceback (most recent call last):
File
"/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py",
line 73, in <module>
import msvcrt
ModuleNotFoundError: No module named 'msvcrt'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
.org_macports_release_tarballs_ports_python_py-
curl/py39-curl/work/pycurl-7.44.1/setup.py", line 11, in <module>
import glob, os, re, sys, subprocess
File
"/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py",
line 78, in <module>
import _posixsubprocess
ModuleNotFoundError: No module named '_posixsubprocess'
Command failed:
/opt/local/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9
setup.py docstrings
Exit code: 1
Error: Failed to build py39-curl: command execution failed
}}}
--
Ticket URL: <https://trac.macports.org/ticket/64916#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list