With the upgrade to 3.10.16, builds on a Tiger G4 resulted in the
ctype module not building. It turns out that it libffi was being
linked against opportunistically via pkg-config in some scenarios.
Just depends on libffi since the version found in the source of
Python (Modules/_ctypes/libffi_osx) is very old (a pre-release of 2.0).
Some modules also link against zlib so depend on that too.
Add a test to ensure the ctype module works in that it imports as
the build of module can fail and the build of Python can succeed only
to find that there no module to import later.
While here add a guard for tkinter test since only on Xorg X11 in 10.5
and up will X11 be started and the test run within. On Tiger you have
in invoke the test from xterm otherwise it'll just fail.
Skipping upgrading pip as setup.py was removed in the following release.
Expectation is ensurepip module is used now with the newer releases.
Add gettext as dependency since version included in 10.5 is missing
symbols
Undefined symbols:
"_libintl_textdomain", referenced from:
__locale_textdomain in libpython3.10.a(_localemodule.o)
"_libintl_dgettext", referenced from:
__locale_dgettext in libpython3.10.a(_localemodule.o)
"_libintl_dcgettext", referenced from:
__locale_dcgettext in libpython3.10.a(_localemodule.o)
"_libintl_bindtextdomain", referenced from:
__locale_bindtextdomain in libpython3.10.a(_localemodule.o)
"_libintl_gettext", referenced from:
__locale_gettext in libpython3.10.a(_localemodule.o)
tcl-tk requires X11 on Tiger and the Python's tkinter module struggles
to interact with legacy TCL/TK included with Tiger which has Aqua bindings.
So always use the tcl-tk version from tigerbrew.
Use bzip2 from tigerbrew to avoid ancient bundled versions.
Python 3.10 is the last version to support building with a C99 compiler.
Postinstall was failing with these errors, which caused (perhaps among other problems?) easy_install and pip3 to not be linked & added to PATH properly.
`vivtop-g4:~/Desktop vivlim$ brew postinstall python3
Error: wrong number of arguments (2 for 1)
Please report this bug:
https://github.com/mistydemeo/tigerbrew/wiki/troubleshooting
/usr/local/Library/Formula/python3.rb:220:in '[]'
/usr/local/Library/Formula/python3.rb:220:in 'post_install'
/usr/local/Library/Homebrew/formula.rb:765:in 'run_post_install'
/usr/local/Library/Homebrew/cmd/postinstall.rb:3:in 'postinstall'
/usr/local/Library/Homebrew/cmd/postinstall.rb:3:in 'each'
/usr/local/Library/Homebrew/cmd/postinstall.rb:3:in 'postinstall'
/usr/local/Library/brew.rb:143:in 'send'
/usr/local/Library/brew.rb:143
vivtop-g4:~/Desktop vivlim$`
We don't want to run ensurepip, which installs an old version of pip; we
take care of this ourselves in postinstall.
On flat (i.e. non-Framework) builds, ensurepip causes an error in postinstall
because the pip-3.4 script already exists in prefix/bin.
Will resolveHomebrew/linuxbrew#469.