diff --git Lib/cgi.py Lib/cgi.py
index 77ab703..bfe1e7a 100755
|
|
|
1 | | #! /usr/local/bin/python |
2 | | |
3 | | # NOTE: the above "/usr/local/bin/python" is NOT a mistake. It is |
4 | | # intentionally NOT "/usr/bin/env python". On many systems |
5 | | # (e.g. Solaris), /usr/local/bin is not in $PATH as passed to CGI |
6 | | # scripts, and /usr/local/bin is the default directory where Python is |
7 | | # installed, so /usr/bin/env would be unable to find python. Granted, |
8 | | # binary installations by Linux vendors often install Python in |
9 | | # /usr/bin. So let those vendors patch cgi.py to match their choice |
10 | | # of installation. |
| 1 | #! /opt/local/bin/python3.9 |
| 2 | |
| 3 | # NOTE: /usr/local/bin/python patched for MacPorts installation |
11 | 4 | |
12 | 5 | """Support module for CGI (Common Gateway Interface) scripts. |
13 | 6 | |
diff --git Lib/ctypes/macholib/dyld.py Lib/ctypes/macholib/dyld.py
index 1c3f8fd..cac41e6 100644
|
|
DEFAULT_FRAMEWORK_FALLBACK = [ |
28 | 28 | |
29 | 29 | DEFAULT_LIBRARY_FALLBACK = [ |
30 | 30 | os.path.expanduser("~/lib"), |
31 | | "/usr/local/lib", |
| 31 | "/opt/local/lib", |
32 | 32 | "/lib", |
33 | 33 | "/usr/lib", |
34 | 34 | ] |
diff --git Makefile.pre.in Makefile.pre.in
index f128444..85bde2b 100644
|
|
sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o |
629 | 629 | esac; \ |
630 | 630 | echo "$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ |
631 | 631 | _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ |
632 | | $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build"; \ |
| 632 | $(PYTHON_FOR_BUILD) $(srcdir)/setup.py --no-user-cfg $$quiet build"; \ |
633 | 633 | $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ |
634 | 634 | _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ |
635 | | $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build |
| 635 | $(PYTHON_FOR_BUILD) $(srcdir)/setup.py --no-user-cfg $$quiet build |
636 | 636 | |
637 | 637 | |
638 | 638 | # Build static library |
… |
… |
libainstall: @DEF_MAKE_RULE@ python-config |
1673 | 1673 | # Install the dynamically loadable modules |
1674 | 1674 | # This goes into $(exec_prefix) |
1675 | 1675 | sharedinstall: sharedmods |
1676 | | $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \ |
| 1676 | $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py --no-user-cfg install \ |
1677 | 1677 | --prefix=$(prefix) \ |
1678 | 1678 | --install-scripts=$(BINDIR) \ |
1679 | 1679 | --install-platlib=$(DESTSHARED) \ |
diff --git Modules/readline.c Modules/readline.c
index 12d6cc7..c1932da 100644
|
|
|
28 | 28 | |
29 | 29 | /* GNU readline definitions */ |
30 | 30 | #undef HAVE_CONFIG_H /* Else readline/chardefs.h includes strings.h */ |
31 | | #include <readline/readline.h> |
32 | | #include <readline/history.h> |
| 31 | #include <editline/readline.h> |
33 | 32 | |
34 | 33 | #ifdef HAVE_RL_COMPLETION_MATCHES |
35 | 34 | #define completion_matches(x, y) \ |
diff --git configure configure
index 2d379fe..d88fe6d 100755
|
|
if test "${enable_framework+set}" = set; then : |
3222 | 3222 | ;; |
3223 | 3223 | esac |
3224 | 3224 | |
| 3225 | FRAMEWORKINSTALLAPPSPREFIX="/Applications/MacPorts" |
| 3226 | |
3225 | 3227 | prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION |
3226 | 3228 | |
3227 | 3229 | # Add files for Mac specific code to the list of output |
… |
… |
$as_echo "$CC" >&6; } |
7467 | 7469 | then |
7468 | 7470 | case "$UNIVERSAL_ARCHS" in |
7469 | 7471 | 32-bit) |
7470 | | UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386" |
| 7472 | UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64" |
7471 | 7473 | LIPO_32BIT_FLAGS="" |
7472 | 7474 | ARCH_RUN_32BIT="" |
7473 | 7475 | ;; |
7474 | 7476 | 64-bit) |
7475 | | UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64" |
| 7477 | UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64" |
7476 | 7478 | LIPO_32BIT_FLAGS="" |
7477 | 7479 | ARCH_RUN_32BIT="true" |
7478 | 7480 | ;; |
7479 | 7481 | all) |
7480 | | UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64" |
7481 | | LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386" |
| 7482 | UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64" |
| 7483 | LIPO_32BIT_FLAGS="" |
7482 | 7484 | ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc" |
7483 | 7485 | ;; |
7484 | 7486 | universal2) |
… |
… |
$as_echo "$CC" >&6; } |
7487 | 7489 | ARCH_RUN_32BIT="true" |
7488 | 7490 | ;; |
7489 | 7491 | intel) |
7490 | | UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64" |
7491 | | LIPO_32BIT_FLAGS="-extract i386" |
| 7492 | UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64" |
| 7493 | LIPO_32BIT_FLAGS="" |
7492 | 7494 | ARCH_RUN_32BIT="/usr/bin/arch -i386" |
7493 | 7495 | ;; |
7494 | 7496 | intel-32) |
7495 | | UNIVERSAL_ARCH_FLAGS="-arch i386" |
| 7497 | UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64" |
7496 | 7498 | LIPO_32BIT_FLAGS="" |
7497 | 7499 | ARCH_RUN_32BIT="" |
7498 | 7500 | ;; |
7499 | 7501 | intel-64) |
7500 | | UNIVERSAL_ARCH_FLAGS="-arch x86_64" |
| 7502 | UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64" |
7501 | 7503 | LIPO_32BIT_FLAGS="" |
7502 | 7504 | ARCH_RUN_32BIT="true" |
7503 | 7505 | ;; |
7504 | 7506 | 3-way) |
7505 | | UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64" |
7506 | | LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386" |
| 7507 | UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64" |
| 7508 | LIPO_32BIT_FLAGS="" |
7507 | 7509 | ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc" |
7508 | 7510 | ;; |
7509 | 7511 | *) |
… |
… |
else |
11072 | 11074 | main() { |
11073 | 11075 | pthread_attr_t attr; |
11074 | 11076 | pthread_t id; |
11075 | | if (pthread_attr_init(&attr)) exit(-1); |
11076 | | if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1); |
11077 | | if (pthread_create(&id, &attr, foo, NULL)) exit(-1); |
11078 | | exit(0); |
| 11077 | if (pthread_attr_init(&attr)) return (-1); |
| 11078 | if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) return (-1); |
| 11079 | if (pthread_create(&id, &attr, foo, NULL)) return (-1); |
| 11080 | return (0); |
11079 | 11081 | } |
11080 | 11082 | _ACEOF |
11081 | 11083 | if ac_fn_c_try_run "$LINENO"; then : |
… |
… |
else |
15083 | 15085 | int main() |
15084 | 15086 | { |
15085 | 15087 | /* Success: exit code 0 */ |
15086 | | exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1); |
| 15088 | return ((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1); |
15087 | 15089 | } |
15088 | 15090 | |
15089 | 15091 | _ACEOF |
… |
… |
else |
15464 | 15466 | |
15465 | 15467 | int main() |
15466 | 15468 | { |
15467 | | exit(((-1)>>3 == -1) ? 0 : 1); |
| 15469 | return (((-1)>>3 == -1) ? 0 : 1); |
15468 | 15470 | } |
15469 | 15471 | |
15470 | 15472 | _ACEOF |
… |
… |
py_cv_lib_readline=no |
15541 | 15543 | $as_echo_n "checking how to link readline libs... " >&6; } |
15542 | 15544 | for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do |
15543 | 15545 | if test -z "$py_libtermcap"; then |
15544 | | READLINE_LIBS="-lreadline" |
| 15546 | READLINE_LIBS="-ledit" |
15545 | 15547 | else |
15546 | | READLINE_LIBS="-lreadline -l$py_libtermcap" |
| 15548 | READLINE_LIBS="-ledit -l$py_libtermcap" |
15547 | 15549 | fi |
15548 | 15550 | LIBS="$READLINE_LIBS $LIBS_no_readline" |
15549 | 15551 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
… |
… |
fi |
15589 | 15591 | # check for readline 2.2 |
15590 | 15592 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
15591 | 15593 | /* end confdefs.h. */ |
15592 | | #include <readline/readline.h> |
| 15594 | #include <editline/readline.h> |
15593 | 15595 | _ACEOF |
15594 | 15596 | if ac_fn_c_try_cpp "$LINENO"; then : |
15595 | 15597 | have_readline=yes |
… |
… |
if test $have_readline = yes |
15602 | 15604 | then |
15603 | 15605 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
15604 | 15606 | /* end confdefs.h. */ |
15605 | | #include <readline/readline.h> |
| 15607 | #include <editline/readline.h> |
15606 | 15608 | |
15607 | 15609 | _ACEOF |
15608 | 15610 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
… |
… |
rm -f conftest* |
15615 | 15617 | |
15616 | 15618 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
15617 | 15619 | /* end confdefs.h. */ |
15618 | | #include <readline/readline.h> |
| 15620 | #include <editline/readline.h> |
15619 | 15621 | |
15620 | 15622 | _ACEOF |
15621 | 15623 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
… |
… |
rm -f conftest* |
15629 | 15631 | fi |
15630 | 15632 | |
15631 | 15633 | # check for readline 4.0 |
15632 | | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5 |
15633 | | $as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; } |
| 15634 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -ledit" >&5 |
| 15635 | $as_echo_n "checking for rl_pre_input_hook in -ledit... " >&6; } |
15634 | 15636 | if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then : |
15635 | 15637 | $as_echo_n "(cached) " >&6 |
15636 | 15638 | else |
15637 | 15639 | ac_check_lib_save_LIBS=$LIBS |
15638 | | LIBS="-lreadline $READLINE_LIBS $LIBS" |
| 15640 | LIBS="-ledit $READLINE_LIBS $LIBS" |
15639 | 15641 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
15640 | 15642 | /* end confdefs.h. */ |
15641 | 15643 | |
… |
… |
fi |
15673 | 15675 | |
15674 | 15676 | |
15675 | 15677 | # also in 4.0 |
15676 | | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5 |
15677 | | $as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; } |
| 15678 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -ledit" >&5 |
| 15679 | $as_echo_n "checking for rl_completion_display_matches_hook in -ledit... " >&6; } |
15678 | 15680 | if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then : |
15679 | 15681 | $as_echo_n "(cached) " >&6 |
15680 | 15682 | else |
15681 | 15683 | ac_check_lib_save_LIBS=$LIBS |
15682 | | LIBS="-lreadline $READLINE_LIBS $LIBS" |
| 15684 | LIBS="-ledit $READLINE_LIBS $LIBS" |
15683 | 15685 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
15684 | 15686 | /* end confdefs.h. */ |
15685 | 15687 | |
… |
… |
fi |
15717 | 15719 | |
15718 | 15720 | |
15719 | 15721 | # also in 4.0, but not in editline |
15720 | | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5 |
15721 | | $as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; } |
| 15722 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -ledit" >&5 |
| 15723 | $as_echo_n "checking for rl_resize_terminal in -ledit... " >&6; } |
15722 | 15724 | if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then : |
15723 | 15725 | $as_echo_n "(cached) " >&6 |
15724 | 15726 | else |
15725 | 15727 | ac_check_lib_save_LIBS=$LIBS |
15726 | | LIBS="-lreadline $READLINE_LIBS $LIBS" |
| 15728 | LIBS="-ledit $READLINE_LIBS $LIBS" |
15727 | 15729 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
15728 | 15730 | /* end confdefs.h. */ |
15729 | 15731 | |
… |
… |
fi |
15761 | 15763 | |
15762 | 15764 | |
15763 | 15765 | # check for readline 4.2 |
15764 | | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5 |
15765 | | $as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; } |
| 15766 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -ledit" >&5 |
| 15767 | $as_echo_n "checking for rl_completion_matches in -ledit... " >&6; } |
15766 | 15768 | if ${ac_cv_lib_readline_rl_completion_matches+:} false; then : |
15767 | 15769 | $as_echo_n "(cached) " >&6 |
15768 | 15770 | else |
15769 | 15771 | ac_check_lib_save_LIBS=$LIBS |
15770 | | LIBS="-lreadline $READLINE_LIBS $LIBS" |
| 15772 | LIBS="-ledit $READLINE_LIBS $LIBS" |
15771 | 15773 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
15772 | 15774 | /* end confdefs.h. */ |
15773 | 15775 | |
… |
… |
fi |
15807 | 15809 | # also in readline 4.2 |
15808 | 15810 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
15809 | 15811 | /* end confdefs.h. */ |
15810 | | #include <readline/readline.h> |
| 15812 | #include <editline/readline.h> |
15811 | 15813 | _ACEOF |
15812 | 15814 | if ac_fn_c_try_cpp "$LINENO"; then : |
15813 | 15815 | have_readline=yes |
… |
… |
if test $have_readline = yes |
15820 | 15822 | then |
15821 | 15823 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
15822 | 15824 | /* end confdefs.h. */ |
15823 | | #include <readline/readline.h> |
| 15825 | #include <editline/readline.h> |
15824 | 15826 | |
15825 | 15827 | _ACEOF |
15826 | 15828 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
… |
… |
rm -f conftest* |
15833 | 15835 | |
15834 | 15836 | fi |
15835 | 15837 | |
15836 | | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5 |
15837 | | $as_echo_n "checking for append_history in -lreadline... " >&6; } |
| 15838 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -ledit" >&5 |
| 15839 | $as_echo_n "checking for append_history in -ledit... " >&6; } |
15838 | 15840 | if ${ac_cv_lib_readline_append_history+:} false; then : |
15839 | 15841 | $as_echo_n "(cached) " >&6 |
15840 | 15842 | else |
15841 | 15843 | ac_check_lib_save_LIBS=$LIBS |
15842 | | LIBS="-lreadline $READLINE_LIBS $LIBS" |
| 15844 | LIBS="-ledit $READLINE_LIBS $LIBS" |
15843 | 15845 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
15844 | 15846 | /* end confdefs.h. */ |
15845 | 15847 | |
… |
… |
else |
15934 | 15936 | /* end confdefs.h. */ |
15935 | 15937 | |
15936 | 15938 | #include <poll.h> |
| 15939 | #include <unistd.h> |
15937 | 15940 | |
15938 | 15941 | int main() |
15939 | 15942 | { |
… |
… |
cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
17063 | 17066 | volatile int val = 1; |
17064 | 17067 | int main() { |
17065 | 17068 | __atomic_load_n(&val, __ATOMIC_SEQ_CST); |
| 17069 | |
| 17070 | /* https://bugs.python.org/issue24844 */ |
| 17071 | #define VERSION_CHECK(cc_major, cc_minor, req_major, req_minor) \ |
| 17072 | ((cc_major) > (req_major) || \ |
| 17073 | (cc_major) == (req_major) && (cc_minor) >= (req_minor)) |
| 17074 | #if defined(__clang__) |
| 17075 | #if defined(__apple_build_version__) |
| 17076 | // either one test or the other should work |
| 17077 | // #if __apple_build_version__ < 5000000 |
| 17078 | #if !VERSION_CHECK(__clang_major__, __clang_minor__, 5, 0) |
| 17079 | #error |
| 17080 | #endif |
| 17081 | // not sure if this is 3.3 or 3.4 |
| 17082 | #elif !VERSION_CHECK(__clang_major__, __clang_minor__, 3, 3) |
| 17083 | #error |
| 17084 | #endif |
| 17085 | #endif |
| 17086 | |
17066 | 17087 | return 0; |
17067 | 17088 | } |
17068 | 17089 | |
diff --git setup.py setup.py
index bd5f736..3bee673 100644
|
|
from distutils.spawn import find_executable |
44 | 44 | TEST_EXTENSIONS = True |
45 | 45 | |
46 | 46 | # This global variable is used to hold the list of modules to be disabled. |
47 | | DISABLED_MODULE_LIST = [] |
| 47 | DISABLED_MODULE_LIST = ['_tkinter', '_gdbm'] |
48 | 48 | |
49 | 49 | |
50 | 50 | def get_platform(): |
… |
… |
class PyBuildExt(build_ext): |
728 | 728 | # Ensure that /usr/local is always used, but the local build |
729 | 729 | # directories (i.e. '.' and 'Include') must be first. See issue |
730 | 730 | # 10520. |
731 | | if not CROSS_COMPILING: |
732 | | add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') |
733 | | add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') |
734 | 731 | # only change this for cross builds for 3.3, issues on Mageia |
735 | 732 | if CROSS_COMPILING: |
736 | 733 | self.add_cross_compiling_paths() |
… |
… |
class PyBuildExt(build_ext): |
963 | 960 | |
964 | 961 | def detect_readline_curses(self): |
965 | 962 | # readline |
966 | | do_readline = self.compiler.find_library_file(self.lib_dirs, 'readline') |
| 963 | do_readline = self.compiler.find_library_file(self.lib_dirs, 'edit') |
967 | 964 | readline_termcap_library = "" |
968 | 965 | curses_library = "" |
969 | 966 | # Cannot use os.popen here in py3k. |
… |
… |
class PyBuildExt(build_ext): |
1033 | 1030 | else: |
1034 | 1031 | readline_extra_link_args = () |
1035 | 1032 | |
1036 | | readline_libs = ['readline'] |
| 1033 | readline_libs = ['edit'] |
1037 | 1034 | if readline_termcap_library: |
1038 | 1035 | pass # Issue 7384: Already linked against curses or tinfo. |
1039 | 1036 | elif curses_library: |
… |
… |
class PyBuildExt(build_ext): |
1981 | 1978 | # Rather than complicate the code below, detecting and building |
1982 | 1979 | # AquaTk is a separate method. Only one Tkinter will be built on |
1983 | 1980 | # Darwin - either AquaTk, if it is found, or X11 based Tk. |
1984 | | if (MACOS and self.detect_tkinter_darwin()): |
1985 | | return True |
| 1981 | self.announce("INFO: Not using Tcl/Tk", 2) |
| 1982 | return False |
1986 | 1983 | |
1987 | 1984 | # Assume we haven't found any of the libraries or include files |
1988 | 1985 | # The versions with dots are used on Unix, and the versions without |