diff options
-rw-r--r-- | cmake/modules/FindPython.cmake | 2 | ||||
-rw-r--r-- | tools/android/packaging/Makefile.in | 2 | ||||
-rw-r--r-- | tools/depends/Makefile.include.in | 2 | ||||
-rw-r--r-- | tools/depends/native/python3/01-distutil-flags.patch | 2 | ||||
-rw-r--r-- | tools/depends/native/python3/Makefile | 12 | ||||
-rw-r--r-- | tools/depends/native/python3/PYTHON3-VERSION | 7 | ||||
-rw-r--r-- | tools/depends/target/Makefile | 2 | ||||
-rw-r--r-- | tools/depends/target/python3/10-android-modules.patch | 11 | ||||
-rw-r--r-- | tools/depends/target/python3/10-linux-modules.patch | 11 | ||||
-rw-r--r-- | tools/depends/target/python3/10-osx-modules.patch | 11 | ||||
-rw-r--r-- | tools/depends/target/python3/Makefile | 34 | ||||
-rw-r--r-- | tools/depends/target/python3/PYTHON3-VERSION | 7 | ||||
-rw-r--r-- | tools/depends/target/python3/android.patch | 29 | ||||
-rw-r--r-- | tools/depends/target/python3/apple.patch | 14 | ||||
-rw-r--r-- | tools/depends/target/python3/crosscompile.patch | 29 | ||||
-rw-r--r-- | tools/depends/target/python3/darwin_embedded.patch | 273 | ||||
-rw-r--r-- | tools/depends/target/python3/modules.setup | 358 |
17 files changed, 303 insertions, 503 deletions
diff --git a/cmake/modules/FindPython.cmake b/cmake/modules/FindPython.cmake index b0c76808c7..782c0f51f6 100644 --- a/cmake/modules/FindPython.cmake +++ b/cmake/modules/FindPython.cmake @@ -37,7 +37,7 @@ if(KODI_DEPENDSBUILD if(KODI_DEPENDSBUILD) # Force set to tools/depends python version - set(PYTHON_VER 3.9) + set(PYTHON_VER 3.11) endif() endif() diff --git a/tools/android/packaging/Makefile.in b/tools/android/packaging/Makefile.in index 9c9ab0b02a..96e500cf8e 100644 --- a/tools/android/packaging/Makefile.in +++ b/tools/android/packaging/Makefile.in @@ -120,7 +120,7 @@ libs: $(PREFIX)/lib/@APP_NAME_LC@/lib@APP_NAME_LC@.so find $(DEPENDS_PATH)/share/kodi/addons -name "*.so" -exec cp -fp {} xbmc/obj/local/$(CPU)/ \; || true find $(DEPENDS_PATH)/lib/kodi/addons -name "*.so" -exec cp -fp {} xbmc/obj/local/$(CPU)/ \; || true find $(PREFIX)/lib/@APP_NAME_LC@/system -name "*.so" -exec cp -fp {} xbmc/obj/local/$(CPU)/ \; - DIR=${CURDIR}; cd $(PREFIX)/lib/python@PYTHON_VERSION@/site-packages; for i in `find Cryptodome -name \*.so` ; do FN=`echo $$i | cut -c1- | tr "/" "_" | sed -e 's/\.cpython-[0-9]\{2\}-x86_64-linux-gnu\./\./g'` ;cp $$i $$DIR/xbmc/obj/local/$(CPU)/$$FN ; done + DIR=${CURDIR}; cd $(PREFIX)/lib/python@PYTHON_VERSION@/site-packages; for i in `find Cryptodome -name \*.so` ; do FN=`echo $$i | cut -c1- | tr "/" "_" | sed -e 's/\.cpython-[0-9]\{2,3\}-.*\\./\./g'` ;cp $$i $$DIR/xbmc/obj/local/$(CPU)/$$FN ; done cd xbmc/obj/local/$(CPU)/; find . -name "*.so" -not -name "lib*.so" | sed "s/\.\///" | xargs -I@ mv @ lib@ cp -fp xbmc/obj/local/$(CPU)/*.so xbmc/lib/$(CPU)/ $(STRIP) --strip-unneeded xbmc/lib/$(CPU)/*.so diff --git a/tools/depends/Makefile.include.in b/tools/depends/Makefile.include.in index 6b45eca0f3..3a36d20d68 100644 --- a/tools/depends/Makefile.include.in +++ b/tools/depends/Makefile.include.in @@ -107,7 +107,7 @@ VERSION.TXT := $(CMAKE_SOURCE_DIR)/version.txt APP_NAME=$(shell awk '/APP_NAME/ {print tolower($$2)}' $(VERSION.TXT)) # Python related vars -PYTHON_VERSION=3.9 +PYTHON_VERSION=3.11 PYTHON_SITE_PKG=@prefix@/@deps_dir@/lib/python${PYTHON_VERSION}/site-packages ifeq ($(CPU), arm64) diff --git a/tools/depends/native/python3/01-distutil-flags.patch b/tools/depends/native/python3/01-distutil-flags.patch index fe83ebe333..28cd2f98ba 100644 --- a/tools/depends/native/python3/01-distutil-flags.patch +++ b/tools/depends/native/python3/01-distutil-flags.patch @@ -1,6 +1,6 @@ --- a/Lib/distutils/sysconfig.py +++ b/Lib/distutils/sysconfig.py -@@ -190,6 +190,9 @@ +@@ -214,6 +214,9 @@ (cc, cxx, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \ get_config_vars('CC', 'CXX', 'CFLAGS', 'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS') diff --git a/tools/depends/native/python3/Makefile b/tools/depends/native/python3/Makefile index d46ec62e9b..672f778c3d 100644 --- a/tools/depends/native/python3/Makefile +++ b/tools/depends/native/python3/Makefile @@ -3,10 +3,14 @@ PLATFORM=$(NATIVEPLATFORM) DEPS = ../../Makefile.include Makefile PYTHON3-VERSION ../../download-files.include \ 01-distutil-flags.patch -CWD=$(shell pwd) -HOSTPYTHONDIR=$(CWD)/$(PLATFORM)/hostpython +CONFIGURE=./configure --prefix=$(NATIVEPREFIX) \ + --disable-shared \ + --disable-framework \ + --without-pymalloc \ + --with-system-ffi + +NATIVE_SITEPACKAGES=$(NATIVEPREFIX)/lib/python$(PYTHON_VERSION)/site-packages -CONFIGURE=./configure --prefix=$(NATIVEPREFIX) --disable-shared --disable-framework --without-pymalloc --with-system-ffi ifeq ($(OS),linux) CONFIGURE += --with-system-expat endif @@ -30,6 +34,8 @@ $(LIBDYLIB): $(PLATFORM) .installed-$(PLATFORM): $(LIBDYLIB) cd $(PLATFORM); patch -p1 -i ../01-distutil-flags.patch cd $(PLATFORM); $(MAKE) install +# Sed patch setuptools that is installed via ensurepip as we cant patch the source + cd $(NATIVE_SITEPACKAGES); sed -ie "s|cflags = cflags + ' ' + os.environ\['CFLAGS'\]|cflags = os.environ\['CFLAGS'\]|" setuptools/_distutils/sysconfig.py touch $(LIBDYLIB) touch $@ diff --git a/tools/depends/native/python3/PYTHON3-VERSION b/tools/depends/native/python3/PYTHON3-VERSION index 5ebe12a1ab..35188cbe3d 100644 --- a/tools/depends/native/python3/PYTHON3-VERSION +++ b/tools/depends/native/python3/PYTHON3-VERSION @@ -1,5 +1,4 @@ LIBNAME=Python -VERSION=3.9.14 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.xz -SHA512=691a7814cf6c7bee96d8dbb7c5c85cb11f2e999101e20491b99435cdec07c3bbd5ce43ad3d9c64f695383b79197884caa1965c4346e4525e23b09c686271e4ab +VERSION=3.11.0 +ARCHIVE=$(LIBNAME)-$(VERSION).tar.xz +SHA512=314eef88ae0d68760f34d7a32f238fd2ecb27c50963baa7357c42ad8159026ec50229a0b31d83c39710a472904a06422afc082f9658a90a1dc83ccb74c08039d diff --git a/tools/depends/target/Makefile b/tools/depends/target/Makefile index 243479fdf9..284fff9df0 100644 --- a/tools/depends/target/Makefile +++ b/tools/depends/target/Makefile @@ -154,7 +154,7 @@ mariadb: openssl $(ICONV) $(ZLIB) mesa: libdrm meson-cross-file $(MESA_DEPS) nettle: gmp openssl: $(ZLIB) -python3: expat gettext libxml2 sqlite3 openssl libffi bzip2 xz +python3: expat gettext libxml2 sqlite3 openssl libffi bzip2 xz $(ICONV) pythonmodule-pil: bzip2 $(PYMODULE_DEPS) $(ZLIB) libjpeg-turbo libpng freetype2 python3 pythonmodule-setuptools pythonmodule-pycryptodome: $(PYMODULE_DEPS) python3 pythonmodule-setuptools pythonmodule-setuptools: $(PYMODULE_DEPS) python3 diff --git a/tools/depends/target/python3/10-android-modules.patch b/tools/depends/target/python3/10-android-modules.patch new file mode 100644 index 0000000000..d23366c31c --- /dev/null +++ b/tools/depends/target/python3/10-android-modules.patch @@ -0,0 +1,11 @@ +--- a/Modules/Setup.bootstrap.in ++++ b/Modules/Setup.bootstrap.in +@@ -26,7 +26,7 @@ + # commonly used core modules + _abc _abc.c + _functools _functoolsmodule.c +-_locale _localemodule.c ++#_locale _localemodule.c + _operator _operator.c + _stat _stat.c + _symtable symtablemodule.c diff --git a/tools/depends/target/python3/10-linux-modules.patch b/tools/depends/target/python3/10-linux-modules.patch new file mode 100644 index 0000000000..97753d9aa7 --- /dev/null +++ b/tools/depends/target/python3/10-linux-modules.patch @@ -0,0 +1,11 @@ +--- a/Modules/Setup ++++ b/Modules/Setup +@@ -182,7 +182,7 @@ + # Modules with some UNIX dependencies + + _posixsubprocess _posixsubprocess.c +-_posixshmem -I$(srcdir)/Modules/_multiprocessing _multiprocessing/posixshmem.c # -lrt # _posixshmem ++_posixshmem -I$(srcdir)/Modules/_multiprocessing _multiprocessing/posixshmem.c -lrt # _posixshmem + fcntl fcntlmodule.c + #grp grpmodule.c + #ossaudiodev ossaudiodev.c diff --git a/tools/depends/target/python3/10-osx-modules.patch b/tools/depends/target/python3/10-osx-modules.patch new file mode 100644 index 0000000000..8050f5ae5d --- /dev/null +++ b/tools/depends/target/python3/10-osx-modules.patch @@ -0,0 +1,11 @@ +--- a/Modules/Setup ++++ b/Modules/Setup +@@ -270,7 +270,7 @@ + + # macOS specific module, needs SystemConfiguration and CoreFoundation framework + # _scproxy _scproxy.c +-$(OSX_SCPROXY) ++_scproxy _scproxy.c -framework SystemConfiguration -framework CoreFoundation + + # Examples + diff --git a/tools/depends/target/python3/Makefile b/tools/depends/target/python3/Makefile index 6d9859a4ef..d6b427e35a 100644 --- a/tools/depends/target/python3/Makefile +++ b/tools/depends/target/python3/Makefile @@ -2,8 +2,10 @@ include ../../Makefile.include PYTHON3-VERSION ../../download-files.include DEPS = ../../Makefile.include Makefile PYTHON3-VERSION ../../download-files.include \ apple.patch \ crosscompile.patch \ - android.patch \ darwin_embedded.patch \ + 10-android-modules.patch \ + 10-linux-modules.patch \ + 10-osx-modules.patch \ modules.setup ifeq ($(findstring apple-darwin, $(HOST)), apple-darwin) @@ -15,8 +17,17 @@ ifeq ($(findstring apple-darwin, $(HOST)), apple-darwin) ac_cv_func_setpriority=no ac_cv_func_sendfile=no ac_cv_header_sched_h=no \ ac_cv_func_posix_spawn=no ac_cv_func_posix_spawnp=no \ ac_cv_func_forkpty=no ac_cv_lib_util_forkpty=no \ - ac_cv_func_getgroups=no + ac_cv_func_getgroups=no \ + ac_cv_func_system=no endif + # required for _localemodule + EXTRA_CONFIGURE+= ac_cv_lib_intl_textdomain=yes + # uses SDK ffi + EXTRA_CONFIGURE+= --with-system-ffi +endif + +ifeq ($(OS),android) + LDFLAGS+= -liconv endif ifeq ($(OS), linux) @@ -30,8 +41,13 @@ CONFIGURE=./configure --prefix=$(PREFIX) \ --disable-framework \ --without-pymalloc \ --enable-ipv6 \ + --with-build-python=$(NATIVEPREFIX)/bin/python3 \ + --with-system-expat=yes \ + --disable-test-modules \ + MODULE_BUILDTYPE=static \ $(EXTRA_CONFIGURE) +export LDFLAGS LIBDYLIB=$(PLATFORM)/libpython$(PYTHON_VERSION).a @@ -41,35 +57,31 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE) $(DEPS) rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM) cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) cd $(PLATFORM); patch -p1 -i ../crosscompile.patch - cd $(PLATFORM); patch -p1 -i ../android.patch cd $(PLATFORM); patch -p1 -i ../apple.patch ifeq ($(OS),darwin_embedded) cd $(PLATFORM); patch -p1 -i ../darwin_embedded.patch endif cp modules.setup $(PLATFORM)/Modules/Setup -#Add -liconv as needed, and add the _scproxy module for darwin -# disable locale altogether for Android ifeq ($(OS),android) - cd $(PLATFORM); sed -ie 's|_locale -DPy_BUILD_CORE_BUILTIN _localemodule.c -lintl \$$(LINK_ICONV)|#_locale -DPy_BUILD_CORE_BUILTIN _localemodule.c -lintl \$$(LINK_ICONV)|' Modules/Setup + cd $(PLATFORM); patch -p1 -i ../10-android-modules.patch endif ifeq ($(OS),linux) - # _posixshmem module requires librt for linux for SHM_OPEN/SHM_UNLINK - cd $(PLATFORM); sed -ie 's|# -lrt # _posixshmem|-lrt # _posixshmem|' Modules/Setup + cd $(PLATFORM); patch -p1 -i ../10-linux-modules.patch endif ifeq ($(OS),osx) - cd $(PLATFORM); sed -ie 's|\$$(OSX_SCPROXY)|_scproxy \$$(srcdir)/Modules/_scproxy.c -framework SystemConfiguration -framework CoreFoundation|' Modules/Setup + cd $(PLATFORM); patch -p1 -i ../10-osx-modules.patch endif cd $(PLATFORM); $(AUTORECONF) cd $(PLATFORM); $(CONFIGURE) $(LIBDYLIB): $(PLATFORM) - $(MAKE) -C $(PLATFORM) $(HOSTPLATFORM) PYTHON_FOR_BUILD=$(NATIVEPREFIX)/bin/python3 CROSS_COMPILE_TARGET=yes libpython$(PYTHON_VERSION).a + $(MAKE) -C $(PLATFORM) $(HOSTPLATFORM) CROSS_COMPILE_TARGET=yes libpython$(PYTHON_VERSION).a touch $@ .installed-$(PLATFORM): $(LIBDYLIB) - $(MAKE) -C $(PLATFORM) $(HOSTPLATFORM) PYTHON_FOR_BUILD=$(NATIVEPREFIX)/bin/python3 CROSS_COMPILE_TARGET=yes install + $(MAKE) -C $(PLATFORM) $(HOSTPLATFORM) CROSS_COMPILE_TARGET=yes install find $(PREFIX)/lib/python$(PYTHON_VERSION) -type f -name "*.pyc" -delete touch $(LIBDYLIB) touch $@ diff --git a/tools/depends/target/python3/PYTHON3-VERSION b/tools/depends/target/python3/PYTHON3-VERSION index 5ebe12a1ab..35188cbe3d 100644 --- a/tools/depends/target/python3/PYTHON3-VERSION +++ b/tools/depends/target/python3/PYTHON3-VERSION @@ -1,5 +1,4 @@ LIBNAME=Python -VERSION=3.9.14 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.xz -SHA512=691a7814cf6c7bee96d8dbb7c5c85cb11f2e999101e20491b99435cdec07c3bbd5ce43ad3d9c64f695383b79197884caa1965c4346e4525e23b09c686271e4ab +VERSION=3.11.0 +ARCHIVE=$(LIBNAME)-$(VERSION).tar.xz +SHA512=314eef88ae0d68760f34d7a32f238fd2ecb27c50963baa7357c42ad8159026ec50229a0b31d83c39710a472904a06422afc082f9658a90a1dc83ccb74c08039d diff --git a/tools/depends/target/python3/android.patch b/tools/depends/target/python3/android.patch deleted file mode 100644 index 0d72053d84..0000000000 --- a/tools/depends/target/python3/android.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- a/Modules/termios.c -+++ b/Modules/termios.c -@@ -239,6 +239,7 @@ - Py_RETURN_NONE; - } - -+#if !defined(__ANDROID__) - PyDoc_STRVAR(termios_tcdrain__doc__, - "tcdrain(fd) -> None\n\ - \n\ -@@ -257,6 +257,7 @@ - - Py_RETURN_NONE; - } -+#endif - - PyDoc_STRVAR(termios_tcflush__doc__, - "tcflush(fd, queue) -> None\n\ -@@ -310,8 +310,10 @@ - METH_VARARGS, termios_tcsetattr__doc__}, - {"tcsendbreak", termios_tcsendbreak, - METH_VARARGS, termios_tcsendbreak__doc__}, -+ #if !defined(__ANDROID__) - {"tcdrain", termios_tcdrain, - METH_VARARGS, termios_tcdrain__doc__}, -+ #endif - {"tcflush", termios_tcflush, - METH_VARARGS, termios_tcflush__doc__}, - {"tcflow", termios_tcflow, diff --git a/tools/depends/target/python3/apple.patch b/tools/depends/target/python3/apple.patch index b6e529f3d3..11dfdb710b 100644 --- a/tools/depends/target/python3/apple.patch +++ b/tools/depends/target/python3/apple.patch @@ -1,6 +1,6 @@ --- a/configure.ac +++ b/configure.ac -@@ -400,6 +400,9 @@ +@@ -545,6 +545,9 @@ *-*-cygwin*) ac_sys_system=Cygwin ;; @@ -10,7 +10,7 @@ *-*-vxworks*) ac_sys_system=VxWorks ;; -@@ -449,6 +449,8 @@ +@@ -600,6 +600,8 @@ *-*-cygwin*) _host_cpu= ;; @@ -19,16 +19,16 @@ *-*-vxworks*) _host_cpu=$host_cpu ;; -@@ -521,6 +521,8 @@ +@@ -675,6 +675,8 @@ define_xopen_source=no;; Darwin/@<:@[12]@:>@@<:@0-9@:>@.*) define_xopen_source=no;; + Darwin/*) + define_xopen_source=no;; - # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but - # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined - # or has another value. By not (re)defining it, the defaults come in place. -@@ -2492,7 +2492,7 @@ + # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from + # defining NI_NUMERICHOST. + QNX/6.3.2) +@@ -2909,7 +2909,7 @@ return 1; } } diff --git a/tools/depends/target/python3/crosscompile.patch b/tools/depends/target/python3/crosscompile.patch index ac43131593..bf9b4f6a26 100644 --- a/tools/depends/target/python3/crosscompile.patch +++ b/tools/depends/target/python3/crosscompile.patch @@ -1,6 +1,6 @@ --- a/configure.ac +++ b/configure.ac -@@ -1221,15 +1221,6 @@ +@@ -1589,15 +1589,6 @@ ARFLAGS="rcs" fi @@ -18,9 +18,9 @@ case $MACHDEP in --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -1695,10 +1695,11 @@ +@@ -2227,10 +2227,11 @@ # This goes into $(exec_prefix) - sharedinstall: sharedmods + sharedinstall: all $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \ + --skip-build \ --prefix=$(prefix) \ @@ -35,16 +35,7 @@ --- a/setup.py +++ b/setup.py -@@ -41,7 +41,7 @@ - - - # Compile extensions used to test Python? --TEST_EXTENSIONS = True -+TEST_EXTENSIONS = False - - # This global variable is used to hold the list of modules to be disabled. - DISABLED_MODULE_LIST = [] -@@ -58,7 +58,7 @@ +@@ -77,7 +77,7 @@ return sys.platform @@ -53,7 +44,7 @@ HOST_PLATFORM = get_platform() MS_WINDOWS = (HOST_PLATFORM == 'win32') CYGWIN = (HOST_PLATFORM == 'cygwin') -@@ -445,6 +445,7 @@ +@@ -488,6 +488,7 @@ self.compiler.set_executables(**args) def build_extensions(self): @@ -61,3 +52,13 @@ self.set_srcdir() self.set_compiler_executables() self.configure_compiler() +@@ -1343,7 +1343,7 @@ + # These are extensions are required to bootstrap the interpreter or + # build process. + self.detect_simple_extensions() +- self.detect_test_extensions() ++ #self.detect_test_extensions() + self.detect_readline_curses() + self.detect_crypt() + self.detect_openssl_hashlib() + diff --git a/tools/depends/target/python3/darwin_embedded.patch b/tools/depends/target/python3/darwin_embedded.patch index 92c4f2d043..6eb6ba4d4a 100644 --- a/tools/depends/target/python3/darwin_embedded.patch +++ b/tools/depends/target/python3/darwin_embedded.patch @@ -1,6 +1,17 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -6785,7 +6785,7 @@ + AS_CASE([$ac_sys_system], + [AIX], [PY_STDLIB_MOD_SET_NA([_scproxy], [spwd])], + [VxWorks*], [PY_STDLIB_MOD_SET_NA([_scproxy], [_crypt], [termios], [grp])], +- [Darwin], [PY_STDLIB_MOD_SET_NA([ossaudiodev], [spwd])], ++ [Darwin], [PY_STDLIB_MOD_SET_NA([ossaudiodev], [spwd], [_posixsubprocess], [_scproxy], [_tkinter], [_xxsubinterpreters])], + [CYGWIN*], [PY_STDLIB_MOD_SET_NA([_scproxy], [nis])], + [QNX*], [PY_STDLIB_MOD_SET_NA([_scproxy], [nis])], + [FreeBSD*], [PY_STDLIB_MOD_SET_NA([_scproxy], [spwd])], --- a/Lib/os.py +++ b/Lib/os.py -@@ -605,6 +605,7 @@ +@@ -604,6 +604,7 @@ fullname = path.join(dir, file) try: exec_func(fullname, *argrest) @@ -10,7 +21,7 @@ except OSError as e: --- a/Lib/platform.py +++ b/Lib/platform.py -@@ -615,7 +615,7 @@ +@@ -607,7 +607,7 @@ default in case the command should fail. """ @@ -21,68 +32,18 @@ --- a/Lib/subprocess.py +++ b/Lib/subprocess.py -@@ -762,6 +762,8 @@ - pass_fds=(), *, user=None, group=None, extra_groups=None, - encoding=None, errors=None, text=None, umask=-1): - """Create new Popen instance.""" -+ raise RuntimeError("Subprocesses are not supported on this platform.") -+ - _cleanup() - # Held while anything is calling waitpid before returncode has been - # updated to prevent clobbering returncode if wait() or poll() are -@@ -1046,6 +1048,7 @@ - if not self._child_created: - # We didn't get to successfully create a child process. - return -+ return - if self.returncode is None: - # Not reading subprocess exit status creates a zombie process which - # is only destroyed at the parent python process exit -@@ -1679,6 +1682,7 @@ - else: - args = list(args) - -+ shell = False - if shell: - # On Android the default shell is at '/system/bin/sh'. - unix_shell = ('/system/bin/sh' if -@@ -1762,6 +1766,7 @@ - gid, gids, uid, umask, - preexec_fn) - self._child_created = True -+ return - finally: - # be sure the FD is closed no matter what - os.close(errpipe_write) -@@ -1781,6 +1786,7 @@ - finally: - # be sure the FD is closed no matter what - os.close(errpipe_read) -+ return - - if errpipe_data: - try: -@@ -1834,7 +1840,7 @@ - else: - self.returncode = waitstatus_to_exitcode(sts) +@@ -75,7 +75,7 @@ + _mswindows = True -- def _internal_poll(self, _deadstate=None, _waitpid=os.waitpid, -+ def _internal_poll(self, _deadstate=None, _waitpid=None, - _WNOHANG=os.WNOHANG, _ECHILD=errno.ECHILD): - """Check if child process has terminated. Returns returncode - attribute. -@@ -1843,6 +1849,8 @@ - outside of the local scope (nor can any methods it calls). + # wasm32-emscripten and wasm32-wasi do not support processes +-_can_fork_exec = sys.platform not in {"emscripten", "wasi"} ++_can_fork_exec = sys.platform not in {"emscripten", "wasi", "darwin"} - """ -+ if _waitpid is None: -+ _waitpid = os.waitpid - if self.returncode is None: - if not self._waitpid_lock.acquire(False): - # Something else is busy calling waitpid. Don't allow two + if _mswindows: + import _winapi --- a/Lib/urllib/request.py +++ b/Lib/urllib/request.py -@@ -2617,11 +2617,9 @@ +@@ -2624,11 +2624,9 @@ if sys.platform == 'darwin': @@ -95,7 +56,7 @@ def getproxies_macosx_sysconf(): """Return a dictionary of scheme -> proxy server URL mappings. -@@ -2629,7 +2627,7 @@ +@@ -2636,7 +2636,7 @@ This function uses the MacOSX framework SystemConfiguration to fetch the proxy information. """ @@ -104,7 +65,7 @@ -@@ -2642,9 +2640,9 @@ +@@ -2649,9 +2649,9 @@ """ proxies = getproxies_environment() if proxies: @@ -118,74 +79,33 @@ return getproxies_environment() or getproxies_macosx_sysconf() --- a/Modules/_posixsubprocess.c +++ b/Modules/_posixsubprocess.c -@@ -100,6 +100,9 @@ - return 0; - } +@@ -71,6 +71,10 @@ + #define MAX_GROUPS 64 + #endif +#if defined(__APPLE__) +#include <TargetConditionals.h> +#endif - - /* Convert ASCII to a positive int, no libc call. no overflow. -1 on error. */ - static int -@@ -456,14 +459,14 @@ - goto error; - - /* Close parent's pipe ends. */ -- if (p2cwrite != -1) -+/* if (p2cwrite != -1) - POSIX_CALL(close(p2cwrite)); - if (c2pread != -1) - POSIX_CALL(close(c2pread)); - if (errread != -1) - POSIX_CALL(close(errread)); - POSIX_CALL(close(errpipe_read)); -- -+*/ - /* When duping fds, if there arises a situation where one of the fds is - either 0, 1 or 2, it is possible that it is overwritten (#12607). */ - if (c2pwrite == 0) { -@@ -508,6 +511,8 @@ - /* We no longer manually close p2cread, c2pwrite, and errwrite here as - * _close_open_fds takes care when it is not already non-inheritable. */ - -+ const char *currentDir = getcwd(NULL, 0); + - if (cwd) - POSIX_CALL(chdir(cwd)); + #define POSIX_CALL(call) do { if ((call) == -1) goto error; } while (0) -@@ -552,13 +557,13 @@ - errno = 0; /* We don't want to report an OSError. */ - goto error; - } -- /* Py_DECREF(result); - We're about to exec so why bother? */ -+ Py_DECREF(result); /* - We're about to exec so why bother? */ - } - - /* close FDs after executing preexec_fn, which might open FDs */ - if (close_fds) { - /* TODO HP-UX could use pstat_getproc() if anyone cares about it. */ -- _close_open_fds(3, py_fds_to_keep); -+// _close_open_fds(3, py_fds_to_keep); - } - - /* This loop matches the Lib/os.py _execvpe()'s PATH search when */ -@@ -567,20 +572,34 @@ + static struct PyModuleDef _posixsubprocessmodule; +@@ -661,14 +665,25 @@ for (i = 0; exec_array[i] != NULL; ++i) { const char *executable = exec_array[i]; if (envp) { +- execve(executable, argv, envp); +#if defined(TARGET_OS_TV) + saved_errno = ENOTSUP; +#elif defined(TARGET_OS_IOS) - execve(executable, argv, envp); + saved_errno = execve(executable, argv, envp); +#endif + break; } else { +- execv(executable, argv); +#if defined(TARGET_OS_TV) + saved_errno = ENOTSUP; +#elif defined(TARGET_OS_IOS) - execv(executable, argv); + saved_errno = execv(executable, argv); +#endif + break; @@ -198,101 +118,54 @@ /* Report the first exec error, not the last. */ if (saved_errno) errno = saved_errno; +@@ -751,7 +766,12 @@ + } else + #endif + { ++#if defined(TARGET_OS_TV) ++ pid = -1; ++ errno = ENOTSUP; ++#else + pid = fork(); ++#endif + } + + if (pid != 0) { +@@ -763,6 +783,7 @@ + * the code below. + */ + ++#if !defined(TARGET_OS_TV) + if (preexec_fn != Py_None) { + /* We'll be calling back into Python later so we need to do this. + * This call may not be async-signal-safe but neither is calling +@@ -779,6 +800,7 @@ + call_setuid, uid, child_umask, child_sigmask, + py_fds_to_keep, preexec_fn, preexec_fn_args_tuple); + _exit(255); ++#endif + return 0; /* Dead code to avoid a potential compiler warning. */ + } - error: - saved_errno = errno; -+ chdir(currentDir); - /* Report the posix error to our parent process. */ - /* We ignore all write() return values as the total size of our writes is - less than PIPEBUF and we cannot do anything about an error anyways. -@@ -837,11 +856,12 @@ +@@ -990,8 +1012,10 @@ preexec_fn_args_tuple = PyTuple_New(0); if (!preexec_fn_args_tuple) goto cleanup; -- PyOS_BeforeFork(); -+// PyOS_BeforeFork(); ++#if !defined(TARGET_OS_TV) + PyOS_BeforeFork(); need_after_fork = 1; ++#endif } -- pid = fork(); -+ pid = -1; -+ errno = ENOTSUP; - if (pid == 0) { - /* Child process */ - /* -@@ -855,7 +875,7 @@ - * This call may not be async-signal-safe but neither is calling - * back into Python. The user asked us to use hope as a strategy - * to avoid deadlock... */ -- PyOS_AfterFork_Child(); -+// PyOS_AfterFork_Child(); - } - - child_exec(exec_array, argv, envp, cwd, -@@ -876,8 +896,8 @@ - - Py_XDECREF(cwd_obj2); + /* NOTE: When old_sigmask is non-NULL, do_fork_exec() may use vfork(). */ +@@ -1051,8 +1073,10 @@ + } + #endif -- if (need_after_fork) -- PyOS_AfterFork_Parent(); -+// if (need_after_fork) -+// PyOS_AfterFork_Parent(); - if (envp) - _Py_FreeCharPArray(envp); - if (argv) ---- a/Modules/getpath.c -+++ b/Modules/getpath.c -@@ -935,8 +935,10 @@ - will fail if a relative path was used. but in that case, - absolutize() should help us out below - */ -- if (_NSGetExecutablePath(execpath, &nsexeclength) != 0 -- || (wchar_t)execpath[0] != SEP) -+ char *iospath = Py_GETENV("PYTHONHOME"); -+ char *prog = Py_GETENV("PYTHONEXECUTABLE"); -+ sprintf(execpath, "%s/bin/%s", iospath, prog); -+ if (execpath[0] != SEP) - { - /* _NSGetExecutablePath() failed or the path is relative */ - return _PyStatus_OK(); ---- a/Modules/posixmodule.c -+++ b/Modules/posixmodule.c -@@ -313,8 +313,8 @@ - # else - /* Unix functions that the configure script doesn't check for */ - # ifndef __VXWORKS__ --# define HAVE_EXECV 1 --# define HAVE_FORK 1 -+//# define HAVE_EXECV 0 -+//# define HAVE_FORK 0 - # if defined(__USLC__) && defined(__SCO_VERSION__) /* SCO UDK Compiler */ - # define HAVE_FORK1 1 - # endif -@@ -327,8 +327,8 @@ - # define HAVE_KILL 1 - # define HAVE_OPENDIR 1 - # define HAVE_PIPE 1 --# define HAVE_SYSTEM 1 --# define HAVE_WAIT 1 -+//# define HAVE_SYSTEM 0 -+//# define HAVE_WAIT 0 - # define HAVE_TTYNAME 1 - # endif /* _MSC_VER */ - #endif /* ! __WATCOMC__ || __QNX__ */ ---- a/Include/intrcheck.h -+++ b/Include/intrcheck.h -@@ -7,13 +7,13 @@ ++#if !defined(TARGET_OS_TV) + if (need_after_fork) + PyOS_AfterFork_Parent(); ++#endif - PyAPI_FUNC(int) PyOS_InterruptOccurred(void); - PyAPI_FUNC(void) PyOS_InitInterrupts(void); --#ifdef HAVE_FORK -+//#ifdef HAVE_FORK - #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03070000 - PyAPI_FUNC(void) PyOS_BeforeFork(void); - PyAPI_FUNC(void) PyOS_AfterFork_Parent(void); - PyAPI_FUNC(void) PyOS_AfterFork_Child(void); - #endif --#endif -+//#endif - /* Deprecated, please use PyOS_AfterFork_Child() instead */ - Py_DEPRECATED(3.7) PyAPI_FUNC(void) PyOS_AfterFork(void); + cleanup: + if (saved_errno != 0) { diff --git a/tools/depends/target/python3/modules.setup b/tools/depends/target/python3/modules.setup index a48241752b..01d6293a6f 100644 --- a/tools/depends/target/python3/modules.setup +++ b/tools/depends/target/python3/modules.setup @@ -38,7 +38,18 @@ # # <name> = <value> # -# which defines a Make variable definition inserted into Makefile.in +# which defines a Make variable definition inserted into Makefile.in. +# You can also use any Make variable that is detected by configure and +# defined in Makefile.pre.in, e.g. OpenSSL flags $(OPENSSL_INCLUDES). +# +# Rules generated by makesetup use additional variables: +# +# - All source file rules have a dependency on $(PYTHON_HEADERS) and on +# optional variable $(MODULES_{mod_upper}_DEPS). +# - If no <cpparg> and no <library> arguments are given, then makesetup +# defaults to $(MODULES_{mod_upper}_CFLAGS) cppargs and +# $(MODULES_{mod_upper}_LDFLAGS) libraries. The variables are typically +# defined by configure. # # The build process works like this: # @@ -62,9 +73,14 @@ # *noconfig* has the same effect as *shared*.) # # NOTE: As a standard policy, as many modules as can be supported by a -# platform should be present. The distribution comes with all modules -# enabled that are supported by most platforms and don't require you -# to ftp sources from elsewhere. +# platform should be listed below. The distribution comes with all +# modules enabled that are supported by most platforms and don't +# require you to download sources from elsewhere. +# +# NOTE: Avoid editing this file directly. Local changes should go into +# Modules/Setup.local file. To enable all modules for testing, run +# +# sed -n -E 's/^#([a-z_\*].*)$/\1/p' Modules/Setup > Modules/Setup.local # Some special rules to define PYTHONPATH. @@ -94,61 +110,17 @@ COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH) PYTHONPATH=$(COREPYTHONPATH) -# The modules listed here can't be built as shared libraries for -# various reasons; therefore they are listed here instead of in the -# normal order. - -# This only contains the minimal set of modules required to run the -# setup.py script in the root of the Python source tree. - -posix -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal posixmodule.c # posix (UNIX) system calls -errno errnomodule.c # posix (UNIX) errno values -pwd pwdmodule.c # this is needed to find out the user's home dir - # if $HOME is not set -_sre _sre.c # Fredrik Lundh's new regular expressions -_codecs _codecsmodule.c # access to the builtin codecs and codec registry -_weakref _weakref.c # weak references -_functools -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal _functoolsmodule.c # Tools for working with functions and callable objects -_operator _operator.c # operator.add() and similar goodies -_collections _collectionsmodule.c # Container types -_abc _abc.c -DPy_BUILD_CORE_MODULE # Abstract base classes -itertools itertoolsmodule.c # Functions creating iterators for efficient looping -atexit atexitmodule.c # Register functions to be run at interpreter-shutdown -_signal -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal signalmodule.c -_stat _stat.c # stat.h interface -time -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal timemodule.c # -lm # time operations and variables -_thread -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal _threadmodule.c # low-level threading interface - -# access to ISO C locale support -_locale -DPy_BUILD_CORE_BUILTIN _localemodule.c -lintl $(LINK_ICONV) - -# Standard I/O baseline -_io -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal -I$(srcdir)/Modules/_io _io/_iomodule.c _io/iobase.c _io/fileio.c _io/bytesio.c _io/bufferedio.c _io/textio.c _io/stringio.c - -# faulthandler module -faulthandler faulthandler.c - -# debug tool to trace memory blocks allocated by Python -# -# bpo-35053: The module must be builtin since _Py_NewReference() -# can call _PyTraceMalloc_NewReference(). -_tracemalloc _tracemalloc.c - -# PEG-based parser module -- slated to be *the* parser -_peg_parser _peg_parser.c +# --- +# Built-in modules required to get a functioning interpreter are listed in +# Modules/Setup.bootstrap. +# --- # The rest of the modules listed in this file are all commented out by # default. Usually they can be detected and built as dynamically -# loaded modules by the new setup.py script added in Python 2.1. If -# you're on a platform that doesn't support dynamic loading, want to -# compile modules statically into the Python binary, or need to -# specify some odd set of compiler switches, you can uncomment the -# appropriate lines below. - -# ====================================================================== - -# The Python symtable module depends on .h files that setup.py doesn't track -_symtable symtablemodule.c +# loaded modules by setup.py. If you're on a platform that doesn't +# support dynamic loading, want to compile modules statically into the +# Python binary, or need to specify some odd set of compiler switches, +# you can uncomment the appropriate lines below. # Uncommenting the following line tells makesetup that all following # modules are to be built as shared libraries (see above for more @@ -156,113 +128,100 @@ _symtable symtablemodule.c #*shared* -# GNU readline. Unlike previous Python incarnations, GNU readline is -# now incorporated in an optional module, configured in the Setup file -# instead of by a configure script switch. You may have to insert a -# -L option pointing to the directory where libreadline.* lives, -# and you may have to change -ltermcap to -ltermlib or perhaps remove -# it, depending on your system -- see the GNU readline instructions. -# It's okay for this to be a shared library, too. +# Modules that should always be present (POSIX and Windows): -#readline readline.c -lreadline -ltermcap - - -# Modules that should always be present (non UNIX dependent): - -array arraymodule.c -DPy_BUILD_CORE_MODULE # array objects -cmath cmathmodule.c _math.c -DPy_BUILD_CORE_MODULE # -lm # complex math library functions -math mathmodule.c _math.c -DPy_BUILD_CORE_MODULE # -lm # math library functions, e.g. sin() -_contextvars _contextvarsmodule.c # Context Variables -_struct _struct.c # binary structure packing/unpacking -_weakref _weakref.c # basic weak reference support -#_testcapi _testcapimodule.c # Python C API test module -#_testinternalcapi _testinternalcapi.c -I$(srcdir)/Include/internal -DPy_BUILD_CORE_MODULE # Python internal C API test module -_random _randommodule.c -DPy_BUILD_CORE_MODULE # Random number generator -_elementtree -I$(prefix)/include -L$(prefix)/lib -lexpat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI _elementtree.c # elementtree accelerator -_pickle _pickle.c -DPy_BUILD_CORE_MODULE # pickle accelerator -_datetime _datetimemodule.c -DPy_BUILD_CORE_MODULE # datetime accelerator -_zoneinfo _zoneinfo.c -DPy_BUILD_CORE_MODULE # zoneinfo accelerator -_bisect _bisectmodule.c # Bisection algorithms -_heapq _heapqmodule.c -DPy_BUILD_CORE_MODULE # Heap queue algorithm -_asyncio _asynciomodule.c -DPy_BUILD_CORE_MODULE # Fast asyncio Future -_json -I$(srcdir)/Include/internal -DPy_BUILD_CORE_BUILTIN _json.c # _json speedups -_statistics _statisticsmodule.c # statistics accelerator - -unicodedata unicodedata.c -DPy_BUILD_CORE_MODULE # static Unicode character database - - -# Modules with some UNIX dependencies -- on by default: -# (If you have a really backward UNIX, select and socket may not be -# supported...) - -fcntl fcntlmodule.c # fcntl(2) and ioctl(2) -#spwd spwdmodule.c # spwd(3) -#grp grpmodule.c # grp(3) -select selectmodule.c # select(2); not on ancient System V - -# Memory-mapped files (also works on Win32). -mmap mmapmodule.c - -# CSV file helper +_asyncio _asynciomodule.c +_bisect _bisectmodule.c +_contextvars _contextvarsmodule.c _csv _csv.c - -# Socket module helper for socket(2) +_datetime _datetimemodule.c +# _decimal _decimal/_decimal.c +_heapq _heapqmodule.c +_json _json.c +_lsprof _lsprof.c rotatingtree.c +_multiprocessing -I$(srcdir)/Modules/_multiprocessing _multiprocessing/multiprocessing.c _multiprocessing/semaphore.c +_opcode _opcode.c +_pickle _pickle.c +_queue _queuemodule.c +_random _randommodule.c _socket socketmodule.c +_statistics _statisticsmodule.c +_struct _struct.c +_typing _typingmodule.c +_zoneinfo _zoneinfo.c +array arraymodule.c +#audioop audioop.c +binascii binascii.c +cmath cmathmodule.c +math mathmodule.c +mmap mmapmodule.c +select selectmodule.c -# Socket module helper for SSL support; you must comment out the other -# socket line above, and possibly edit the SSL variable: -SSL=$(prefix) -_ssl _ssl.c \ - -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \ - -L$(SSL)/lib -lssl -lcrypto - -# The crypt module is now disabled by default because it breaks builds -# on many systems (where -lcrypt is needed), e.g. Linux (I believe). - -#_crypt _cryptmodule.c # -lcrypt # crypt(3); needs -lcrypt on some systems - - -# Some more UNIX dependent modules -- off by default, since these -# are not supported by all UNIX systems: - -#nis nismodule.c -lnsl # Sun yellow pages -- not everywhere -termios termios.c # Steen Lumholt's termios module -resource resource.c # Jeremy Hylton's rlimit interface +# XML +_elementtree _elementtree.c +pyexpat pyexpat.c -_posixsubprocess _posixsubprocess.c -DPy_BUILD_CORE_MODULE # POSIX subprocess module helper +# hashing builtins +_blake2 _blake2/blake2module.c _blake2/blake2b_impl.c _blake2/blake2s_impl.c +_md5 md5module.c +_sha1 sha1module.c +_sha256 sha256module.c +_sha512 sha512module.c +_sha3 _sha3/sha3module.c -# Multimedia modules -- off by default. -# These don't work for 64-bit platforms!!! -# #993173 says audioop works on 64-bit platforms, though. -# These represent audio samples or images as strings: +# text encodings and unicode +_codecs_cn cjkcodecs/_codecs_cn.c +_codecs_hk cjkcodecs/_codecs_hk.c +_codecs_iso2022 cjkcodecs/_codecs_iso2022.c +_codecs_jp cjkcodecs/_codecs_jp.c +_codecs_kr cjkcodecs/_codecs_kr.c +_codecs_tw cjkcodecs/_codecs_tw.c +_multibytecodec cjkcodecs/multibytecodec.c +unicodedata unicodedata.c -#audioop audioop.c # Operations on audio samples +# Modules with some UNIX dependencies +_posixsubprocess _posixsubprocess.c +_posixshmem -I$(srcdir)/Modules/_multiprocessing _multiprocessing/posixshmem.c # -lrt # _posixshmem +fcntl fcntlmodule.c +#grp grpmodule.c +#ossaudiodev ossaudiodev.c +resource resource.c +#spwd spwdmodule.c +#syslog syslogmodule.c +termios termios.c -# Note that the _md5 and _sha modules are normally only built if the -# system does not have the OpenSSL libs containing an optimized version. +# Modules with UNIX dependencies that require external libraries -# The _md5 module implements the RSA Data Security, Inc. MD5 -# Message-Digest Algorithm, described in RFC 1321. +#_crypt _cryptmodule.c -lcrypt +#nis nismodule.c -I/usr/include/tirpc -lnsl -ltirpc -_md5 md5module.c +# Modules that require external libraries. +_bz2 _bz2module.c -lbz2 +_ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/stgdict.c _ctypes/cfield.c -I$(prefix)/include -L$(prefix)/lib -ldl -lffi -DHAVE_FFI_PREP_CIF_VAR -DHAVE_FFI_PREP_CLOSURE_LOC -DHAVE_FFI_CLOSURE_ALLOC +# The _dbm module supports NDBM, GDBM with compat module, and Berkeley DB. +#_dbm _dbmmodule.c -lgdbm_compat -DUSE_GDBM_COMPAT +#_gdbm _gdbmmodule.c -lgdbm +_lzma _lzmamodule.c -llzma +#_uuid _uuidmodule.c -luuid +zlib zlibmodule.c -lz -# The _sha module implements the SHA checksum algorithms. -# (NIST's Secure Hash Algorithms.) -_sha1 sha1module.c -_sha256 sha256module.c -DPy_BUILD_CORE_BUILTIN -_sha512 sha512module.c -DPy_BUILD_CORE_BUILTIN -_sha3 _sha3/sha3module.c +_sqlite3 _sqlite/blob.c _sqlite/connection.c _sqlite/cursor.c _sqlite/microprotocols.c _sqlite/module.c _sqlite/prepare_protocol.c _sqlite/row.c _sqlite/statement.c _sqlite/util.c -lsqlite3 -# _blake module -_blake2 _blake2/blake2module.c _blake2/blake2b_impl.c _blake2/blake2s_impl.c +# The readline module also supports libeditline (-leditline). +# Some systems may require -ltermcap or -ltermlib. +#readline readline.c -lreadline -ltermcap -# _multiprocessing module -_multiprocessing _multiprocessing/multiprocessing.c _multiprocessing/semaphore.c +# OpenSSL bindings +#_ssl _ssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) $(OPENSSL_LIBS) +#_hashlib _hashopenssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) -lcrypto -# _posixshmem module does not run on android platform due to missing primitives shm_open/shm_unlink -_posixshmem _multiprocessing/posixshmem.c -I$(srcdir)/Modules/_multiprocessing # -lrt # _posixshmem +# To statically link OpenSSL: + _ssl _ssl.c -I$(prefix)/include -I$(prefix)/include/openssl \ + -L$(prefix)/lib -lintl -lssl -lcrypto + _hashlib _hashopenssl.c -I$(prefix)/include -I$(prefix)/include/openssl \ + -L$(prefix)/lib # The _tkinter module. # @@ -276,7 +235,7 @@ _posixshmem _multiprocessing/posixshmem.c -I$(srcdir)/Modules/_multiprocessing # # every system. # *** Always uncomment this (leave the leading underscore in!): -# _tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \ +#_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT $(TCLTK_INCLUDES) $(TCLTK_LIBS) \ # *** Uncomment and edit to reflect where your Tcl/Tk libraries are: # -L/usr/local/lib \ # *** Uncomment and edit to reflect where your Tcl/Tk headers are: @@ -294,8 +253,6 @@ _posixshmem _multiprocessing/posixshmem.c -I$(srcdir)/Modules/_multiprocessing # # -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \ # *** Uncomment and edit for TOGL extension only: # -DWITH_TOGL togl.c \ -# *** Uncomment and edit to reflect your Tcl/Tk versions: -# -ltk8.2 -ltcl8.2 \ # *** Uncomment and edit to reflect where your X11 libraries are: # -L/usr/X11R6/lib \ # *** Or uncomment this for Solaris: @@ -307,92 +264,41 @@ _posixshmem _multiprocessing/posixshmem.c -I$(srcdir)/Modules/_multiprocessing # # *** Always uncomment this; X11 libraries to link with: # -lX11 -# Lance Ellinghaus's syslog module -#syslog syslogmodule.c # syslog daemon interface - - -# Curses support, requiring the System V version of curses, often -# provided by the ncurses library. e.g. on Linux, link with -lncurses -# instead of -lcurses). - -#_curses _cursesmodule.c -lcurses -ltermcap -# Wrapper for the panel library that's part of ncurses and SYSV curses. -#_curses_panel _curses_panel.c -lpanel -lncurses - - -# Modules that provide persistent dictionary-like semantics. You will -# probably want to arrange for at least one of them to be available on -# your machine, though none are defined by default because of library -# dependencies. The Python module dbm/__init__.py provides an -# implementation independent wrapper for these; dbm/dumb.py provides -# similar functionality (but slower of course) implemented in Python. - -#_dbm _dbmmodule.c # dbm(3) may require -lndbm or similar - -# Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm: - -#_gdbm _gdbmmodule.c -I/usr/local/include -L/usr/local/lib -lgdbm - - -# Helper module for various ascii-encoders -binascii binascii.c - -# Fred Drake's interface to the Python parser -parser parsermodule.c - -# profiling -_lsprof _lsprof.c rotatingtree.c -DPy_BUILD_CORE_MODULE +# Some system have -lcurses +#_curses -lncurses -lncursesw -ltermcap _cursesmodule.c +#_curses_panel -lpanel -lncurses _curses_panel.c -# Andrew Kuchling's zlib module. -# This require zlib 1.1.3 (or later). -# See http://www.gzip.org/zlib/ -zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz - -# Interface to the Expat XML parser -# More information on Expat can be found at www.libexpat.org. -# -pyexpat pyexpat.c -I$(prefix)/include -L$(prefix)/lib -lexpat -DHAVE_EXPAT_CONFIG_H -DXML_POOR_ENTROPY -DUSE_PYEXPAT_CAPI - -# Hye-Shik Chang's CJKCodecs - -# multibytecodec is required for all the other CJK codec modules -_multibytecodec cjkcodecs/multibytecodec.c - -_codecs_cn cjkcodecs/_codecs_cn.c -_codecs_hk cjkcodecs/_codecs_hk.c -_codecs_iso2022 cjkcodecs/_codecs_iso2022.c -_codecs_jp cjkcodecs/_codecs_jp.c -_codecs_kr cjkcodecs/_codecs_kr.c -_codecs_tw cjkcodecs/_codecs_tw.c - -# Example -- included for reference only: -# xx xxmodule.c +# macOS specific module, needs SystemConfiguration and CoreFoundation framework +# _scproxy _scproxy.c +$(OSX_SCPROXY) -# Another example -- the 'xxsubtype' module shows C-level subtyping in action -xxsubtype xxsubtype.c +# Examples -SQLITEDEFINES='-DMODULE_NAME="sqlite3"' -_sqlite3 _sqlite/connection.c \ - _sqlite/cursor.c _sqlite/microprotocols.c _sqlite/prepare_protocol.c \ - _sqlite/row.c _sqlite/statement.c _sqlite/module.c _sqlite/util.c _sqlite/cache.c \ - -I$(prefix)/include -L$(prefix)/lib -lsqlite3 $(SQLITEDEFINES) +#xx xxmodule.c +#xxlimited xxlimited.c +#xxlimited_35 xxlimited_35.c +xxsubtype xxsubtype.c # Required for the test suite to pass! -_ctypes _ctypes/callbacks.c _ctypes/callproc.c _ctypes/cfield.c _ctypes/_ctypes.c \ - _ctypes/stgdict.c -DPy_BUILD_CORE_MODULE \ - -I$(prefix)/include/ffi -L$(prefix)/lib -lffi +# Testing -_queue _queuemodule.c -DPy_BUILD_CORE_MODULE +#_xxsubinterpreters _xxsubinterpretersmodule.c +#_xxtestfuzz _xxtestfuzz/_xxtestfuzz.c _xxtestfuzz/fuzzer.c +#_testbuffer _testbuffer.c +#_testinternalcapi _testinternalcapi.c -_bz2 _bz2module.c -I$(prefix)/include -L$(prefix)/lib -lbz2 -_lzma _lzmamodule.c -I$(prefix)/include -L$(prefix)/lib -llzma +# Some testing modules MUST be built as shared libraries. -# scproxy module only for osx -$(OSX_SCPROXY) +#*shared* +#_ctypes_test _ctypes/_ctypes_test.c +#_testcapi _testcapimodule.c +#_testimportmultiple _testimportmultiple.c +#_testmultiphase _testmultiphase.c +# --- # Uncommenting the following line tells makesetup that all following modules # are not built (see above for more detail). # #*disabled* # -#_sqlite3 _tkinter _curses pyexpat -#_codecs_jp _codecs_kr _codecs_tw unicodedata +# _tkinter _curses +# _codecs_jp _codecs_kr _codecs_tw |