diff --git a/lib/cmake/OpenSSL/OpenSSLConfig.cmake b/lib/cmake/OpenSSL/OpenSSLConfig.cmake new file mode 100644 index 0000000000000000000000000000000000000000..baba54fd83fd0964b613183df443ef20ceb8cdd7 --- /dev/null +++ b/lib/cmake/OpenSSL/OpenSSLConfig.cmake @@ -0,0 +1,147 @@ +# Generated by OpenSSL +# + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Avoid duplicate find_package() +set(_ossl_expected_targets OpenSSL::Crypto OpenSSL::SSL + ) +set(_ossl_defined_targets) +set(_ossl_undefined_targets) +foreach(t IN LISTS _ossl_expected_targets) + if(TARGET "${t}") + LIST(APPEND _ossl_defined_targets "${t}") + else() + LIST(APPEND _ossl_undefined_targets "${t}") + endif() +endforeach() +message(DEBUG "_ossl_expected_targets = ${_ossl_expected_targets}") +message(DEBUG "_ossl_defined_targets = ${_ossl_defined_targets}") +message(DEBUG "_ossl_undefined_targets = ${_ossl_undefined_targets}") +if(NOT _ossl_undefined_targets) + # All targets are defined, we're good, just undo everything and return + unset(_ossl_expected_targets) + unset(_ossl_defined_targets) + unset(_ossl_undefined_targets) + unset(CMAKE_IMPORT_FILE_VERSION) + return() +endif() +if(_ossl_defined_targets) + # We have a mix of defined and undefined targets. This is hard to reconcile, + # and probably the result of another config, or FindOpenSSL.cmake having been + # called, or whatever. Therefore, the best course of action is to quit with a + # hard error. + message(FATAL_ERROR "Some targets defined, others not:\nNot defined: ${_ossl_undefined_targets}\nDefined: ${_ossl_defined_targets}") +endif() +unset(_ossl_expected_targets) +unset(_ossl_defined_targets) +unset(_ossl_undefined_targets) + + +# Set up the import path, so all other import paths are made relative this file +get_filename_component(_ossl_prefix "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_ossl_prefix "${_ossl_prefix}" PATH) +get_filename_component(_ossl_prefix "${_ossl_prefix}" PATH) +get_filename_component(_ossl_prefix "${_ossl_prefix}" PATH) + +if(_ossl_prefix STREQUAL "/") + set(_ossl_prefix "") +endif() + + +if(OPENSSL_USE_STATIC_LIBS) + set(_ossl_use_static_libs True) +elseif(DEFINED OPENSSL_USE_STATIC_LIBS) + # We know OPENSSL_USE_STATIC_LIBS is defined and False + if(_ossl_use_static_libs) + # OPENSSL_USE_STATIC_LIBS is explicitly false, indicating that shared libraries are + # required. However, _ossl_use_static_libs indicates that no shared libraries are + # available. The best course of action is to simply return and leave it to CMake to + # use another OpenSSL config. + unset(_ossl_use_static_libs) + unset(CMAKE_IMPORT_FILE_VERSION) + return() + endif() +endif() + +# Version, copied from what find_package() gives, for compatibility with FindOpenSSL.cmake +set(OPENSSL_VERSION "${OpenSSL_VERSION}") +set(OPENSSL_VERSION_MAJOR "${OpenSSL_VERSION_MAJOR}") +set(OPENSSL_VERSION_MINOR "${OpenSSL_VERSION_MINOR}") +set(OPENSSL_VERSION_FIX "${OpenSSL_VERSION_PATCH}") +set(OPENSSL_FOUND YES) + +# Directories and names +set(OPENSSL_LIBRARY_DIR "${_ossl_prefix}/lib") +set(OPENSSL_INCLUDE_DIR "${_ossl_prefix}/include") +set(OPENSSL_ENGINES_DIR "${_ossl_prefix}/lib/engines-3") +set(OPENSSL_MODULES_DIR "${_ossl_prefix}/lib/ossl-modules") +set(OPENSSL_RUNTIME_DIR "${_ossl_prefix}/bin") + +set(OPENSSL_PROGRAM "${OPENSSL_RUNTIME_DIR}/openssl") + +# Set up the imported targets +if(_ossl_use_static_libs) + + add_library(OpenSSL::Crypto STATIC IMPORTED) + add_library(OpenSSL::SSL STATIC IMPORTED) + + set(OPENSSL_LIBCRYPTO_STATIC "${OPENSSL_LIBRARY_DIR}/libcrypto.a") + set(OPENSSL_LIBCRYPTO_DEPENDENCIES -ldl -pthread) + set_target_properties(OpenSSL::Crypto PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION ${OPENSSL_LIBCRYPTO_STATIC}) + set_property(TARGET OpenSSL::Crypto + PROPERTY INTERFACE_LINK_LIBRARIES ${OPENSSL_LIBCRYPTO_DEPENDENCIES}) + + set(OPENSSL_LIBSSL_STATIC "${OPENSSL_LIBRARY_DIR}/libssl.a") + set(OPENSSL_LIBSSL_DEPENDENCIES OpenSSL::Crypto) + set_target_properties(OpenSSL::SSL PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION ${OPENSSL_LIBSSL_STATIC}) + set_property(TARGET OpenSSL::SSL + PROPERTY INTERFACE_LINK_LIBRARIES ${OPENSSL_LIBSSL_DEPENDENCIES}) + + # Directories and names compatible with CMake's FindOpenSSL.cmake + set(OPENSSL_CRYPTO_LIBRARY ${OPENSSL_LIBCRYPTO_STATIC}) + set(OPENSSL_CRYPTO_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY} ${OPENSSL_LIBCRYPTO_DEPENDENCIES}) + set(OPENSSL_SSL_LIBRARY ${OPENSSL_LIBSSL_STATIC}) + set(OPENSSL_SSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_LIBSSL_DEPENDENCIES}) + set(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_LIBSSL_DEPENDENCIES} ${OPENSSL_LIBCRYPTO_DEPENDENCIES}) + +else() + + add_library(OpenSSL::Crypto SHARED IMPORTED) + add_library(OpenSSL::SSL SHARED IMPORTED) + + # Dependencies are assumed to be implied in the shared libraries + set(OPENSSL_LIBCRYPTO_SHARED "${OPENSSL_LIBRARY_DIR}/libcrypto.so") + set_target_properties(OpenSSL::Crypto PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION ${OPENSSL_LIBCRYPTO_SHARED}) + + set(OPENSSL_LIBSSL_SHARED "${OPENSSL_LIBRARY_DIR}/libssl.so") + set_target_properties(OpenSSL::SSL PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION ${OPENSSL_LIBSSL_SHARED}) + + # Directories and names compatible with CMake's FindOpenSSL.cmake + set(OPENSSL_CRYPTO_LIBRARY ${OPENSSL_LIBCRYPTO_SHARED}) + set(OPENSSL_CRYPTO_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY}) + set(OPENSSL_SSL_LIBRARY ${OPENSSL_LIBSSL_SHARED}) + set(OPENSSL_SSL_LIBRARIES ${OPENSSL_SSL_LIBRARY}) + set(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARIES}) + + +endif() + +set_target_properties(OpenSSL::Crypto PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${OPENSSL_INCLUDE_DIR}") +set_target_properties(OpenSSL::SSL PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${OPENSSL_INCLUDE_DIR}") + + + +unset(_ossl_prefix) +unset(_ossl_use_static_libs) diff --git a/lib/cmake/OpenSSL/OpenSSLConfigVersion.cmake b/lib/cmake/OpenSSL/OpenSSLConfigVersion.cmake new file mode 100644 index 0000000000000000000000000000000000000000..bd51f35a3e59c18e9c307e1b1bffc6b6eef4d7a0 --- /dev/null +++ b/lib/cmake/OpenSSL/OpenSSLConfigVersion.cmake @@ -0,0 +1,18 @@ +# Generated by OpenSSL +# + +set(PACKAGE_VERSION 3.5.6) + +if(NOT PACKAGE_FIND_VERSION) + # find_package() was called without any version information. This is assumed to + # mean that the caller accepts whatever they get. + set(PACKAGE_VERSION_COMPATIBLE 1) +elseif(PACKAGE_FIND_VERSION_MAJOR LESS 3 + OR PACKAGE_FIND_VERSION VERSION_GREATER 3.5.6) + set(PACKAGE_VERSION_UNSUITABLE 1) +else() + set(PACKAGE_VERSION_COMPATIBLE 1) + if(PACKAGE_FIND_VERSION VERSION_EQUAL 3.5.6) + set(PACKAGE_VERSION_EXACT 1) + endif() +endif() diff --git a/lib/cmake/expat-2.8.0/expat-config-version.cmake b/lib/cmake/expat-2.8.0/expat-config-version.cmake new file mode 100644 index 0000000000000000000000000000000000000000..f6b4600436dbc911c1d243f38c1cb79bce7dec95 --- /dev/null +++ b/lib/cmake/expat-2.8.0/expat-config-version.cmake @@ -0,0 +1,65 @@ +# This is a basic version file for the Config-mode of find_package(). +# It is used by write_basic_package_version_file() as input file for configure_file() +# to create a version-file which can be installed along a config.cmake file. +# +# The created file sets PACKAGE_VERSION_EXACT if the current version string and +# the requested version string are exactly the same and it sets +# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version, +# but only if the requested major version is the same as the current one. +# The variable CVF_VERSION must be set before calling configure_file(). + + +set(PACKAGE_VERSION "2.8.0") + +if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + + if("2.8.0" MATCHES "^([0-9]+)\\.") + set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}") + if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0) + string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}") + endif() + else() + set(CVF_VERSION_MAJOR "2.8.0") + endif() + + if(PACKAGE_FIND_VERSION_RANGE) + # both endpoints of the range must have the expected major version + math (EXPR CVF_VERSION_MAJOR_NEXT "${CVF_VERSION_MAJOR} + 1") + if (NOT PACKAGE_FIND_VERSION_MIN_MAJOR STREQUAL CVF_VERSION_MAJOR + OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND NOT PACKAGE_FIND_VERSION_MAX_MAJOR STREQUAL CVF_VERSION_MAJOR) + OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND NOT PACKAGE_FIND_VERSION_MAX VERSION_LESS_EQUAL CVF_VERSION_MAJOR_NEXT))) + set(PACKAGE_VERSION_COMPATIBLE FALSE) + elseif(PACKAGE_FIND_VERSION_MIN_MAJOR STREQUAL CVF_VERSION_MAJOR + AND ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS_EQUAL PACKAGE_FIND_VERSION_MAX) + OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MAX))) + set(PACKAGE_VERSION_COMPATIBLE TRUE) + else() + set(PACKAGE_VERSION_COMPATIBLE FALSE) + endif() + else() + if(PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR) + set(PACKAGE_VERSION_COMPATIBLE TRUE) + else() + set(PACKAGE_VERSION_COMPATIBLE FALSE) + endif() + + if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) + set(PACKAGE_VERSION_EXACT TRUE) + endif() + endif() +endif() + + +# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it: +if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "") + return() +endif() + +# check that the installed version has the same 32/64bit-ness as the one which is currently searching: +if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "8") + math(EXPR installedBits "8 * 8") + set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)") + set(PACKAGE_VERSION_UNSUITABLE TRUE) +endif() diff --git a/lib/cmake/expat-2.8.0/expat-config.cmake b/lib/cmake/expat-2.8.0/expat-config.cmake new file mode 100644 index 0000000000000000000000000000000000000000..36a013198b665a6b72e2016253093a1e36b33aca --- /dev/null +++ b/lib/cmake/expat-2.8.0/expat-config.cmake @@ -0,0 +1,99 @@ +# __ __ _ +# ___\ \/ /_ __ __ _| |_ +# / _ \\ /| '_ \ / _` | __| +# | __// \| |_) | (_| | |_ +# \___/_/\_\ .__/ \__,_|\__| +# |_| XML parser +# +# Copyright (c) 2019 Expat development team +# Licensed under the MIT license: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +# USE OR OTHER DEALINGS IN THE SOFTWARE. +# +if(NOT _expat_config_included) + # Protect against multiple inclusion + set(_expat_config_included TRUE) + + +include("${CMAKE_CURRENT_LIST_DIR}/expat.cmake") + + +####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() ####### +####### Any changes to this file will be overwritten by the next CMake run #### +####### The input file was expat-config.cmake.in ######## + +get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE) + +macro(set_and_check _var _file) + set(${_var} "${_file}") + if(NOT EXISTS "${_file}") + message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !") + endif() +endmacro() + +macro(check_required_components _NAME) + foreach(comp ${${_NAME}_FIND_COMPONENTS}) + if(NOT ${_NAME}_${comp}_FOUND) + if(${_NAME}_FIND_REQUIRED_${comp}) + set(${_NAME}_FOUND FALSE) + endif() + endif() + endforeach() +endmacro() + +#################################################################################### + +# +# Supported components +# +macro(expat_register_component _NAME _AVAILABE) + set(expat_${_NAME}_FOUND ${_AVAILABE}) +endmacro() + +expat_register_component(attr_info OFF) +expat_register_component(dtd ON) +expat_register_component(large_size OFF) +expat_register_component(min_size OFF) +expat_register_component(ns ON) + +if(1024) + expat_register_component(context_bytes ON) +else() + expat_register_component(context_bytes OFF) +endif() + +if("char" STREQUAL "char") + expat_register_component(char ON) + expat_register_component(ushort OFF) + expat_register_component(wchar_t OFF) +elseif("char" STREQUAL "ushort") + expat_register_component(char OFF) + expat_register_component(ushort ON) + expat_register_component(wchar_t OFF) +elseif("char" STREQUAL "wchar_t") + expat_register_component(char OFF) + expat_register_component(ushort OFF) + expat_register_component(wchar_t ON) +endif() + +check_required_components(expat) + + +endif(NOT _expat_config_included) diff --git a/lib/cmake/expat-2.8.0/expat-release.cmake b/lib/cmake/expat-2.8.0/expat-release.cmake new file mode 100644 index 0000000000000000000000000000000000000000..51cb4d7114a9e34aa585c4484befb741b3220cf2 --- /dev/null +++ b/lib/cmake/expat-2.8.0/expat-release.cmake @@ -0,0 +1,19 @@ +#---------------------------------------------------------------- +# Generated CMake target import file for configuration "Release". +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "expat::expat" for configuration "Release" +set_property(TARGET expat::expat APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) +set_target_properties(expat::expat PROPERTIES + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libexpat.so.1.12.0" + IMPORTED_SONAME_RELEASE "libexpat.so.1" + ) + +list(APPEND _cmake_import_check_targets expat::expat ) +list(APPEND _cmake_import_check_files_for_expat::expat "${_IMPORT_PREFIX}/lib/libexpat.so.1.12.0" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/lib/cmake/expat-2.8.0/expat.cmake b/lib/cmake/expat-2.8.0/expat.cmake new file mode 100644 index 0000000000000000000000000000000000000000..5935aef2f84b3004a5f610c4270ca20f089ae01f --- /dev/null +++ b/lib/cmake/expat-2.8.0/expat.cmake @@ -0,0 +1,107 @@ +# Generated by CMake + +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8) + message(FATAL_ERROR "CMake >= 2.8.12 required") +endif() +if(CMAKE_VERSION VERSION_LESS "2.8.12") + message(FATAL_ERROR "CMake >= 2.8.12 required") +endif() +cmake_policy(PUSH) +cmake_policy(VERSION 2.8.12...4.0) +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Protect against multiple inclusion, which would fail when already imported targets are added once more. +set(_cmake_targets_defined "") +set(_cmake_targets_not_defined "") +set(_cmake_expected_targets "") +foreach(_cmake_expected_target IN ITEMS expat::expat) + list(APPEND _cmake_expected_targets "${_cmake_expected_target}") + if(TARGET "${_cmake_expected_target}") + list(APPEND _cmake_targets_defined "${_cmake_expected_target}") + else() + list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}") + endif() +endforeach() +unset(_cmake_expected_target) +if(_cmake_targets_defined STREQUAL _cmake_expected_targets) + unset(_cmake_targets_defined) + unset(_cmake_targets_not_defined) + unset(_cmake_expected_targets) + unset(CMAKE_IMPORT_FILE_VERSION) + cmake_policy(POP) + return() +endif() +if(NOT _cmake_targets_defined STREQUAL "") + string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}") + string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}") + message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n") +endif() +unset(_cmake_targets_defined) +unset(_cmake_targets_not_defined) +unset(_cmake_expected_targets) + + +# Compute the installation prefix relative to this file. +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +# Create imported target expat::expat +add_library(expat::expat SHARED IMPORTED) + +set_target_properties(expat::expat PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" + INTERFACE_LINK_LIBRARIES "m" +) + +# Load information for each installed configuration. +file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/expat-*.cmake") +foreach(_cmake_config_file IN LISTS _cmake_config_files) + include("${_cmake_config_file}") +endforeach() +unset(_cmake_config_file) +unset(_cmake_config_files) + +# Cleanup temporary variables. +set(_IMPORT_PREFIX) + +# Loop over all imported files and verify that they actually exist +foreach(_cmake_target IN LISTS _cmake_import_check_targets) + if(CMAKE_VERSION VERSION_LESS "3.28" + OR NOT DEFINED _cmake_import_check_xcframework_for_${_cmake_target} + OR NOT IS_DIRECTORY "${_cmake_import_check_xcframework_for_${_cmake_target}}") + foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}") + if(NOT EXISTS "${_cmake_file}") + message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file + \"${_cmake_file}\" +but this file does not exist. Possible reasons include: +* The file was deleted, renamed, or moved to another location. +* An install or uninstall procedure did not complete successfully. +* The installation package was faulty and contained + \"${CMAKE_CURRENT_LIST_FILE}\" +but not all the files it references. +") + endif() + endforeach() + endif() + unset(_cmake_file) + unset("_cmake_import_check_files_for_${_cmake_target}") +endforeach() +unset(_cmake_target) +unset(_cmake_import_check_targets) + +# This file does not depend on other imported targets which have +# been exported from the same project but in a separate export set. + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/lib/cmake/liblzma/liblzma-config-version.cmake b/lib/cmake/liblzma/liblzma-config-version.cmake new file mode 100644 index 0000000000000000000000000000000000000000..d1811751b2d761c5fe4e761c9728211d2c735c3d --- /dev/null +++ b/lib/cmake/liblzma/liblzma-config-version.cmake @@ -0,0 +1,70 @@ +# This is a basic version file for the Config-mode of find_package(). +# It is used by write_basic_package_version_file() as input file for configure_file() +# to create a version-file which can be installed along a config.cmake file. +# +# The created file sets PACKAGE_VERSION_EXACT if the current version string and +# the requested version string are exactly the same and it sets +# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version, +# but only if the requested major version is the same as the current one. +# The variable CVF_VERSION must be set before calling configure_file(). + + +set(PACKAGE_VERSION "5.8.2") + +if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + + if("5.8.2" MATCHES "^([0-9]+)\\.") + set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}") + if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0) + string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}") + endif() + else() + set(CVF_VERSION_MAJOR "5.8.2") + endif() + + if(PACKAGE_FIND_VERSION_RANGE) + # both endpoints of the range must have the expected major version + math (EXPR CVF_VERSION_MAJOR_NEXT "${CVF_VERSION_MAJOR} + 1") + if (NOT PACKAGE_FIND_VERSION_MIN_MAJOR STREQUAL CVF_VERSION_MAJOR + OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND NOT PACKAGE_FIND_VERSION_MAX_MAJOR STREQUAL CVF_VERSION_MAJOR) + OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND NOT PACKAGE_FIND_VERSION_MAX VERSION_LESS_EQUAL CVF_VERSION_MAJOR_NEXT))) + set(PACKAGE_VERSION_COMPATIBLE FALSE) + elseif(PACKAGE_FIND_VERSION_MIN_MAJOR STREQUAL CVF_VERSION_MAJOR + AND ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS_EQUAL PACKAGE_FIND_VERSION_MAX) + OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MAX))) + set(PACKAGE_VERSION_COMPATIBLE TRUE) + else() + set(PACKAGE_VERSION_COMPATIBLE FALSE) + endif() + else() + if(PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR) + set(PACKAGE_VERSION_COMPATIBLE TRUE) + else() + set(PACKAGE_VERSION_COMPATIBLE FALSE) + endif() + + if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) + set(PACKAGE_VERSION_EXACT TRUE) + endif() + endif() +endif() + + +# if the installed project requested no architecture check, don't perform the check +if("FALSE") + return() +endif() + +# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it: +if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "") + return() +endif() + +# check that the installed version has the same 32/64bit-ness as the one which is currently searching: +if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "8") + math(EXPR installedBits "8 * 8") + set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)") + set(PACKAGE_VERSION_UNSUITABLE TRUE) +endif() diff --git a/lib/cmake/liblzma/liblzma-config.cmake b/lib/cmake/liblzma/liblzma-config.cmake new file mode 100644 index 0000000000000000000000000000000000000000..181f55a935c295549869d578133b3d4ea45f1209 --- /dev/null +++ b/lib/cmake/liblzma/liblzma-config.cmake @@ -0,0 +1,16 @@ +include(CMakeFindDependencyMacro) +set(THREADS_PREFER_PTHREAD_FLAG TRUE) +find_dependency(Threads) + +include("${CMAKE_CURRENT_LIST_DIR}/liblzma-targets.cmake") + +if(NOT TARGET LibLZMA::LibLZMA) + # Be compatible with the spelling used by the FindLibLZMA module. This + # doesn't use ALIAS because it would make CMake resolve LibLZMA::LibLZMA + # to liblzma::liblzma instead of keeping the original spelling. Keeping + # the original spelling is important for good FindLibLZMA compatibility. + add_library(LibLZMA::LibLZMA INTERFACE IMPORTED) + set_target_properties(LibLZMA::LibLZMA PROPERTIES + INTERFACE_LINK_LIBRARIES liblzma::liblzma) +endif() + diff --git a/lib/cmake/liblzma/liblzma-targets-release.cmake b/lib/cmake/liblzma/liblzma-targets-release.cmake new file mode 100644 index 0000000000000000000000000000000000000000..57d860d984d358e7a7c453137300818ece894a1f --- /dev/null +++ b/lib/cmake/liblzma/liblzma-targets-release.cmake @@ -0,0 +1,19 @@ +#---------------------------------------------------------------- +# Generated CMake target import file for configuration "Release". +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "liblzma::liblzma" for configuration "Release" +set_property(TARGET liblzma::liblzma APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) +set_target_properties(liblzma::liblzma PROPERTIES + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/liblzma.so.5.8.2" + IMPORTED_SONAME_RELEASE "liblzma.so.5" + ) + +list(APPEND _cmake_import_check_targets liblzma::liblzma ) +list(APPEND _cmake_import_check_files_for_liblzma::liblzma "${_IMPORT_PREFIX}/lib/liblzma.so.5.8.2" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/lib/cmake/liblzma/liblzma-targets.cmake b/lib/cmake/liblzma/liblzma-targets.cmake new file mode 100644 index 0000000000000000000000000000000000000000..fc4d550f0c984c8b636012fd7f2aea2e1e632ee5 --- /dev/null +++ b/lib/cmake/liblzma/liblzma-targets.cmake @@ -0,0 +1,102 @@ +# Generated by CMake + +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8) + message(FATAL_ERROR "CMake >= 2.8.0 required") +endif() +if(CMAKE_VERSION VERSION_LESS "2.8.3") + message(FATAL_ERROR "CMake >= 2.8.3 required") +endif() +cmake_policy(PUSH) +cmake_policy(VERSION 2.8.3...3.23) +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Protect against multiple inclusion, which would fail when already imported targets are added once more. +set(_cmake_targets_defined "") +set(_cmake_targets_not_defined "") +set(_cmake_expected_targets "") +foreach(_cmake_expected_target IN ITEMS liblzma::liblzma) + list(APPEND _cmake_expected_targets "${_cmake_expected_target}") + if(TARGET "${_cmake_expected_target}") + list(APPEND _cmake_targets_defined "${_cmake_expected_target}") + else() + list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}") + endif() +endforeach() +unset(_cmake_expected_target) +if(_cmake_targets_defined STREQUAL _cmake_expected_targets) + unset(_cmake_targets_defined) + unset(_cmake_targets_not_defined) + unset(_cmake_expected_targets) + unset(CMAKE_IMPORT_FILE_VERSION) + cmake_policy(POP) + return() +endif() +if(NOT _cmake_targets_defined STREQUAL "") + string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}") + string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}") + message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n") +endif() +unset(_cmake_targets_defined) +unset(_cmake_targets_not_defined) +unset(_cmake_expected_targets) + + +# Compute the installation prefix relative to this file. +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +# Create imported target liblzma::liblzma +add_library(liblzma::liblzma SHARED IMPORTED) + +set_target_properties(liblzma::liblzma PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" +) + +# Load information for each installed configuration. +file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/liblzma-targets-*.cmake") +foreach(_cmake_config_file IN LISTS _cmake_config_files) + include("${_cmake_config_file}") +endforeach() +unset(_cmake_config_file) +unset(_cmake_config_files) + +# Cleanup temporary variables. +set(_IMPORT_PREFIX) + +# Loop over all imported files and verify that they actually exist +foreach(_cmake_target IN LISTS _cmake_import_check_targets) + foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}") + if(NOT EXISTS "${_cmake_file}") + message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file + \"${_cmake_file}\" +but this file does not exist. Possible reasons include: +* The file was deleted, renamed, or moved to another location. +* An install or uninstall procedure did not complete successfully. +* The installation package was faulty and contained + \"${CMAKE_CURRENT_LIST_FILE}\" +but not all the files it references. +") + endif() + endforeach() + unset(_cmake_file) + unset("_cmake_import_check_files_for_${_cmake_target}") +endforeach() +unset(_cmake_target) +unset(_cmake_import_check_targets) + +# This file does not depend on other imported targets which have +# been exported from the same project but in a separate export set. + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/lib/itcl4.3.0/itcl.tcl b/lib/itcl4.3.0/itcl.tcl new file mode 100644 index 0000000000000000000000000000000000000000..276abae7bd99d1eea782712006563d0b36671470 --- /dev/null +++ b/lib/itcl4.3.0/itcl.tcl @@ -0,0 +1,151 @@ +# +# itcl.tcl +# ---------------------------------------------------------------------- +# Invoked automatically upon startup to customize the interpreter +# for [incr Tcl]. +# ---------------------------------------------------------------------- +# AUTHOR: Michael J. McLennan +# Bell Labs Innovations for Lucent Technologies +# mmclennan@lucent.com +# http://www.tcltk.com/itcl +# ---------------------------------------------------------------------- +# Copyright (c) 1993-1998 Lucent Technologies, Inc. +# ====================================================================== +# See the file "license.terms" for information on usage and +# redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. + +proc ::itcl::delete_helper { name args } { + ::itcl::delete object $name +} + +# ---------------------------------------------------------------------- +# USAGE: local ? ...? +# +# Creates a new object called in class , passing +# the remaining 's to the constructor. Unlike the usual +# [incr Tcl] objects, however, an object created by this procedure +# will be automatically deleted when the local call frame is destroyed. +# This command is useful for creating objects that should only remain +# alive until a procedure exits. +# ---------------------------------------------------------------------- +proc ::itcl::local {class name args} { + set ptr [uplevel [list $class $name] $args] + uplevel [list set itcl-local-$ptr $ptr] + set cmd [uplevel namespace which -command $ptr] + uplevel [list trace add variable itcl-local-$ptr unset \ + "::itcl::delete_helper $cmd"] + return $ptr +} + +# ---------------------------------------------------------------------- +# auto_mkindex +# ---------------------------------------------------------------------- +# Define Itcl commands that will be recognized by the auto_mkindex +# parser in Tcl... +# + +# +# USAGE: itcl::class name body +# Adds an entry for the given class declaration. +# +foreach __cmd {itcl::class class itcl::type type ictl::widget widget itcl::widgetadaptor widgetadaptor itcl::extendedclass extendedclass} { + auto_mkindex_parser::command $__cmd {name body} { + variable index + variable scriptFile + append index "set [list auto_index([fullname $name])]" + append index " \[list source -encoding utf-8 \[file join \$dir [list $scriptFile]\]\]\n" + + variable parser + variable contextStack + set contextStack [linsert $contextStack 0 $name] + $parser eval $body + set contextStack [lrange $contextStack 1 end] + } +} + +# +# USAGE: itcl::body name arglist body +# Adds an entry for the given method/proc body. +# +foreach __cmd {itcl::body body} { + auto_mkindex_parser::command $__cmd {name arglist body} { + variable index + variable scriptFile + append index "set [list auto_index([fullname $name])]" + append index " \[list source -encoding utf-8 \[file join \$dir [list $scriptFile]\]\]\n" + } +} + +# +# USAGE: itcl::configbody name arglist body +# Adds an entry for the given method/proc body. +# +foreach __cmd {itcl::configbody configbody} { + auto_mkindex_parser::command $__cmd {name body} { + variable index + variable scriptFile + append index "set [list auto_index([fullname $name])]" + append index " \[list source -encoding utf-8 \[file join \$dir [list $scriptFile]\]\]\n" + } +} + +# +# USAGE: ensemble name ?body? +# Adds an entry to the auto index list for the given ensemble name. +# +foreach __cmd {itcl::ensemble ensemble} { + auto_mkindex_parser::command $__cmd {name {body ""}} { + variable index + variable scriptFile + append index "set [list auto_index([fullname $name])]" + append index " \[list source -encoding utf-8 \[file join \$dir [list $scriptFile]\]\]\n" + } +} + +# +# USAGE: public arg ?arg arg...? +# protected arg ?arg arg...? +# private arg ?arg arg...? +# +# Evaluates the arguments as commands, so we can recognize proc +# declarations within classes. +# +foreach __cmd {public protected private} { + auto_mkindex_parser::command $__cmd {args} { + variable parser + $parser eval $args + } +} + +# SF bug #246 unset variable __cmd to avoid problems in user programs!! +unset __cmd + +# ---------------------------------------------------------------------- +# auto_import +# ---------------------------------------------------------------------- +# This procedure overrides the usual "auto_import" function in the +# Tcl library. It is invoked during "namespace import" to make see +# if the imported commands reside in an autoloaded library. If so, +# stubs are created to represent the commands. Executing a stub +# later on causes the real implementation to be autoloaded. +# +# Arguments - +# pattern The pattern of commands being imported (like "foo::*") +# a canonical namespace as returned by [namespace current] + +proc auto_import {pattern} { + global auto_index + + set ns [uplevel namespace current] + set patternList [auto_qualify $pattern $ns] + + auto_load_index + + foreach pattern $patternList { + foreach name [array names auto_index $pattern] { + if {"" == [info commands $name]} { + ::itcl::import::stub create $name + } + } + } +} diff --git a/lib/itcl4.3.0/itclConfig.sh b/lib/itcl4.3.0/itclConfig.sh new file mode 100644 index 0000000000000000000000000000000000000000..0c3dd9439796d50c52170391bd76be4f9ed66167 --- /dev/null +++ b/lib/itcl4.3.0/itclConfig.sh @@ -0,0 +1,67 @@ +# itclConfig.sh -- +# +# This shell script (for sh) is generated automatically by Itcl's +# configure script. It will create shell variables for most of +# the configuration options discovered by the configure script. +# This script is intended to be included by the configure scripts +# for Itcl extensions so that they don't have to figure this all +# out for themselves. This file does not duplicate information +# already provided by tclConfig.sh, so you may need to use that +# file in addition to this one. +# +# The information in this file is specific to a single platform. + +# Itcl's version number. +itcl_VERSION='4.3.0' +ITCL_VERSION='4.3.0' + +# The name of the Itcl library (may be either a .a file or a shared library): +itcl_LIB_FILE=libitcl4.3.0.so +ITCL_LIB_FILE=libitcl4.3.0.so + +# String to pass to linker to pick up the Itcl library from its +# build directory. +itcl_BUILD_LIB_SPEC='-L/croot/tk_1755243777296/work/tcl8.6.15/unix/pkgs/itcl4.3.0 -litcl4.3.0' +ITCL_BUILD_LIB_SPEC='-L/croot/tk_1755243777296/work/tcl8.6.15/unix/pkgs/itcl4.3.0 -litcl4.3.0' + +# String to pass to linker to pick up the Itcl library from its +# installed directory. +itcl_LIB_SPEC='-L/usr/local/miniconda3/envs/phantom/lib/itcl4.3.0 -litcl4.3.0' +ITCL_LIB_SPEC='-L/usr/local/miniconda3/envs/phantom/lib/itcl4.3.0 -litcl4.3.0' + +# The name of the Itcl stub library (a .a file): +itcl_STUB_LIB_FILE=libitclstub4.3.0.a +ITCL_STUB_LIB_FILE=libitclstub4.3.0.a + +# String to pass to linker to pick up the Itcl stub library from its +# build directory. +itcl_BUILD_STUB_LIB_SPEC='-L/croot/tk_1755243777296/work/tcl8.6.15/unix/pkgs/itcl4.3.0 -litclstub4.3.0' +ITCL_BUILD_STUB_LIB_SPEC='-L/croot/tk_1755243777296/work/tcl8.6.15/unix/pkgs/itcl4.3.0 -litclstub4.3.0' + +# String to pass to linker to pick up the Itcl stub library from its +# installed directory. +itcl_STUB_LIB_SPEC='-L/usr/local/miniconda3/envs/phantom/lib/itcl4.3.0 -litclstub4.3.0' +ITCL_STUB_LIB_SPEC='-L/usr/local/miniconda3/envs/phantom/lib/itcl4.3.0 -litclstub4.3.0' + +# String to pass to linker to pick up the Itcl stub library from its +# build directory. +itcl_BUILD_STUB_LIB_PATH='/croot/tk_1755243777296/work/tcl8.6.15/unix/pkgs/itcl4.3.0/libitclstub4.3.0.a' +ITCL_BUILD_STUB_LIB_PATH='/croot/tk_1755243777296/work/tcl8.6.15/unix/pkgs/itcl4.3.0/libitclstub4.3.0.a' + +# String to pass to linker to pick up the Itcl stub library from its +# installed directory. +itcl_STUB_LIB_PATH='/usr/local/miniconda3/envs/phantom/lib/itcl4.3.0/libitclstub4.3.0.a' +ITCL_STUB_LIB_PATH='/usr/local/miniconda3/envs/phantom/lib/itcl4.3.0/libitclstub4.3.0.a' + +# Location of the top-level source directories from which [incr Tcl] +# was built. This is the directory that contains generic, unix, etc. +# If [incr Tcl] was compiled in a different place than the directory +# containing the source files, this points to the location of the sources, +# not the location where [incr Tcl] was compiled. +itcl_SRC_DIR='/croot/tk_1755243777296/work/tcl8.6.15/pkgs/itcl4.3.0' +ITCL_SRC_DIR='/croot/tk_1755243777296/work/tcl8.6.15/pkgs/itcl4.3.0' + +# String to pass to the compiler so that an extension can +# find installed Itcl headers. +itcl_INCLUDE_SPEC='' +ITCL_INCLUDE_SPEC='' diff --git a/lib/itcl4.3.0/itclHullCmds.tcl b/lib/itcl4.3.0/itclHullCmds.tcl new file mode 100644 index 0000000000000000000000000000000000000000..5ef32645c92cda278d2448d2aeff1aaba5918cd7 --- /dev/null +++ b/lib/itcl4.3.0/itclHullCmds.tcl @@ -0,0 +1,562 @@ +# +# itclHullCmds.tcl +# ---------------------------------------------------------------------- +# Invoked automatically upon startup to customize the interpreter +# for [incr Tcl] when one of setupcomponent or createhull is called. +# ---------------------------------------------------------------------- +# AUTHOR: Arnulf P. Wiedemann +# +# ---------------------------------------------------------------------- +# Copyright (c) 2008 Arnulf P. Wiedemann +# ====================================================================== +# See the file "license.terms" for information on usage and +# redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. + +package require Tk 8.6 9 + +namespace eval ::itcl::internal::commands { + +# ======================= widgetDeleted =========================== + +proc widgetDeleted {oldName newName op} { + # The widget is beeing deleted, so we have to delete the object + # which had the widget as itcl_hull too! + # We have to get the real name from for example + # ::itcl::internal::widgets::hull1.lw + # we need only .lw here + +#puts stderr "widgetDeleted!$oldName!$newName!$op!" + set cmdName [namespace tail $oldName] + set flds [split $cmdName {.}] + set cmdName .[join [lrange $flds 1 end] {.}] +#puts stderr "DELWIDGET![namespace current]!$cmdName![::info command $cmdName]!" + rename $cmdName {} +} + +} + +namespace eval ::itcl::builtin { + +# ======================= createhull =========================== +# the hull widget is a tk widget which is the (mega) widget handled behind the itcl +# extendedclass/itcl widget. +# It is created be renaming the itcl class object to a temporary name _ +# creating the widget with the +# appropriate options and the installing that as the "hull" widget (the container) +# All the options in args and the options delegated to component itcl_hull are used +# Then a unique name (hull_widget_name) in the itcl namespace is created for widget: +# ::itcl::internal::widgets::hull +# and widget is renamed to that name +# Finally the _ is renamed to the original again +# Component itcl_hull is created if not existent +# itcl_hull is set to the hull_widget_name and the +# is returned to the caller +# ============================================================== + +proc createhull {widget_type path args} { + variable hullCount + upvar this this + upvar win win + + +#puts stderr "il-1![::info level -1]!$this!" +#puts stderr "createhull!$widget_type!$path!$args!$this![::info command $this]!" +#puts stderr "ns1![uplevel 1 namespace current]!" +#puts stderr "ns2![uplevel 2 namespace current]!" +#puts stderr "ns3![uplevel 3 namespace current]!" +#puts stderr "level-1![::info level -1]!" +#puts stderr "level-2![::info level -2]!" +# set my_this [namespace tail $this] + set my_this $this + set tmp $my_this +#puts stderr "II![::info command $this]![::info command $tmp]!" +#puts stderr "rename1!rename $my_this ${tmp}_!" + rename ::$my_this ${tmp}_ + set options [list] + foreach {option_name value} $args { + switch -glob -- $option_name { + -class { + lappend options $option_name [namespace tail $value] + } + -* { + lappend options $option_name $value + } + default { + return -code error "bad option name\"$option_name\" options must start with a \"-\"" + } + } + } + set my_win [namespace tail $path] + set cmd [list $widget_type $my_win] +#puts stderr "my_win!$my_win!cmd!$cmd!$path!" + if {[llength $options] > 0} { + lappend cmd {*}$options + } + set widget [uplevel 1 $cmd] +#puts stderr "widget!$widget!" + trace add command $widget delete ::itcl::internal::commands::widgetDeleted + set opts [uplevel 1 info delegated options] + foreach entry $opts { + foreach {optName compName} $entry break + if {$compName eq "itcl_hull"} { + set optInfos [uplevel 1 info delegated option $optName] + set realOptName [lindex $optInfos 4] + # strip off the "-" at the beginning + set myOptName [string range $realOptName 1 end] + set my_opt_val [option get $my_win $myOptName *] + if {$my_opt_val ne ""} { + $my_win configure -$myOptName $my_opt_val + } + } + } + set idx 1 + while {1} { + set widgetName ::itcl::internal::widgets::hull${idx}$my_win +#puts stderr "widgetName!$widgetName!" + if {[string length [::info command $widgetName]] == 0} { + break + } + incr idx + } +#puts stderr "rename2!rename $widget $widgetName!" + set dorename 0 + rename $widget $widgetName +#puts stderr "rename3!rename ${tmp}_ $tmp![::info command ${tmp}_]!my_this!$my_this!" + rename ${tmp}_ ::$tmp + set exists [uplevel 1 ::info exists itcl_hull] + if {!$exists} { + # that does not yet work, beacause of problems with resolving + ::itcl::addcomponent $my_this itcl_hull + } + upvar itcl_hull itcl_hull + ::itcl::setcomponent $my_this itcl_hull $widgetName +#puts stderr "IC![::info command $my_win]!" + set exists [uplevel 1 ::info exists itcl_interior] + if {!$exists} { + # that does not yet work, beacause of problems with resolving + ::itcl::addcomponent $this itcl_interior + } + upvar itcl_interior itcl_interior + set itcl_interior $my_win +#puts stderr "hull end!win!$win!itcl_hull!$itcl_hull!itcl_interior!$itcl_interior!" + return $my_win +} + +# ======================= addToItclOptions =========================== + +proc addToItclOptions {my_class my_win myOptions argsDict} { + upvar win win + upvar itcl_hull itcl_hull + + set opt_lst [list configure] + foreach opt [lsort $myOptions] { +#puts stderr "IOPT!$opt!$my_class!$my_win![::itcl::is class $my_class]!" + set isClass [::itcl::is class $my_class] + set found 0 + if {$isClass} { + if {[catch { + set resource [namespace eval $my_class info option $opt -resource] + set class [namespace eval $my_class info option $opt -class] + set default_val [uplevel 2 info option $opt -default] + set found 1 + } msg]} { +# puts stderr "MSG!$opt!$my_class!$msg!" + } + } else { + set tmp_win [uplevel #0 $my_class .___xx] + + set my_info [$tmp_win configure $opt] + set resource [lindex $my_info 1] + set class [lindex $my_info 2] + set default_val [lindex $my_info 3] + uplevel #0 destroy $tmp_win + set found 1 + } + if {$found} { + if {[catch { + set val [uplevel #0 ::option get $win $resource $class] + } msg]} { + set val "" + } + if {[::dict exists $argsDict $opt]} { + # we have an explicitly set option + set val [::dict get $argsDict $opt] + } else { + if {[string length $val] == 0} { + set val $default_val + } + } + set ::itcl::internal::variables::${my_win}::itcl_options($opt) $val + set ::itcl::internal::variables::${my_win}::__itcl_option_infos($opt) [list $resource $class $default_val] +#puts stderr "OPT1!$opt!$val!" +# uplevel 1 [list set itcl_options($opt) [list $val]] + if {[catch {uplevel 1 $win configure $opt [list $val]} msg]} { +#puts stderr "addToItclOptions ERR!$msg!$my_class!$win!configure!$opt!$val!" + } + } + } +} + +# ======================= setupcomponent =========================== + +proc setupcomponent {comp using widget_type path args} { + upvar this this + upvar win win + upvar itcl_hull itcl_hull + +#puts stderr "setupcomponent!$comp!$widget_type!$path!$args!$this!$win!$itcl_hull!" +#puts stderr "CONT![uplevel 1 info context]!" +#puts stderr "ns1![uplevel 1 namespace current]!" +#puts stderr "ns2![uplevel 2 namespace current]!" +#puts stderr "ns3![uplevel 3 namespace current]!" + set my_comp_object [lindex [uplevel 1 info context] 1] + if {[::info exists ::itcl::internal::component_objects($my_comp_object)]} { + set my_comp_object [set ::itcl::internal::component_objects($my_comp_object)] + } else { + set ::itcl::internal::component_objects($path) $my_comp_object + } + set options [list] + foreach {option_name value} $args { + switch -glob -- $option_name { + -* { + lappend options $option_name $value + } + default { + return -code error "bad option name\"$option_name\" options must start with a \"-\"" + } + } + } + if {[llength $args]} { + set argsDict [dict create {*}$args] + } else { + set argsDict [dict create] + } + set cmd [list $widget_type $path] + if {[llength $options] > 0} { + lappend cmd {*}$options + } +#puts stderr "cmd0![::info command $widget_type]!$path![::info command $path]!" +#puts stderr "cmd1!$cmd!" +# set my_comp [uplevel 3 $cmd] + set my_comp [uplevel #0 $cmd] +#puts stderr 111![::info command $path]! + ::itcl::setcomponent $this $comp $my_comp + set opts [uplevel 1 info delegated options] + foreach entry $opts { + foreach {optName compName} $entry break + if {$compName eq $my_comp} { + set optInfos [uplevel 1 info delegated option $optName] + set realOptName [lindex $optInfos 4] + # strip off the "-" at the beginning + set myOptName [string range $realOptName 1 end] + set my_opt_val [option get $my_win $myOptName *] + if {$my_opt_val ne ""} { + $my_comp configure -$myOptName $my_opt_val + } + } + } + set my_class $widget_type + set my_parent_class [uplevel 1 namespace current] + if {[catch { + set myOptions [namespace eval $my_class {info classoptions}] + } msg]} { + set myOptions [list] + } + foreach entry [$path configure] { + foreach {opt dummy1 dummy2 dummy3} $entry break + lappend myOptions $opt + } +#puts stderr "OPTS!$myOptions!" + addToItclOptions $widget_type $my_comp_object $myOptions $argsDict +#puts stderr END!$path![::info command $path]! +} + +proc itcl_initoptions {args} { +puts stderr "ITCL_INITOPT!$args!" +} + +# ======================= initoptions =========================== + +proc initoptions {args} { + upvar win win + upvar itcl_hull itcl_hull + upvar itcl_option_components itcl_option_components + +#puts stderr "INITOPT!!$win!" + if {[llength $args]} { + set argsDict [dict create {*}$args] + } else { + set argsDict [dict create] + } + set my_class [uplevel 1 namespace current] + set myOptions [namespace eval $my_class {info classoptions}] + if {[dict exists $::itcl::internal::dicts::classComponents $my_class]} { + set class_info_dict [dict get $::itcl::internal::dicts::classComponents $my_class] +# set myOptions [lsort -unique [namespace eval $my_class {info options}]] + foreach comp [uplevel 1 info components] { + if {[dict exists $class_info_dict $comp -keptoptions]} { + foreach my_opt [dict get $class_info_dict $comp -keptoptions] { + if {[lsearch $myOptions $my_opt] < 0} { +#puts stderr "KEOPT!$my_opt!" + lappend myOptions $my_opt + } + } + } + } + } else { + set class_info_dict [list] + } +#puts stderr "OPTS!$win!$my_class![join [lsort $myOptions]] \n]!" + set opt_lst [list configure] + set my_win $win + foreach opt [lsort $myOptions] { + set found 0 + if {[catch { + set resource [uplevel 1 info option $opt -resource] + set class [uplevel 1 info option $opt -class] + set default_val [uplevel 1 info option $opt -default] + set found 1 + } msg]} { +# puts stderr "MSG!$opt!$msg!" + } +#puts stderr "OPT!$opt!$found!" + if {$found} { + if {[catch { + set val [uplevel #0 ::option get $my_win $resource $class] + } msg]} { + set val "" + } + if {[::dict exists $argsDict $opt]} { + # we have an explicitly set option + set val [::dict get $argsDict $opt] + } else { + if {[string length $val] == 0} { + set val $default_val + } + } + set ::itcl::internal::variables::${win}::itcl_options($opt) $val + set ::itcl::internal::variables::${win}::__itcl_option_infos($opt) [list $resource $class $default_val] +#puts stderr "OPT1!$opt!$val!" +# uplevel 1 [list set itcl_options($opt) [list $val]] + if {[catch {uplevel 1 $my_win configure $opt [list $val]} msg]} { +puts stderr "initoptions ERR!$msg!$my_class!$my_win!configure!$opt!$val!" + } + } + foreach comp [dict keys $class_info_dict] { +#puts stderr "OPT1!$opt!$comp![dict get $class_info_dict $comp]!" + if {[dict exists $class_info_dict $comp -keptoptions]} { + if {[lsearch [dict get $class_info_dict $comp -keptoptions] $opt] >= 0} { + if {$found == 0} { + # we use the option value of the first component for setting + # the option, as the components are traversed in the dict + # depending on the ordering of the component creation!! + set my_info [uplevel 1 \[set $comp\] configure $opt] + set resource [lindex $my_info 1] + set class [lindex $my_info 2] + set default_val [lindex $my_info 3] + set found 2 + set val [uplevel #0 ::option get $my_win $resource $class] + if {[::dict exists $argsDict $opt]} { + # we have an explicitly set option + set val [::dict get $argsDict $opt] + } else { + if {[string length $val] == 0} { + set val $default_val + } + } +#puts stderr "OPT2!$opt!$val!" + set ::itcl::internal::variables::${win}::itcl_options($opt) $val + set ::itcl::internal::variables::${win}::__itcl_option_infos($opt) [list $resource $class $default_val] +# uplevel 1 [list set itcl_options($opt) [list $val]] + } + if {[catch {uplevel 1 \[set $comp\] configure $opt [list $val]} msg]} { +puts stderr "initoptions ERR2!$msg!$my_class!$comp!configure!$opt!$val!" + } + if {![uplevel 1 info exists itcl_option_components($opt)]} { + set itcl_option_components($opt) [list] + } + if {[lsearch [set itcl_option_components($opt)] $comp] < 0} { + if {![catch { + set optval [uplevel 1 [list set itcl_options($opt)]] + } msg3]} { + uplevel 1 \[set $comp\] configure $opt $optval + } + lappend itcl_option_components($opt) $comp + } + } + } + } + } +# uplevel 1 $opt_lst +} + +# ======================= setoptions =========================== + +proc setoptions {args} { + +#puts stderr "setOPT!!$args!" + if {[llength $args]} { + set argsDict [dict create {*}$args] + } else { + set argsDict [dict create] + } + set my_class [uplevel 1 namespace current] + set myOptions [namespace eval $my_class {info options}] +#puts stderr "OPTS!$win!$my_class![join [lsort $myOptions]] \n]!" + set opt_lst [list configure] + foreach opt [lsort $myOptions] { + set found 0 + if {[catch { + set resource [uplevel 1 info option $opt -resource] + set class [uplevel 1 info option $opt -class] + set default_val [uplevel 1 info option $opt -default] + set found 1 + } msg]} { +# puts stderr "MSG!$opt!$msg!" + } +#puts stderr "OPT!$opt!$found!" + if {$found} { + set val "" + if {[::dict exists $argsDict $opt]} { + # we have an explicitly set option + set val [::dict get $argsDict $opt] + } else { + if {[string length $val] == 0} { + set val $default_val + } + } + set myObj [uplevel 1 set this] +#puts stderr "myObj!$myObj!" + set ::itcl::internal::variables::${myObj}::itcl_options($opt) $val + set ::itcl::internal::variables::${myObj}::__itcl_option_infos($opt) [list $resource $class $default_val] +#puts stderr "OPT1!$opt!$val!" + uplevel 1 [list set itcl_options($opt) [list $val]] +# if {[catch {uplevel 1 $myObj configure $opt [list $val]} msg]} { +#puts stderr "initoptions ERR!$msg!$my_class!$my_win!configure!$opt!$val!" +# } + } + } +# uplevel 1 $opt_lst +} + +# ========================= keepcomponentoption ====================== +# Invoked by Tcl during evaluating constructor whenever +# the "keepcomponentoption" command is invoked to list the options +# to be kept when an ::itcl::extendedclass component has been setup +# for an object. +# +# It checks, for all arguments, if the opt is an option of that class +# and of that component. If that is the case it adds the component name +# to the list of components for that option. +# The variable is the object variable: itcl_option_components($opt) +# +# Handles the following syntax: +# +# keepcomponentoption ? ...? +# +# ====================================================================== + + +proc keepcomponentoption {args} { + upvar win win + upvar itcl_hull itcl_hull + + set usage "wrong # args, should be: keepcomponentoption componentName optionName ?optionName ...?" + +#puts stderr "KEEP!$args![uplevel 1 namespace current]!" + if {[llength $args] < 2} { + puts stderr $usage + return -code error + } + set my_hull [uplevel 1 set itcl_hull] + set my_class [uplevel 1 namespace current] + set comp [lindex $args 0] + set args [lrange $args 1 end] + set class_info_dict [dict get $::itcl::internal::dicts::classComponents $my_class] + if {![dict exists $class_info_dict $comp]} { + puts stderr "keepcomponentoption cannot find component \"$comp\"" + return -code error + } + set class_comp_dict [dict get $class_info_dict $comp] + if {![dict exists $class_comp_dict -keptoptions]} { + dict set class_comp_dict -keptoptions [list] + } + foreach opt $args { +#puts stderr "KEEP!$opt!" + if {[string range $opt 0 0] ne "-"} { + puts stderr "keepcomponentoption: option must begin with a \"-\"!" + return -code error + } + if {[lsearch [dict get $class_comp_dict -keptoptions] $opt] < 0} { + dict lappend class_comp_dict -keptoptions $opt + } + } + if {![info exists ::itcl::internal::component_objects([lindex [uplevel 1 info context] 1])]} { + set comp_object $::itcl::internal::component_objects([lindex [uplevel 1 info context] 1]) + } else { + set comp_object "unknown_comp_obj_$comp!" + } + dict set class_info_dict $comp $class_comp_dict + dict set ::itcl::internal::dicts::classComponents $my_class $class_info_dict +puts stderr "CLDI!$class_comp_dict!" + addToItclOptions $my_class $comp_object $args [list] +} + +proc ignorecomponentoption {args} { +puts stderr "IGNORE_COMPONENT_OPTION!$args!" +} + +proc renamecomponentoption {args} { +puts stderr "rename_COMPONENT_OPTION!$args!" +} + +proc addoptioncomponent {args} { +puts stderr "ADD_OPTION_COMPONENT!$args!" +} + +proc ignoreoptioncomponent {args} { +puts stderr "IGNORE_OPTION_COMPONENT!$args!" +} + +proc renameoptioncomponent {args} { +puts stderr "RENAME_OPTION_COMPONENT!$args!" +} + +proc getEclassOptions {args} { + upvar win win + +#puts stderr "getEclassOptions!$args!$win![uplevel 1 namespace current]!" +#parray ::itcl::internal::variables::${win}::itcl_options + set result [list] + foreach opt [array names ::itcl::internal::variables::${win}::itcl_options] { + if {[catch { + foreach {res cls def} [set ::itcl::internal::variables::${win}::__itcl_option_infos($opt)] break + lappend result [list $opt $res $cls $def [set ::itcl::internal::variables::${win}::itcl_options($opt)]] + } msg]} { + } + } + return $result +} + +proc eclassConfigure {args} { + upvar win win + +#puts stderr "+++ eclassConfigure!$args!" + if {[llength $args] > 1} { + foreach {opt val} $args break + if {[::info exists ::itcl::internal::variables::${win}::itcl_options($opt)]} { + set ::itcl::internal::variables::${win}::itcl_options($opt) $val + return + } + } else { + foreach {opt} $args break + if {[::info exists ::itcl::internal::variables::${win}::itcl_options($opt)]} { +#puts stderr "OP![set ::itcl::internal::variables::${win}::itcl_options($opt)]!" + foreach {res cls def} [set ::itcl::internal::variables::${win}::__itcl_option_infos($opt)] break + return [list $opt $res $cls $def [set ::itcl::internal::variables::${win}::itcl_options($opt)]] + } + } + return -code error +} + +} diff --git a/lib/itcl4.3.0/itclWidget.tcl b/lib/itcl4.3.0/itclWidget.tcl new file mode 100644 index 0000000000000000000000000000000000000000..daa5309c42c20c631c45797e739ebbe5511ec55a --- /dev/null +++ b/lib/itcl4.3.0/itclWidget.tcl @@ -0,0 +1,447 @@ +# +# itclWidget.tcl +# ---------------------------------------------------------------------- +# Invoked automatically upon startup to customize the interpreter +# for [incr Tcl] when one of ::itcl::widget or ::itcl::widgetadaptor is called. +# ---------------------------------------------------------------------- +# AUTHOR: Arnulf P. Wiedemann +# +# ---------------------------------------------------------------------- +# Copyright (c) 2008 Arnulf P. Wiedemann +# ====================================================================== +# See the file "license.terms" for information on usage and +# redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. + +package require Tk 8.6 9 +# package require itclwidget [set ::itcl::version] + +namespace eval ::itcl { + +proc widget {name args} { + set result [uplevel 1 ::itcl::internal::commands::genericclass widget $name $args] + # we handle create by owerselfs !! allow classunknown to handle that + oo::objdefine $result unexport create + return $result +} + +proc widgetadaptor {name args} { + set result [uplevel 1 ::itcl::internal::commands::genericclass widgetadaptor $name $args] + # we handle create by owerselfs !! allow classunknown to handle that + oo::objdefine $result unexport create + return $result +} + +} ; # end ::itcl + + +namespace eval ::itcl::internal::commands { + +proc initWidgetOptions {varNsName widgetName className} { + set myDict [set ::itcl::internal::dicts::classOptions] + if {$myDict eq ""} { + return + } + if {![dict exists $myDict $className]} { + return + } + set myDict [dict get $myDict $className] + foreach option [dict keys $myDict] { + set infos [dict get $myDict $option] + set resource [dict get $infos -resource] + set class [dict get $infos -class] + set value [::option get $widgetName $resource $class] + if {$value eq ""} { + if {[dict exists $infos -default]} { + set defaultValue [dict get $infos -default] + uplevel 1 set ${varNsName}::itcl_options($option) $defaultValue + } + } else { + uplevel 1 set ${varNsName}::itcl_options($option) $value + } + } +} + +proc initWidgetDelegatedOptions {varNsName widgetName className args} { + set myDict [set ::itcl::internal::dicts::classDelegatedOptions] + if {$myDict eq ""} { + return + } + if {![dict exists $myDict $className]} { + return + } + set myDict [dict get $myDict $className] + foreach option [dict keys $myDict] { + set infos [dict get $myDict $option] + if {![dict exists $infos -resource]} { + # this is the case when delegating "*" + continue + } + if {![dict exists $infos -component]} { + # nothing to do + continue + } + # check if not in the command line options + # these have higher priority + set myOption $option + if {[dict exists $infos -as]} { + set myOption [dict get $infos -as] + } + set noOptionSet 0 + foreach {optName optVal} $args { + if {$optName eq $myOption} { + set noOptionSet 1 + break + } + } + if {$noOptionSet} { + continue + } + set resource [dict get $infos -resource] + set class [dict get $infos -class] + set component [dict get $infos -component] + set value [::option get $widgetName $resource $class] + if {$component ne ""} { + if {$value ne ""} { + set compVar [namespace eval ${varNsName}${className} "set $component"] + if {$compVar ne ""} { + uplevel 1 $compVar configure $myOption $value + } + } + } + } +} + +proc widgetinitobjectoptions {varNsName widgetName className} { +#puts stderr "initWidgetObjectOptions!$varNsName!$widgetName!$className!" +} + +proc deletehull {newName oldName what} { + if {$what eq "delete"} { + set name [namespace tail $newName] + regsub {hull[0-9]+} $name {} name + rename $name {} + } + if {$what eq "rename"} { + set name [namespace tail $newName] + regsub {hull[0-9]+} $name {} name + rename $name {} + } +} + +proc hullandoptionsinstall {objectName className widgetClass hulltype args} { + if {$hulltype eq ""} { + set hulltype frame + } + set idx 0 + set found 0 + foreach {optName optValue} $args { + if {$optName eq "-class"} { + set found 1 + set widgetClass $optValue + break + } + incr idx + } + if {$found} { + set args [lreplace $args $idx [expr {$idx + 1}]] + } + if {$widgetClass eq ""} { + set widgetClass $className + set widgetClass [string totitle $widgetClass] + } + set cmd "set win $objectName; ::itcl::builtin::installhull using $hulltype -class $widgetClass $args" + uplevel 2 $cmd +} + +} ; # end ::itcl::internal::commands + +namespace eval ::itcl::builtin { + +proc installhull {args} { + set cmdPath ::itcl::internal::commands + set className [uplevel 1 info class] + + set replace 0 + switch -- [llength $args] { + 0 { + return -code error\ + "wrong # args: should be \"[lindex [info level 0] 0]\ + name|using ?arg ...?\"" + } + 1 { + set widgetName [lindex $args 0] + set varNsName $::itcl::internal::varNsName($widgetName) + } + default { + upvar win win + set widgetName $win + + set varNsName $::itcl::internal::varNsName($widgetName) + set widgetType [lindex $args 1] + incr replace + if {[llength $args] > 3 && [lindex $args 2] eq "-class"} { + set classNam [lindex $args 3] + incr replace 2 + } else { + set classNam [string totitle $widgetType] + } + uplevel 1 [lreplace $args 0 $replace $widgetType $widgetName -class $classNam] + uplevel 1 [list ${cmdPath}::initWidgetOptions $varNsName $widgetName $className] + } + } + + # initialize the itcl_hull variable + set i 0 + set nam ::itcl::internal::widgets::hull + while {1} { + incr i + set hullNam ${nam}${i}$widgetName + if {[::info command $hullNam] eq ""} { + break + } + } + uplevel 1 [list ${cmdPath}::sethullwindowname $widgetName] + uplevel 1 [list ::rename $widgetName $hullNam] + uplevel 1 [list ::trace add command $hullNam {delete rename} ::itcl::internal::commands::deletehull] + catch {${cmdPath}::checksetitclhull [list] 0} + namespace eval ${varNsName}${className} "set itcl_hull $hullNam" + catch {${cmdPath}::checksetitclhull [list] 2} + uplevel 1 [lreplace $args 0 $replace ${cmdPath}::initWidgetDelegatedOptions $varNsName $widgetName $className] +} + +proc installcomponent {args} { + upvar win win + + set className [uplevel 1 info class] + set myType [${className}::info types [namespace tail $className]] + set isType 0 + if {$myType ne ""} { + set isType 1 + } + set numArgs [llength $args] + set usage "usage: installcomponent using ?-option value ...?" + if {$numArgs < 4} { + error $usage + } + foreach {componentName using widgetType widgetPath} $args break + set opts [lrange $args 4 end] + if {$using ne "using"} { + error $usage + } + if {!$isType} { + set hullExists [uplevel 1 ::info exists itcl_hull] + if {!$hullExists} { + error "cannot install \"$componentName\" before \"itcl_hull\" exists" + } + set hullVal [uplevel 1 set itcl_hull] + if {$hullVal eq ""} { + error "cannot install \"$componentName\" before \"itcl_hull\" exists" + } + } + # check for delegated option and ask the option database for the values + # first check for number of delegated options + set numOpts 0 + set starOption 0 + set myDict [set ::itcl::internal::dicts::classDelegatedOptions] + if {[dict exists $myDict $className]} { + set myDict [dict get $myDict $className] + foreach option [dict keys $myDict] { + if {$option eq "*"} { + set starOption 1 + } + incr numOpts + } + } + set myOptionDict [set ::itcl::internal::dicts::classOptions] + if {[dict exists $myOptionDict $className]} { + set myOptionDict [dict get $myOptionDict $className] + } + set cmd [list $widgetPath configure] + set cmd1 "set $componentName \[$widgetType $widgetPath\]" + uplevel 1 $cmd1 + if {$starOption} { + upvar $componentName compName + set cmd1 [list $compName configure] + set configInfos [uplevel 1 $cmd1] + foreach entry $configInfos { + if {[llength $entry] > 2} { + foreach {optName resource class defaultValue} $entry break + set val "" + catch { + set val [::option get $win $resource $class] + } + if {$val ne ""} { + set addOpt 1 + if {[dict exists $myDict $$optName]} { + set addOpt 0 + } else { + set starDict [dict get $myDict "*"] + if {[dict exists $starDict -except]} { + set exceptions [dict get $starDict -except] + if {[lsearch $exceptions $optName] >= 0} { + set addOpt 0 + } + + } + if {[dict exists $myOptionDict $optName]} { + set addOpt 0 + } + } + if {$addOpt} { + lappend cmd $optName $val + } + + } + + } + } + } else { + foreach optName [dict keys $myDict] { + set optInfos [dict get $myDict $optName] + set resource [dict get $optInfos -resource] + set class [namespace tail $className] + set class [string totitle $class] + set val "" + catch { + set val [::option get $win $resource $class] + } + if {$val ne ""} { + if {[dict exists $optInfos -as] } { + set optName [dict get $optInfos -as] + } + lappend cmd $optName $val + } + } + } + lappend cmd {*}$opts + uplevel 1 $cmd +} + +} ; # end ::itcl::builtin + +set ::itcl::internal::dicts::hullTypes [list \ + frame \ + toplevel \ + labelframe \ + ttk:frame \ + ttk:toplevel \ + ttk:labelframe \ + ] + +namespace eval ::itcl::builtin::Info { + +proc hulltypes {args} { + namespace upvar ::itcl::internal::dicts hullTypes hullTypes + + set numArgs [llength $args] + if {$numArgs > 1} { + error "wrong # args should be: info hulltypes ??" + } + set pattern "" + if {$numArgs > 0} { + set pattern [lindex $args 0] + } + if {$pattern ne ""} { + return [lsearch -all -inline -glob $hullTypes $pattern] + } + return $hullTypes + +} + +proc widgetclasses {args} { + set numArgs [llength $args] + if {$numArgs > 1} { + error "wrong # args should be: info widgetclasses ??" + } + set pattern "" + if {$numArgs > 0} { + set pattern [lindex $args 0] + } + set myDict [set ::itcl::internal::dicts::classes] + if {![dict exists $myDict widget]} { + return [list] + } + set myDict [dict get $myDict widget] + set result [list] + if {$pattern ne ""} { + foreach key [dict keys $myDict] { + set myInfo [dict get $myDict $key] + set value [dict get $myInfo -widget] + if {[string match $pattern $value]} { + lappend result $value + } + } + } else { + foreach key [dict keys $myDict] { + set myInfo [dict get $myDict $key] + lappend result [dict get $myInfo -widget] + } + } + return $result +} + +proc widgets {args} { + set numArgs [llength $args] + if {$numArgs > 1} { + error "wrong # args should be: info widgets ??" + } + set pattern "" + if {$numArgs > 0} { + set pattern [lindex $args 0] + } + set myDict [set ::itcl::internal::dicts::classes] + if {![dict exists $myDict widget]} { + return [list] + } + set myDict [dict get $myDict widget] + set result [list] + if {$pattern ne ""} { + foreach key [dict keys $myDict] { + set myInfo [dict get $myDict $key] + set value [dict get $myInfo -name] + if {[string match $pattern $value]} { + lappend result $value + } + } + } else { + foreach key [dict keys $myDict] { + set myInfo [dict get $myDict $key] + lappend result [dict get $myInfo -name] + } + } + return $result +} + +proc widgetadaptors {args} { + set numArgs [llength $args] + if {$numArgs > 1} { + error "wrong # args should be: info widgetadaptors ??" + } + set pattern "" + if {$numArgs > 0} { + set pattern [lindex $args 0] + } + set myDict [set ::itcl::internal::dicts::classes] + if {![dict exists $myDict widgetadaptor]} { + return [list] + } + set myDict [dict get $myDict widgetadaptor] + set result [list] + if {$pattern ne ""} { + foreach key [dict keys $myDict] { + set myInfo [dict get $myDict $key] + set value [dict get $myInfo -name] + if {[string match $pattern $value]} { + lappend result $value + } + } + } else { + foreach key [dict keys $myDict] { + set myInfo [dict get $myDict $key] + lappend result [dict get $myInfo -name] + } + } + return $result +} + +} ; # end ::itcl::builtin::Info diff --git a/lib/itcl4.3.0/libitclstub4.3.0.a b/lib/itcl4.3.0/libitclstub4.3.0.a new file mode 100644 index 0000000000000000000000000000000000000000..95bfb45c8ba74d1bfa6427f00b8f34b05a50b585 Binary files /dev/null and b/lib/itcl4.3.0/libitclstub4.3.0.a differ diff --git a/lib/itcl4.3.0/pkgIndex.tcl b/lib/itcl4.3.0/pkgIndex.tcl new file mode 100644 index 0000000000000000000000000000000000000000..7f16270d22215e97b4eab24dff2350b569bbe8b4 --- /dev/null +++ b/lib/itcl4.3.0/pkgIndex.tcl @@ -0,0 +1,14 @@ +# -*- tcl -*- +# Tcl package index file, version 1.1 +# + +if {![package vsatisfies [package provide Tcl] 8.6-]} {return} + +if {[package vsatisfies [package provide Tcl] 9.0-]} { + package ifneeded itcl 4.3.0 \ + [list load [file join $dir libtcl9itcl4.3.0.so] Itcl] +} else { + package ifneeded itcl 4.3.0 \ + [list load [file join $dir libitcl4.3.0.so] Itcl] +} +package ifneeded Itcl 4.3.0 [list package require -exact itcl 4.3.0] diff --git a/lib/libX11-xcb.so b/lib/libX11-xcb.so new file mode 100644 index 0000000000000000000000000000000000000000..30b5b9abb4f1eda503b140e60f98ef29cc5a000d Binary files /dev/null and b/lib/libX11-xcb.so differ diff --git a/lib/libX11-xcb.so.1 b/lib/libX11-xcb.so.1 new file mode 100644 index 0000000000000000000000000000000000000000..30b5b9abb4f1eda503b140e60f98ef29cc5a000d Binary files /dev/null and b/lib/libX11-xcb.so.1 differ diff --git a/lib/libX11-xcb.so.1.0.0 b/lib/libX11-xcb.so.1.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..30b5b9abb4f1eda503b140e60f98ef29cc5a000d Binary files /dev/null and b/lib/libX11-xcb.so.1.0.0 differ diff --git a/lib/libXau.so b/lib/libXau.so new file mode 100644 index 0000000000000000000000000000000000000000..208456b0da0f2be9f0f73469fd4453323c085cb6 Binary files /dev/null and b/lib/libXau.so differ diff --git a/lib/libXau.so.6 b/lib/libXau.so.6 new file mode 100644 index 0000000000000000000000000000000000000000..208456b0da0f2be9f0f73469fd4453323c085cb6 Binary files /dev/null and b/lib/libXau.so.6 differ diff --git a/lib/libXau.so.6.0.0 b/lib/libXau.so.6.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..208456b0da0f2be9f0f73469fd4453323c085cb6 Binary files /dev/null and b/lib/libXau.so.6.0.0 differ diff --git a/lib/libXdmcp.so b/lib/libXdmcp.so new file mode 100644 index 0000000000000000000000000000000000000000..71b90c70d647ff04781152969bc18f4ee626368f Binary files /dev/null and b/lib/libXdmcp.so differ diff --git a/lib/libXdmcp.so.6 b/lib/libXdmcp.so.6 new file mode 100644 index 0000000000000000000000000000000000000000..71b90c70d647ff04781152969bc18f4ee626368f Binary files /dev/null and b/lib/libXdmcp.so.6 differ diff --git a/lib/libXdmcp.so.6.0.0 b/lib/libXdmcp.so.6.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..71b90c70d647ff04781152969bc18f4ee626368f Binary files /dev/null and b/lib/libXdmcp.so.6.0.0 differ diff --git a/lib/libffi.7.so b/lib/libffi.7.so new file mode 100644 index 0000000000000000000000000000000000000000..c5ff2932b8dc1962f0c0c27cc25b9bce136ebe84 Binary files /dev/null and b/lib/libffi.7.so differ diff --git a/lib/libffi.8.so b/lib/libffi.8.so new file mode 100644 index 0000000000000000000000000000000000000000..c5ff2932b8dc1962f0c0c27cc25b9bce136ebe84 Binary files /dev/null and b/lib/libffi.8.so differ diff --git a/lib/libffi.a b/lib/libffi.a new file mode 100644 index 0000000000000000000000000000000000000000..468924e8f5edd555d159c10062c9ceff7b675cb8 Binary files /dev/null and b/lib/libffi.a differ diff --git a/lib/libffi.so b/lib/libffi.so new file mode 100644 index 0000000000000000000000000000000000000000..c5ff2932b8dc1962f0c0c27cc25b9bce136ebe84 Binary files /dev/null and b/lib/libffi.so differ diff --git a/lib/libffi.so.7 b/lib/libffi.so.7 new file mode 100644 index 0000000000000000000000000000000000000000..c5ff2932b8dc1962f0c0c27cc25b9bce136ebe84 Binary files /dev/null and b/lib/libffi.so.7 differ diff --git a/lib/libffi.so.8 b/lib/libffi.so.8 new file mode 100644 index 0000000000000000000000000000000000000000..c5ff2932b8dc1962f0c0c27cc25b9bce136ebe84 Binary files /dev/null and b/lib/libffi.so.8 differ diff --git a/lib/libffi.so.8.1.4 b/lib/libffi.so.8.1.4 new file mode 100644 index 0000000000000000000000000000000000000000..c5ff2932b8dc1962f0c0c27cc25b9bce136ebe84 Binary files /dev/null and b/lib/libffi.so.8.1.4 differ diff --git a/lib/libform.so b/lib/libform.so new file mode 100644 index 0000000000000000000000000000000000000000..2ec97ee8fcbcc5305f64816d29ce7970bc0c0d91 Binary files /dev/null and b/lib/libform.so differ diff --git a/lib/libform.so.6 b/lib/libform.so.6 new file mode 100644 index 0000000000000000000000000000000000000000..2ec97ee8fcbcc5305f64816d29ce7970bc0c0d91 Binary files /dev/null and b/lib/libform.so.6 differ diff --git a/lib/libform.so.6.5 b/lib/libform.so.6.5 new file mode 100644 index 0000000000000000000000000000000000000000..2ec97ee8fcbcc5305f64816d29ce7970bc0c0d91 Binary files /dev/null and b/lib/libform.so.6.5 differ diff --git a/lib/libformw.so b/lib/libformw.so new file mode 100644 index 0000000000000000000000000000000000000000..2ec97ee8fcbcc5305f64816d29ce7970bc0c0d91 Binary files /dev/null and b/lib/libformw.so differ diff --git a/lib/libformw.so.6 b/lib/libformw.so.6 new file mode 100644 index 0000000000000000000000000000000000000000..2ec97ee8fcbcc5305f64816d29ce7970bc0c0d91 Binary files /dev/null and b/lib/libformw.so.6 differ diff --git a/lib/libformw.so.6.5 b/lib/libformw.so.6.5 new file mode 100644 index 0000000000000000000000000000000000000000..2ec97ee8fcbcc5305f64816d29ce7970bc0c0d91 Binary files /dev/null and b/lib/libformw.so.6.5 differ diff --git a/lib/libgcc_s.so b/lib/libgcc_s.so new file mode 100644 index 0000000000000000000000000000000000000000..c8e92242fc5b32888222e279088df08e791bd52c --- /dev/null +++ b/lib/libgcc_s.so @@ -0,0 +1,4 @@ +/* GNU ld script + Use the shared library, but some functions are only in + the static library. */ +GROUP ( libgcc_s.so.1 -lgcc ) diff --git a/lib/libhistory.a b/lib/libhistory.a new file mode 100644 index 0000000000000000000000000000000000000000..dc5b4a3db2fb47f41abe32078272f0e6388955ce Binary files /dev/null and b/lib/libhistory.a differ diff --git a/lib/libhistory.so b/lib/libhistory.so new file mode 100644 index 0000000000000000000000000000000000000000..a4ecc028c19c65c5c4d6cfe6d8b1f76725e85efa Binary files /dev/null and b/lib/libhistory.so differ diff --git a/lib/libhistory.so.8 b/lib/libhistory.so.8 new file mode 100644 index 0000000000000000000000000000000000000000..a4ecc028c19c65c5c4d6cfe6d8b1f76725e85efa Binary files /dev/null and b/lib/libhistory.so.8 differ diff --git a/lib/libhistory.so.8.3 b/lib/libhistory.so.8.3 new file mode 100644 index 0000000000000000000000000000000000000000..a4ecc028c19c65c5c4d6cfe6d8b1f76725e85efa Binary files /dev/null and b/lib/libhistory.so.8.3 differ diff --git a/lib/libmenu.a b/lib/libmenu.a new file mode 100644 index 0000000000000000000000000000000000000000..e9ab4b0608c3691b2e8910b2622b8b9cef667338 Binary files /dev/null and b/lib/libmenu.a differ diff --git a/lib/libmenu.so b/lib/libmenu.so new file mode 100644 index 0000000000000000000000000000000000000000..7cb31173a4e4378f4c0ff419363e9c12093a66de Binary files /dev/null and b/lib/libmenu.so differ diff --git a/lib/libmenu.so.6 b/lib/libmenu.so.6 new file mode 100644 index 0000000000000000000000000000000000000000..7cb31173a4e4378f4c0ff419363e9c12093a66de Binary files /dev/null and b/lib/libmenu.so.6 differ diff --git a/lib/libmenu.so.6.5 b/lib/libmenu.so.6.5 new file mode 100644 index 0000000000000000000000000000000000000000..7cb31173a4e4378f4c0ff419363e9c12093a66de Binary files /dev/null and b/lib/libmenu.so.6.5 differ diff --git a/lib/libmenuw.a b/lib/libmenuw.a new file mode 100644 index 0000000000000000000000000000000000000000..e9ab4b0608c3691b2e8910b2622b8b9cef667338 Binary files /dev/null and b/lib/libmenuw.a differ diff --git a/lib/libmenuw.so b/lib/libmenuw.so new file mode 100644 index 0000000000000000000000000000000000000000..7cb31173a4e4378f4c0ff419363e9c12093a66de Binary files /dev/null and b/lib/libmenuw.so differ diff --git a/lib/libmenuw.so.6 b/lib/libmenuw.so.6 new file mode 100644 index 0000000000000000000000000000000000000000..7cb31173a4e4378f4c0ff419363e9c12093a66de Binary files /dev/null and b/lib/libmenuw.so.6 differ diff --git a/lib/libmenuw.so.6.5 b/lib/libmenuw.so.6.5 new file mode 100644 index 0000000000000000000000000000000000000000..7cb31173a4e4378f4c0ff419363e9c12093a66de Binary files /dev/null and b/lib/libmenuw.so.6.5 differ diff --git a/lib/libnsl.so b/lib/libnsl.so new file mode 100644 index 0000000000000000000000000000000000000000..29f878d574c30bdef07b0ce7b4d6cb2193c9cfb7 Binary files /dev/null and b/lib/libnsl.so differ diff --git a/lib/libnsl.so.3 b/lib/libnsl.so.3 new file mode 100644 index 0000000000000000000000000000000000000000..29f878d574c30bdef07b0ce7b4d6cb2193c9cfb7 Binary files /dev/null and b/lib/libnsl.so.3 differ diff --git a/lib/libnsl.so.3.0.0 b/lib/libnsl.so.3.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..29f878d574c30bdef07b0ce7b4d6cb2193c9cfb7 Binary files /dev/null and b/lib/libnsl.so.3.0.0 differ diff --git a/lib/libpanel.a b/lib/libpanel.a new file mode 100644 index 0000000000000000000000000000000000000000..74db65376e3a545c50d7a4e4f71a76d1ecb9e8c4 Binary files /dev/null and b/lib/libpanel.a differ diff --git a/lib/libpanel.so b/lib/libpanel.so new file mode 100644 index 0000000000000000000000000000000000000000..0abaf7359565d5b177893357615e4d1e779068e5 Binary files /dev/null and b/lib/libpanel.so differ diff --git a/lib/libpanel.so.6 b/lib/libpanel.so.6 new file mode 100644 index 0000000000000000000000000000000000000000..0abaf7359565d5b177893357615e4d1e779068e5 Binary files /dev/null and b/lib/libpanel.so.6 differ diff --git a/lib/libpanel.so.6.5 b/lib/libpanel.so.6.5 new file mode 100644 index 0000000000000000000000000000000000000000..0abaf7359565d5b177893357615e4d1e779068e5 Binary files /dev/null and b/lib/libpanel.so.6.5 differ diff --git a/lib/libpanelw.a b/lib/libpanelw.a new file mode 100644 index 0000000000000000000000000000000000000000..74db65376e3a545c50d7a4e4f71a76d1ecb9e8c4 Binary files /dev/null and b/lib/libpanelw.a differ diff --git a/lib/libpanelw.so b/lib/libpanelw.so new file mode 100644 index 0000000000000000000000000000000000000000..0abaf7359565d5b177893357615e4d1e779068e5 Binary files /dev/null and b/lib/libpanelw.so differ diff --git a/lib/libpanelw.so.6 b/lib/libpanelw.so.6 new file mode 100644 index 0000000000000000000000000000000000000000..0abaf7359565d5b177893357615e4d1e779068e5 Binary files /dev/null and b/lib/libpanelw.so.6 differ diff --git a/lib/libpanelw.so.6.5 b/lib/libpanelw.so.6.5 new file mode 100644 index 0000000000000000000000000000000000000000..0abaf7359565d5b177893357615e4d1e779068e5 Binary files /dev/null and b/lib/libpanelw.so.6.5 differ diff --git a/lib/libpython3.so b/lib/libpython3.so new file mode 100644 index 0000000000000000000000000000000000000000..fbf336fea1aef33d6bc742b9d88239b8c37773f7 Binary files /dev/null and b/lib/libpython3.so differ diff --git a/lib/libtclstub8.6.a b/lib/libtclstub8.6.a new file mode 100644 index 0000000000000000000000000000000000000000..9d28825e8872d4a8f2b8d1929bf27804c7c58fcd Binary files /dev/null and b/lib/libtclstub8.6.a differ diff --git a/lib/libtkstub8.6.a b/lib/libtkstub8.6.a new file mode 100644 index 0000000000000000000000000000000000000000..6342826605079700e43ce35f73265730458b8a71 Binary files /dev/null and b/lib/libtkstub8.6.a differ diff --git a/lib/libuuid.a b/lib/libuuid.a new file mode 100644 index 0000000000000000000000000000000000000000..130124cef4b653a84827c7c3fe9b0e7eba0daa0d Binary files /dev/null and b/lib/libuuid.a differ diff --git a/lib/libuuid.so b/lib/libuuid.so new file mode 100644 index 0000000000000000000000000000000000000000..87e7c36b4c42406e82c44d062a11e9cbb7f0c4c4 Binary files /dev/null and b/lib/libuuid.so differ diff --git a/lib/libuuid.so.1 b/lib/libuuid.so.1 new file mode 100644 index 0000000000000000000000000000000000000000..87e7c36b4c42406e82c44d062a11e9cbb7f0c4c4 Binary files /dev/null and b/lib/libuuid.so.1 differ diff --git a/lib/libuuid.so.1.3.0 b/lib/libuuid.so.1.3.0 new file mode 100644 index 0000000000000000000000000000000000000000..87e7c36b4c42406e82c44d062a11e9cbb7f0c4c4 Binary files /dev/null and b/lib/libuuid.so.1.3.0 differ diff --git a/lib/libxcb-composite.so b/lib/libxcb-composite.so new file mode 100644 index 0000000000000000000000000000000000000000..20d5777f600d15a4861823a590360bb3c40fcd77 Binary files /dev/null and b/lib/libxcb-composite.so differ diff --git a/lib/libxcb-composite.so.0 b/lib/libxcb-composite.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..20d5777f600d15a4861823a590360bb3c40fcd77 Binary files /dev/null and b/lib/libxcb-composite.so.0 differ diff --git a/lib/libxcb-composite.so.0.0.0 b/lib/libxcb-composite.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..20d5777f600d15a4861823a590360bb3c40fcd77 Binary files /dev/null and b/lib/libxcb-composite.so.0.0.0 differ diff --git a/lib/libxcb-damage.so b/lib/libxcb-damage.so new file mode 100644 index 0000000000000000000000000000000000000000..de03f5464feb29a64096d5bfb54ffe77b4d374d0 Binary files /dev/null and b/lib/libxcb-damage.so differ diff --git a/lib/libxcb-damage.so.0 b/lib/libxcb-damage.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..de03f5464feb29a64096d5bfb54ffe77b4d374d0 Binary files /dev/null and b/lib/libxcb-damage.so.0 differ diff --git a/lib/libxcb-damage.so.0.0.0 b/lib/libxcb-damage.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..de03f5464feb29a64096d5bfb54ffe77b4d374d0 Binary files /dev/null and b/lib/libxcb-damage.so.0.0.0 differ diff --git a/lib/libxcb-dbe.so b/lib/libxcb-dbe.so new file mode 100644 index 0000000000000000000000000000000000000000..80afc29ad9c859c2aa1a746add2b0f61552d7eda Binary files /dev/null and b/lib/libxcb-dbe.so differ diff --git a/lib/libxcb-dbe.so.0 b/lib/libxcb-dbe.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..80afc29ad9c859c2aa1a746add2b0f61552d7eda Binary files /dev/null and b/lib/libxcb-dbe.so.0 differ diff --git a/lib/libxcb-dbe.so.0.0.0 b/lib/libxcb-dbe.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..80afc29ad9c859c2aa1a746add2b0f61552d7eda Binary files /dev/null and b/lib/libxcb-dbe.so.0.0.0 differ diff --git a/lib/libxcb-dpms.so b/lib/libxcb-dpms.so new file mode 100644 index 0000000000000000000000000000000000000000..836aa46c54bc7b354c057e5f0e851e261d393a9c Binary files /dev/null and b/lib/libxcb-dpms.so differ diff --git a/lib/libxcb-dpms.so.0 b/lib/libxcb-dpms.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..836aa46c54bc7b354c057e5f0e851e261d393a9c Binary files /dev/null and b/lib/libxcb-dpms.so.0 differ diff --git a/lib/libxcb-dpms.so.0.0.0 b/lib/libxcb-dpms.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..836aa46c54bc7b354c057e5f0e851e261d393a9c Binary files /dev/null and b/lib/libxcb-dpms.so.0.0.0 differ diff --git a/lib/libxcb-dri2.so b/lib/libxcb-dri2.so new file mode 100644 index 0000000000000000000000000000000000000000..87d593af098ccb3298133ad9d9fe35e9f63474ca Binary files /dev/null and b/lib/libxcb-dri2.so differ diff --git a/lib/libxcb-dri2.so.0 b/lib/libxcb-dri2.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..87d593af098ccb3298133ad9d9fe35e9f63474ca Binary files /dev/null and b/lib/libxcb-dri2.so.0 differ diff --git a/lib/libxcb-dri2.so.0.0.0 b/lib/libxcb-dri2.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..87d593af098ccb3298133ad9d9fe35e9f63474ca Binary files /dev/null and b/lib/libxcb-dri2.so.0.0.0 differ diff --git a/lib/libxcb-dri3.so b/lib/libxcb-dri3.so new file mode 100644 index 0000000000000000000000000000000000000000..cc745736ac5cac1834cccfb999f5cf7f9cd164fa Binary files /dev/null and b/lib/libxcb-dri3.so differ diff --git a/lib/libxcb-dri3.so.0 b/lib/libxcb-dri3.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..cc745736ac5cac1834cccfb999f5cf7f9cd164fa Binary files /dev/null and b/lib/libxcb-dri3.so.0 differ diff --git a/lib/libxcb-dri3.so.0.1.0 b/lib/libxcb-dri3.so.0.1.0 new file mode 100644 index 0000000000000000000000000000000000000000..cc745736ac5cac1834cccfb999f5cf7f9cd164fa Binary files /dev/null and b/lib/libxcb-dri3.so.0.1.0 differ diff --git a/lib/libxcb-present.so b/lib/libxcb-present.so new file mode 100644 index 0000000000000000000000000000000000000000..fc0178cb9f7dff6074cb7167df645544c9a453e2 Binary files /dev/null and b/lib/libxcb-present.so differ diff --git a/lib/libxcb-present.so.0 b/lib/libxcb-present.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..fc0178cb9f7dff6074cb7167df645544c9a453e2 Binary files /dev/null and b/lib/libxcb-present.so.0 differ diff --git a/lib/libxcb-present.so.0.0.0 b/lib/libxcb-present.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..fc0178cb9f7dff6074cb7167df645544c9a453e2 Binary files /dev/null and b/lib/libxcb-present.so.0.0.0 differ diff --git a/lib/libxcb-randr.so b/lib/libxcb-randr.so new file mode 100644 index 0000000000000000000000000000000000000000..6f09722772447520a699b38aeb62e585144c5d99 Binary files /dev/null and b/lib/libxcb-randr.so differ diff --git a/lib/libxcb-randr.so.0 b/lib/libxcb-randr.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..6f09722772447520a699b38aeb62e585144c5d99 Binary files /dev/null and b/lib/libxcb-randr.so.0 differ diff --git a/lib/libxcb-randr.so.0.1.0 b/lib/libxcb-randr.so.0.1.0 new file mode 100644 index 0000000000000000000000000000000000000000..6f09722772447520a699b38aeb62e585144c5d99 Binary files /dev/null and b/lib/libxcb-randr.so.0.1.0 differ diff --git a/lib/libxcb-record.so b/lib/libxcb-record.so new file mode 100644 index 0000000000000000000000000000000000000000..2ec2e7fcf47d00d8412e7cbc4a140c740d59d97e Binary files /dev/null and b/lib/libxcb-record.so differ diff --git a/lib/libxcb-record.so.0 b/lib/libxcb-record.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..2ec2e7fcf47d00d8412e7cbc4a140c740d59d97e Binary files /dev/null and b/lib/libxcb-record.so.0 differ diff --git a/lib/libxcb-record.so.0.0.0 b/lib/libxcb-record.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..2ec2e7fcf47d00d8412e7cbc4a140c740d59d97e Binary files /dev/null and b/lib/libxcb-record.so.0.0.0 differ diff --git a/lib/libxcb-render.so b/lib/libxcb-render.so new file mode 100644 index 0000000000000000000000000000000000000000..cb65e02656d95ebee8855b82cb75ead42393d536 Binary files /dev/null and b/lib/libxcb-render.so differ diff --git a/lib/libxcb-render.so.0 b/lib/libxcb-render.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..cb65e02656d95ebee8855b82cb75ead42393d536 Binary files /dev/null and b/lib/libxcb-render.so.0 differ diff --git a/lib/libxcb-render.so.0.0.0 b/lib/libxcb-render.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..cb65e02656d95ebee8855b82cb75ead42393d536 Binary files /dev/null and b/lib/libxcb-render.so.0.0.0 differ diff --git a/lib/libxcb-res.so b/lib/libxcb-res.so new file mode 100644 index 0000000000000000000000000000000000000000..9d229738462bc1e1ba7cb768e0d5e6b0217d2a77 Binary files /dev/null and b/lib/libxcb-res.so differ diff --git a/lib/libxcb-res.so.0 b/lib/libxcb-res.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..9d229738462bc1e1ba7cb768e0d5e6b0217d2a77 Binary files /dev/null and b/lib/libxcb-res.so.0 differ diff --git a/lib/libxcb-res.so.0.0.0 b/lib/libxcb-res.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..9d229738462bc1e1ba7cb768e0d5e6b0217d2a77 Binary files /dev/null and b/lib/libxcb-res.so.0.0.0 differ diff --git a/lib/libxcb-screensaver.so b/lib/libxcb-screensaver.so new file mode 100644 index 0000000000000000000000000000000000000000..3e15a3df20f86e42fb35d37bb6f4803ff8b1df74 Binary files /dev/null and b/lib/libxcb-screensaver.so differ diff --git a/lib/libxcb-screensaver.so.0 b/lib/libxcb-screensaver.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..3e15a3df20f86e42fb35d37bb6f4803ff8b1df74 Binary files /dev/null and b/lib/libxcb-screensaver.so.0 differ diff --git a/lib/libxcb-screensaver.so.0.0.0 b/lib/libxcb-screensaver.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..3e15a3df20f86e42fb35d37bb6f4803ff8b1df74 Binary files /dev/null and b/lib/libxcb-screensaver.so.0.0.0 differ diff --git a/lib/libxcb-shape.so b/lib/libxcb-shape.so new file mode 100644 index 0000000000000000000000000000000000000000..1214841f39b92792f8bb4dc20fd9cc440305439e Binary files /dev/null and b/lib/libxcb-shape.so differ diff --git a/lib/libxcb-shape.so.0 b/lib/libxcb-shape.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..1214841f39b92792f8bb4dc20fd9cc440305439e Binary files /dev/null and b/lib/libxcb-shape.so.0 differ diff --git a/lib/libxcb-shape.so.0.0.0 b/lib/libxcb-shape.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..1214841f39b92792f8bb4dc20fd9cc440305439e Binary files /dev/null and b/lib/libxcb-shape.so.0.0.0 differ diff --git a/lib/libxcb-shm.so b/lib/libxcb-shm.so new file mode 100644 index 0000000000000000000000000000000000000000..03a8c126a21140b0d43fe36993548e04ea026e91 Binary files /dev/null and b/lib/libxcb-shm.so differ diff --git a/lib/libxcb-shm.so.0 b/lib/libxcb-shm.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..03a8c126a21140b0d43fe36993548e04ea026e91 Binary files /dev/null and b/lib/libxcb-shm.so.0 differ diff --git a/lib/libxcb-shm.so.0.0.0 b/lib/libxcb-shm.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..03a8c126a21140b0d43fe36993548e04ea026e91 Binary files /dev/null and b/lib/libxcb-shm.so.0.0.0 differ diff --git a/lib/libxcb-sync.so b/lib/libxcb-sync.so new file mode 100644 index 0000000000000000000000000000000000000000..76f051604ac445b513453a6b39c67359973344b5 Binary files /dev/null and b/lib/libxcb-sync.so differ diff --git a/lib/libxcb-sync.so.1 b/lib/libxcb-sync.so.1 new file mode 100644 index 0000000000000000000000000000000000000000..76f051604ac445b513453a6b39c67359973344b5 Binary files /dev/null and b/lib/libxcb-sync.so.1 differ diff --git a/lib/libxcb-sync.so.1.0.0 b/lib/libxcb-sync.so.1.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..76f051604ac445b513453a6b39c67359973344b5 Binary files /dev/null and b/lib/libxcb-sync.so.1.0.0 differ diff --git a/lib/libxcb-xf86dri.so b/lib/libxcb-xf86dri.so new file mode 100644 index 0000000000000000000000000000000000000000..9635e33aa23fa9cb366fc38f937f7cf1f9aeab4a Binary files /dev/null and b/lib/libxcb-xf86dri.so differ diff --git a/lib/libxcb-xf86dri.so.0 b/lib/libxcb-xf86dri.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..9635e33aa23fa9cb366fc38f937f7cf1f9aeab4a Binary files /dev/null and b/lib/libxcb-xf86dri.so.0 differ diff --git a/lib/libxcb-xf86dri.so.0.0.0 b/lib/libxcb-xf86dri.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..9635e33aa23fa9cb366fc38f937f7cf1f9aeab4a Binary files /dev/null and b/lib/libxcb-xf86dri.so.0.0.0 differ diff --git a/lib/libxcb-xfixes.so b/lib/libxcb-xfixes.so new file mode 100644 index 0000000000000000000000000000000000000000..1f31351566b16d6ba2cc20e6ab5100d054d920c3 Binary files /dev/null and b/lib/libxcb-xfixes.so differ diff --git a/lib/libxcb-xfixes.so.0 b/lib/libxcb-xfixes.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..1f31351566b16d6ba2cc20e6ab5100d054d920c3 Binary files /dev/null and b/lib/libxcb-xfixes.so.0 differ diff --git a/lib/libxcb-xfixes.so.0.0.0 b/lib/libxcb-xfixes.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..1f31351566b16d6ba2cc20e6ab5100d054d920c3 Binary files /dev/null and b/lib/libxcb-xfixes.so.0.0.0 differ diff --git a/lib/libxcb-xinerama.so b/lib/libxcb-xinerama.so new file mode 100644 index 0000000000000000000000000000000000000000..1662c1ee705349465c71bbdaf67f70853aacb021 Binary files /dev/null and b/lib/libxcb-xinerama.so differ diff --git a/lib/libxcb-xinerama.so.0 b/lib/libxcb-xinerama.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..1662c1ee705349465c71bbdaf67f70853aacb021 Binary files /dev/null and b/lib/libxcb-xinerama.so.0 differ diff --git a/lib/libxcb-xinerama.so.0.0.0 b/lib/libxcb-xinerama.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..1662c1ee705349465c71bbdaf67f70853aacb021 Binary files /dev/null and b/lib/libxcb-xinerama.so.0.0.0 differ diff --git a/lib/libxcb-xlib.so.0 b/lib/libxcb-xlib.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..45f5bda6f8b061e8f294a329ea98428dad7a915e Binary files /dev/null and b/lib/libxcb-xlib.so.0 differ diff --git a/lib/libxcb-xlib.so.0.0.0 b/lib/libxcb-xlib.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..45f5bda6f8b061e8f294a329ea98428dad7a915e Binary files /dev/null and b/lib/libxcb-xlib.so.0.0.0 differ diff --git a/lib/libxcb-xtest.so b/lib/libxcb-xtest.so new file mode 100644 index 0000000000000000000000000000000000000000..eb1d7f78e401953e9e0dca8216a6fd3e63688da5 Binary files /dev/null and b/lib/libxcb-xtest.so differ diff --git a/lib/libxcb-xtest.so.0 b/lib/libxcb-xtest.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..eb1d7f78e401953e9e0dca8216a6fd3e63688da5 Binary files /dev/null and b/lib/libxcb-xtest.so.0 differ diff --git a/lib/libxcb-xtest.so.0.0.0 b/lib/libxcb-xtest.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..eb1d7f78e401953e9e0dca8216a6fd3e63688da5 Binary files /dev/null and b/lib/libxcb-xtest.so.0.0.0 differ diff --git a/lib/libxcb-xv.so b/lib/libxcb-xv.so new file mode 100644 index 0000000000000000000000000000000000000000..837f25d9be2a11960543790c4bf289e9519d1d2a Binary files /dev/null and b/lib/libxcb-xv.so differ diff --git a/lib/libxcb-xv.so.0 b/lib/libxcb-xv.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..837f25d9be2a11960543790c4bf289e9519d1d2a Binary files /dev/null and b/lib/libxcb-xv.so.0 differ diff --git a/lib/libxcb-xv.so.0.0.0 b/lib/libxcb-xv.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..837f25d9be2a11960543790c4bf289e9519d1d2a Binary files /dev/null and b/lib/libxcb-xv.so.0.0.0 differ diff --git a/lib/libxcb-xvmc.so b/lib/libxcb-xvmc.so new file mode 100644 index 0000000000000000000000000000000000000000..620accfe1ca09d9a968c6f9ce9c766f338864a79 Binary files /dev/null and b/lib/libxcb-xvmc.so differ diff --git a/lib/libxcb-xvmc.so.0 b/lib/libxcb-xvmc.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..620accfe1ca09d9a968c6f9ce9c766f338864a79 Binary files /dev/null and b/lib/libxcb-xvmc.so.0 differ diff --git a/lib/libxcb-xvmc.so.0.0.0 b/lib/libxcb-xvmc.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..620accfe1ca09d9a968c6f9ce9c766f338864a79 Binary files /dev/null and b/lib/libxcb-xvmc.so.0.0.0 differ diff --git a/lib/pkgconfig/expat.pc b/lib/pkgconfig/expat.pc new file mode 100644 index 0000000000000000000000000000000000000000..e3b77cee8b72add69860d93a9bab66ed38f5cdef --- /dev/null +++ b/lib/pkgconfig/expat.pc @@ -0,0 +1,13 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: expat +Version: 2.8.0 +Description: expat XML parser +URL: https://libexpat.github.io/ +Libs: -L${libdir} -lexpat +Libs.private: -lm +Cflags: -I${includedir} +Cflags.private: -DXML_STATIC diff --git a/lib/pkgconfig/formw.pc b/lib/pkgconfig/formw.pc new file mode 100644 index 0000000000000000000000000000000000000000..6a1787162073e59a14286ab363a27c045c7dd022 --- /dev/null +++ b/lib/pkgconfig/formw.pc @@ -0,0 +1,19 @@ +# pkg-config file generated by gen-pkgconfig +# vile:makemode + +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include/ncursesw +abi_version=6 +major_version=6 +version=6.5.20240427 + +Name: formw +Description: ncurses 6.5 add-on library +Version: ${version} +URL: https://invisible-island.net/ncurses +Requires.private: ncursesw +Libs: -L/usr/local/miniconda3/envs/phantom/lib -Wl,-O2 -Wl,--sort-common -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib -Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib -lformw +Libs.private: +Cflags: -D_GNU_SOURCE -DNCURSES_WIDECHAR -I${includedir} -I/usr/local/miniconda3/envs/phantom/include diff --git a/lib/pkgconfig/history.pc b/lib/pkgconfig/history.pc new file mode 100644 index 0000000000000000000000000000000000000000..a79f102674742f9f961df5b81569a62a99eb99b6 --- /dev/null +++ b/lib/pkgconfig/history.pc @@ -0,0 +1,11 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: History +Description: Gnu History library for managing previously-entered lines +URL: http://tiswww.cwru.edu/php/chet/readline/rltop.html +Version: 8.3 +Libs: -L${libdir} -lhistory +Cflags: -I${includedir} diff --git a/lib/pkgconfig/libcrypto.pc b/lib/pkgconfig/libcrypto.pc new file mode 100644 index 0000000000000000000000000000000000000000..5e8e97fe5921c1026ee2456eb7406cd704f51588 --- /dev/null +++ b/lib/pkgconfig/libcrypto.pc @@ -0,0 +1,14 @@ +# +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include +enginesdir=${libdir}/engines-3 +modulesdir=${libdir}/ossl-modules + +Name: OpenSSL-libcrypto +Description: OpenSSL cryptography library +Version: 3.5.6 +Libs: -L${libdir} -lcrypto +Libs.private: -ldl -pthread +Cflags: -I${includedir} diff --git a/lib/pkgconfig/libffi.pc b/lib/pkgconfig/libffi.pc new file mode 100644 index 0000000000000000000000000000000000000000..ca690955a2c722bfa102a60e05baeb006afba4fb --- /dev/null +++ b/lib/pkgconfig/libffi.pc @@ -0,0 +1,11 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +toolexeclibdir=${libdir} +includedir=/usr/local/miniconda3/envs/phantom/include + +Name: libffi +Description: Library supporting Foreign Function Interfaces +Version: 3.4.8 +Libs: -L${toolexeclibdir} -lffi +Cflags: -I${includedir} diff --git a/lib/pkgconfig/liblzma.pc b/lib/pkgconfig/liblzma.pc new file mode 100644 index 0000000000000000000000000000000000000000..f46521651b28a901a8cdff51c063936c82b8ca91 --- /dev/null +++ b/lib/pkgconfig/liblzma.pc @@ -0,0 +1,16 @@ +# SPDX-License-Identifier: 0BSD +# Author: Lasse Collin + +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: liblzma +Description: General purpose data compression library +URL: https://tukaani.org/xz/ +Version: 5.8.2 +Cflags: -I${includedir} +Cflags.private: -DLZMA_API_STATIC +Libs: -L${libdir} -llzma +Libs.private: -pthread diff --git a/lib/pkgconfig/libnsl.pc b/lib/pkgconfig/libnsl.pc new file mode 100644 index 0000000000000000000000000000000000000000..139963a214a39da8abcc7217ca6e3fe5d9725fb4 --- /dev/null +++ b/lib/pkgconfig/libnsl.pc @@ -0,0 +1,12 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: libnsl +Description: Library containing NIS functions using TI-RPC (IPv6 enabled) +Requires: libtirpc >= 1.0.1 +Version: 2.0.0 +Libs: -L${exec_prefix}/lib -lnsl +Cflags: -I${prefix}/include + diff --git a/lib/pkgconfig/libssl.pc b/lib/pkgconfig/libssl.pc new file mode 100644 index 0000000000000000000000000000000000000000..46c1188f88375bef195f943aa3b1ceb57892f40d --- /dev/null +++ b/lib/pkgconfig/libssl.pc @@ -0,0 +1,12 @@ +# +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: OpenSSL-libssl +Description: Secure Sockets Layer and cryptography libraries +Version: 3.5.6 +Requires.private: libcrypto +Libs: -L${libdir} -lssl +Cflags: -I${includedir} diff --git a/lib/pkgconfig/menuw.pc b/lib/pkgconfig/menuw.pc new file mode 100644 index 0000000000000000000000000000000000000000..fc6bb6378291d3bc9eae9c91fd3d2c38200151ea --- /dev/null +++ b/lib/pkgconfig/menuw.pc @@ -0,0 +1,19 @@ +# pkg-config file generated by gen-pkgconfig +# vile:makemode + +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include/ncursesw +abi_version=6 +major_version=6 +version=6.5.20240427 + +Name: menuw +Description: ncurses 6.5 add-on library +Version: ${version} +URL: https://invisible-island.net/ncurses +Requires.private: ncursesw +Libs: -L/usr/local/miniconda3/envs/phantom/lib -Wl,-O2 -Wl,--sort-common -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib -Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib -lmenuw +Libs.private: +Cflags: -D_GNU_SOURCE -DNCURSES_WIDECHAR -I${includedir} -I/usr/local/miniconda3/envs/phantom/include diff --git a/lib/pkgconfig/ncurses++w.pc b/lib/pkgconfig/ncurses++w.pc new file mode 100644 index 0000000000000000000000000000000000000000..fb1eb424b1f302ab13ee8ced9b222fc3f34df26b --- /dev/null +++ b/lib/pkgconfig/ncurses++w.pc @@ -0,0 +1,19 @@ +# pkg-config file generated by gen-pkgconfig +# vile:makemode + +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include/ncursesw +abi_version=6 +major_version=6 +version=6.5.20240427 + +Name: ncurses++w +Description: ncurses 6.5 add-on library +Version: ${version} +URL: https://invisible-island.net/ncurses +Requires.private: panelw, menuw, formw, ncursesw +Libs: -L/usr/local/miniconda3/envs/phantom/lib -Wl,-O2 -Wl,--sort-common -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib -Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib -lncurses++w +Libs.private: +Cflags: -D_GNU_SOURCE -DNCURSES_WIDECHAR -I${includedir} -I/usr/local/miniconda3/envs/phantom/include diff --git a/lib/pkgconfig/ncursesw.pc b/lib/pkgconfig/ncursesw.pc new file mode 100644 index 0000000000000000000000000000000000000000..01247785a94af06f255d00bb7ff76aeafee8e188 --- /dev/null +++ b/lib/pkgconfig/ncursesw.pc @@ -0,0 +1,19 @@ +# pkg-config file generated by gen-pkgconfig +# vile:makemode + +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include/ncursesw +abi_version=6 +major_version=6 +version=6.5.20240427 + +Name: ncursesw +Description: ncurses 6.5 library +Version: ${version} +URL: https://invisible-island.net/ncurses +Requires.private: +Libs: -L/usr/local/miniconda3/envs/phantom/lib -Wl,-O2 -Wl,--sort-common -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib -Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib -lncursesw -ltinfow +Libs.private: +Cflags: -D_GNU_SOURCE -DNCURSES_WIDECHAR -I${includedir} -I/usr/local/miniconda3/envs/phantom/include diff --git a/lib/pkgconfig/openssl.pc b/lib/pkgconfig/openssl.pc new file mode 100644 index 0000000000000000000000000000000000000000..5f77fca685f33cb9bf28119134bc60153fa8ae7e --- /dev/null +++ b/lib/pkgconfig/openssl.pc @@ -0,0 +1,10 @@ +# +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: OpenSSL +Description: Secure Sockets Layer and cryptography libraries and tools +Version: 3.5.6 +Requires: libssl libcrypto diff --git a/lib/pkgconfig/panelw.pc b/lib/pkgconfig/panelw.pc new file mode 100644 index 0000000000000000000000000000000000000000..9946fe3e72d6fd5adb3ddc24d5cbe3e58d4c1f27 --- /dev/null +++ b/lib/pkgconfig/panelw.pc @@ -0,0 +1,19 @@ +# pkg-config file generated by gen-pkgconfig +# vile:makemode + +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include/ncursesw +abi_version=6 +major_version=6 +version=6.5.20240427 + +Name: panelw +Description: ncurses 6.5 add-on library +Version: ${version} +URL: https://invisible-island.net/ncurses +Requires.private: ncursesw +Libs: -L/usr/local/miniconda3/envs/phantom/lib -Wl,-O2 -Wl,--sort-common -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib -Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib -lpanelw +Libs.private: +Cflags: -D_GNU_SOURCE -DNCURSES_WIDECHAR -I${includedir} -I/usr/local/miniconda3/envs/phantom/include diff --git a/lib/pkgconfig/pthread-stubs.pc b/lib/pkgconfig/pthread-stubs.pc new file mode 100644 index 0000000000000000000000000000000000000000..b85462b076924f3ff63fe33e9656679403d79072 --- /dev/null +++ b/lib/pkgconfig/pthread-stubs.pc @@ -0,0 +1,8 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib + +Name: pthread stubs +Description: Stubs missing from libc for standard pthread functions +Version: 0.3 +Libs: diff --git a/lib/pkgconfig/python-3.11-embed.pc b/lib/pkgconfig/python-3.11-embed.pc new file mode 100644 index 0000000000000000000000000000000000000000..b01b05addae4da4733415d23ce7ba65fddd26ca5 --- /dev/null +++ b/lib/pkgconfig/python-3.11-embed.pc @@ -0,0 +1,13 @@ +# See: man pkg-config +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: Python +Description: Embed Python into an application +Requires: +Version: 3.11 +Libs.private: -lpthread -ldl -lutil +Libs: -L${libdir} -lpython3.11 +Cflags: -I${includedir}/python3.11 diff --git a/lib/pkgconfig/python-3.11.pc b/lib/pkgconfig/python-3.11.pc new file mode 100644 index 0000000000000000000000000000000000000000..87cd2ae3166b83a055e8c7464d749bbad1f3a36c --- /dev/null +++ b/lib/pkgconfig/python-3.11.pc @@ -0,0 +1,13 @@ +# See: man pkg-config +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: Python +Description: Build a C extension for Python +Requires: +Version: 3.11 +Libs.private: -lpthread -ldl -lutil +Libs: +Cflags: -I${includedir}/python3.11 diff --git a/lib/pkgconfig/python3-embed.pc b/lib/pkgconfig/python3-embed.pc new file mode 100644 index 0000000000000000000000000000000000000000..b01b05addae4da4733415d23ce7ba65fddd26ca5 --- /dev/null +++ b/lib/pkgconfig/python3-embed.pc @@ -0,0 +1,13 @@ +# See: man pkg-config +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: Python +Description: Embed Python into an application +Requires: +Version: 3.11 +Libs.private: -lpthread -ldl -lutil +Libs: -L${libdir} -lpython3.11 +Cflags: -I${includedir}/python3.11 diff --git a/lib/pkgconfig/python3.pc b/lib/pkgconfig/python3.pc new file mode 100644 index 0000000000000000000000000000000000000000..87cd2ae3166b83a055e8c7464d749bbad1f3a36c --- /dev/null +++ b/lib/pkgconfig/python3.pc @@ -0,0 +1,13 @@ +# See: man pkg-config +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: Python +Description: Build a C extension for Python +Requires: +Version: 3.11 +Libs.private: -lpthread -ldl -lutil +Libs: +Cflags: -I${includedir}/python3.11 diff --git a/lib/pkgconfig/readline.pc b/lib/pkgconfig/readline.pc new file mode 100644 index 0000000000000000000000000000000000000000..813046fb19f6d4a3b6b042c70bfd93add1627c2b --- /dev/null +++ b/lib/pkgconfig/readline.pc @@ -0,0 +1,12 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: Readline +Description: Gnu Readline library for command line editing +URL: http://tiswww.cwru.edu/php/chet/readline/rltop.html +Version: 8.3 +Requires.private: tinfo +Libs: -L${libdir} -lreadline +Cflags: -I${includedir} diff --git a/lib/pkgconfig/sqlite3.pc b/lib/pkgconfig/sqlite3.pc new file mode 100644 index 0000000000000000000000000000000000000000..e6fa2714b64e9f390301d379be35fb65b82db1c3 --- /dev/null +++ b/lib/pkgconfig/sqlite3.pc @@ -0,0 +1,13 @@ +# Package Information for pkg-config + +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: SQLite +Description: SQL database engine +Version: 3.51.2 +Libs: -L${libdir} -lsqlite3 +Libs.private: -lm -lz -ldl -lpthread +Cflags: -I${includedir} diff --git a/lib/pkgconfig/tcl.pc b/lib/pkgconfig/tcl.pc new file mode 100644 index 0000000000000000000000000000000000000000..4ddff5cecf2eb03e625013f68a5ece3e31caea7e --- /dev/null +++ b/lib/pkgconfig/tcl.pc @@ -0,0 +1,16 @@ +# tcl pkg-config source file + +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=/usr/local/miniconda3/envs/phantom +libdir=/usr/local/miniconda3/envs/phantom/lib +includedir=${prefix}/include +libfile=libtcl8.6.so + +Name: Tool Command Language +Description: Tcl is a powerful, easy-to-learn dynamic programming language, suitable for a wide range of uses. +URL: https://www.tcl-lang.org/ +Version: 8.6.15 +Requires.private: zlib >= 1.2.3 +Libs: -L${libdir} -ltcl8.6 -ltclstub8.6 +Libs.private: -ldl -lz -lpthread -lm +Cflags: -I${includedir} diff --git a/lib/pkgconfig/tinfow.pc b/lib/pkgconfig/tinfow.pc new file mode 100644 index 0000000000000000000000000000000000000000..c5388e54d518fa09cd10d377326c82debd65cd6a --- /dev/null +++ b/lib/pkgconfig/tinfow.pc @@ -0,0 +1,19 @@ +# pkg-config file generated by gen-pkgconfig +# vile:makemode + +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include/ncursesw +abi_version=6 +major_version=6 +version=6.5.20240427 + +Name: tinfow +Description: ncurses 6.5 terminal interface library +Version: ${version} +URL: https://invisible-island.net/ncurses +Requires.private: +Libs: -L/usr/local/miniconda3/envs/phantom/lib -Wl,-O2 -Wl,--sort-common -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib -Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib -ltinfow +Libs.private: +Cflags: -D_GNU_SOURCE -DNCURSES_WIDECHAR -I${includedir} -I/usr/local/miniconda3/envs/phantom/include diff --git a/lib/pkgconfig/tk.pc b/lib/pkgconfig/tk.pc new file mode 100644 index 0000000000000000000000000000000000000000..f7c18bb9513f714b57fc91bc7308a84dd407aa7c --- /dev/null +++ b/lib/pkgconfig/tk.pc @@ -0,0 +1,15 @@ +# tk pkg-config source file + +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=/usr/local/miniconda3/envs/phantom +libdir=/usr/local/miniconda3/envs/phantom/lib +includedir=${prefix}/include + +Name: The Tk Toolkit +Description: Tk is a cross-platform graphical user interface toolkit, the standard GUI not only for Tcl, but for many other dynamic languages as well. +URL: https://www.tcl-lang.org/ +Version: 8.6.15 +Requires: tcl >= 8.6 +Libs: -L${libdir} -ltk8.6 -ltkstub8.6 +Libs.private: -lX11 +Cflags: -I${includedir} diff --git a/lib/pkgconfig/uuid.pc b/lib/pkgconfig/uuid.pc new file mode 100644 index 0000000000000000000000000000000000000000..61c1309709d1d3498d08dc6325647c8f7f77172a --- /dev/null +++ b/lib/pkgconfig/uuid.pc @@ -0,0 +1,11 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=/usr/local/miniconda3/envs/phantom +libdir=/usr/local/miniconda3/envs/phantom/lib +includedir=/usr/local/miniconda3/envs/phantom/include + +Name: uuid +Description: Universally unique id library +Version: 2.32.1 +Requires: +Cflags: -I${includedir}/uuid +Libs: -L${libdir} -luuid diff --git a/lib/pkgconfig/x11-xcb.pc b/lib/pkgconfig/x11-xcb.pc new file mode 100644 index 0000000000000000000000000000000000000000..87b51d6d3fee3b8d38b520edfb489d4d338cbfdf --- /dev/null +++ b/lib/pkgconfig/x11-xcb.pc @@ -0,0 +1,11 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: X11 XCB +Description: X Library XCB interface +Version: 1.8.12 +Requires: x11 xcb +Cflags: -I${includedir} +Libs: -L${libdir} -lX11-xcb diff --git a/lib/pkgconfig/x11.pc b/lib/pkgconfig/x11.pc new file mode 100644 index 0000000000000000000000000000000000000000..fe1000535010c3ad8161e694c0569dc77159482e --- /dev/null +++ b/lib/pkgconfig/x11.pc @@ -0,0 +1,16 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +xthreadlib=-lpthread + +Name: X11 +Description: X Library +URL: https://gitlab.freedesktop.org/xorg/lib/libx11/ +Version: 1.8.12 +Requires: xproto kbproto +Requires.private: xcb >= 1.11.1 +Cflags: -I${includedir} +Libs: -L${libdir} -lX11 +Libs.private: -lpthread diff --git a/lib/pkgconfig/xau.pc b/lib/pkgconfig/xau.pc new file mode 100644 index 0000000000000000000000000000000000000000..a951d6ac1c9096e46a555e174a3fad529acfbd69 --- /dev/null +++ b/lib/pkgconfig/xau.pc @@ -0,0 +1,11 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: Xau +Description: X authorization file management library +Version: 1.0.12 +Requires: xproto +Cflags: -I${includedir} +Libs: -L${libdir} -lXau diff --git a/lib/pkgconfig/xcb-composite.pc b/lib/pkgconfig/xcb-composite.pc new file mode 100644 index 0000000000000000000000000000000000000000..fbb0d9e8ad34419195b5fc79af94083c7b4512bb --- /dev/null +++ b/lib/pkgconfig/xcb-composite.pc @@ -0,0 +1,11 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB Composite +Description: XCB Composite Extension +Version: 1.17.0 +Requires.private: xcb xcb-xfixes +Libs: -L${libdir} -lxcb-composite +Cflags: -I${includedir} diff --git a/lib/pkgconfig/xcb-damage.pc b/lib/pkgconfig/xcb-damage.pc new file mode 100644 index 0000000000000000000000000000000000000000..fd28e3c950dac66156ed7ea5f90951c9090dc514 --- /dev/null +++ b/lib/pkgconfig/xcb-damage.pc @@ -0,0 +1,11 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB Damage +Description: XCB Damage Extension +Version: 1.17.0 +Requires.private: xcb xcb-xfixes +Libs: -L${libdir} -lxcb-damage +Cflags: -I${includedir} diff --git a/lib/pkgconfig/xcb-dbe.pc b/lib/pkgconfig/xcb-dbe.pc new file mode 100644 index 0000000000000000000000000000000000000000..e5ed12e21682f3f161890f965341ddb567863482 --- /dev/null +++ b/lib/pkgconfig/xcb-dbe.pc @@ -0,0 +1,11 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB Dbe +Description: XCB Double Buffer Extension +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-dbe +Cflags: -I${includedir} diff --git a/lib/pkgconfig/xcb-dpms.pc b/lib/pkgconfig/xcb-dpms.pc new file mode 100644 index 0000000000000000000000000000000000000000..76510f5cf70ed3b3cc9e8e1f4af6df103641c772 --- /dev/null +++ b/lib/pkgconfig/xcb-dpms.pc @@ -0,0 +1,11 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB DPMS +Description: XCB DPMS Extension +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-dpms +Cflags: -I${includedir} diff --git a/lib/pkgconfig/xcb-dri2.pc b/lib/pkgconfig/xcb-dri2.pc new file mode 100644 index 0000000000000000000000000000000000000000..389beb6cedd36b867eca46cf5507a94b01aa88ed --- /dev/null +++ b/lib/pkgconfig/xcb-dri2.pc @@ -0,0 +1,11 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB DRI2 +Description: XCB DRI2 Extension +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-dri2 +Cflags: -I${includedir} diff --git a/lib/pkgconfig/xcb-dri3.pc b/lib/pkgconfig/xcb-dri3.pc new file mode 100644 index 0000000000000000000000000000000000000000..d817427cfc314f23994d9314b444ea6b153b4617 --- /dev/null +++ b/lib/pkgconfig/xcb-dri3.pc @@ -0,0 +1,11 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB DRI3 +Description: XCB DRI3 Extension +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-dri3 +Cflags: -I${includedir} diff --git a/lib/pkgconfig/xcb-glx.pc b/lib/pkgconfig/xcb-glx.pc new file mode 100644 index 0000000000000000000000000000000000000000..ec612ba88398b1e5f6e988b2aa681b87e40b2bd9 --- /dev/null +++ b/lib/pkgconfig/xcb-glx.pc @@ -0,0 +1,11 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB GLX +Description: XCB GLX Extension +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-glx +Cflags: -I${includedir} diff --git a/lib/pkgconfig/xcb-present.pc b/lib/pkgconfig/xcb-present.pc new file mode 100644 index 0000000000000000000000000000000000000000..4284dab8d50cc1e6f4e0126e24618ba79db06b1e --- /dev/null +++ b/lib/pkgconfig/xcb-present.pc @@ -0,0 +1,11 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB Present +Description: XCB Present Extension +Version: 1.17.0 +Requires.private: xcb xcb-randr xcb-xfixes xcb-sync xcb-dri3 +Libs: -L${libdir} -lxcb-present +Cflags: -I${includedir} diff --git a/lib/pkgconfig/xcb-randr.pc b/lib/pkgconfig/xcb-randr.pc new file mode 100644 index 0000000000000000000000000000000000000000..1456583ced42aa64361df0f87cda2d13383c0c21 --- /dev/null +++ b/lib/pkgconfig/xcb-randr.pc @@ -0,0 +1,11 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB RandR +Description: XCB RandR Extension +Version: 1.17.0 +Requires.private: xcb xcb-render +Libs: -L${libdir} -lxcb-randr +Cflags: -I${includedir} diff --git a/lib/pkgconfig/xcb-record.pc b/lib/pkgconfig/xcb-record.pc new file mode 100644 index 0000000000000000000000000000000000000000..9c3d6d0871a2ebdab75bd5f7b44c81c0483cfd87 --- /dev/null +++ b/lib/pkgconfig/xcb-record.pc @@ -0,0 +1,11 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB Record +Description: XCB Record Extension +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-record +Cflags: -I${includedir} diff --git a/lib/pkgconfig/xcb-render.pc b/lib/pkgconfig/xcb-render.pc new file mode 100644 index 0000000000000000000000000000000000000000..c1b03995656a586cb371fb9ac43797ad44e5549c --- /dev/null +++ b/lib/pkgconfig/xcb-render.pc @@ -0,0 +1,11 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB Render +Description: XCB Render Extension +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-render +Cflags: -I${includedir} diff --git a/lib/pkgconfig/xcb-res.pc b/lib/pkgconfig/xcb-res.pc new file mode 100644 index 0000000000000000000000000000000000000000..a91fc43b62408819c383c42f53f08ed465a03b55 --- /dev/null +++ b/lib/pkgconfig/xcb-res.pc @@ -0,0 +1,11 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB Res +Description: XCB X-Resource Extension +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-res +Cflags: -I${includedir} diff --git a/lib/pkgconfig/xcb-screensaver.pc b/lib/pkgconfig/xcb-screensaver.pc new file mode 100644 index 0000000000000000000000000000000000000000..db90949f46d7577c2114a5aea3c00a758c43e2b7 --- /dev/null +++ b/lib/pkgconfig/xcb-screensaver.pc @@ -0,0 +1,11 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB Screensaver +Description: XCB Screensaver Extension +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-screensaver +Cflags: -I${includedir} diff --git a/lib/pkgconfig/xcb-shape.pc b/lib/pkgconfig/xcb-shape.pc new file mode 100644 index 0000000000000000000000000000000000000000..aed1a11ff11ec0cb30dd3df55f4207c7cc921733 --- /dev/null +++ b/lib/pkgconfig/xcb-shape.pc @@ -0,0 +1,11 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB Shape +Description: XCB Shape Extension +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-shape +Cflags: -I${includedir} diff --git a/lib/pkgconfig/xcb-shm.pc b/lib/pkgconfig/xcb-shm.pc new file mode 100644 index 0000000000000000000000000000000000000000..7dc530bde5b5e9f56c222fe5f1095323143aae61 --- /dev/null +++ b/lib/pkgconfig/xcb-shm.pc @@ -0,0 +1,11 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB Shm +Description: XCB Shm Extension +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-shm +Cflags: -I${includedir} diff --git a/lib/pkgconfig/xcb-sync.pc b/lib/pkgconfig/xcb-sync.pc new file mode 100644 index 0000000000000000000000000000000000000000..d8f9e0ebcdd8077b158624ef9150a9ba0d2f267b --- /dev/null +++ b/lib/pkgconfig/xcb-sync.pc @@ -0,0 +1,11 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB Sync +Description: XCB Sync Extension +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-sync +Cflags: -I${includedir} diff --git a/lib/pkgconfig/xcb-xf86dri.pc b/lib/pkgconfig/xcb-xf86dri.pc new file mode 100644 index 0000000000000000000000000000000000000000..9eab0ecbe65e61fe22ffc2ac19731a86b99f297d --- /dev/null +++ b/lib/pkgconfig/xcb-xf86dri.pc @@ -0,0 +1,11 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB XFree86-DRI +Description: XCB XFree86-DRI Extension +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-xf86dri +Cflags: -I${includedir} diff --git a/lib/pkgconfig/xcb-xfixes.pc b/lib/pkgconfig/xcb-xfixes.pc new file mode 100644 index 0000000000000000000000000000000000000000..a5ac9f2f8facd1f79c15c7e20a2f6d800106c7e6 --- /dev/null +++ b/lib/pkgconfig/xcb-xfixes.pc @@ -0,0 +1,11 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB XFixes +Description: XCB XFixes Extension +Version: 1.17.0 +Requires.private: xcb xcb-render xcb-shape +Libs: -L${libdir} -lxcb-xfixes +Cflags: -I${includedir} diff --git a/lib/pkgconfig/xcb-xinerama.pc b/lib/pkgconfig/xcb-xinerama.pc new file mode 100644 index 0000000000000000000000000000000000000000..3414d712ca1fa58a0b658b0a3456941d1b699fcd --- /dev/null +++ b/lib/pkgconfig/xcb-xinerama.pc @@ -0,0 +1,11 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB Xinerama +Description: XCB Xinerama Extension +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-xinerama +Cflags: -I${includedir} diff --git a/lib/pkgconfig/xcb-xinput.pc b/lib/pkgconfig/xcb-xinput.pc new file mode 100644 index 0000000000000000000000000000000000000000..bdbc5f07818055aeea86e5cec977941826ac28ac --- /dev/null +++ b/lib/pkgconfig/xcb-xinput.pc @@ -0,0 +1,11 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB XInput +Description: XCB XInput Extension (EXPERIMENTAL) +Version: 1.17.0 +Requires.private: xcb xcb-xfixes +Libs: -L${libdir} -lxcb-xinput +Cflags: -I${includedir} diff --git a/lib/pkgconfig/xcb-xkb.pc b/lib/pkgconfig/xcb-xkb.pc new file mode 100644 index 0000000000000000000000000000000000000000..6e6b7e86c760ef562c0542e2c22121b995889dea --- /dev/null +++ b/lib/pkgconfig/xcb-xkb.pc @@ -0,0 +1,11 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB XKB +Description: XCB Keyboard Extension (EXPERIMENTAL) +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-xkb +Cflags: -I${includedir} diff --git a/lib/pkgconfig/xcb-xtest.pc b/lib/pkgconfig/xcb-xtest.pc new file mode 100644 index 0000000000000000000000000000000000000000..bb3b9a057207d885e1ce51ed3c163007fae1313f --- /dev/null +++ b/lib/pkgconfig/xcb-xtest.pc @@ -0,0 +1,11 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB XTEST +Description: XCB XTEST Extension +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-xtest +Cflags: -I${includedir} diff --git a/lib/pkgconfig/xcb-xv.pc b/lib/pkgconfig/xcb-xv.pc new file mode 100644 index 0000000000000000000000000000000000000000..df6bb846377aac39ca68f6b00e4b8879caedef3c --- /dev/null +++ b/lib/pkgconfig/xcb-xv.pc @@ -0,0 +1,11 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB Xv +Description: XCB Xv Extension +Version: 1.17.0 +Requires.private: xcb xcb-shm +Libs: -L${libdir} -lxcb-xv +Cflags: -I${includedir} diff --git a/lib/pkgconfig/xcb-xvmc.pc b/lib/pkgconfig/xcb-xvmc.pc new file mode 100644 index 0000000000000000000000000000000000000000..db6c45f9651696dd084de8c4b98d71d43b9e8641 --- /dev/null +++ b/lib/pkgconfig/xcb-xvmc.pc @@ -0,0 +1,11 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB XvMC +Description: XCB XvMC Extension +Version: 1.17.0 +Requires.private: xcb xcb-xv +Libs: -L${libdir} -lxcb-xvmc +Cflags: -I${includedir} diff --git a/lib/pkgconfig/xcb.pc b/lib/pkgconfig/xcb.pc new file mode 100644 index 0000000000000000000000000000000000000000..c4c9b715dabadbc95cfcaaba78f84c1a8a6a8daa --- /dev/null +++ b/lib/pkgconfig/xcb.pc @@ -0,0 +1,13 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include +xcbproto_version=1.17.0 + +Name: XCB +Description: X-protocol C Binding +Version: 1.17.0 +Requires.private: xau >= 0.99.2 xdmcp +Libs: -L${libdir} -lxcb +Libs.private: +Cflags: -I${includedir} diff --git a/lib/pkgconfig/xdmcp.pc b/lib/pkgconfig/xdmcp.pc new file mode 100644 index 0000000000000000000000000000000000000000..af17ea39f680b5afaff80a8c1b3baff0d124307e --- /dev/null +++ b/lib/pkgconfig/xdmcp.pc @@ -0,0 +1,11 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: Xdmcp +Description: X Display Manager Control Protocol library +Version: 1.1.5 +Requires: xproto +Cflags: -I${includedir} +Libs: -L${libdir} -lXdmcp diff --git a/lib/pkgconfig/zlib.pc b/lib/pkgconfig/zlib.pc new file mode 100644 index 0000000000000000000000000000000000000000..03ccd8cc438d5f58b8abaca85ef2847af6fb5dee --- /dev/null +++ b/lib/pkgconfig/zlib.pc @@ -0,0 +1,13 @@ +prefix=/usr/local/miniconda3/envs/phantom +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +sharedlibdir=${libdir} +includedir=${prefix}/include + +Name: zlib +Description: zlib compression library +Version: 1.3.1 + +Requires: +Libs: -L${libdir} -L${sharedlibdir} -lz +Cflags: -I${includedir} diff --git a/lib/python3.11/__phello__/__init__.py b/lib/python3.11/__phello__/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d37bd2766ac1c6c50660afff724338ab696afbbd --- /dev/null +++ b/lib/python3.11/__phello__/__init__.py @@ -0,0 +1,7 @@ +initialized = True + +def main(): + print("Hello world!") + +if __name__ == '__main__': + main() diff --git a/lib/python3.11/__phello__/__pycache__/__init__.cpython-311.pyc b/lib/python3.11/__phello__/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6bf9b1a4b0f54bf84f86d7ecb9f5dc1c40748285 Binary files /dev/null and b/lib/python3.11/__phello__/__pycache__/__init__.cpython-311.pyc differ diff --git a/lib/python3.11/__phello__/__pycache__/spam.cpython-311.pyc b/lib/python3.11/__phello__/__pycache__/spam.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..206de64fd992bc684743a3532bf137d8d091b187 Binary files /dev/null and b/lib/python3.11/__phello__/__pycache__/spam.cpython-311.pyc differ diff --git a/lib/python3.11/__phello__/spam.py b/lib/python3.11/__phello__/spam.py new file mode 100644 index 0000000000000000000000000000000000000000..d37bd2766ac1c6c50660afff724338ab696afbbd --- /dev/null +++ b/lib/python3.11/__phello__/spam.py @@ -0,0 +1,7 @@ +initialized = True + +def main(): + print("Hello world!") + +if __name__ == '__main__': + main() diff --git a/lib/python3.11/__pycache__/__future__.cpython-311.pyc b/lib/python3.11/__pycache__/__future__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5bf838f584d31c5648732aae8b8fd78a25e0bbc4 Binary files /dev/null and b/lib/python3.11/__pycache__/__future__.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/__hello__.cpython-311.pyc b/lib/python3.11/__pycache__/__hello__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0afd9451e5756d28884fcb504e9ccdf1f1713f56 Binary files /dev/null and b/lib/python3.11/__pycache__/__hello__.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/_aix_support.cpython-311.pyc b/lib/python3.11/__pycache__/_aix_support.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f508c9c9b0fece842b3dd80793bcd2c807c43c27 Binary files /dev/null and b/lib/python3.11/__pycache__/_aix_support.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/_bootsubprocess.cpython-311.pyc b/lib/python3.11/__pycache__/_bootsubprocess.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..31bff9764a5acb244c547d2c8d2eda710707e733 Binary files /dev/null and b/lib/python3.11/__pycache__/_bootsubprocess.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/_collections_abc.cpython-311.pyc b/lib/python3.11/__pycache__/_collections_abc.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bb5c8e047fa9fdb06790cf3688d2cbfbc3e283f6 Binary files /dev/null and b/lib/python3.11/__pycache__/_collections_abc.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/_compat_pickle.cpython-311.pyc b/lib/python3.11/__pycache__/_compat_pickle.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8d4d67efd2b8e96b0e80d0ebf48a23ba06924609 Binary files /dev/null and b/lib/python3.11/__pycache__/_compat_pickle.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/_compression.cpython-311.pyc b/lib/python3.11/__pycache__/_compression.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d88980356b28cae5aaa14c622e431311b5cacc93 Binary files /dev/null and b/lib/python3.11/__pycache__/_compression.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/_markupbase.cpython-311.pyc b/lib/python3.11/__pycache__/_markupbase.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c196fa82c9cf7c0bc57234a12fab82d9ffa3119b Binary files /dev/null and b/lib/python3.11/__pycache__/_markupbase.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/_osx_support.cpython-311.pyc b/lib/python3.11/__pycache__/_osx_support.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ae441813f1f4dce7d59608fca712fe547aabb5a6 Binary files /dev/null and b/lib/python3.11/__pycache__/_osx_support.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/_py_abc.cpython-311.pyc b/lib/python3.11/__pycache__/_py_abc.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..14a31ff743eb1f0778a01607b9bef24e452a0719 Binary files /dev/null and b/lib/python3.11/__pycache__/_py_abc.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/_sitebuiltins.cpython-311.pyc b/lib/python3.11/__pycache__/_sitebuiltins.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1b57217f768842d0ddb9142bb29f8736946b8b41 Binary files /dev/null and b/lib/python3.11/__pycache__/_sitebuiltins.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/_strptime.cpython-311.pyc b/lib/python3.11/__pycache__/_strptime.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..66a93bd7f802853b84f1271b1d7672188c436bf1 Binary files /dev/null and b/lib/python3.11/__pycache__/_strptime.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/_sysconfigdata__linux_x86_64-linux-gnu.cpython-311.pyc b/lib/python3.11/__pycache__/_sysconfigdata__linux_x86_64-linux-gnu.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..99969f379914f34abac5141d4c5e169f5859faba Binary files /dev/null and b/lib/python3.11/__pycache__/_sysconfigdata__linux_x86_64-linux-gnu.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/_sysconfigdata_x86_64_conda_cos6_linux_gnu.cpython-311.pyc b/lib/python3.11/__pycache__/_sysconfigdata_x86_64_conda_cos6_linux_gnu.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f6877a6eb5db2e1c18aa8739fcfc50bbe7aed48b Binary files /dev/null and b/lib/python3.11/__pycache__/_sysconfigdata_x86_64_conda_cos6_linux_gnu.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/_sysconfigdata_x86_64_conda_linux_gnu.cpython-311.pyc b/lib/python3.11/__pycache__/_sysconfigdata_x86_64_conda_linux_gnu.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e7a739b98ea535c4f56be7b824d3171ebb8b24a8 Binary files /dev/null and b/lib/python3.11/__pycache__/_sysconfigdata_x86_64_conda_linux_gnu.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/_threading_local.cpython-311.pyc b/lib/python3.11/__pycache__/_threading_local.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1a22fd87fb938c370faa4b990b24c0b662903ce8 Binary files /dev/null and b/lib/python3.11/__pycache__/_threading_local.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/_weakrefset.cpython-311.pyc b/lib/python3.11/__pycache__/_weakrefset.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5a94a5d3a50a305ab3b35721df68ce4e5f14358d Binary files /dev/null and b/lib/python3.11/__pycache__/_weakrefset.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/abc.cpython-311.pyc b/lib/python3.11/__pycache__/abc.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..96e3901c73a07fd99b6ddeb84e457447d85c137b Binary files /dev/null and b/lib/python3.11/__pycache__/abc.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/aifc.cpython-311.pyc b/lib/python3.11/__pycache__/aifc.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2329b1b6290463899b9b57e5085f46d324c0726b Binary files /dev/null and b/lib/python3.11/__pycache__/aifc.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/antigravity.cpython-311.pyc b/lib/python3.11/__pycache__/antigravity.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..be290bf9ba3a816498ea41505e4030543f621952 Binary files /dev/null and b/lib/python3.11/__pycache__/antigravity.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/asynchat.cpython-311.pyc b/lib/python3.11/__pycache__/asynchat.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..66415aaca9957624b9b534578cbd497456d565a3 Binary files /dev/null and b/lib/python3.11/__pycache__/asynchat.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/asyncore.cpython-311.pyc b/lib/python3.11/__pycache__/asyncore.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8021f575cbe95c85621ee743b7d370850ebaad53 Binary files /dev/null and b/lib/python3.11/__pycache__/asyncore.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/base64.cpython-311.pyc b/lib/python3.11/__pycache__/base64.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6bf780613bb14489a6132f72b6599a40ac7f1d78 Binary files /dev/null and b/lib/python3.11/__pycache__/base64.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/bdb.cpython-311.pyc b/lib/python3.11/__pycache__/bdb.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5c0597e71d7599022e1732be5b00fe0df7e674be Binary files /dev/null and b/lib/python3.11/__pycache__/bdb.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/bisect.cpython-311.pyc b/lib/python3.11/__pycache__/bisect.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..acbe7874f36c1194436e8319cd3c7c73d2113ab3 Binary files /dev/null and b/lib/python3.11/__pycache__/bisect.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/bz2.cpython-311.pyc b/lib/python3.11/__pycache__/bz2.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..64d798bd54c8c1ec9440c4436cadad5587851db2 Binary files /dev/null and b/lib/python3.11/__pycache__/bz2.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/cProfile.cpython-311.pyc b/lib/python3.11/__pycache__/cProfile.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ad62214c559b70404eea4738e93e26144d89696a Binary files /dev/null and b/lib/python3.11/__pycache__/cProfile.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/calendar.cpython-311.pyc b/lib/python3.11/__pycache__/calendar.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f46074be059499fe81cd9f31a5e7bc311805f734 Binary files /dev/null and b/lib/python3.11/__pycache__/calendar.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/cgi.cpython-311.pyc b/lib/python3.11/__pycache__/cgi.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..94eebb0e49921484bf60b6db9700583f15ae4256 Binary files /dev/null and b/lib/python3.11/__pycache__/cgi.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/cgitb.cpython-311.pyc b/lib/python3.11/__pycache__/cgitb.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dd6046b55bcaf0d0ebfd7b6090d222dd3fbeb017 Binary files /dev/null and b/lib/python3.11/__pycache__/cgitb.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/chunk.cpython-311.pyc b/lib/python3.11/__pycache__/chunk.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..adf8e1f3dfe7e08761eada50469ba04ffb890224 Binary files /dev/null and b/lib/python3.11/__pycache__/chunk.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/cmd.cpython-311.pyc b/lib/python3.11/__pycache__/cmd.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1ccbbcce503a8fbb5390082f858baed58d2b4b4e Binary files /dev/null and b/lib/python3.11/__pycache__/cmd.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/code.cpython-311.pyc b/lib/python3.11/__pycache__/code.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..be329602acf14da2c095dda22b15e0554e4fff64 Binary files /dev/null and b/lib/python3.11/__pycache__/code.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/codecs.cpython-311.pyc b/lib/python3.11/__pycache__/codecs.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e0e0486b0ddece33ead708108ea2b36b5d519405 Binary files /dev/null and b/lib/python3.11/__pycache__/codecs.cpython-311.pyc differ diff --git a/lib/python3.11/__pycache__/codeop.cpython-311.pyc b/lib/python3.11/__pycache__/codeop.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dfefc787710f75b1f1ea8a9ffdc30b6c16fc087f Binary files /dev/null and b/lib/python3.11/__pycache__/codeop.cpython-311.pyc differ diff --git a/lib/python3.11/_sysconfigdata__linux_x86_64-linux-gnu.py b/lib/python3.11/_sysconfigdata__linux_x86_64-linux-gnu.py new file mode 100644 index 0000000000000000000000000000000000000000..e24bcad9893066153699d0828d7de7b710105cf2 --- /dev/null +++ b/lib/python3.11/_sysconfigdata__linux_x86_64-linux-gnu.py @@ -0,0 +1,1339 @@ +# system configuration generated and used by the sysconfig module +build_time_vars = {'ABIFLAGS': '', + 'AC_APPLE_UNIVERSAL_BUILD': 0, + 'AIX_BUILDDATE': 0, + 'AIX_GENUINE_CPLUSPLUS': 0, + 'ALIGNOF_LONG': 8, + 'ALIGNOF_SIZE_T': 8, + 'ALT_SOABI': 0, + 'ANDROID_API_LEVEL': 0, + 'AR': 'ar', + 'ARFLAGS': 'rcs', + 'BASECFLAGS': '', + 'BASECPPFLAGS': '-IObjects -IInclude -IPython', + 'BASEMODLIBS': '', + 'BINDIR': '/usr/local/miniconda3/envs/phantom/bin', + 'BINLIBDEST': '/usr/local/miniconda3/envs/phantom/lib/python3.11', + 'BLDLIBRARY': 'libpython3.11.a', + 'BLDSHARED': 'gcc -pthread -B /usr/local/miniconda3/envs/phantom/compiler_compat -shared ' + '' + '' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '' + '' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib', + 'BOOTSTRAP_HEADERS': '\\', + 'BUILDEXE': '', + 'BUILDPYTHON': 'python', + 'BUILD_GNU_TYPE': 'x86_64-conda_cos6-linux-gnu', + 'BYTESTR_DEPS': '\\', + 'CC': 'gcc -pthread -B /usr/local/miniconda3/envs/phantom/compiler_compat', + 'CCSHARED': '-fPIC', + 'CFLAGS': '-DNDEBUG -fwrapv -O2 -Wall ' + '-fPIC -O2 ' + '-isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '' + '' + '' + '-fPIC ' + '-O2 ' + '-isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '' + '' + '', + 'CFLAGSFORSHARED': '', + 'CFLAGS_ALIASING': '', + 'CONFIGFILES': 'configure configure.ac acconfig.h pyconfig.h.in ' + 'Makefile.pre.in', + 'CONFIGURE_CFLAGS': '-fPIC ' + '-O2 ' + '-isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '' + '' + '' + '', + 'CONFIGURE_CFLAGS_NODIST': '-fno-semantic-interposition ' + '' + '-g -std=c11 ' + '-Werror=implicit-function-declaration ' + '-fvisibility=hidden', + 'CONFIGURE_CPPFLAGS': '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include', + 'CONFIGURE_LDFLAGS': '' + '' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib', + 'CONFIGURE_LDFLAGS_NODIST': '-fno-semantic-interposition ' + '' + '-g', + 'CONFIGURE_LDFLAGS_NOLTO': '-fno-lto', + 'CONFIG_ARGS': "'--prefix=/usr/local/miniconda3/envs/phantom'" + "'--build=x86_64-conda_cos6-linux-gnu'" + "'--host=x86_64-conda_cos6-linux-gnu''--enable-ipv6'" + "'--with-ensurepip=no'" + "'--with-tzpath=/usr/local/miniconda3/envs/phantom/share/zoneinfo:/usr/local/miniconda3/envs/phantom/share/tzinfo'" + "'--with-computed-gotos''--with-system-ffi'" + "'--with-system-expat''--enable-loadable-sqlite-extensions'" + "'--with-tcltk-includes=-I/usr/local/miniconda3/envs/phantom/include'" + "'--with-tcltk-libs=-L/usr/local/miniconda3/envs/phantom/lib " + "-ltcl8.6 -ltk8.6''--with-platlibdir=lib''--with-lto'" + "'--enable-optimizations'" + "'-oldincludedir=/home/task_177324838993876/croot/python-split_1773249007352/_build_env/x86_64-conda_cos6-linux-gnu/sysroot/usr/include'" + "'--disable-shared''PROFILE_TASK=-m test --pgo'" + "'build_alias=x86_64-conda_cos6-linux-gnu'" + "'host_alias=x86_64-conda_cos6-linux-gnu'" + "'PKG_CONFIG_PATH=/usr/local/miniconda3/envs/phantom/lib/pkgconfig'" + "'MACHDEP=linux''CC=gcc'" + "'CFLAGS= -fPIC " + '-O2 ' + '-isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '' + '' + '' + "''LDFLAGS= " + '' + '' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + "-L/usr/local/miniconda3/envs/phantom/lib'" + "'CPPFLAGS=-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem " + '/usr/local/miniconda3/envs/phantom/include ' + "-I/usr/local/miniconda3/envs/phantom/include'" + "'CPP=/home/task_177324838993876/croot/python-split_1773249007352/_build_env/bin/cpp'", + 'CONFINCLUDEDIR': '/usr/local/miniconda3/envs/phantom/include', + 'CONFINCLUDEPY': '/usr/local/miniconda3/envs/phantom/include/python3.11', + 'COREPYTHONPATH': '', + 'COVERAGE_INFO': '/home/task_177324838993876/croot/python-split_1773249007352/work/build-static/coverage.info', + 'COVERAGE_LCOV_OPTIONS': '--rc lcov_branch_coverage=1', + 'COVERAGE_REPORT': '/home/task_177324838993876/croot/python-split_1773249007352/work/build-static/lcov-report', + 'COVERAGE_REPORT_OPTIONS': '--rc lcov_branch_coverage=1 --branch-coverage ' + '--title "CPython 3.11 LCOV report [commit $(shell ' + ')]"', + 'CPPFLAGS': '-IObjects -IInclude -IPython -I. ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include', + 'CXX': 'g++ -pthread -B /usr/local/miniconda3/envs/phantom/compiler_compat', + 'DECIMAL_CFLAGS': '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_decimal/libmpdec ' + '-DCONFIG_64=1 -DANSI=1 -DHAVE_UINT128_T=1', + 'DECIMAL_LDFLAGS': '-lm Modules/_decimal/libmpdec/libmpdec.a', + 'DEEPFREEZE_C': 'Python/deepfreeze/deepfreeze.c', + 'DEEPFREEZE_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Tools/scripts/deepfreeze.py ' + '_bootstrap_python ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Programs/_freeze_module.py ' + '\\', + 'DEEPFREEZE_OBJS': 'Python/deepfreeze/deepfreeze.o', + 'DESTDIRS': '/usr/local/miniconda3/envs/phantom ' + '/usr/local/miniconda3/envs/phantom/lib ' + '/usr/local/miniconda3/envs/phantom/lib/python3.11 ' + '/usr/local/miniconda3/envs/phantom/lib/python3.11/lib-dynload', + 'DESTLIB': '/usr/local/miniconda3/envs/phantom/lib/python3.11', + 'DESTPATH': '', + 'DESTSHARED': '/usr/local/miniconda3/envs/phantom/lib/python3.11/lib-dynload', + 'DFLAGS': '', + 'DIRMODE': 755, + 'DIST': 'README.rst ChangeLog configure configure.ac acconfig.h pyconfig.h.in ' + 'Makefile.pre.in Include Lib Misc Ext-dummy', + 'DISTDIRS': 'Include Lib Misc Ext-dummy', + 'DISTFILES': 'README.rst ChangeLog configure configure.ac acconfig.h ' + 'pyconfig.h.in Makefile.pre.in', + 'DLINCLDIR': '.', + 'DLLLIBRARY': '', + 'DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754': 0, + 'DOUBLE_IS_BIG_ENDIAN_IEEE754': 0, + 'DOUBLE_IS_LITTLE_ENDIAN_IEEE754': 1, + 'DTRACE': '', + 'DTRACE_DEPS': '\\', + 'DTRACE_HEADERS': '', + 'DTRACE_OBJS': '', + 'DYNLOADFILE': 'dynload_shlib.o', + 'ENABLE_IPV6': 1, + 'ENSUREPIP': 'no', + 'EXE': '', + 'EXEMODE': 755, + 'EXPAT_CFLAGS': '', + 'EXPAT_LDFLAGS': '-lexpat', + 'EXPORTSFROM': '', + 'EXPORTSYMS': '', + 'EXTRATESTOPTS': '', + 'EXT_SUFFIX': '.cpython-311-x86_64-linux-gnu.so', + 'FILEMODE': 644, + 'FLOAT_WORDS_BIGENDIAN': 0, + 'FREEZE_MODULE': './_bootstrap_python ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Programs/_freeze_module.py', + 'FREEZE_MODULE_BOOTSTRAP': './Programs/_freeze_module', + 'FREEZE_MODULE_BOOTSTRAP_DEPS': 'Programs/_freeze_module', + 'FREEZE_MODULE_DEPS': '_bootstrap_python ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Programs/_freeze_module.py', + 'FROZEN_FILES_IN': '\\', + 'FROZEN_FILES_OUT': '\\', + 'GETPGRP_HAVE_ARG': 0, + 'GITBRANCH': '', + 'GITTAG': '', + 'GITVERSION': '', + 'GNULD': 'no', + 'HAVE_ACCEPT': 1, + 'HAVE_ACCEPT4': 1, + 'HAVE_ACOSH': 1, + 'HAVE_ADDRINFO': 1, + 'HAVE_ALARM': 1, + 'HAVE_ALIGNED_REQUIRED': 0, + 'HAVE_ALLOCA_H': 1, + 'HAVE_ALTZONE': 0, + 'HAVE_ASINH': 1, + 'HAVE_ASM_TYPES_H': 1, + 'HAVE_ATANH': 1, + 'HAVE_BIND': 1, + 'HAVE_BIND_TEXTDOMAIN_CODESET': 1, + 'HAVE_BLUETOOTH_BLUETOOTH_H': 0, + 'HAVE_BLUETOOTH_H': 0, + 'HAVE_BROKEN_MBSTOWCS': 0, + 'HAVE_BROKEN_NICE': 0, + 'HAVE_BROKEN_PIPE_BUF': 0, + 'HAVE_BROKEN_POLL': 0, + 'HAVE_BROKEN_POSIX_SEMAPHORES': 0, + 'HAVE_BROKEN_PTHREAD_SIGMASK': 0, + 'HAVE_BROKEN_SEM_GETVALUE': 0, + 'HAVE_BROKEN_UNSETENV': 0, + 'HAVE_BUILTIN_ATOMIC': 1, + 'HAVE_BZLIB_H': 1, + 'HAVE_CHFLAGS': 0, + 'HAVE_CHMOD': 1, + 'HAVE_CHOWN': 1, + 'HAVE_CHROOT': 1, + 'HAVE_CLOCK': 1, + 'HAVE_CLOCK_GETRES': 1, + 'HAVE_CLOCK_GETTIME': 1, + 'HAVE_CLOCK_NANOSLEEP': 1, + 'HAVE_CLOCK_SETTIME': 1, + 'HAVE_CLOSE_RANGE': 0, + 'HAVE_COMPUTED_GOTOS': 1, + 'HAVE_CONFSTR': 1, + 'HAVE_CONIO_H': 0, + 'HAVE_CONNECT': 1, + 'HAVE_COPY_FILE_RANGE': 1, + 'HAVE_CRYPT_H': 0, + 'HAVE_CRYPT_R': 0, + 'HAVE_CTERMID': 1, + 'HAVE_CTERMID_R': 0, + 'HAVE_CURSES_FILTER': 1, + 'HAVE_CURSES_H': 1, + 'HAVE_CURSES_HAS_KEY': 1, + 'HAVE_CURSES_IMMEDOK': 1, + 'HAVE_CURSES_IS_PAD': 1, + 'HAVE_CURSES_IS_TERM_RESIZED': 1, + 'HAVE_CURSES_RESIZETERM': 1, + 'HAVE_CURSES_RESIZE_TERM': 1, + 'HAVE_CURSES_SYNCOK': 1, + 'HAVE_CURSES_TYPEAHEAD': 1, + 'HAVE_CURSES_USE_ENV': 1, + 'HAVE_CURSES_WCHGAT': 1, + 'HAVE_DB_H': 0, + 'HAVE_DECL_RTLD_DEEPBIND': 1, + 'HAVE_DECL_RTLD_GLOBAL': 1, + 'HAVE_DECL_RTLD_LAZY': 1, + 'HAVE_DECL_RTLD_LOCAL': 1, + 'HAVE_DECL_RTLD_MEMBER': 0, + 'HAVE_DECL_RTLD_NODELETE': 1, + 'HAVE_DECL_RTLD_NOLOAD': 1, + 'HAVE_DECL_RTLD_NOW': 1, + 'HAVE_DECL_TZNAME': 0, + 'HAVE_DEVICE_MACROS': 1, + 'HAVE_DEV_PTC': 0, + 'HAVE_DEV_PTMX': 1, + 'HAVE_DIRECT_H': 0, + 'HAVE_DIRENT_D_TYPE': 1, + 'HAVE_DIRENT_H': 1, + 'HAVE_DIRFD': 1, + 'HAVE_DLFCN_H': 1, + 'HAVE_DLOPEN': 1, + 'HAVE_DUP': 1, + 'HAVE_DUP2': 1, + 'HAVE_DUP3': 1, + 'HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH': 0, + 'HAVE_DYNAMIC_LOADING': 1, + 'HAVE_ENDIAN_H': 1, + 'HAVE_EPOLL': 1, + 'HAVE_EPOLL_CREATE1': 1, + 'HAVE_ERF': 1, + 'HAVE_ERFC': 1, + 'HAVE_ERRNO_H': 1, + 'HAVE_EVENTFD': 1, + 'HAVE_EXECV': 1, + 'HAVE_EXPLICIT_BZERO': 1, + 'HAVE_EXPLICIT_MEMSET': 0, + 'HAVE_EXPM1': 1, + 'HAVE_FACCESSAT': 1, + 'HAVE_FCHDIR': 1, + 'HAVE_FCHMOD': 1, + 'HAVE_FCHMODAT': 1, + 'HAVE_FCHOWN': 1, + 'HAVE_FCHOWNAT': 1, + 'HAVE_FCNTL_H': 1, + 'HAVE_FDATASYNC': 1, + 'HAVE_FDOPENDIR': 1, + 'HAVE_FDWALK': 0, + 'HAVE_FEXECVE': 1, + 'HAVE_FLOCK': 1, + 'HAVE_FORK': 1, + 'HAVE_FORK1': 0, + 'HAVE_FORKPTY': 1, + 'HAVE_FPATHCONF': 1, + 'HAVE_FSEEK64': 0, + 'HAVE_FSEEKO': 1, + 'HAVE_FSTATAT': 1, + 'HAVE_FSTATVFS': 1, + 'HAVE_FSYNC': 1, + 'HAVE_FTELL64': 0, + 'HAVE_FTELLO': 1, + 'HAVE_FTIME': 1, + 'HAVE_FTRUNCATE': 1, + 'HAVE_FUTIMENS': 1, + 'HAVE_FUTIMES': 1, + 'HAVE_FUTIMESAT': 1, + 'HAVE_GAI_STRERROR': 1, + 'HAVE_GCC_ASM_FOR_MC68881': 0, + 'HAVE_GCC_ASM_FOR_X64': 1, + 'HAVE_GCC_ASM_FOR_X87': 1, + 'HAVE_GCC_UINT128_T': 1, + 'HAVE_GDBM_DASH_NDBM_H': 0, + 'HAVE_GDBM_H': 0, + 'HAVE_GDBM_NDBM_H': 0, + 'HAVE_GETADDRINFO': 1, + 'HAVE_GETC_UNLOCKED': 1, + 'HAVE_GETEGID': 1, + 'HAVE_GETENTROPY': 1, + 'HAVE_GETEUID': 1, + 'HAVE_GETGID': 1, + 'HAVE_GETGRGID': 1, + 'HAVE_GETGRGID_R': 1, + 'HAVE_GETGRNAM_R': 1, + 'HAVE_GETGROUPLIST': 1, + 'HAVE_GETGROUPS': 1, + 'HAVE_GETHOSTBYADDR': 1, + 'HAVE_GETHOSTBYNAME': 1, + 'HAVE_GETHOSTBYNAME_R': 1, + 'HAVE_GETHOSTBYNAME_R_3_ARG': 0, + 'HAVE_GETHOSTBYNAME_R_5_ARG': 0, + 'HAVE_GETHOSTBYNAME_R_6_ARG': 1, + 'HAVE_GETHOSTNAME': 1, + 'HAVE_GETITIMER': 1, + 'HAVE_GETLOADAVG': 1, + 'HAVE_GETLOGIN': 1, + 'HAVE_GETNAMEINFO': 1, + 'HAVE_GETPAGESIZE': 1, + 'HAVE_GETPEERNAME': 1, + 'HAVE_GETPGID': 1, + 'HAVE_GETPGRP': 1, + 'HAVE_GETPID': 1, + 'HAVE_GETPPID': 1, + 'HAVE_GETPRIORITY': 1, + 'HAVE_GETPROTOBYNAME': 1, + 'HAVE_GETPWENT': 1, + 'HAVE_GETPWNAM_R': 1, + 'HAVE_GETPWUID': 1, + 'HAVE_GETPWUID_R': 1, + 'HAVE_GETRANDOM': 1, + 'HAVE_GETRANDOM_SYSCALL': 1, + 'HAVE_GETRESGID': 1, + 'HAVE_GETRESUID': 1, + 'HAVE_GETRUSAGE': 1, + 'HAVE_GETSERVBYNAME': 1, + 'HAVE_GETSERVBYPORT': 1, + 'HAVE_GETSID': 1, + 'HAVE_GETSOCKNAME': 1, + 'HAVE_GETSPENT': 1, + 'HAVE_GETSPNAM': 1, + 'HAVE_GETUID': 1, + 'HAVE_GETWD': 1, + 'HAVE_GLIBC_MEMMOVE_BUG': 0, + 'HAVE_GRP_H': 1, + 'HAVE_HSTRERROR': 1, + 'HAVE_HTOLE64': 1, + 'HAVE_IEEEFP_H': 0, + 'HAVE_IF_NAMEINDEX': 1, + 'HAVE_INET_ATON': 1, + 'HAVE_INET_NTOA': 1, + 'HAVE_INET_PTON': 1, + 'HAVE_INITGROUPS': 1, + 'HAVE_INTTYPES_H': 1, + 'HAVE_IO_H': 0, + 'HAVE_IPA_PURE_CONST_BUG': 0, + 'HAVE_KILL': 1, + 'HAVE_KILLPG': 1, + 'HAVE_KQUEUE': 0, + 'HAVE_LANGINFO_H': 1, + 'HAVE_LARGEFILE_SUPPORT': 0, + 'HAVE_LCHFLAGS': 0, + 'HAVE_LCHMOD': 0, + 'HAVE_LCHOWN': 1, + 'HAVE_LIBB2': 0, + 'HAVE_LIBDB': 0, + 'HAVE_LIBDL': 1, + 'HAVE_LIBDLD': 0, + 'HAVE_LIBGDBM_COMPAT': 0, + 'HAVE_LIBIEEE': 0, + 'HAVE_LIBINTL_H': 1, + 'HAVE_LIBNDBM': 0, + 'HAVE_LIBREADLINE': 1, + 'HAVE_LIBRESOLV': 0, + 'HAVE_LIBSENDFILE': 0, + 'HAVE_LIBSQLITE3': 1, + 'HAVE_LIBUTIL_H': 0, + 'HAVE_LINK': 1, + 'HAVE_LINKAT': 1, + 'HAVE_LINUX_AUXVEC_H': 1, + 'HAVE_LINUX_CAN_BCM_H': 1, + 'HAVE_LINUX_CAN_H': 1, + 'HAVE_LINUX_CAN_J1939_H': 0, + 'HAVE_LINUX_CAN_RAW_FD_FRAMES': 1, + 'HAVE_LINUX_CAN_RAW_H': 1, + 'HAVE_LINUX_CAN_RAW_JOIN_FILTERS': 1, + 'HAVE_LINUX_LIMITS_H': 1, + 'HAVE_LINUX_MEMFD_H': 1, + 'HAVE_LINUX_NETLINK_H': 1, + 'HAVE_LINUX_QRTR_H': 1, + 'HAVE_LINUX_RANDOM_H': 1, + 'HAVE_LINUX_SOUNDCARD_H': 1, + 'HAVE_LINUX_TIPC_H': 1, + 'HAVE_LINUX_VM_SOCKETS_H': 1, + 'HAVE_LINUX_WAIT_H': 1, + 'HAVE_LISTEN': 1, + 'HAVE_LOCKF': 1, + 'HAVE_LOG1P': 1, + 'HAVE_LOG2': 1, + 'HAVE_LOGIN_TTY': 1, + 'HAVE_LONG_DOUBLE': 1, + 'HAVE_LSTAT': 1, + 'HAVE_LUTIMES': 1, + 'HAVE_LZMA_H': 0, + 'HAVE_MADVISE': 1, + 'HAVE_MAKEDEV': 1, + 'HAVE_MBRTOWC': 1, + 'HAVE_MEMFD_CREATE': 1, + 'HAVE_MEMORY_H': 1, + 'HAVE_MEMRCHR': 1, + 'HAVE_MKDIRAT': 1, + 'HAVE_MKFIFO': 1, + 'HAVE_MKFIFOAT': 1, + 'HAVE_MKNOD': 1, + 'HAVE_MKNODAT': 1, + 'HAVE_MKTIME': 1, + 'HAVE_MMAP': 1, + 'HAVE_MREMAP': 1, + 'HAVE_NANOSLEEP': 1, + 'HAVE_NCURSES_H': 1, + 'HAVE_NDBM_H': 0, + 'HAVE_NDIR_H': 0, + 'HAVE_NETCAN_CAN_H': 0, + 'HAVE_NETDB_H': 1, + 'HAVE_NETINET_IN_H': 1, + 'HAVE_NETPACKET_PACKET_H': 1, + 'HAVE_NET_IF_H': 1, + 'HAVE_NICE': 1, + 'HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION': 0, + 'HAVE_OPENAT': 1, + 'HAVE_OPENDIR': 1, + 'HAVE_OPENPTY': 1, + 'HAVE_PATHCONF': 1, + 'HAVE_PAUSE': 1, + 'HAVE_PIPE': 1, + 'HAVE_PIPE2': 1, + 'HAVE_PLOCK': 0, + 'HAVE_POLL': 1, + 'HAVE_POLL_H': 1, + 'HAVE_POSIX_FADVISE': 1, + 'HAVE_POSIX_FALLOCATE': 1, + 'HAVE_POSIX_SPAWN': 1, + 'HAVE_POSIX_SPAWNP': 1, + 'HAVE_PREAD': 1, + 'HAVE_PREADV': 1, + 'HAVE_PREADV2': 1, + 'HAVE_PRLIMIT': 1, + 'HAVE_PROCESS_H': 0, + 'HAVE_PROTOTYPES': 1, + 'HAVE_PTHREAD_CONDATTR_SETCLOCK': 1, + 'HAVE_PTHREAD_DESTRUCTOR': 0, + 'HAVE_PTHREAD_GETCPUCLOCKID': 1, + 'HAVE_PTHREAD_H': 1, + 'HAVE_PTHREAD_INIT': 0, + 'HAVE_PTHREAD_KILL': 1, + 'HAVE_PTHREAD_SIGMASK': 1, + 'HAVE_PTHREAD_STUBS': 0, + 'HAVE_PTY_H': 1, + 'HAVE_PWRITE': 1, + 'HAVE_PWRITEV': 1, + 'HAVE_PWRITEV2': 1, + 'HAVE_READLINK': 1, + 'HAVE_READLINKAT': 1, + 'HAVE_READV': 1, + 'HAVE_REALPATH': 1, + 'HAVE_RECVFROM': 1, + 'HAVE_RENAMEAT': 1, + 'HAVE_RL_APPEND_HISTORY': 1, + 'HAVE_RL_CATCH_SIGNAL': 1, + 'HAVE_RL_COMPDISP_FUNC_T': 1, + 'HAVE_RL_COMPLETION_APPEND_CHARACTER': 1, + 'HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK': 1, + 'HAVE_RL_COMPLETION_MATCHES': 1, + 'HAVE_RL_COMPLETION_SUPPRESS_APPEND': 1, + 'HAVE_RL_PRE_INPUT_HOOK': 1, + 'HAVE_RL_RESIZE_TERMINAL': 1, + 'HAVE_RPC_RPC_H': 0, + 'HAVE_RTPSPAWN': 0, + 'HAVE_SCHED_GET_PRIORITY_MAX': 1, + 'HAVE_SCHED_H': 1, + 'HAVE_SCHED_RR_GET_INTERVAL': 1, + 'HAVE_SCHED_SETAFFINITY': 1, + 'HAVE_SCHED_SETPARAM': 1, + 'HAVE_SCHED_SETSCHEDULER': 1, + 'HAVE_SEM_CLOCKWAIT': 0, + 'HAVE_SEM_GETVALUE': 1, + 'HAVE_SEM_OPEN': 1, + 'HAVE_SEM_TIMEDWAIT': 1, + 'HAVE_SEM_UNLINK': 1, + 'HAVE_SENDFILE': 1, + 'HAVE_SENDTO': 1, + 'HAVE_SETEGID': 1, + 'HAVE_SETEUID': 1, + 'HAVE_SETGID': 1, + 'HAVE_SETGROUPS': 1, + 'HAVE_SETHOSTNAME': 1, + 'HAVE_SETITIMER': 1, + 'HAVE_SETJMP_H': 1, + 'HAVE_SETLOCALE': 1, + 'HAVE_SETPGID': 1, + 'HAVE_SETPGRP': 1, + 'HAVE_SETPRIORITY': 1, + 'HAVE_SETREGID': 1, + 'HAVE_SETRESGID': 1, + 'HAVE_SETRESUID': 1, + 'HAVE_SETREUID': 1, + 'HAVE_SETSID': 1, + 'HAVE_SETSOCKOPT': 1, + 'HAVE_SETUID': 1, + 'HAVE_SETVBUF': 1, + 'HAVE_SHADOW_H': 1, + 'HAVE_SHM_OPEN': 1, + 'HAVE_SHM_UNLINK': 1, + 'HAVE_SHUTDOWN': 1, + 'HAVE_SIGACTION': 1, + 'HAVE_SIGALTSTACK': 1, + 'HAVE_SIGFILLSET': 1, + 'HAVE_SIGINFO_T_SI_BAND': 1, + 'HAVE_SIGINTERRUPT': 1, + 'HAVE_SIGNAL_H': 1, + 'HAVE_SIGPENDING': 1, + 'HAVE_SIGRELSE': 1, + 'HAVE_SIGTIMEDWAIT': 1, + 'HAVE_SIGWAIT': 1, + 'HAVE_SIGWAITINFO': 1, + 'HAVE_SNPRINTF': 1, + 'HAVE_SOCKADDR_ALG': 1, + 'HAVE_SOCKADDR_SA_LEN': 0, + 'HAVE_SOCKADDR_STORAGE': 1, + 'HAVE_SOCKET': 1, + 'HAVE_SOCKETPAIR': 1, + 'HAVE_SPAWN_H': 1, + 'HAVE_SPLICE': 1, + 'HAVE_SSIZE_T': 1, + 'HAVE_STATVFS': 1, + 'HAVE_STAT_TV_NSEC': 1, + 'HAVE_STAT_TV_NSEC2': 0, + 'HAVE_STDARG_PROTOTYPES': 1, + 'HAVE_STDINT_H': 1, + 'HAVE_STDLIB_H': 1, + 'HAVE_STD_ATOMIC': 1, + 'HAVE_STRFTIME': 1, + 'HAVE_STRINGS_H': 1, + 'HAVE_STRING_H': 1, + 'HAVE_STRLCPY': 0, + 'HAVE_STROPTS_H': 0, + 'HAVE_STRSIGNAL': 1, + 'HAVE_STRUCT_PASSWD_PW_GECOS': 1, + 'HAVE_STRUCT_PASSWD_PW_PASSWD': 1, + 'HAVE_STRUCT_STAT_ST_BIRTHTIME': 0, + 'HAVE_STRUCT_STAT_ST_BLKSIZE': 1, + 'HAVE_STRUCT_STAT_ST_BLOCKS': 1, + 'HAVE_STRUCT_STAT_ST_FLAGS': 0, + 'HAVE_STRUCT_STAT_ST_GEN': 0, + 'HAVE_STRUCT_STAT_ST_RDEV': 1, + 'HAVE_STRUCT_TM_TM_ZONE': 1, + 'HAVE_SYMLINK': 1, + 'HAVE_SYMLINKAT': 1, + 'HAVE_SYNC': 1, + 'HAVE_SYSCONF': 1, + 'HAVE_SYSEXITS_H': 1, + 'HAVE_SYSLOG_H': 1, + 'HAVE_SYSTEM': 1, + 'HAVE_SYS_AUDIOIO_H': 0, + 'HAVE_SYS_AUXV_H': 1, + 'HAVE_SYS_BSDTTY_H': 0, + 'HAVE_SYS_DEVPOLL_H': 0, + 'HAVE_SYS_DIR_H': 0, + 'HAVE_SYS_ENDIAN_H': 0, + 'HAVE_SYS_EPOLL_H': 1, + 'HAVE_SYS_EVENTFD_H': 1, + 'HAVE_SYS_EVENT_H': 0, + 'HAVE_SYS_FILE_H': 1, + 'HAVE_SYS_IOCTL_H': 1, + 'HAVE_SYS_KERN_CONTROL_H': 0, + 'HAVE_SYS_LOADAVG_H': 0, + 'HAVE_SYS_LOCK_H': 0, + 'HAVE_SYS_MEMFD_H': 0, + 'HAVE_SYS_MKDEV_H': 0, + 'HAVE_SYS_MMAN_H': 1, + 'HAVE_SYS_MODEM_H': 0, + 'HAVE_SYS_NDIR_H': 0, + 'HAVE_SYS_PARAM_H': 1, + 'HAVE_SYS_POLL_H': 1, + 'HAVE_SYS_RANDOM_H': 1, + 'HAVE_SYS_RESOURCE_H': 1, + 'HAVE_SYS_SELECT_H': 1, + 'HAVE_SYS_SENDFILE_H': 1, + 'HAVE_SYS_SOCKET_H': 1, + 'HAVE_SYS_SOUNDCARD_H': 1, + 'HAVE_SYS_STATVFS_H': 1, + 'HAVE_SYS_STAT_H': 1, + 'HAVE_SYS_SYSCALL_H': 1, + 'HAVE_SYS_SYSMACROS_H': 1, + 'HAVE_SYS_SYS_DOMAIN_H': 0, + 'HAVE_SYS_TERMIO_H': 0, + 'HAVE_SYS_TIMES_H': 1, + 'HAVE_SYS_TIME_H': 1, + 'HAVE_SYS_TYPES_H': 1, + 'HAVE_SYS_UIO_H': 1, + 'HAVE_SYS_UN_H': 1, + 'HAVE_SYS_UTSNAME_H': 1, + 'HAVE_SYS_WAIT_H': 1, + 'HAVE_SYS_XATTR_H': 1, + 'HAVE_TCGETPGRP': 1, + 'HAVE_TCSETPGRP': 1, + 'HAVE_TEMPNAM': 1, + 'HAVE_TERMIOS_H': 1, + 'HAVE_TERM_H': 1, + 'HAVE_TIMEGM': 1, + 'HAVE_TIMES': 1, + 'HAVE_TMPFILE': 1, + 'HAVE_TMPNAM': 1, + 'HAVE_TMPNAM_R': 1, + 'HAVE_TM_ZONE': 1, + 'HAVE_TRUNCATE': 1, + 'HAVE_TTYNAME': 1, + 'HAVE_TZNAME': 0, + 'HAVE_UMASK': 1, + 'HAVE_UNAME': 1, + 'HAVE_UNISTD_H': 1, + 'HAVE_UNLINKAT': 1, + 'HAVE_USABLE_WCHAR_T': 0, + 'HAVE_UTIL_H': 0, + 'HAVE_UTIMENSAT': 1, + 'HAVE_UTIMES': 1, + 'HAVE_UTIME_H': 1, + 'HAVE_UTMP_H': 1, + 'HAVE_UUID_CREATE': 0, + 'HAVE_UUID_ENC_BE': 0, + 'HAVE_UUID_GENERATE_TIME_SAFE': 1, + 'HAVE_UUID_H': 1, + 'HAVE_UUID_UUID_H': 0, + 'HAVE_VFORK': 1, + 'HAVE_WAIT': 1, + 'HAVE_WAIT3': 1, + 'HAVE_WAIT4': 1, + 'HAVE_WAITID': 1, + 'HAVE_WAITPID': 1, + 'HAVE_WCHAR_H': 1, + 'HAVE_WCSCOLL': 1, + 'HAVE_WCSFTIME': 1, + 'HAVE_WCSXFRM': 1, + 'HAVE_WMEMCMP': 1, + 'HAVE_WORKING_TZSET': 1, + 'HAVE_WRITEV': 1, + 'HAVE_ZLIB_COPY': 1, + 'HAVE_ZLIB_H': 0, + 'HAVE__GETPTY': 0, + 'HOSTRUNNER': '', + 'HOST_GNU_TYPE': 'x86_64-conda_cos6-linux-gnu', + 'INCLDIRSTOMAKE': '/usr/local/miniconda3/envs/phantom/include ' + '/usr/local/miniconda3/envs/phantom/include ' + '/usr/local/miniconda3/envs/phantom/include/python3.11 ' + '/usr/local/miniconda3/envs/phantom/include/python3.11', + 'INCLUDEDIR': '/usr/local/miniconda3/envs/phantom/include', + 'INCLUDEPY': '/usr/local/miniconda3/envs/phantom/include/python3.11', + 'INSTALL': '/usr/bin/install -c', + 'INSTALL_DATA': '/usr/bin/install -c -m 644', + 'INSTALL_PROGRAM': '/usr/bin/install -c', + 'INSTALL_SCRIPT': '/usr/bin/install -c', + 'INSTALL_SHARED': '/usr/bin/install -c -m 755', + 'INSTSONAME': 'libpython3.11.a', + 'IO_H': 'Modules/_io/_iomodule.h', + 'IO_OBJS': '\\', + 'LDCXXSHARED': 'g++ -pthread -B /usr/local/miniconda3/envs/phantom/compiler_compat -shared', + 'LDFLAGS': '' + '' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '' + '' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib', + 'LDLIBRARY': 'libpython3.11.a', + 'LDLIBRARYDIR': '', + 'LDSHARED': 'gcc -pthread -B /usr/local/miniconda3/envs/phantom/compiler_compat -shared ' + '' + '' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '' + '' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib', + 'LDVERSION': '3.11', + 'LIBC': '', + 'LIBDEST': '/usr/local/miniconda3/envs/phantom/lib/python3.11', + 'LIBDIR': '/usr/local/miniconda3/envs/phantom/lib', + 'LIBEXPAT_A': 'Modules/expat/libexpat.a', + 'LIBEXPAT_CFLAGS': '-DNDEBUG -fwrapv -O2 -Wall ' + '-fPIC ' + '-O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '' + '' + '' + '' + '-fPIC ' + '-O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '' + '' + '' + '-fno-semantic-interposition ' + '' + '-g -std=c11 ' + '-Werror=implicit-function-declaration -fvisibility=hidden ' + '' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include/internal ' + '-IObjects -IInclude -IPython -I. ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-fPIC', + 'LIBEXPAT_HEADERS': '\\', + 'LIBEXPAT_OBJS': '\\', + 'LIBFFI_INCLUDEDIR': '/usr/local/miniconda3/envs/phantom/include', + 'LIBM': '-lm', + 'LIBMPDEC_A': 'Modules/_decimal/libmpdec/libmpdec.a', + 'LIBMPDEC_CFLAGS': '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_decimal/libmpdec ' + '-DCONFIG_64=1 -DANSI=1 -DHAVE_UINT128_T=1 -DNDEBUG ' + '-fwrapv -O2 -Wall ' + '-fPIC ' + '-O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '' + '' + '' + '' + '-fPIC ' + '-O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '' + '' + '' + '-fno-semantic-interposition ' + '' + '-g -std=c11 ' + '-Werror=implicit-function-declaration -fvisibility=hidden ' + '' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include/internal ' + '-IObjects -IInclude -IPython -I. ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-fPIC', + 'LIBMPDEC_HEADERS': '\\', + 'LIBMPDEC_OBJS': '\\', + 'LIBOBJDIR': 'Python/', + 'LIBOBJS': '', + 'LIBPC': '/usr/local/miniconda3/envs/phantom/lib/pkgconfig', + 'LIBPL': '/usr/local/miniconda3/envs/phantom/lib/python3.11/config-3.11-x86_64-linux-gnu', + 'LIBPYTHON': '', + 'LIBRARY': 'libpython3.11.a', + 'LIBRARY_DEPS': 'libpython3.11.a', + 'LIBRARY_OBJS': '\\', + 'LIBRARY_OBJS_OMIT_FROZEN': '\\', + 'LIBS': '-lpthread -ldl -lutil', + 'LIBSUBDIRS': 'asyncio \\', + 'LINKCC': 'gcc -pthread -B /usr/local/miniconda3/envs/phantom/compiler_compat', + 'LINKFORSHARED': '-Xlinker -export-dynamic', + 'LINK_PYTHON_DEPS': 'libpython3.11.a', + 'LINK_PYTHON_OBJS': '\\', + 'LIPO_32BIT_FLAGS': '', + 'LIPO_INTEL64_FLAGS': '', + 'LLVM_PROF_ERR': 'no', + 'LLVM_PROF_FILE': '', + 'LLVM_PROF_MERGER': 'true', + 'LN': 'ln', + 'LOCALMODLIBS': '', + 'MACHDEP': 'linux', + 'MACHDEP_OBJS': '', + 'MACHDESTLIB': '/usr/local/miniconda3/envs/phantom/lib/python3.11', + 'MACOSX_DEPLOYMENT_TARGET': '', + 'MAINCC': 'gcc -pthread -B /usr/local/miniconda3/envs/phantom/compiler_compat', + 'MAJOR_IN_MKDEV': 0, + 'MAJOR_IN_SYSMACROS': 1, + 'MAKESETUP': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/makesetup', + 'MANDIR': '/usr/local/miniconda3/envs/phantom/share/man', + 'MKDIR_P': '/usr/bin/mkdir -p', + 'MODBUILT_NAMES': 'atexit faulthandler posix _signal _tracemalloc ' + '_codecs _collections errno _io itertools _sre ' + '_thread time _weakref _abc _functools _locale ' + '_operator _stat _symtable pwd xxsubtype', + 'MODDISABLED_NAMES': '', + 'MODLIBS': '', + 'MODOBJS': 'Modules/atexitmodule.o Modules/faulthandler.o ' + 'Modules/posixmodule.o Modules/signalmodule.o ' + 'Modules/_tracemalloc.o Modules/_codecsmodule.o ' + 'Modules/_collectionsmodule.o Modules/errnomodule.o ' + 'Modules/_io/_iomodule.o Modules/_io/iobase.o Modules/_io/fileio.o ' + 'Modules/_io/bytesio.o Modules/_io/bufferedio.o ' + 'Modules/_io/textio.o Modules/_io/stringio.o ' + 'Modules/itertoolsmodule.o Modules/_sre/sre.o ' + 'Modules/_threadmodule.o Modules/timemodule.o ' + 'Modules/_weakref.o Modules/_abc.o Modules/_functoolsmodule.o ' + 'Modules/_localemodule.o Modules/_operator.o Modules/_stat.o ' + 'Modules/symtablemodule.o Modules/pwdmodule.o ' + 'Modules/xxsubtype.o', + 'MODSHARED_NAMES': '', + 'MODULE_ARRAY_STATE': 'yes', + 'MODULE_ATEXIT_LDFLAGS': '', + 'MODULE_AUDIOOP_LDFLAGS': '-lm', + 'MODULE_AUDIOOP_STATE': 'yes', + 'MODULE_BINASCII_CFLAGS': '-DUSE_ZLIB_CRC32 ' + '-I/usr/local/miniconda3/envs/phantom/include', + 'MODULE_BINASCII_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-lz', + 'MODULE_BINASCII_STATE': 'yes', + 'MODULE_CMATH_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_math.h', + 'MODULE_CMATH_LDFLAGS': '-lm', + 'MODULE_CMATH_STATE': 'yes', + 'MODULE_ERRNO_LDFLAGS': '', + 'MODULE_FAULTHANDLER_LDFLAGS': '', + 'MODULE_FCNTL_LDFLAGS': '', + 'MODULE_FCNTL_STATE': 'yes', + 'MODULE_GRP_STATE': 'yes', + 'MODULE_ITERTOOLS_LDFLAGS': '', + 'MODULE_MATH_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_math.h', + 'MODULE_MATH_LDFLAGS': '-lm', + 'MODULE_MATH_STATE': 'yes', + 'MODULE_MMAP_STATE': 'yes', + 'MODULE_NIS_STATE': 'missing', + 'MODULE_OBJS': '\\', + 'MODULE_OSSAUDIODEV_LDFLAGS': '', + 'MODULE_OSSAUDIODEV_STATE': 'yes', + 'MODULE_POSIX_LDFLAGS': '', + 'MODULE_PWD_LDFLAGS': '', + 'MODULE_PWD_STATE': 'yes', + 'MODULE_PYEXPAT_CFLAGS': '', + 'MODULE_PYEXPAT_DEPS': '', + 'MODULE_PYEXPAT_LDFLAGS': '-lexpat', + 'MODULE_PYEXPAT_STATE': 'yes', + 'MODULE_RESOURCE_STATE': 'yes', + 'MODULE_SELECT_STATE': 'yes', + 'MODULE_SPWD_STATE': 'yes', + 'MODULE_SYSLOG_STATE': 'yes', + 'MODULE_TERMIOS_STATE': 'yes', + 'MODULE_TIME_LDFLAGS': '', + 'MODULE_TIME_STATE': 'yes', + 'MODULE_UNICODEDATA_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/unicodedata_db.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/unicodename_db.h', + 'MODULE_UNICODEDATA_STATE': 'yes', + 'MODULE_XXLIMITED_35_STATE': 'yes', + 'MODULE_XXLIMITED_STATE': 'yes', + 'MODULE_XXSUBTYPE_LDFLAGS': '', + 'MODULE_ZLIB_CFLAGS': '-I/usr/local/miniconda3/envs/phantom/include', + 'MODULE_ZLIB_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-lz', + 'MODULE_ZLIB_STATE': 'yes', + 'MODULE__ABC_LDFLAGS': '', + 'MODULE__ASYNCIO_STATE': 'yes', + 'MODULE__BISECT_STATE': 'yes', + 'MODULE__BLAKE2_CFLAGS': '', + 'MODULE__BLAKE2_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2-config.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2-impl.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2b-load-sse2.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2b-load-sse41.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2b-ref.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2b-round.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2b.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2s-load-sse2.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2s-load-sse41.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2s-load-xop.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2s-ref.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2s-round.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2s.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/blake2module.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/hashlib.h', + 'MODULE__BLAKE2_LDFLAGS': '', + 'MODULE__BLAKE2_STATE': 'yes', + 'MODULE__BZ2_CFLAGS': '', + 'MODULE__BZ2_LDFLAGS': '-lbz2', + 'MODULE__BZ2_STATE': 'yes', + 'MODULE__CODECS_CN_STATE': 'yes', + 'MODULE__CODECS_HK_STATE': 'yes', + 'MODULE__CODECS_ISO2022_STATE': 'yes', + 'MODULE__CODECS_JP_STATE': 'yes', + 'MODULE__CODECS_KR_STATE': 'yes', + 'MODULE__CODECS_LDFLAGS': '', + 'MODULE__CODECS_TW_STATE': 'yes', + 'MODULE__COLLECTIONS_LDFLAGS': '', + 'MODULE__CONTEXTVARS_STATE': 'yes', + 'MODULE__CRYPT_CFLAGS': '', + 'MODULE__CRYPT_LDFLAGS': '', + 'MODULE__CRYPT_STATE': 'yes', + 'MODULE__CSV_STATE': 'yes', + 'MODULE__CTYPES_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ctypes/ctypes.h', + 'MODULE__CTYPES_TEST_LDFLAGS': '-lm', + 'MODULE__CTYPES_TEST_STATE': 'yes', + 'MODULE__DATETIME_LDFLAGS': '-lm', + 'MODULE__DATETIME_STATE': 'yes', + 'MODULE__DECIMAL_CFLAGS': '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_decimal/libmpdec ' + '-DCONFIG_64=1 -DANSI=1 -DHAVE_UINT128_T=1', + 'MODULE__DECIMAL_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_decimal/docstrings.h ' + '\\ Modules/_decimal/libmpdec/libmpdec.a', + 'MODULE__DECIMAL_LDFLAGS': '-lm Modules/_decimal/libmpdec/libmpdec.a', + 'MODULE__DECIMAL_STATE': 'yes', + 'MODULE__ELEMENTTREE_CFLAGS': '', + 'MODULE__ELEMENTTREE_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/pyexpat.c', + 'MODULE__ELEMENTTREE_STATE': 'yes', + 'MODULE__FUNCTOOLS_LDFLAGS': '', + 'MODULE__GDBM_STATE': 'missing', + 'MODULE__HASHLIB_CFLAGS': '-I/usr/local/miniconda3/envs/phantom/include', + 'MODULE__HASHLIB_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/hashlib.h', + 'MODULE__HASHLIB_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-lcrypto', + 'MODULE__HASHLIB_STATE': 'yes', + 'MODULE__HEAPQ_STATE': 'yes', + 'MODULE__IO_CFLAGS': '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_io', + 'MODULE__IO_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_io/_iomodule.h', + 'MODULE__IO_LDFLAGS': '', + 'MODULE__IO_STATE': 'yes', + 'MODULE__JSON_STATE': 'yes', + 'MODULE__LOCALE_LDFLAGS': '', + 'MODULE__LSPROF_STATE': 'yes', + 'MODULE__LZMA_CFLAGS': '-I/usr/local/miniconda3/envs/phantom/include', + 'MODULE__LZMA_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-llzma', + 'MODULE__LZMA_STATE': 'yes', + 'MODULE__MD5_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/hashlib.h', + 'MODULE__MD5_STATE': 'yes', + 'MODULE__MULTIBYTECODEC_STATE': 'yes', + 'MODULE__MULTIPROCESSING_CFLAGS': '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_multiprocessing', + 'MODULE__MULTIPROCESSING_STATE': 'yes', + 'MODULE__OPCODE_STATE': 'yes', + 'MODULE__OPERATOR_LDFLAGS': '', + 'MODULE__PICKLE_STATE': 'yes', + 'MODULE__POSIXSHMEM_CFLAGS': '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_multiprocessing', + 'MODULE__POSIXSHMEM_LDFLAGS': '-lrt', + 'MODULE__POSIXSHMEM_STATE': 'yes', + 'MODULE__POSIXSUBPROCESS_STATE': 'yes', + 'MODULE__QUEUE_STATE': 'yes', + 'MODULE__RANDOM_STATE': 'yes', + 'MODULE__SCPROXY_STATE': 'n/a', + 'MODULE__SHA1_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/hashlib.h', + 'MODULE__SHA1_STATE': 'yes', + 'MODULE__SHA256_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/hashlib.h', + 'MODULE__SHA256_STATE': 'yes', + 'MODULE__SHA3_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sha3/sha3.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sha3/sha3.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/hashlib.h', + 'MODULE__SHA3_STATE': 'yes', + 'MODULE__SHA512_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/hashlib.h', + 'MODULE__SHA512_STATE': 'yes', + 'MODULE__SIGNAL_LDFLAGS': '', + 'MODULE__SOCKET_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/socketmodule.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/addrinfo.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/getaddrinfo.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/getnameinfo.c', + 'MODULE__SOCKET_STATE': 'yes', + 'MODULE__SQLITE3_CFLAGS': '-I/usr/local/miniconda3/envs/phantom/include ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite', + 'MODULE__SQLITE3_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite/connection.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite/cursor.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite/microprotocols.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite/module.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite/prepare_protocol.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite/row.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite/util.h', + 'MODULE__SQLITE3_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-lsqlite3', + 'MODULE__SQLITE3_STATE': 'yes', + 'MODULE__SRE_LDFLAGS': '', + 'MODULE__SSL_CFLAGS': '-I/usr/local/miniconda3/envs/phantom/include', + 'MODULE__SSL_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ssl.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ssl/cert.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ssl/debughelpers.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ssl/misc.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ssl_data.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ssl_data_111.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ssl_data_300.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/socketmodule.h', + 'MODULE__SSL_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-lssl -lcrypto', + 'MODULE__SSL_STATE': 'yes', + 'MODULE__STATISTICS_LDFLAGS': '-lm', + 'MODULE__STATISTICS_STATE': 'yes', + 'MODULE__STAT_LDFLAGS': '', + 'MODULE__STRUCT_STATE': 'yes', + 'MODULE__SYMTABLE_LDFLAGS': '', + 'MODULE__TESTBUFFER_STATE': 'yes', + 'MODULE__TESTCAPI_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/testcapi_long.h', + 'MODULE__TESTCAPI_STATE': 'yes', + 'MODULE__TESTCLINIC_STATE': 'yes', + 'MODULE__TESTIMPORTMULTIPLE_STATE': 'yes', + 'MODULE__TESTINTERNALCAPI_STATE': 'yes', + 'MODULE__TESTMULTIPHASE_STATE': 'yes', + 'MODULE__THREAD_LDFLAGS': '', + 'MODULE__TKINTER_CFLAGS': '-I/usr/local/miniconda3/envs/phantom/include ' + '-Wno-strict-prototypes -DWITH_APPINIT=1', + 'MODULE__TKINTER_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-ltk8.6 -ltkstub8.6 -ltcl8.6 -ltclstub8.6', + 'MODULE__TKINTER_STATE': 'yes', + 'MODULE__TRACEMALLOC_LDFLAGS': '', + 'MODULE__TYPING_STATE': 'yes', + 'MODULE__UUID_CFLAGS': '-I/usr/local/miniconda3/envs/phantom/include/uuid', + 'MODULE__UUID_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-luuid', + 'MODULE__UUID_STATE': 'yes', + 'MODULE__WEAKREF_LDFLAGS': '', + 'MODULE__XXSUBINTERPRETERS_STATE': 'yes', + 'MODULE__XXTESTFUZZ_STATE': 'yes', + 'MODULE__ZONEINFO_STATE': 'yes', + 'MULTIARCH': 'x86_64-linux-gnu', + 'MULTIARCH_CPPFLAGS': '-DMULTIARCH=\\"x86_64-linux-gnu\\"', + 'MVWDELCH_IS_EXPRESSION': 1, + 'NO_AS_NEEDED': '-Wl,--no-as-needed', + 'OBJECT_OBJS': '\\', + 'OPENSSL_INCLUDES': '-I/usr/local/miniconda3/envs/phantom/include', + 'OPENSSL_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib', + 'OPENSSL_LIBS': '-lssl -lcrypto', + 'OPENSSL_RPATH': '', + 'OPT': '-DNDEBUG -fwrapv -O2 -Wall', + 'OTHER_LIBTOOL_OPT': '', + 'PACKAGE_BUGREPORT': 0, + 'PACKAGE_NAME': 0, + 'PACKAGE_STRING': 0, + 'PACKAGE_TARNAME': 0, + 'PACKAGE_URL': 0, + 'PACKAGE_VERSION': 0, + 'PARSER_HEADERS': '\\', + 'PARSER_OBJS': '\\ \\ Parser/myreadline.o Parser/tokenizer.o', + 'PEGEN_HEADERS': '\\', + 'PEGEN_OBJS': '\\', + 'PGO_PROF_GEN_FLAG': '-fprofile-generate', + 'PGO_PROF_USE_FLAG': '', + 'PLATLIBDIR': 'lib', + 'POBJS': '\\', + 'POSIX_SEMAPHORES_NOT_ENABLED': 0, + 'PROFILE_TASK': '-m test --pgo', + 'PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT': 1, + 'PTHREAD_SYSTEM_SCHED_SUPPORTED': 1, + 'PURIFY': '', + 'PY3LIBRARY': '', + 'PYLONG_BITS_IN_DIGIT': 0, + 'PYTHON': 'python', + 'PYTHONFRAMEWORK': '', + 'PYTHONFRAMEWORKDIR': 'no-framework', + 'PYTHONFRAMEWORKINSTALLDIR': '', + 'PYTHONFRAMEWORKPREFIX': '', + 'PYTHONPATH': '', + 'PYTHON_FOR_BUILD': './python -E', + 'PYTHON_FOR_BUILD_DEPS': 'python', + 'PYTHON_FOR_FREEZE': './_bootstrap_python', + 'PYTHON_FOR_REGEN': '', + 'PYTHON_HEADERS': '\\', + 'PYTHON_OBJS': '\\', + 'PY_BUILTIN_HASHLIB_HASHES': '"md5,sha1,sha256,sha512,sha3,blake2"', + 'PY_BUILTIN_MODULE_CFLAGS': '-DNDEBUG -fwrapv -O2 -Wall ' + '-fPIC ' + '-O2 ' + '-isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '' + '' + '' + '' + '-fPIC ' + '-O2 ' + '-isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '' + '' + '' + '' + '-fno-semantic-interposition ' + '' + '-g -std=c11 ' + '-Werror=implicit-function-declaration ' + '-fvisibility=hidden ' + '' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include/internal ' + '-IObjects -IInclude -IPython -I. ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DPy_BUILD_CORE_BUILTIN', + 'PY_CFLAGS': '-DNDEBUG -fwrapv -O2 -Wall ' + '-fPIC -O2 ' + '-isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '' + '' + '' + '-fPIC ' + '-O2 ' + '-isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '' + '' + '' + '', + 'PY_CFLAGS_NODIST': '-fno-semantic-interposition ' + '-g -std=c11 ' + '-Werror=implicit-function-declaration ' + '-fvisibility=hidden ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include/internal', + 'PY_COERCE_C_LOCALE': 1, + 'PY_CORE_CFLAGS': '-DNDEBUG -fwrapv -O2 -Wall ' + '-fPIC ' + '-O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '' + '' + '' + '-fPIC ' + '-O2 ' + '-isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '' + '' + '' + '-fno-semantic-interposition ' + '' + '-g -std=c11 -Werror=implicit-function-declaration ' + '-fvisibility=hidden ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include/internal ' + '-IObjects -IInclude -IPython -I. ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DPy_BUILD_CORE', + 'PY_CORE_LDFLAGS': '' + '' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '' + '' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '-fno-semantic-interposition ' + '-g', + 'PY_CPPFLAGS': '-IObjects -IInclude -IPython -I. ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include', + 'PY_ENABLE_SHARED': 0, + 'PY_FORMAT_SIZE_T': '"z"', + 'PY_LDFLAGS': '' + '' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '' + '' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib', + 'PY_LDFLAGS_NODIST': '-fno-semantic-interposition ' + '-g', + 'PY_LDFLAGS_NOLTO': '' + '' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '' + '' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '-fno-lto', + 'PY_SQLITE_ENABLE_LOAD_EXTENSION': 1, + 'PY_SQLITE_HAVE_SERIALIZE': 1, + 'PY_SSL_DEFAULT_CIPHERS': 1, + 'PY_SSL_DEFAULT_CIPHER_STRING': 0, + 'PY_STDMODULE_CFLAGS': '-DNDEBUG -fwrapv -O2 -Wall ' + '-fPIC ' + '-O2 ' + '-isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '' + '' + '' + '' + '-fPIC ' + '-O2 ' + '-isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '' + '' + '' + '' + '-fno-semantic-interposition ' + '-g -std=c11 ' + '-Werror=implicit-function-declaration ' + '-fvisibility=hidden ' + '' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include/internal ' + '-IObjects -IInclude -IPython -I. ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include', + 'PY_SUPPORT_TIER': 1, + 'Py_DEBUG': 0, + 'Py_ENABLE_SHARED': 0, + 'Py_HASH_ALGORITHM': 0, + 'Py_STATS': 0, + 'Py_SUNOS_VERSION': 0, + 'Py_TRACE_REFS': 0, + 'QUICKTESTOPTS': '-x test_subprocess test_io test_lib2to3 \\', + 'READELF': 'readelf', + 'RESSRCDIR': 'Mac/Resources/framework', + 'RETSIGTYPE': 'void', + 'RUNSHARED': '', + 'SCRIPTDIR': '/usr/local/miniconda3/envs/phantom/lib', + 'SETPGRP_HAVE_ARG': 0, + 'SHELL': '/bin/sh', + 'SHLIBS': '-lpthread -ldl -lutil', + 'SHLIB_SUFFIX': '.so', + 'SIGNED_RIGHT_SHIFT_ZERO_FILLS': 0, + 'SITEPATH': '', + 'SIZEOF_DOUBLE': 8, + 'SIZEOF_FLOAT': 4, + 'SIZEOF_FPOS_T': 16, + 'SIZEOF_INT': 4, + 'SIZEOF_LONG': 8, + 'SIZEOF_LONG_DOUBLE': 16, + 'SIZEOF_LONG_LONG': 8, + 'SIZEOF_OFF_T': 8, + 'SIZEOF_PID_T': 4, + 'SIZEOF_PTHREAD_KEY_T': 4, + 'SIZEOF_PTHREAD_T': 8, + 'SIZEOF_SHORT': 2, + 'SIZEOF_SIZE_T': 8, + 'SIZEOF_TIME_T': 8, + 'SIZEOF_UINTPTR_T': 8, + 'SIZEOF_VOID_P': 8, + 'SIZEOF_WCHAR_T': 4, + 'SIZEOF__BOOL': 1, + 'SOABI': 'cpython-311-x86_64-linux-gnu', + 'SRCDIRS': 'Modules Modules/_blake2 Modules/_ctypes Modules/_decimal ' + 'Modules/_decimal/libmpdec Modules/_io ' + 'Modules/_multiprocessing Modules/_sha3 Modules/_sqlite ' + 'Modules/_sre Modules/_xxtestfuzz Modules/cjkcodecs ' + 'Modules/expat Objects Parser Programs Python ' + 'Python/frozen_modules Python/deepfreeze', + 'SRC_GDB_HOOKS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Tools/gdb/libpython.py', + 'STATIC_LIBPYTHON': 1, + 'STDC_HEADERS': 1, + 'STRICT_SYSV_CURSES': "/* Don't use ncurses extensions */", + 'STRIPFLAG': '-s', + 'SUBDIRS': '', + 'SUBDIRSTOO': 'Include Lib Misc', + 'SYSLIBS': '-lm', + 'SYS_SELECT_WITH_SYS_TIME': 1, + 'TESTOPTS': '', + 'TESTPATH': '', + 'TESTPYTHON': './python -E', + 'TESTPYTHONOPTS': '', + 'TESTRUNNER': './python -E ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Tools/scripts/run_tests.py', + 'TESTSUBDIRS': 'ctypes/test \\', + 'TESTTIMEOUT': 1200, + 'TEST_MODULES': 'yes', + 'THREAD_STACK_SIZE': 0, + 'TIMEMODULE_LIB': 0, + 'TIME_WITH_SYS_TIME': 1, + 'TM_IN_SYS_TIME': 0, + 'TZPATH': '/usr/local/miniconda3/envs/phantom/share/zoneinfo:/usr/local/miniconda3/envs/phantom/share/tzinfo', + 'UNICODE_DEPS': '\\', + 'UNIVERSALSDK': '', + 'UPDATE_FILE': '/home/task_177324838993876/croot/python-split_1773249007352/work/Tools/scripts/update_file.py', + 'USE_COMPUTED_GOTOS': 1, + 'VERSION': '3.11', + 'VPATH': '/home/task_177324838993876/croot/python-split_1773249007352/work', + 'WASM_ASSETS_DIR': './usr/local/miniconda3/envs/phantom', + 'WASM_STDLIB': './usr/local/miniconda3/envs/phantom/lib/python3.11/os.py', + 'WHEEL_PKG_DIR': '', + 'WINDOW_HAS_FLAGS': 0, + 'WITH_DECIMAL_CONTEXTVAR': 1, + 'WITH_DOC_STRINGS': 1, + 'WITH_DTRACE': 0, + 'WITH_DYLD': 0, + 'WITH_EDITLINE': 0, + 'WITH_FREELISTS': 1, + 'WITH_LIBINTL': 0, + 'WITH_NEXT_FRAMEWORK': 0, + 'WITH_PYMALLOC': 1, + 'WITH_VALGRIND': 0, + 'X87_DOUBLE_ROUNDING': 0, + 'XMLLIBSUBDIRS': 'xml xml/dom xml/etree xml/parsers xml/sax', + 'abs_builddir': '/home/task_177324838993876/croot/python-split_1773249007352/work/build-static', + 'abs_srcdir': '/home/task_177324838993876/croot/python-split_1773249007352/work', + 'datarootdir': '/usr/local/miniconda3/envs/phantom/share', + 'exec_prefix': '/usr/local/miniconda3/envs/phantom', + 'prefix': '/usr/local/miniconda3/envs/phantom', + 'srcdir': '/home/task_177324838993876/croot/python-split_1773249007352/work'} diff --git a/lib/python3.11/_sysconfigdata__linux_x86_64-linux-gnu.py.orig b/lib/python3.11/_sysconfigdata__linux_x86_64-linux-gnu.py.orig new file mode 100644 index 0000000000000000000000000000000000000000..6df52bfe1435b491a2c684a013e65ddd7ebdec01 --- /dev/null +++ b/lib/python3.11/_sysconfigdata__linux_x86_64-linux-gnu.py.orig @@ -0,0 +1,1339 @@ +# system configuration generated and used by the sysconfig module +build_time_vars = {'ABIFLAGS': '', + 'AC_APPLE_UNIVERSAL_BUILD': 0, + 'AIX_BUILDDATE': 0, + 'AIX_GENUINE_CPLUSPLUS': 0, + 'ALIGNOF_LONG': 8, + 'ALIGNOF_SIZE_T': 8, + 'ALT_SOABI': 0, + 'ANDROID_API_LEVEL': 0, + 'AR': 'x86_64-conda-linux-gnu-ar', + 'ARFLAGS': 'rcs', + 'BASECFLAGS': '', + 'BASECPPFLAGS': '-IObjects -IInclude -IPython', + 'BASEMODLIBS': '', + 'BINDIR': '/usr/local/miniconda3/envs/phantom/bin', + 'BINLIBDEST': '/usr/local/miniconda3/envs/phantom/lib/python3.11', + 'BLDLIBRARY': 'libpython3.11.a', + 'BLDSHARED': 'x86_64-conda-linux-gnu-gcc -pthread -shared -Wl,-O2 ' + '-Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now ' + '-Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro ' + '-Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib', + 'BOOTSTRAP_HEADERS': '\\', + 'BUILDEXE': '', + 'BUILDPYTHON': 'python', + 'BUILD_GNU_TYPE': 'x86_64-conda-linux-gnu', + 'BYTESTR_DEPS': '\\', + 'CC': 'x86_64-conda-linux-gnu-gcc -pthread', + 'CCSHARED': '-fPIC', + 'CFLAGS': '-DNDEBUG -fwrapv -O2 -Wall -march=nocona -mtune=haswell ' + '-ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 ' + '-ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-fdebug-prefix-map=/home/task_177324838993876/croot/python-split_1773249007352/work=/usr/local/src/conda/python-3.11.15 ' + '-fdebug-prefix-map=/usr/local/miniconda3/envs/phantom=/usr/local/src/conda-prefix ' + ' ' + '-march=nocona -mtune=haswell -ftree-vectorize -fPIC ' + '-fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe ' + '-isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-fdebug-prefix-map=/home/task_177324838993876/croot/python-split_1773249007352/work=/usr/local/src/conda/python-3.11.15 ' + '-fdebug-prefix-map=/usr/local/miniconda3/envs/phantom=/usr/local/src/conda-prefix ' + ' ', + 'CFLAGSFORSHARED': '', + 'CFLAGS_ALIASING': '', + 'CONFIGFILES': 'configure configure.ac acconfig.h pyconfig.h.in ' + 'Makefile.pre.in', + 'CONFIGURE_CFLAGS': '-march=nocona -mtune=haswell -ftree-vectorize -fPIC ' + '-fstack-protector-strong -fno-plt -O2 ' + '-ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-fdebug-prefix-map=/home/task_177324838993876/croot/python-split_1773249007352/work=/usr/local/src/conda/python-3.11.15 ' + '-fdebug-prefix-map=/usr/local/miniconda3/envs/phantom=/usr/local/src/conda-prefix ' + ' ' + ' ', + 'CONFIGURE_CFLAGS_NODIST': '-fno-semantic-interposition ' + ' ' + ' -g -std=c11 ' + '-Werror=implicit-function-declaration ' + '-fvisibility=hidden', + 'CONFIGURE_CPPFLAGS': '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include', + 'CONFIGURE_LDFLAGS': '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro ' + '-Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib', + 'CONFIGURE_LDFLAGS_NODIST': '-fno-semantic-interposition ' + ' ' + ' -g', + 'CONFIGURE_LDFLAGS_NOLTO': '-fno-lto', + 'CONFIG_ARGS': "'--prefix=/usr/local/miniconda3/envs/phantom' " + "'--build=x86_64-conda-linux-gnu' " + "'--host=x86_64-conda-linux-gnu' '--enable-ipv6' " + "'--with-ensurepip=no' " + "'--with-tzpath=/usr/local/miniconda3/envs/phantom/share/zoneinfo' " + "'--with-computed-gotos' '--with-system-ffi' " + "'--with-system-expat' '--enable-loadable-sqlite-extensions' " + "'--with-tcltk-includes=-I/usr/local/miniconda3/envs/phantom/include' " + "'--with-tcltk-libs=-L/usr/local/miniconda3/envs/phantom/lib " + "-ltcl8.6 -ltk8.6' '--with-platlibdir=lib' '--with-lto' " + "'--enable-optimizations' " + "'-oldincludedir=/home/task_177324838993876/croot/python-split_1773249007352/_build_env/x86_64-conda-linux-gnu/sysroot/usr/include' " + "'--disable-shared' 'PROFILE_TASK=-m test --pgo' " + "'build_alias=x86_64-conda-linux-gnu' " + "'host_alias=x86_64-conda-linux-gnu' " + "'PKG_CONFIG_PATH=/usr/local/miniconda3/envs/phantom/lib/pkgconfig' " + "'MACHDEP=linux' 'CC=x86_64-conda-linux-gnu-gcc' " + "'CFLAGS=-march=nocona -mtune=haswell -ftree-vectorize -fPIC " + '-fstack-protector-strong -fno-plt -O2 -ffunction-sections ' + '-pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-fdebug-prefix-map=/home/task_177324838993876/croot/python-split_1773249007352/work=/usr/local/src/conda/python-3.11.15 ' + '-fdebug-prefix-map=/usr/local/miniconda3/envs/phantom=/usr/local/src/conda-prefix ' + ' ' + "' 'LDFLAGS=-Wl,-O2 -Wl,--sort-common -Wl,--as-needed " + '-Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags ' + '-Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + "-L/usr/local/miniconda3/envs/phantom/lib' " + "'CPPFLAGS=-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem " + '/usr/local/miniconda3/envs/phantom/include ' + "-I/usr/local/miniconda3/envs/phantom/include' " + "'CPP=/home/task_177324838993876/croot/python-split_1773249007352/_build_env/bin/x86_64-conda-linux-gnu-cpp'", + 'CONFINCLUDEDIR': '/usr/local/miniconda3/envs/phantom/include', + 'CONFINCLUDEPY': '/usr/local/miniconda3/envs/phantom/include/python3.11', + 'COREPYTHONPATH': '', + 'COVERAGE_INFO': '/home/task_177324838993876/croot/python-split_1773249007352/work/build-static/coverage.info', + 'COVERAGE_LCOV_OPTIONS': '--rc lcov_branch_coverage=1', + 'COVERAGE_REPORT': '/home/task_177324838993876/croot/python-split_1773249007352/work/build-static/lcov-report', + 'COVERAGE_REPORT_OPTIONS': '--rc lcov_branch_coverage=1 --branch-coverage ' + '--title "CPython 3.11 LCOV report [commit $(shell ' + ')]"', + 'CPPFLAGS': '-IObjects -IInclude -IPython -I. ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include', + 'CXX': 'x86_64-conda-linux-gnu-c++ -pthread', + 'DECIMAL_CFLAGS': '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_decimal/libmpdec ' + '-DCONFIG_64=1 -DANSI=1 -DHAVE_UINT128_T=1', + 'DECIMAL_LDFLAGS': '-lm Modules/_decimal/libmpdec/libmpdec.a', + 'DEEPFREEZE_C': 'Python/deepfreeze/deepfreeze.c', + 'DEEPFREEZE_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Tools/scripts/deepfreeze.py ' + '_bootstrap_python ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Programs/_freeze_module.py ' + '\\', + 'DEEPFREEZE_OBJS': 'Python/deepfreeze/deepfreeze.o', + 'DESTDIRS': '/usr/local/miniconda3/envs/phantom ' + '/usr/local/miniconda3/envs/phantom/lib ' + '/usr/local/miniconda3/envs/phantom/lib/python3.11 ' + '/usr/local/miniconda3/envs/phantom/lib/python3.11/lib-dynload', + 'DESTLIB': '/usr/local/miniconda3/envs/phantom/lib/python3.11', + 'DESTPATH': '', + 'DESTSHARED': '/usr/local/miniconda3/envs/phantom/lib/python3.11/lib-dynload', + 'DFLAGS': '', + 'DIRMODE': 755, + 'DIST': 'README.rst ChangeLog configure configure.ac acconfig.h pyconfig.h.in ' + 'Makefile.pre.in Include Lib Misc Ext-dummy', + 'DISTDIRS': 'Include Lib Misc Ext-dummy', + 'DISTFILES': 'README.rst ChangeLog configure configure.ac acconfig.h ' + 'pyconfig.h.in Makefile.pre.in', + 'DLINCLDIR': '.', + 'DLLLIBRARY': '', + 'DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754': 0, + 'DOUBLE_IS_BIG_ENDIAN_IEEE754': 0, + 'DOUBLE_IS_LITTLE_ENDIAN_IEEE754': 1, + 'DTRACE': '', + 'DTRACE_DEPS': '\\', + 'DTRACE_HEADERS': '', + 'DTRACE_OBJS': '', + 'DYNLOADFILE': 'dynload_shlib.o', + 'ENABLE_IPV6': 1, + 'ENSUREPIP': 'no', + 'EXE': '', + 'EXEMODE': 755, + 'EXPAT_CFLAGS': '', + 'EXPAT_LDFLAGS': '-lexpat', + 'EXPORTSFROM': '', + 'EXPORTSYMS': '', + 'EXTRATESTOPTS': '', + 'EXT_SUFFIX': '.cpython-311-x86_64-linux-gnu.so', + 'FILEMODE': 644, + 'FLOAT_WORDS_BIGENDIAN': 0, + 'FREEZE_MODULE': './_bootstrap_python ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Programs/_freeze_module.py', + 'FREEZE_MODULE_BOOTSTRAP': './Programs/_freeze_module', + 'FREEZE_MODULE_BOOTSTRAP_DEPS': 'Programs/_freeze_module', + 'FREEZE_MODULE_DEPS': '_bootstrap_python ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Programs/_freeze_module.py', + 'FROZEN_FILES_IN': '\\', + 'FROZEN_FILES_OUT': '\\', + 'GETPGRP_HAVE_ARG': 0, + 'GITBRANCH': '', + 'GITTAG': '', + 'GITVERSION': '', + 'GNULD': 'yes', + 'HAVE_ACCEPT': 1, + 'HAVE_ACCEPT4': 1, + 'HAVE_ACOSH': 1, + 'HAVE_ADDRINFO': 1, + 'HAVE_ALARM': 1, + 'HAVE_ALIGNED_REQUIRED': 0, + 'HAVE_ALLOCA_H': 1, + 'HAVE_ALTZONE': 0, + 'HAVE_ASINH': 1, + 'HAVE_ASM_TYPES_H': 1, + 'HAVE_ATANH': 1, + 'HAVE_BIND': 1, + 'HAVE_BIND_TEXTDOMAIN_CODESET': 1, + 'HAVE_BLUETOOTH_BLUETOOTH_H': 0, + 'HAVE_BLUETOOTH_H': 0, + 'HAVE_BROKEN_MBSTOWCS': 0, + 'HAVE_BROKEN_NICE': 0, + 'HAVE_BROKEN_PIPE_BUF': 0, + 'HAVE_BROKEN_POLL': 0, + 'HAVE_BROKEN_POSIX_SEMAPHORES': 0, + 'HAVE_BROKEN_PTHREAD_SIGMASK': 0, + 'HAVE_BROKEN_SEM_GETVALUE': 0, + 'HAVE_BROKEN_UNSETENV': 0, + 'HAVE_BUILTIN_ATOMIC': 1, + 'HAVE_BZLIB_H': 1, + 'HAVE_CHFLAGS': 0, + 'HAVE_CHMOD': 1, + 'HAVE_CHOWN': 1, + 'HAVE_CHROOT': 1, + 'HAVE_CLOCK': 1, + 'HAVE_CLOCK_GETRES': 1, + 'HAVE_CLOCK_GETTIME': 1, + 'HAVE_CLOCK_NANOSLEEP': 1, + 'HAVE_CLOCK_SETTIME': 1, + 'HAVE_CLOSE_RANGE': 0, + 'HAVE_COMPUTED_GOTOS': 1, + 'HAVE_CONFSTR': 1, + 'HAVE_CONIO_H': 0, + 'HAVE_CONNECT': 1, + 'HAVE_COPY_FILE_RANGE': 1, + 'HAVE_CRYPT_H': 0, + 'HAVE_CRYPT_R': 0, + 'HAVE_CTERMID': 1, + 'HAVE_CTERMID_R': 0, + 'HAVE_CURSES_FILTER': 1, + 'HAVE_CURSES_H': 1, + 'HAVE_CURSES_HAS_KEY': 1, + 'HAVE_CURSES_IMMEDOK': 1, + 'HAVE_CURSES_IS_PAD': 1, + 'HAVE_CURSES_IS_TERM_RESIZED': 1, + 'HAVE_CURSES_RESIZETERM': 1, + 'HAVE_CURSES_RESIZE_TERM': 1, + 'HAVE_CURSES_SYNCOK': 1, + 'HAVE_CURSES_TYPEAHEAD': 1, + 'HAVE_CURSES_USE_ENV': 1, + 'HAVE_CURSES_WCHGAT': 1, + 'HAVE_DB_H': 0, + 'HAVE_DECL_RTLD_DEEPBIND': 1, + 'HAVE_DECL_RTLD_GLOBAL': 1, + 'HAVE_DECL_RTLD_LAZY': 1, + 'HAVE_DECL_RTLD_LOCAL': 1, + 'HAVE_DECL_RTLD_MEMBER': 0, + 'HAVE_DECL_RTLD_NODELETE': 1, + 'HAVE_DECL_RTLD_NOLOAD': 1, + 'HAVE_DECL_RTLD_NOW': 1, + 'HAVE_DECL_TZNAME': 0, + 'HAVE_DEVICE_MACROS': 1, + 'HAVE_DEV_PTC': 0, + 'HAVE_DEV_PTMX': 1, + 'HAVE_DIRECT_H': 0, + 'HAVE_DIRENT_D_TYPE': 1, + 'HAVE_DIRENT_H': 1, + 'HAVE_DIRFD': 1, + 'HAVE_DLFCN_H': 1, + 'HAVE_DLOPEN': 1, + 'HAVE_DUP': 1, + 'HAVE_DUP2': 1, + 'HAVE_DUP3': 1, + 'HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH': 0, + 'HAVE_DYNAMIC_LOADING': 1, + 'HAVE_ENDIAN_H': 1, + 'HAVE_EPOLL': 1, + 'HAVE_EPOLL_CREATE1': 1, + 'HAVE_ERF': 1, + 'HAVE_ERFC': 1, + 'HAVE_ERRNO_H': 1, + 'HAVE_EVENTFD': 1, + 'HAVE_EXECV': 1, + 'HAVE_EXPLICIT_BZERO': 1, + 'HAVE_EXPLICIT_MEMSET': 0, + 'HAVE_EXPM1': 1, + 'HAVE_FACCESSAT': 1, + 'HAVE_FCHDIR': 1, + 'HAVE_FCHMOD': 1, + 'HAVE_FCHMODAT': 1, + 'HAVE_FCHOWN': 1, + 'HAVE_FCHOWNAT': 1, + 'HAVE_FCNTL_H': 1, + 'HAVE_FDATASYNC': 1, + 'HAVE_FDOPENDIR': 1, + 'HAVE_FDWALK': 0, + 'HAVE_FEXECVE': 1, + 'HAVE_FLOCK': 1, + 'HAVE_FORK': 1, + 'HAVE_FORK1': 0, + 'HAVE_FORKPTY': 1, + 'HAVE_FPATHCONF': 1, + 'HAVE_FSEEK64': 0, + 'HAVE_FSEEKO': 1, + 'HAVE_FSTATAT': 1, + 'HAVE_FSTATVFS': 1, + 'HAVE_FSYNC': 1, + 'HAVE_FTELL64': 0, + 'HAVE_FTELLO': 1, + 'HAVE_FTIME': 1, + 'HAVE_FTRUNCATE': 1, + 'HAVE_FUTIMENS': 1, + 'HAVE_FUTIMES': 1, + 'HAVE_FUTIMESAT': 1, + 'HAVE_GAI_STRERROR': 1, + 'HAVE_GCC_ASM_FOR_MC68881': 0, + 'HAVE_GCC_ASM_FOR_X64': 1, + 'HAVE_GCC_ASM_FOR_X87': 1, + 'HAVE_GCC_UINT128_T': 1, + 'HAVE_GDBM_DASH_NDBM_H': 0, + 'HAVE_GDBM_H': 0, + 'HAVE_GDBM_NDBM_H': 0, + 'HAVE_GETADDRINFO': 1, + 'HAVE_GETC_UNLOCKED': 1, + 'HAVE_GETEGID': 1, + 'HAVE_GETENTROPY': 1, + 'HAVE_GETEUID': 1, + 'HAVE_GETGID': 1, + 'HAVE_GETGRGID': 1, + 'HAVE_GETGRGID_R': 1, + 'HAVE_GETGRNAM_R': 1, + 'HAVE_GETGROUPLIST': 1, + 'HAVE_GETGROUPS': 1, + 'HAVE_GETHOSTBYADDR': 1, + 'HAVE_GETHOSTBYNAME': 1, + 'HAVE_GETHOSTBYNAME_R': 1, + 'HAVE_GETHOSTBYNAME_R_3_ARG': 0, + 'HAVE_GETHOSTBYNAME_R_5_ARG': 0, + 'HAVE_GETHOSTBYNAME_R_6_ARG': 1, + 'HAVE_GETHOSTNAME': 1, + 'HAVE_GETITIMER': 1, + 'HAVE_GETLOADAVG': 1, + 'HAVE_GETLOGIN': 1, + 'HAVE_GETNAMEINFO': 1, + 'HAVE_GETPAGESIZE': 1, + 'HAVE_GETPEERNAME': 1, + 'HAVE_GETPGID': 1, + 'HAVE_GETPGRP': 1, + 'HAVE_GETPID': 1, + 'HAVE_GETPPID': 1, + 'HAVE_GETPRIORITY': 1, + 'HAVE_GETPROTOBYNAME': 1, + 'HAVE_GETPWENT': 1, + 'HAVE_GETPWNAM_R': 1, + 'HAVE_GETPWUID': 1, + 'HAVE_GETPWUID_R': 1, + 'HAVE_GETRANDOM': 1, + 'HAVE_GETRANDOM_SYSCALL': 1, + 'HAVE_GETRESGID': 1, + 'HAVE_GETRESUID': 1, + 'HAVE_GETRUSAGE': 1, + 'HAVE_GETSERVBYNAME': 1, + 'HAVE_GETSERVBYPORT': 1, + 'HAVE_GETSID': 1, + 'HAVE_GETSOCKNAME': 1, + 'HAVE_GETSPENT': 1, + 'HAVE_GETSPNAM': 1, + 'HAVE_GETUID': 1, + 'HAVE_GETWD': 1, + 'HAVE_GLIBC_MEMMOVE_BUG': 0, + 'HAVE_GRP_H': 1, + 'HAVE_HSTRERROR': 1, + 'HAVE_HTOLE64': 1, + 'HAVE_IEEEFP_H': 0, + 'HAVE_IF_NAMEINDEX': 1, + 'HAVE_INET_ATON': 1, + 'HAVE_INET_NTOA': 1, + 'HAVE_INET_PTON': 1, + 'HAVE_INITGROUPS': 1, + 'HAVE_INTTYPES_H': 1, + 'HAVE_IO_H': 0, + 'HAVE_IPA_PURE_CONST_BUG': 0, + 'HAVE_KILL': 1, + 'HAVE_KILLPG': 1, + 'HAVE_KQUEUE': 0, + 'HAVE_LANGINFO_H': 1, + 'HAVE_LARGEFILE_SUPPORT': 0, + 'HAVE_LCHFLAGS': 0, + 'HAVE_LCHMOD': 0, + 'HAVE_LCHOWN': 1, + 'HAVE_LIBB2': 0, + 'HAVE_LIBDB': 0, + 'HAVE_LIBDL': 1, + 'HAVE_LIBDLD': 0, + 'HAVE_LIBGDBM_COMPAT': 0, + 'HAVE_LIBIEEE': 0, + 'HAVE_LIBINTL_H': 1, + 'HAVE_LIBNDBM': 0, + 'HAVE_LIBREADLINE': 1, + 'HAVE_LIBRESOLV': 0, + 'HAVE_LIBSENDFILE': 0, + 'HAVE_LIBSQLITE3': 1, + 'HAVE_LIBUTIL_H': 0, + 'HAVE_LINK': 1, + 'HAVE_LINKAT': 1, + 'HAVE_LINUX_AUXVEC_H': 1, + 'HAVE_LINUX_CAN_BCM_H': 1, + 'HAVE_LINUX_CAN_H': 1, + 'HAVE_LINUX_CAN_J1939_H': 0, + 'HAVE_LINUX_CAN_RAW_FD_FRAMES': 1, + 'HAVE_LINUX_CAN_RAW_H': 1, + 'HAVE_LINUX_CAN_RAW_JOIN_FILTERS': 1, + 'HAVE_LINUX_LIMITS_H': 1, + 'HAVE_LINUX_MEMFD_H': 1, + 'HAVE_LINUX_NETLINK_H': 1, + 'HAVE_LINUX_QRTR_H': 1, + 'HAVE_LINUX_RANDOM_H': 1, + 'HAVE_LINUX_SOUNDCARD_H': 1, + 'HAVE_LINUX_TIPC_H': 1, + 'HAVE_LINUX_VM_SOCKETS_H': 1, + 'HAVE_LINUX_WAIT_H': 1, + 'HAVE_LISTEN': 1, + 'HAVE_LOCKF': 1, + 'HAVE_LOG1P': 1, + 'HAVE_LOG2': 1, + 'HAVE_LOGIN_TTY': 1, + 'HAVE_LONG_DOUBLE': 1, + 'HAVE_LSTAT': 1, + 'HAVE_LUTIMES': 1, + 'HAVE_LZMA_H': 0, + 'HAVE_MADVISE': 1, + 'HAVE_MAKEDEV': 1, + 'HAVE_MBRTOWC': 1, + 'HAVE_MEMFD_CREATE': 1, + 'HAVE_MEMORY_H': 1, + 'HAVE_MEMRCHR': 1, + 'HAVE_MKDIRAT': 1, + 'HAVE_MKFIFO': 1, + 'HAVE_MKFIFOAT': 1, + 'HAVE_MKNOD': 1, + 'HAVE_MKNODAT': 1, + 'HAVE_MKTIME': 1, + 'HAVE_MMAP': 1, + 'HAVE_MREMAP': 1, + 'HAVE_NANOSLEEP': 1, + 'HAVE_NCURSES_H': 1, + 'HAVE_NDBM_H': 0, + 'HAVE_NDIR_H': 0, + 'HAVE_NETCAN_CAN_H': 0, + 'HAVE_NETDB_H': 1, + 'HAVE_NETINET_IN_H': 1, + 'HAVE_NETPACKET_PACKET_H': 1, + 'HAVE_NET_IF_H': 1, + 'HAVE_NICE': 1, + 'HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION': 0, + 'HAVE_OPENAT': 1, + 'HAVE_OPENDIR': 1, + 'HAVE_OPENPTY': 1, + 'HAVE_PATHCONF': 1, + 'HAVE_PAUSE': 1, + 'HAVE_PIPE': 1, + 'HAVE_PIPE2': 1, + 'HAVE_PLOCK': 0, + 'HAVE_POLL': 1, + 'HAVE_POLL_H': 1, + 'HAVE_POSIX_FADVISE': 1, + 'HAVE_POSIX_FALLOCATE': 1, + 'HAVE_POSIX_SPAWN': 1, + 'HAVE_POSIX_SPAWNP': 1, + 'HAVE_PREAD': 1, + 'HAVE_PREADV': 1, + 'HAVE_PREADV2': 1, + 'HAVE_PRLIMIT': 1, + 'HAVE_PROCESS_H': 0, + 'HAVE_PROTOTYPES': 1, + 'HAVE_PTHREAD_CONDATTR_SETCLOCK': 1, + 'HAVE_PTHREAD_DESTRUCTOR': 0, + 'HAVE_PTHREAD_GETCPUCLOCKID': 1, + 'HAVE_PTHREAD_H': 1, + 'HAVE_PTHREAD_INIT': 0, + 'HAVE_PTHREAD_KILL': 1, + 'HAVE_PTHREAD_SIGMASK': 1, + 'HAVE_PTHREAD_STUBS': 0, + 'HAVE_PTY_H': 1, + 'HAVE_PWRITE': 1, + 'HAVE_PWRITEV': 1, + 'HAVE_PWRITEV2': 1, + 'HAVE_READLINK': 1, + 'HAVE_READLINKAT': 1, + 'HAVE_READV': 1, + 'HAVE_REALPATH': 1, + 'HAVE_RECVFROM': 1, + 'HAVE_RENAMEAT': 1, + 'HAVE_RL_APPEND_HISTORY': 1, + 'HAVE_RL_CATCH_SIGNAL': 1, + 'HAVE_RL_COMPDISP_FUNC_T': 1, + 'HAVE_RL_COMPLETION_APPEND_CHARACTER': 1, + 'HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK': 1, + 'HAVE_RL_COMPLETION_MATCHES': 1, + 'HAVE_RL_COMPLETION_SUPPRESS_APPEND': 1, + 'HAVE_RL_PRE_INPUT_HOOK': 1, + 'HAVE_RL_RESIZE_TERMINAL': 1, + 'HAVE_RPC_RPC_H': 0, + 'HAVE_RTPSPAWN': 0, + 'HAVE_SCHED_GET_PRIORITY_MAX': 1, + 'HAVE_SCHED_H': 1, + 'HAVE_SCHED_RR_GET_INTERVAL': 1, + 'HAVE_SCHED_SETAFFINITY': 1, + 'HAVE_SCHED_SETPARAM': 1, + 'HAVE_SCHED_SETSCHEDULER': 1, + 'HAVE_SEM_CLOCKWAIT': 0, + 'HAVE_SEM_GETVALUE': 1, + 'HAVE_SEM_OPEN': 1, + 'HAVE_SEM_TIMEDWAIT': 1, + 'HAVE_SEM_UNLINK': 1, + 'HAVE_SENDFILE': 1, + 'HAVE_SENDTO': 1, + 'HAVE_SETEGID': 1, + 'HAVE_SETEUID': 1, + 'HAVE_SETGID': 1, + 'HAVE_SETGROUPS': 1, + 'HAVE_SETHOSTNAME': 1, + 'HAVE_SETITIMER': 1, + 'HAVE_SETJMP_H': 1, + 'HAVE_SETLOCALE': 1, + 'HAVE_SETPGID': 1, + 'HAVE_SETPGRP': 1, + 'HAVE_SETPRIORITY': 1, + 'HAVE_SETREGID': 1, + 'HAVE_SETRESGID': 1, + 'HAVE_SETRESUID': 1, + 'HAVE_SETREUID': 1, + 'HAVE_SETSID': 1, + 'HAVE_SETSOCKOPT': 1, + 'HAVE_SETUID': 1, + 'HAVE_SETVBUF': 1, + 'HAVE_SHADOW_H': 1, + 'HAVE_SHM_OPEN': 1, + 'HAVE_SHM_UNLINK': 1, + 'HAVE_SHUTDOWN': 1, + 'HAVE_SIGACTION': 1, + 'HAVE_SIGALTSTACK': 1, + 'HAVE_SIGFILLSET': 1, + 'HAVE_SIGINFO_T_SI_BAND': 1, + 'HAVE_SIGINTERRUPT': 1, + 'HAVE_SIGNAL_H': 1, + 'HAVE_SIGPENDING': 1, + 'HAVE_SIGRELSE': 1, + 'HAVE_SIGTIMEDWAIT': 1, + 'HAVE_SIGWAIT': 1, + 'HAVE_SIGWAITINFO': 1, + 'HAVE_SNPRINTF': 1, + 'HAVE_SOCKADDR_ALG': 1, + 'HAVE_SOCKADDR_SA_LEN': 0, + 'HAVE_SOCKADDR_STORAGE': 1, + 'HAVE_SOCKET': 1, + 'HAVE_SOCKETPAIR': 1, + 'HAVE_SPAWN_H': 1, + 'HAVE_SPLICE': 1, + 'HAVE_SSIZE_T': 1, + 'HAVE_STATVFS': 1, + 'HAVE_STAT_TV_NSEC': 1, + 'HAVE_STAT_TV_NSEC2': 0, + 'HAVE_STDARG_PROTOTYPES': 1, + 'HAVE_STDINT_H': 1, + 'HAVE_STDLIB_H': 1, + 'HAVE_STD_ATOMIC': 1, + 'HAVE_STRFTIME': 1, + 'HAVE_STRINGS_H': 1, + 'HAVE_STRING_H': 1, + 'HAVE_STRLCPY': 0, + 'HAVE_STROPTS_H': 0, + 'HAVE_STRSIGNAL': 1, + 'HAVE_STRUCT_PASSWD_PW_GECOS': 1, + 'HAVE_STRUCT_PASSWD_PW_PASSWD': 1, + 'HAVE_STRUCT_STAT_ST_BIRTHTIME': 0, + 'HAVE_STRUCT_STAT_ST_BLKSIZE': 1, + 'HAVE_STRUCT_STAT_ST_BLOCKS': 1, + 'HAVE_STRUCT_STAT_ST_FLAGS': 0, + 'HAVE_STRUCT_STAT_ST_GEN': 0, + 'HAVE_STRUCT_STAT_ST_RDEV': 1, + 'HAVE_STRUCT_TM_TM_ZONE': 1, + 'HAVE_SYMLINK': 1, + 'HAVE_SYMLINKAT': 1, + 'HAVE_SYNC': 1, + 'HAVE_SYSCONF': 1, + 'HAVE_SYSEXITS_H': 1, + 'HAVE_SYSLOG_H': 1, + 'HAVE_SYSTEM': 1, + 'HAVE_SYS_AUDIOIO_H': 0, + 'HAVE_SYS_AUXV_H': 1, + 'HAVE_SYS_BSDTTY_H': 0, + 'HAVE_SYS_DEVPOLL_H': 0, + 'HAVE_SYS_DIR_H': 0, + 'HAVE_SYS_ENDIAN_H': 0, + 'HAVE_SYS_EPOLL_H': 1, + 'HAVE_SYS_EVENTFD_H': 1, + 'HAVE_SYS_EVENT_H': 0, + 'HAVE_SYS_FILE_H': 1, + 'HAVE_SYS_IOCTL_H': 1, + 'HAVE_SYS_KERN_CONTROL_H': 0, + 'HAVE_SYS_LOADAVG_H': 0, + 'HAVE_SYS_LOCK_H': 0, + 'HAVE_SYS_MEMFD_H': 0, + 'HAVE_SYS_MKDEV_H': 0, + 'HAVE_SYS_MMAN_H': 1, + 'HAVE_SYS_MODEM_H': 0, + 'HAVE_SYS_NDIR_H': 0, + 'HAVE_SYS_PARAM_H': 1, + 'HAVE_SYS_POLL_H': 1, + 'HAVE_SYS_RANDOM_H': 1, + 'HAVE_SYS_RESOURCE_H': 1, + 'HAVE_SYS_SELECT_H': 1, + 'HAVE_SYS_SENDFILE_H': 1, + 'HAVE_SYS_SOCKET_H': 1, + 'HAVE_SYS_SOUNDCARD_H': 1, + 'HAVE_SYS_STATVFS_H': 1, + 'HAVE_SYS_STAT_H': 1, + 'HAVE_SYS_SYSCALL_H': 1, + 'HAVE_SYS_SYSMACROS_H': 1, + 'HAVE_SYS_SYS_DOMAIN_H': 0, + 'HAVE_SYS_TERMIO_H': 0, + 'HAVE_SYS_TIMES_H': 1, + 'HAVE_SYS_TIME_H': 1, + 'HAVE_SYS_TYPES_H': 1, + 'HAVE_SYS_UIO_H': 1, + 'HAVE_SYS_UN_H': 1, + 'HAVE_SYS_UTSNAME_H': 1, + 'HAVE_SYS_WAIT_H': 1, + 'HAVE_SYS_XATTR_H': 1, + 'HAVE_TCGETPGRP': 1, + 'HAVE_TCSETPGRP': 1, + 'HAVE_TEMPNAM': 1, + 'HAVE_TERMIOS_H': 1, + 'HAVE_TERM_H': 1, + 'HAVE_TIMEGM': 1, + 'HAVE_TIMES': 1, + 'HAVE_TMPFILE': 1, + 'HAVE_TMPNAM': 1, + 'HAVE_TMPNAM_R': 1, + 'HAVE_TM_ZONE': 1, + 'HAVE_TRUNCATE': 1, + 'HAVE_TTYNAME': 1, + 'HAVE_TZNAME': 0, + 'HAVE_UMASK': 1, + 'HAVE_UNAME': 1, + 'HAVE_UNISTD_H': 1, + 'HAVE_UNLINKAT': 1, + 'HAVE_USABLE_WCHAR_T': 0, + 'HAVE_UTIL_H': 0, + 'HAVE_UTIMENSAT': 1, + 'HAVE_UTIMES': 1, + 'HAVE_UTIME_H': 1, + 'HAVE_UTMP_H': 1, + 'HAVE_UUID_CREATE': 0, + 'HAVE_UUID_ENC_BE': 0, + 'HAVE_UUID_GENERATE_TIME_SAFE': 1, + 'HAVE_UUID_H': 1, + 'HAVE_UUID_UUID_H': 0, + 'HAVE_VFORK': 1, + 'HAVE_WAIT': 1, + 'HAVE_WAIT3': 1, + 'HAVE_WAIT4': 1, + 'HAVE_WAITID': 1, + 'HAVE_WAITPID': 1, + 'HAVE_WCHAR_H': 1, + 'HAVE_WCSCOLL': 1, + 'HAVE_WCSFTIME': 1, + 'HAVE_WCSXFRM': 1, + 'HAVE_WMEMCMP': 1, + 'HAVE_WORKING_TZSET': 1, + 'HAVE_WRITEV': 1, + 'HAVE_ZLIB_COPY': 1, + 'HAVE_ZLIB_H': 0, + 'HAVE__GETPTY': 0, + 'HOSTRUNNER': '', + 'HOST_GNU_TYPE': 'x86_64-conda-linux-gnu', + 'INCLDIRSTOMAKE': '/usr/local/miniconda3/envs/phantom/include ' + '/usr/local/miniconda3/envs/phantom/include ' + '/usr/local/miniconda3/envs/phantom/include/python3.11 ' + '/usr/local/miniconda3/envs/phantom/include/python3.11', + 'INCLUDEDIR': '/usr/local/miniconda3/envs/phantom/include', + 'INCLUDEPY': '/usr/local/miniconda3/envs/phantom/include/python3.11', + 'INSTALL': '/usr/bin/install -c', + 'INSTALL_DATA': '/usr/bin/install -c -m 644', + 'INSTALL_PROGRAM': '/usr/bin/install -c', + 'INSTALL_SCRIPT': '/usr/bin/install -c', + 'INSTALL_SHARED': '/usr/bin/install -c -m 755', + 'INSTSONAME': 'libpython3.11.a', + 'IO_H': 'Modules/_io/_iomodule.h', + 'IO_OBJS': '\\', + 'LDCXXSHARED': 'x86_64-conda-linux-gnu-c++ -pthread -shared', + 'LDFLAGS': '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now ' + '-Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now ' + '-Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib', + 'LDLIBRARY': 'libpython3.11.a', + 'LDLIBRARYDIR': '', + 'LDSHARED': 'x86_64-conda-linux-gnu-gcc -pthread -shared -Wl,-O2 ' + '-Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now ' + '-Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro ' + '-Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib', + 'LDVERSION': '3.11', + 'LIBC': '', + 'LIBDEST': '/usr/local/miniconda3/envs/phantom/lib/python3.11', + 'LIBDIR': '/usr/local/miniconda3/envs/phantom/lib', + 'LIBEXPAT_A': 'Modules/expat/libexpat.a', + 'LIBEXPAT_CFLAGS': '-DNDEBUG -fwrapv -O2 -Wall -march=nocona -mtune=haswell ' + '-ftree-vectorize -fPIC -fstack-protector-strong -fno-plt ' + '-O2 -ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-fdebug-prefix-map=/home/task_177324838993876/croot/python-split_1773249007352/work=/usr/local/src/conda/python-3.11.15 ' + '-fdebug-prefix-map=/usr/local/miniconda3/envs/phantom=/usr/local/src/conda-prefix ' + ' ' + ' -march=nocona -mtune=haswell ' + '-ftree-vectorize -fPIC -fstack-protector-strong -fno-plt ' + '-O2 -ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-fdebug-prefix-map=/home/task_177324838993876/croot/python-split_1773249007352/work=/usr/local/src/conda/python-3.11.15 ' + '-fdebug-prefix-map=/usr/local/miniconda3/envs/phantom=/usr/local/src/conda-prefix ' + ' ' + ' -fno-semantic-interposition ' + ' ' + ' -g -std=c11 ' + '-Werror=implicit-function-declaration -fvisibility=hidden ' + ' ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include/internal ' + '-IObjects -IInclude -IPython -I. ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-fPIC', + 'LIBEXPAT_HEADERS': '\\', + 'LIBEXPAT_OBJS': '\\', + 'LIBFFI_INCLUDEDIR': '/usr/local/miniconda3/envs/phantom/include', + 'LIBM': '-lm', + 'LIBMPDEC_A': 'Modules/_decimal/libmpdec/libmpdec.a', + 'LIBMPDEC_CFLAGS': '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_decimal/libmpdec ' + '-DCONFIG_64=1 -DANSI=1 -DHAVE_UINT128_T=1 -DNDEBUG ' + '-fwrapv -O2 -Wall -march=nocona -mtune=haswell ' + '-ftree-vectorize -fPIC -fstack-protector-strong -fno-plt ' + '-O2 -ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-fdebug-prefix-map=/home/task_177324838993876/croot/python-split_1773249007352/work=/usr/local/src/conda/python-3.11.15 ' + '-fdebug-prefix-map=/usr/local/miniconda3/envs/phantom=/usr/local/src/conda-prefix ' + ' ' + ' -march=nocona -mtune=haswell ' + '-ftree-vectorize -fPIC -fstack-protector-strong -fno-plt ' + '-O2 -ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-fdebug-prefix-map=/home/task_177324838993876/croot/python-split_1773249007352/work=/usr/local/src/conda/python-3.11.15 ' + '-fdebug-prefix-map=/usr/local/miniconda3/envs/phantom=/usr/local/src/conda-prefix ' + ' ' + ' -fno-semantic-interposition ' + ' ' + ' -g -std=c11 ' + '-Werror=implicit-function-declaration -fvisibility=hidden ' + ' ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include/internal ' + '-IObjects -IInclude -IPython -I. ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-fPIC', + 'LIBMPDEC_HEADERS': '\\', + 'LIBMPDEC_OBJS': '\\', + 'LIBOBJDIR': 'Python/', + 'LIBOBJS': '', + 'LIBPC': '/usr/local/miniconda3/envs/phantom/lib/pkgconfig', + 'LIBPL': '/usr/local/miniconda3/envs/phantom/lib/python3.11/config-3.11-x86_64-linux-gnu', + 'LIBPYTHON': '', + 'LIBRARY': 'libpython3.11.a', + 'LIBRARY_DEPS': 'libpython3.11.a', + 'LIBRARY_OBJS': '\\', + 'LIBRARY_OBJS_OMIT_FROZEN': '\\', + 'LIBS': '-lpthread -ldl -lutil', + 'LIBSUBDIRS': 'asyncio \\', + 'LINKCC': 'x86_64-conda-linux-gnu-gcc -pthread', + 'LINKFORSHARED': '-Xlinker -export-dynamic', + 'LINK_PYTHON_DEPS': 'libpython3.11.a', + 'LINK_PYTHON_OBJS': '\\', + 'LIPO_32BIT_FLAGS': '', + 'LIPO_INTEL64_FLAGS': '', + 'LLVM_PROF_ERR': 'no', + 'LLVM_PROF_FILE': '', + 'LLVM_PROF_MERGER': 'true', + 'LN': 'ln', + 'LOCALMODLIBS': '', + 'MACHDEP': 'linux', + 'MACHDEP_OBJS': '', + 'MACHDESTLIB': '/usr/local/miniconda3/envs/phantom/lib/python3.11', + 'MACOSX_DEPLOYMENT_TARGET': '', + 'MAINCC': 'x86_64-conda-linux-gnu-gcc -pthread', + 'MAJOR_IN_MKDEV': 0, + 'MAJOR_IN_SYSMACROS': 1, + 'MAKESETUP': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/makesetup', + 'MANDIR': '/usr/local/miniconda3/envs/phantom/share/man', + 'MKDIR_P': '/usr/bin/mkdir -p', + 'MODBUILT_NAMES': 'atexit faulthandler posix _signal _tracemalloc ' + '_codecs _collections errno _io itertools _sre ' + '_thread time _weakref _abc _functools _locale ' + '_operator _stat _symtable pwd xxsubtype', + 'MODDISABLED_NAMES': '', + 'MODLIBS': '', + 'MODOBJS': 'Modules/atexitmodule.o Modules/faulthandler.o ' + 'Modules/posixmodule.o Modules/signalmodule.o ' + 'Modules/_tracemalloc.o Modules/_codecsmodule.o ' + 'Modules/_collectionsmodule.o Modules/errnomodule.o ' + 'Modules/_io/_iomodule.o Modules/_io/iobase.o Modules/_io/fileio.o ' + 'Modules/_io/bytesio.o Modules/_io/bufferedio.o ' + 'Modules/_io/textio.o Modules/_io/stringio.o ' + 'Modules/itertoolsmodule.o Modules/_sre/sre.o ' + 'Modules/_threadmodule.o Modules/timemodule.o ' + 'Modules/_weakref.o Modules/_abc.o Modules/_functoolsmodule.o ' + 'Modules/_localemodule.o Modules/_operator.o Modules/_stat.o ' + 'Modules/symtablemodule.o Modules/pwdmodule.o ' + 'Modules/xxsubtype.o', + 'MODSHARED_NAMES': '', + 'MODULE_ARRAY_STATE': 'yes', + 'MODULE_ATEXIT_LDFLAGS': '', + 'MODULE_AUDIOOP_LDFLAGS': '-lm', + 'MODULE_AUDIOOP_STATE': 'yes', + 'MODULE_BINASCII_CFLAGS': '-DUSE_ZLIB_CRC32 ' + '-I/usr/local/miniconda3/envs/phantom/include', + 'MODULE_BINASCII_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-lz', + 'MODULE_BINASCII_STATE': 'yes', + 'MODULE_CMATH_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_math.h', + 'MODULE_CMATH_LDFLAGS': '-lm', + 'MODULE_CMATH_STATE': 'yes', + 'MODULE_ERRNO_LDFLAGS': '', + 'MODULE_FAULTHANDLER_LDFLAGS': '', + 'MODULE_FCNTL_LDFLAGS': '', + 'MODULE_FCNTL_STATE': 'yes', + 'MODULE_GRP_STATE': 'yes', + 'MODULE_ITERTOOLS_LDFLAGS': '', + 'MODULE_MATH_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_math.h', + 'MODULE_MATH_LDFLAGS': '-lm', + 'MODULE_MATH_STATE': 'yes', + 'MODULE_MMAP_STATE': 'yes', + 'MODULE_NIS_STATE': 'missing', + 'MODULE_OBJS': '\\', + 'MODULE_OSSAUDIODEV_LDFLAGS': '', + 'MODULE_OSSAUDIODEV_STATE': 'yes', + 'MODULE_POSIX_LDFLAGS': '', + 'MODULE_PWD_LDFLAGS': '', + 'MODULE_PWD_STATE': 'yes', + 'MODULE_PYEXPAT_CFLAGS': '', + 'MODULE_PYEXPAT_DEPS': '', + 'MODULE_PYEXPAT_LDFLAGS': '-lexpat', + 'MODULE_PYEXPAT_STATE': 'yes', + 'MODULE_RESOURCE_STATE': 'yes', + 'MODULE_SELECT_STATE': 'yes', + 'MODULE_SPWD_STATE': 'yes', + 'MODULE_SYSLOG_STATE': 'yes', + 'MODULE_TERMIOS_STATE': 'yes', + 'MODULE_TIME_LDFLAGS': '', + 'MODULE_TIME_STATE': 'yes', + 'MODULE_UNICODEDATA_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/unicodedata_db.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/unicodename_db.h', + 'MODULE_UNICODEDATA_STATE': 'yes', + 'MODULE_XXLIMITED_35_STATE': 'yes', + 'MODULE_XXLIMITED_STATE': 'yes', + 'MODULE_XXSUBTYPE_LDFLAGS': '', + 'MODULE_ZLIB_CFLAGS': '-I/usr/local/miniconda3/envs/phantom/include', + 'MODULE_ZLIB_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-lz', + 'MODULE_ZLIB_STATE': 'yes', + 'MODULE__ABC_LDFLAGS': '', + 'MODULE__ASYNCIO_STATE': 'yes', + 'MODULE__BISECT_STATE': 'yes', + 'MODULE__BLAKE2_CFLAGS': '', + 'MODULE__BLAKE2_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2-config.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2-impl.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2b-load-sse2.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2b-load-sse41.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2b-ref.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2b-round.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2b.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2s-load-sse2.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2s-load-sse41.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2s-load-xop.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2s-ref.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2s-round.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2s.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/blake2module.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/hashlib.h', + 'MODULE__BLAKE2_LDFLAGS': '', + 'MODULE__BLAKE2_STATE': 'yes', + 'MODULE__BZ2_CFLAGS': '', + 'MODULE__BZ2_LDFLAGS': '-lbz2', + 'MODULE__BZ2_STATE': 'yes', + 'MODULE__CODECS_CN_STATE': 'yes', + 'MODULE__CODECS_HK_STATE': 'yes', + 'MODULE__CODECS_ISO2022_STATE': 'yes', + 'MODULE__CODECS_JP_STATE': 'yes', + 'MODULE__CODECS_KR_STATE': 'yes', + 'MODULE__CODECS_LDFLAGS': '', + 'MODULE__CODECS_TW_STATE': 'yes', + 'MODULE__COLLECTIONS_LDFLAGS': '', + 'MODULE__CONTEXTVARS_STATE': 'yes', + 'MODULE__CRYPT_CFLAGS': '', + 'MODULE__CRYPT_LDFLAGS': '', + 'MODULE__CRYPT_STATE': 'yes', + 'MODULE__CSV_STATE': 'yes', + 'MODULE__CTYPES_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ctypes/ctypes.h', + 'MODULE__CTYPES_TEST_LDFLAGS': '-lm', + 'MODULE__CTYPES_TEST_STATE': 'yes', + 'MODULE__DATETIME_LDFLAGS': '-lm', + 'MODULE__DATETIME_STATE': 'yes', + 'MODULE__DECIMAL_CFLAGS': '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_decimal/libmpdec ' + '-DCONFIG_64=1 -DANSI=1 -DHAVE_UINT128_T=1', + 'MODULE__DECIMAL_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_decimal/docstrings.h ' + '\\ Modules/_decimal/libmpdec/libmpdec.a', + 'MODULE__DECIMAL_LDFLAGS': '-lm Modules/_decimal/libmpdec/libmpdec.a', + 'MODULE__DECIMAL_STATE': 'yes', + 'MODULE__ELEMENTTREE_CFLAGS': '', + 'MODULE__ELEMENTTREE_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/pyexpat.c', + 'MODULE__ELEMENTTREE_STATE': 'yes', + 'MODULE__FUNCTOOLS_LDFLAGS': '', + 'MODULE__GDBM_STATE': 'missing', + 'MODULE__HASHLIB_CFLAGS': '-I/usr/local/miniconda3/envs/phantom/include', + 'MODULE__HASHLIB_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/hashlib.h', + 'MODULE__HASHLIB_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-lcrypto', + 'MODULE__HASHLIB_STATE': 'yes', + 'MODULE__HEAPQ_STATE': 'yes', + 'MODULE__IO_CFLAGS': '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_io', + 'MODULE__IO_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_io/_iomodule.h', + 'MODULE__IO_LDFLAGS': '', + 'MODULE__IO_STATE': 'yes', + 'MODULE__JSON_STATE': 'yes', + 'MODULE__LOCALE_LDFLAGS': '', + 'MODULE__LSPROF_STATE': 'yes', + 'MODULE__LZMA_CFLAGS': '-I/usr/local/miniconda3/envs/phantom/include', + 'MODULE__LZMA_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-llzma', + 'MODULE__LZMA_STATE': 'yes', + 'MODULE__MD5_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/hashlib.h', + 'MODULE__MD5_STATE': 'yes', + 'MODULE__MULTIBYTECODEC_STATE': 'yes', + 'MODULE__MULTIPROCESSING_CFLAGS': '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_multiprocessing', + 'MODULE__MULTIPROCESSING_STATE': 'yes', + 'MODULE__OPCODE_STATE': 'yes', + 'MODULE__OPERATOR_LDFLAGS': '', + 'MODULE__PICKLE_STATE': 'yes', + 'MODULE__POSIXSHMEM_CFLAGS': '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_multiprocessing', + 'MODULE__POSIXSHMEM_LDFLAGS': '-lrt', + 'MODULE__POSIXSHMEM_STATE': 'yes', + 'MODULE__POSIXSUBPROCESS_STATE': 'yes', + 'MODULE__QUEUE_STATE': 'yes', + 'MODULE__RANDOM_STATE': 'yes', + 'MODULE__SCPROXY_STATE': 'n/a', + 'MODULE__SHA1_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/hashlib.h', + 'MODULE__SHA1_STATE': 'yes', + 'MODULE__SHA256_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/hashlib.h', + 'MODULE__SHA256_STATE': 'yes', + 'MODULE__SHA3_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sha3/sha3.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sha3/sha3.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/hashlib.h', + 'MODULE__SHA3_STATE': 'yes', + 'MODULE__SHA512_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/hashlib.h', + 'MODULE__SHA512_STATE': 'yes', + 'MODULE__SIGNAL_LDFLAGS': '', + 'MODULE__SOCKET_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/socketmodule.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/addrinfo.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/getaddrinfo.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/getnameinfo.c', + 'MODULE__SOCKET_STATE': 'yes', + 'MODULE__SQLITE3_CFLAGS': '-I/usr/local/miniconda3/envs/phantom/include ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite', + 'MODULE__SQLITE3_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite/connection.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite/cursor.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite/microprotocols.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite/module.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite/prepare_protocol.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite/row.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite/util.h', + 'MODULE__SQLITE3_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-lsqlite3', + 'MODULE__SQLITE3_STATE': 'yes', + 'MODULE__SRE_LDFLAGS': '', + 'MODULE__SSL_CFLAGS': '-I/usr/local/miniconda3/envs/phantom/include', + 'MODULE__SSL_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ssl.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ssl/cert.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ssl/debughelpers.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ssl/misc.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ssl_data.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ssl_data_111.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ssl_data_300.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/socketmodule.h', + 'MODULE__SSL_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-lssl -lcrypto', + 'MODULE__SSL_STATE': 'yes', + 'MODULE__STATISTICS_LDFLAGS': '-lm', + 'MODULE__STATISTICS_STATE': 'yes', + 'MODULE__STAT_LDFLAGS': '', + 'MODULE__STRUCT_STATE': 'yes', + 'MODULE__SYMTABLE_LDFLAGS': '', + 'MODULE__TESTBUFFER_STATE': 'yes', + 'MODULE__TESTCAPI_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/testcapi_long.h', + 'MODULE__TESTCAPI_STATE': 'yes', + 'MODULE__TESTCLINIC_STATE': 'yes', + 'MODULE__TESTIMPORTMULTIPLE_STATE': 'yes', + 'MODULE__TESTINTERNALCAPI_STATE': 'yes', + 'MODULE__TESTMULTIPHASE_STATE': 'yes', + 'MODULE__THREAD_LDFLAGS': '', + 'MODULE__TKINTER_CFLAGS': '-I/usr/local/miniconda3/envs/phantom/include ' + '-Wno-strict-prototypes -DWITH_APPINIT=1', + 'MODULE__TKINTER_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-ltk8.6 -ltkstub8.6 -ltcl8.6 -ltclstub8.6', + 'MODULE__TKINTER_STATE': 'yes', + 'MODULE__TRACEMALLOC_LDFLAGS': '', + 'MODULE__TYPING_STATE': 'yes', + 'MODULE__UUID_CFLAGS': '-I/usr/local/miniconda3/envs/phantom/include/uuid', + 'MODULE__UUID_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-luuid', + 'MODULE__UUID_STATE': 'yes', + 'MODULE__WEAKREF_LDFLAGS': '', + 'MODULE__XXSUBINTERPRETERS_STATE': 'yes', + 'MODULE__XXTESTFUZZ_STATE': 'yes', + 'MODULE__ZONEINFO_STATE': 'yes', + 'MULTIARCH': 'x86_64-linux-gnu', + 'MULTIARCH_CPPFLAGS': '-DMULTIARCH=\\"x86_64-linux-gnu\\"', + 'MVWDELCH_IS_EXPRESSION': 1, + 'NO_AS_NEEDED': '-Wl,--no-as-needed', + 'OBJECT_OBJS': '\\', + 'OPENSSL_INCLUDES': '-I/usr/local/miniconda3/envs/phantom/include', + 'OPENSSL_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib', + 'OPENSSL_LIBS': '-lssl -lcrypto', + 'OPENSSL_RPATH': '', + 'OPT': '-DNDEBUG -fwrapv -O2 -Wall', + 'OTHER_LIBTOOL_OPT': '', + 'PACKAGE_BUGREPORT': 0, + 'PACKAGE_NAME': 0, + 'PACKAGE_STRING': 0, + 'PACKAGE_TARNAME': 0, + 'PACKAGE_URL': 0, + 'PACKAGE_VERSION': 0, + 'PARSER_HEADERS': '\\', + 'PARSER_OBJS': '\\ \\ Parser/myreadline.o Parser/tokenizer.o', + 'PEGEN_HEADERS': '\\', + 'PEGEN_OBJS': '\\', + 'PGO_PROF_GEN_FLAG': '-fprofile-generate', + 'PGO_PROF_USE_FLAG': ' ', + 'PLATLIBDIR': 'lib', + 'POBJS': '\\', + 'POSIX_SEMAPHORES_NOT_ENABLED': 0, + 'PROFILE_TASK': '-m test --pgo', + 'PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT': 1, + 'PTHREAD_SYSTEM_SCHED_SUPPORTED': 1, + 'PURIFY': '', + 'PY3LIBRARY': '', + 'PYLONG_BITS_IN_DIGIT': 0, + 'PYTHON': 'python', + 'PYTHONFRAMEWORK': '', + 'PYTHONFRAMEWORKDIR': 'no-framework', + 'PYTHONFRAMEWORKINSTALLDIR': '', + 'PYTHONFRAMEWORKPREFIX': '', + 'PYTHONPATH': '', + 'PYTHON_FOR_BUILD': './python -E', + 'PYTHON_FOR_BUILD_DEPS': 'python', + 'PYTHON_FOR_FREEZE': './_bootstrap_python', + 'PYTHON_FOR_REGEN': '', + 'PYTHON_HEADERS': '\\', + 'PYTHON_OBJS': '\\', + 'PY_BUILTIN_HASHLIB_HASHES': '"md5,sha1,sha256,sha512,sha3,blake2"', + 'PY_BUILTIN_MODULE_CFLAGS': '-DNDEBUG -fwrapv -O2 -Wall -march=nocona ' + '-mtune=haswell -ftree-vectorize -fPIC ' + '-fstack-protector-strong -fno-plt -O2 ' + '-ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-fdebug-prefix-map=/home/task_177324838993876/croot/python-split_1773249007352/work=/usr/local/src/conda/python-3.11.15 ' + '-fdebug-prefix-map=/usr/local/miniconda3/envs/phantom=/usr/local/src/conda-prefix ' + ' ' + ' -march=nocona ' + '-mtune=haswell -ftree-vectorize -fPIC ' + '-fstack-protector-strong -fno-plt -O2 ' + '-ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-fdebug-prefix-map=/home/task_177324838993876/croot/python-split_1773249007352/work=/usr/local/src/conda/python-3.11.15 ' + '-fdebug-prefix-map=/usr/local/miniconda3/envs/phantom=/usr/local/src/conda-prefix ' + ' ' + ' ' + '-fno-semantic-interposition ' + ' ' + ' -g -std=c11 ' + '-Werror=implicit-function-declaration ' + '-fvisibility=hidden ' + ' ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include/internal ' + '-IObjects -IInclude -IPython -I. ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DPy_BUILD_CORE_BUILTIN', + 'PY_CFLAGS': '-DNDEBUG -fwrapv -O2 -Wall -march=nocona -mtune=haswell ' + '-ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 ' + '-ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-fdebug-prefix-map=/home/task_177324838993876/croot/python-split_1773249007352/work=/usr/local/src/conda/python-3.11.15 ' + '-fdebug-prefix-map=/usr/local/miniconda3/envs/phantom=/usr/local/src/conda-prefix ' + ' ' + ' -march=nocona -mtune=haswell -ftree-vectorize -fPIC ' + '-fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe ' + '-isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-fdebug-prefix-map=/home/task_177324838993876/croot/python-split_1773249007352/work=/usr/local/src/conda/python-3.11.15 ' + '-fdebug-prefix-map=/usr/local/miniconda3/envs/phantom=/usr/local/src/conda-prefix ' + ' ' + '', + 'PY_CFLAGS_NODIST': '-fno-semantic-interposition ' + ' -g -std=c11 ' + '-Werror=implicit-function-declaration ' + '-fvisibility=hidden ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include/internal', + 'PY_COERCE_C_LOCALE': 1, + 'PY_CORE_CFLAGS': '-DNDEBUG -fwrapv -O2 -Wall -march=nocona -mtune=haswell ' + '-ftree-vectorize -fPIC -fstack-protector-strong -fno-plt ' + '-O2 -ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-fdebug-prefix-map=/home/task_177324838993876/croot/python-split_1773249007352/work=/usr/local/src/conda/python-3.11.15 ' + '-fdebug-prefix-map=/usr/local/miniconda3/envs/phantom=/usr/local/src/conda-prefix ' + ' ' + ' -march=nocona -mtune=haswell -ftree-vectorize -fPIC ' + '-fstack-protector-strong -fno-plt -O2 -ffunction-sections ' + '-pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-fdebug-prefix-map=/home/task_177324838993876/croot/python-split_1773249007352/work=/usr/local/src/conda/python-3.11.15 ' + '-fdebug-prefix-map=/usr/local/miniconda3/envs/phantom=/usr/local/src/conda-prefix ' + ' ' + ' -fno-semantic-interposition ' + ' ' + '-g -std=c11 -Werror=implicit-function-declaration ' + '-fvisibility=hidden ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include/internal ' + '-IObjects -IInclude -IPython -I. ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DPy_BUILD_CORE', + 'PY_CORE_LDFLAGS': '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro ' + '-Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro ' + '-Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '-fno-semantic-interposition ' + ' -g', + 'PY_CPPFLAGS': '-IObjects -IInclude -IPython -I. ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include', + 'PY_ENABLE_SHARED': 0, + 'PY_FORMAT_SIZE_T': '"z"', + 'PY_LDFLAGS': '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro ' + '-Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro ' + '-Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib', + 'PY_LDFLAGS_NODIST': '-fno-semantic-interposition ' + ' -g', + 'PY_LDFLAGS_NOLTO': '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro ' + '-Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro ' + '-Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '-fno-lto', + 'PY_SQLITE_ENABLE_LOAD_EXTENSION': 1, + 'PY_SQLITE_HAVE_SERIALIZE': 1, + 'PY_SSL_DEFAULT_CIPHERS': 1, + 'PY_SSL_DEFAULT_CIPHER_STRING': 0, + 'PY_STDMODULE_CFLAGS': '-DNDEBUG -fwrapv -O2 -Wall -march=nocona ' + '-mtune=haswell -ftree-vectorize -fPIC ' + '-fstack-protector-strong -fno-plt -O2 ' + '-ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-fdebug-prefix-map=/home/task_177324838993876/croot/python-split_1773249007352/work=/usr/local/src/conda/python-3.11.15 ' + '-fdebug-prefix-map=/usr/local/miniconda3/envs/phantom=/usr/local/src/conda-prefix ' + ' ' + ' -march=nocona ' + '-mtune=haswell -ftree-vectorize -fPIC ' + '-fstack-protector-strong -fno-plt -O2 ' + '-ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-fdebug-prefix-map=/home/task_177324838993876/croot/python-split_1773249007352/work=/usr/local/src/conda/python-3.11.15 ' + '-fdebug-prefix-map=/usr/local/miniconda3/envs/phantom=/usr/local/src/conda-prefix ' + ' ' + ' ' + '-fno-semantic-interposition ' + ' -g -std=c11 ' + '-Werror=implicit-function-declaration ' + '-fvisibility=hidden ' + ' ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include/internal ' + '-IObjects -IInclude -IPython -I. ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include', + 'PY_SUPPORT_TIER': 1, + 'Py_DEBUG': 0, + 'Py_ENABLE_SHARED': 0, + 'Py_HASH_ALGORITHM': 0, + 'Py_STATS': 0, + 'Py_SUNOS_VERSION': 0, + 'Py_TRACE_REFS': 0, + 'QUICKTESTOPTS': '-x test_subprocess test_io test_lib2to3 \\', + 'READELF': 'x86_64-conda-linux-gnu-readelf', + 'RESSRCDIR': 'Mac/Resources/framework', + 'RETSIGTYPE': 'void', + 'RUNSHARED': '', + 'SCRIPTDIR': '/usr/local/miniconda3/envs/phantom/lib', + 'SETPGRP_HAVE_ARG': 0, + 'SHELL': '/bin/sh', + 'SHLIBS': '-lpthread -ldl -lutil', + 'SHLIB_SUFFIX': '.so', + 'SIGNED_RIGHT_SHIFT_ZERO_FILLS': 0, + 'SITEPATH': '', + 'SIZEOF_DOUBLE': 8, + 'SIZEOF_FLOAT': 4, + 'SIZEOF_FPOS_T': 16, + 'SIZEOF_INT': 4, + 'SIZEOF_LONG': 8, + 'SIZEOF_LONG_DOUBLE': 16, + 'SIZEOF_LONG_LONG': 8, + 'SIZEOF_OFF_T': 8, + 'SIZEOF_PID_T': 4, + 'SIZEOF_PTHREAD_KEY_T': 4, + 'SIZEOF_PTHREAD_T': 8, + 'SIZEOF_SHORT': 2, + 'SIZEOF_SIZE_T': 8, + 'SIZEOF_TIME_T': 8, + 'SIZEOF_UINTPTR_T': 8, + 'SIZEOF_VOID_P': 8, + 'SIZEOF_WCHAR_T': 4, + 'SIZEOF__BOOL': 1, + 'SOABI': 'cpython-311-x86_64-linux-gnu', + 'SRCDIRS': 'Modules Modules/_blake2 Modules/_ctypes Modules/_decimal ' + 'Modules/_decimal/libmpdec Modules/_io ' + 'Modules/_multiprocessing Modules/_sha3 Modules/_sqlite ' + 'Modules/_sre Modules/_xxtestfuzz Modules/cjkcodecs ' + 'Modules/expat Objects Parser Programs Python ' + 'Python/frozen_modules Python/deepfreeze', + 'SRC_GDB_HOOKS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Tools/gdb/libpython.py', + 'STATIC_LIBPYTHON': 1, + 'STDC_HEADERS': 1, + 'STRICT_SYSV_CURSES': "/* Don't use ncurses extensions */", + 'STRIPFLAG': '-s', + 'SUBDIRS': '', + 'SUBDIRSTOO': 'Include Lib Misc', + 'SYSLIBS': '-lm', + 'SYS_SELECT_WITH_SYS_TIME': 1, + 'TESTOPTS': '', + 'TESTPATH': '', + 'TESTPYTHON': './python -E', + 'TESTPYTHONOPTS': '', + 'TESTRUNNER': './python -E ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Tools/scripts/run_tests.py', + 'TESTSUBDIRS': 'ctypes/test \\', + 'TESTTIMEOUT': 1200, + 'TEST_MODULES': 'yes', + 'THREAD_STACK_SIZE': 0, + 'TIMEMODULE_LIB': 0, + 'TIME_WITH_SYS_TIME': 1, + 'TM_IN_SYS_TIME': 0, + 'TZPATH': '/usr/local/miniconda3/envs/phantom/share/zoneinfo', + 'UNICODE_DEPS': '\\', + 'UNIVERSALSDK': '', + 'UPDATE_FILE': '/home/task_177324838993876/croot/python-split_1773249007352/work/Tools/scripts/update_file.py', + 'USE_COMPUTED_GOTOS': 1, + 'VERSION': '3.11', + 'VPATH': '/home/task_177324838993876/croot/python-split_1773249007352/work', + 'WASM_ASSETS_DIR': './usr/local/miniconda3/envs/phantom', + 'WASM_STDLIB': './usr/local/miniconda3/envs/phantom/lib/python3.11/os.py', + 'WHEEL_PKG_DIR': '', + 'WINDOW_HAS_FLAGS': 0, + 'WITH_DECIMAL_CONTEXTVAR': 1, + 'WITH_DOC_STRINGS': 1, + 'WITH_DTRACE': 0, + 'WITH_DYLD': 0, + 'WITH_EDITLINE': 0, + 'WITH_FREELISTS': 1, + 'WITH_LIBINTL': 0, + 'WITH_NEXT_FRAMEWORK': 0, + 'WITH_PYMALLOC': 1, + 'WITH_VALGRIND': 0, + 'X87_DOUBLE_ROUNDING': 0, + 'XMLLIBSUBDIRS': 'xml xml/dom xml/etree xml/parsers xml/sax', + 'abs_builddir': '/home/task_177324838993876/croot/python-split_1773249007352/work/build-static', + 'abs_srcdir': '/home/task_177324838993876/croot/python-split_1773249007352/work', + 'datarootdir': '/usr/local/miniconda3/envs/phantom/share', + 'exec_prefix': '/usr/local/miniconda3/envs/phantom', + 'prefix': '/usr/local/miniconda3/envs/phantom', + 'srcdir': '/home/task_177324838993876/croot/python-split_1773249007352/work'} diff --git a/lib/python3.11/_sysconfigdata_x86_64_conda_cos6_linux_gnu.py b/lib/python3.11/_sysconfigdata_x86_64_conda_cos6_linux_gnu.py new file mode 100644 index 0000000000000000000000000000000000000000..73c5c20437cbfb5c1b4ebda1018a0851d600f16e --- /dev/null +++ b/lib/python3.11/_sysconfigdata_x86_64_conda_cos6_linux_gnu.py @@ -0,0 +1,1339 @@ +# system configuration generated and used by the sysconfig module +build_time_vars = {'ABIFLAGS': '', + 'AC_APPLE_UNIVERSAL_BUILD': 0, + 'AIX_BUILDDATE': 0, + 'AIX_GENUINE_CPLUSPLUS': 0, + 'ALIGNOF_LONG': 8, + 'ALIGNOF_SIZE_T': 8, + 'ALT_SOABI': 0, + 'ANDROID_API_LEVEL': 0, + 'AR': 'x86_64-conda_cos6-linux-gnu-ar', + 'ARFLAGS': 'rcs', + 'BASECFLAGS': '', + 'BASECPPFLAGS': '-IObjects -IInclude -IPython', + 'BASEMODLIBS': '', + 'BINDIR': '/usr/local/miniconda3/envs/phantom/bin', + 'BINLIBDEST': '/usr/local/miniconda3/envs/phantom/lib/python3.11', + 'BLDLIBRARY': 'libpython3.11.a', + 'BLDSHARED': 'x86_64-conda_cos6-linux-gnu-gcc -pthread -shared -Wl,-O2 ' + '-Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now ' + '-Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro ' + '-Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib', + 'BOOTSTRAP_HEADERS': '\\', + 'BUILDEXE': '', + 'BUILDPYTHON': 'python', + 'BUILD_GNU_TYPE': 'x86_64-conda_cos6-linux-gnu', + 'BYTESTR_DEPS': '\\', + 'CC': 'x86_64-conda_cos6-linux-gnu-gcc -pthread', + 'CCSHARED': '-fPIC', + 'CFLAGS': '-DNDEBUG -fwrapv -O2 -Wall -march=nocona -mtune=haswell ' + '-ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 ' + '-ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ' + '-march=nocona -mtune=haswell -ftree-vectorize -fPIC ' + '-fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe ' + '-isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ', + 'CFLAGSFORSHARED': '', + 'CFLAGS_ALIASING': '', + 'CONFIGFILES': 'configure configure.ac acconfig.h pyconfig.h.in ' + 'Makefile.pre.in', + 'CONFIGURE_CFLAGS': '-march=nocona -mtune=haswell -ftree-vectorize -fPIC ' + '-fstack-protector-strong -fno-plt -O2 ' + '-ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ' + ' ', + 'CONFIGURE_CFLAGS_NODIST': '-fno-semantic-interposition ' + ' ' + ' -g -std=c11 ' + '-Werror=implicit-function-declaration ' + '-fvisibility=hidden', + 'CONFIGURE_CPPFLAGS': '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include', + 'CONFIGURE_LDFLAGS': '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro ' + '-Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib', + 'CONFIGURE_LDFLAGS_NODIST': '-fno-semantic-interposition ' + ' ' + ' -g', + 'CONFIGURE_LDFLAGS_NOLTO': '-fno-lto', + 'CONFIG_ARGS': "'--prefix=/usr/local/miniconda3/envs/phantom' " + "'--build=x86_64-conda_cos6-linux-gnu' " + "'--host=x86_64-conda_cos6-linux-gnu' '--enable-ipv6' " + "'--with-ensurepip=no' " + "'--with-tzpath=/usr/local/miniconda3/envs/phantom/share/zoneinfo:/usr/local/miniconda3/envs/phantom/share/tzinfo' " + "'--with-computed-gotos' '--with-system-ffi' " + "'--with-system-expat' '--enable-loadable-sqlite-extensions' " + "'--with-tcltk-includes=-I/usr/local/miniconda3/envs/phantom/include' " + "'--with-tcltk-libs=-L/usr/local/miniconda3/envs/phantom/lib " + "-ltcl8.6 -ltk8.6' '--with-platlibdir=lib' '--with-lto' " + "'--enable-optimizations' " + "'-oldincludedir=/home/task_177324838993876/croot/python-split_1773249007352/_build_env/x86_64-conda_cos6-linux-gnu/sysroot/usr/include' " + "'--disable-shared' 'PROFILE_TASK=-m test --pgo' " + "'build_alias=x86_64-conda_cos6-linux-gnu' " + "'host_alias=x86_64-conda_cos6-linux-gnu' " + "'PKG_CONFIG_PATH=/usr/local/miniconda3/envs/phantom/lib/pkgconfig' " + "'MACHDEP=linux' 'CC=x86_64-conda_cos6-linux-gnu-gcc' " + "'CFLAGS=-march=nocona -mtune=haswell -ftree-vectorize -fPIC " + '-fstack-protector-strong -fno-plt -O2 -ffunction-sections ' + '-pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ' + "' 'LDFLAGS=-Wl,-O2 -Wl,--sort-common -Wl,--as-needed " + '-Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags ' + '-Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + "-L/usr/local/miniconda3/envs/phantom/lib' " + "'CPPFLAGS=-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem " + '/usr/local/miniconda3/envs/phantom/include ' + "-I/usr/local/miniconda3/envs/phantom/include' " + "'CPP=/home/task_177324838993876/croot/python-split_1773249007352/_build_env/bin/x86_64-conda_cos6-linux-gnu-cpp'", + 'CONFINCLUDEDIR': '/usr/local/miniconda3/envs/phantom/include', + 'CONFINCLUDEPY': '/usr/local/miniconda3/envs/phantom/include/python3.11', + 'COREPYTHONPATH': '', + 'COVERAGE_INFO': '/home/task_177324838993876/croot/python-split_1773249007352/work/build-static/coverage.info', + 'COVERAGE_LCOV_OPTIONS': '--rc lcov_branch_coverage=1', + 'COVERAGE_REPORT': '/home/task_177324838993876/croot/python-split_1773249007352/work/build-static/lcov-report', + 'COVERAGE_REPORT_OPTIONS': '--rc lcov_branch_coverage=1 --branch-coverage ' + '--title "CPython 3.11 LCOV report [commit $(shell ' + ')]"', + 'CPPFLAGS': '-IObjects -IInclude -IPython -I. ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include', + 'CXX': 'x86_64-conda_cos6-linux-gnu-c++ -pthread', + 'DECIMAL_CFLAGS': '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_decimal/libmpdec ' + '-DCONFIG_64=1 -DANSI=1 -DHAVE_UINT128_T=1', + 'DECIMAL_LDFLAGS': '-lm Modules/_decimal/libmpdec/libmpdec.a', + 'DEEPFREEZE_C': 'Python/deepfreeze/deepfreeze.c', + 'DEEPFREEZE_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Tools/scripts/deepfreeze.py ' + '_bootstrap_python ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Programs/_freeze_module.py ' + '\\', + 'DEEPFREEZE_OBJS': 'Python/deepfreeze/deepfreeze.o', + 'DESTDIRS': '/usr/local/miniconda3/envs/phantom ' + '/usr/local/miniconda3/envs/phantom/lib ' + '/usr/local/miniconda3/envs/phantom/lib/python3.11 ' + '/usr/local/miniconda3/envs/phantom/lib/python3.11/lib-dynload', + 'DESTLIB': '/usr/local/miniconda3/envs/phantom/lib/python3.11', + 'DESTPATH': '', + 'DESTSHARED': '/usr/local/miniconda3/envs/phantom/lib/python3.11/lib-dynload', + 'DFLAGS': '', + 'DIRMODE': 755, + 'DIST': 'README.rst ChangeLog configure configure.ac acconfig.h pyconfig.h.in ' + 'Makefile.pre.in Include Lib Misc Ext-dummy', + 'DISTDIRS': 'Include Lib Misc Ext-dummy', + 'DISTFILES': 'README.rst ChangeLog configure configure.ac acconfig.h ' + 'pyconfig.h.in Makefile.pre.in', + 'DLINCLDIR': '.', + 'DLLLIBRARY': '', + 'DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754': 0, + 'DOUBLE_IS_BIG_ENDIAN_IEEE754': 0, + 'DOUBLE_IS_LITTLE_ENDIAN_IEEE754': 1, + 'DTRACE': '', + 'DTRACE_DEPS': '\\', + 'DTRACE_HEADERS': '', + 'DTRACE_OBJS': '', + 'DYNLOADFILE': 'dynload_shlib.o', + 'ENABLE_IPV6': 1, + 'ENSUREPIP': 'no', + 'EXE': '', + 'EXEMODE': 755, + 'EXPAT_CFLAGS': '', + 'EXPAT_LDFLAGS': '-lexpat', + 'EXPORTSFROM': '', + 'EXPORTSYMS': '', + 'EXTRATESTOPTS': '', + 'EXT_SUFFIX': '.cpython-311-x86_64-linux-gnu.so', + 'FILEMODE': 644, + 'FLOAT_WORDS_BIGENDIAN': 0, + 'FREEZE_MODULE': './_bootstrap_python ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Programs/_freeze_module.py', + 'FREEZE_MODULE_BOOTSTRAP': './Programs/_freeze_module', + 'FREEZE_MODULE_BOOTSTRAP_DEPS': 'Programs/_freeze_module', + 'FREEZE_MODULE_DEPS': '_bootstrap_python ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Programs/_freeze_module.py', + 'FROZEN_FILES_IN': '\\', + 'FROZEN_FILES_OUT': '\\', + 'GETPGRP_HAVE_ARG': 0, + 'GITBRANCH': '', + 'GITTAG': '', + 'GITVERSION': '', + 'GNULD': 'no', + 'HAVE_ACCEPT': 1, + 'HAVE_ACCEPT4': 1, + 'HAVE_ACOSH': 1, + 'HAVE_ADDRINFO': 1, + 'HAVE_ALARM': 1, + 'HAVE_ALIGNED_REQUIRED': 0, + 'HAVE_ALLOCA_H': 1, + 'HAVE_ALTZONE': 0, + 'HAVE_ASINH': 1, + 'HAVE_ASM_TYPES_H': 1, + 'HAVE_ATANH': 1, + 'HAVE_BIND': 1, + 'HAVE_BIND_TEXTDOMAIN_CODESET': 1, + 'HAVE_BLUETOOTH_BLUETOOTH_H': 0, + 'HAVE_BLUETOOTH_H': 0, + 'HAVE_BROKEN_MBSTOWCS': 0, + 'HAVE_BROKEN_NICE': 0, + 'HAVE_BROKEN_PIPE_BUF': 0, + 'HAVE_BROKEN_POLL': 0, + 'HAVE_BROKEN_POSIX_SEMAPHORES': 0, + 'HAVE_BROKEN_PTHREAD_SIGMASK': 0, + 'HAVE_BROKEN_SEM_GETVALUE': 0, + 'HAVE_BROKEN_UNSETENV': 0, + 'HAVE_BUILTIN_ATOMIC': 1, + 'HAVE_BZLIB_H': 1, + 'HAVE_CHFLAGS': 0, + 'HAVE_CHMOD': 1, + 'HAVE_CHOWN': 1, + 'HAVE_CHROOT': 1, + 'HAVE_CLOCK': 1, + 'HAVE_CLOCK_GETRES': 1, + 'HAVE_CLOCK_GETTIME': 1, + 'HAVE_CLOCK_NANOSLEEP': 1, + 'HAVE_CLOCK_SETTIME': 1, + 'HAVE_CLOSE_RANGE': 0, + 'HAVE_COMPUTED_GOTOS': 1, + 'HAVE_CONFSTR': 1, + 'HAVE_CONIO_H': 0, + 'HAVE_CONNECT': 1, + 'HAVE_COPY_FILE_RANGE': 1, + 'HAVE_CRYPT_H': 0, + 'HAVE_CRYPT_R': 0, + 'HAVE_CTERMID': 1, + 'HAVE_CTERMID_R': 0, + 'HAVE_CURSES_FILTER': 1, + 'HAVE_CURSES_H': 1, + 'HAVE_CURSES_HAS_KEY': 1, + 'HAVE_CURSES_IMMEDOK': 1, + 'HAVE_CURSES_IS_PAD': 1, + 'HAVE_CURSES_IS_TERM_RESIZED': 1, + 'HAVE_CURSES_RESIZETERM': 1, + 'HAVE_CURSES_RESIZE_TERM': 1, + 'HAVE_CURSES_SYNCOK': 1, + 'HAVE_CURSES_TYPEAHEAD': 1, + 'HAVE_CURSES_USE_ENV': 1, + 'HAVE_CURSES_WCHGAT': 1, + 'HAVE_DB_H': 0, + 'HAVE_DECL_RTLD_DEEPBIND': 1, + 'HAVE_DECL_RTLD_GLOBAL': 1, + 'HAVE_DECL_RTLD_LAZY': 1, + 'HAVE_DECL_RTLD_LOCAL': 1, + 'HAVE_DECL_RTLD_MEMBER': 0, + 'HAVE_DECL_RTLD_NODELETE': 1, + 'HAVE_DECL_RTLD_NOLOAD': 1, + 'HAVE_DECL_RTLD_NOW': 1, + 'HAVE_DECL_TZNAME': 0, + 'HAVE_DEVICE_MACROS': 1, + 'HAVE_DEV_PTC': 0, + 'HAVE_DEV_PTMX': 1, + 'HAVE_DIRECT_H': 0, + 'HAVE_DIRENT_D_TYPE': 1, + 'HAVE_DIRENT_H': 1, + 'HAVE_DIRFD': 1, + 'HAVE_DLFCN_H': 1, + 'HAVE_DLOPEN': 1, + 'HAVE_DUP': 1, + 'HAVE_DUP2': 1, + 'HAVE_DUP3': 1, + 'HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH': 0, + 'HAVE_DYNAMIC_LOADING': 1, + 'HAVE_ENDIAN_H': 1, + 'HAVE_EPOLL': 1, + 'HAVE_EPOLL_CREATE1': 1, + 'HAVE_ERF': 1, + 'HAVE_ERFC': 1, + 'HAVE_ERRNO_H': 1, + 'HAVE_EVENTFD': 1, + 'HAVE_EXECV': 1, + 'HAVE_EXPLICIT_BZERO': 1, + 'HAVE_EXPLICIT_MEMSET': 0, + 'HAVE_EXPM1': 1, + 'HAVE_FACCESSAT': 1, + 'HAVE_FCHDIR': 1, + 'HAVE_FCHMOD': 1, + 'HAVE_FCHMODAT': 1, + 'HAVE_FCHOWN': 1, + 'HAVE_FCHOWNAT': 1, + 'HAVE_FCNTL_H': 1, + 'HAVE_FDATASYNC': 1, + 'HAVE_FDOPENDIR': 1, + 'HAVE_FDWALK': 0, + 'HAVE_FEXECVE': 1, + 'HAVE_FLOCK': 1, + 'HAVE_FORK': 1, + 'HAVE_FORK1': 0, + 'HAVE_FORKPTY': 1, + 'HAVE_FPATHCONF': 1, + 'HAVE_FSEEK64': 0, + 'HAVE_FSEEKO': 1, + 'HAVE_FSTATAT': 1, + 'HAVE_FSTATVFS': 1, + 'HAVE_FSYNC': 1, + 'HAVE_FTELL64': 0, + 'HAVE_FTELLO': 1, + 'HAVE_FTIME': 1, + 'HAVE_FTRUNCATE': 1, + 'HAVE_FUTIMENS': 1, + 'HAVE_FUTIMES': 1, + 'HAVE_FUTIMESAT': 1, + 'HAVE_GAI_STRERROR': 1, + 'HAVE_GCC_ASM_FOR_MC68881': 0, + 'HAVE_GCC_ASM_FOR_X64': 1, + 'HAVE_GCC_ASM_FOR_X87': 1, + 'HAVE_GCC_UINT128_T': 1, + 'HAVE_GDBM_DASH_NDBM_H': 0, + 'HAVE_GDBM_H': 0, + 'HAVE_GDBM_NDBM_H': 0, + 'HAVE_GETADDRINFO': 1, + 'HAVE_GETC_UNLOCKED': 1, + 'HAVE_GETEGID': 1, + 'HAVE_GETENTROPY': 1, + 'HAVE_GETEUID': 1, + 'HAVE_GETGID': 1, + 'HAVE_GETGRGID': 1, + 'HAVE_GETGRGID_R': 1, + 'HAVE_GETGRNAM_R': 1, + 'HAVE_GETGROUPLIST': 1, + 'HAVE_GETGROUPS': 1, + 'HAVE_GETHOSTBYADDR': 1, + 'HAVE_GETHOSTBYNAME': 1, + 'HAVE_GETHOSTBYNAME_R': 1, + 'HAVE_GETHOSTBYNAME_R_3_ARG': 0, + 'HAVE_GETHOSTBYNAME_R_5_ARG': 0, + 'HAVE_GETHOSTBYNAME_R_6_ARG': 1, + 'HAVE_GETHOSTNAME': 1, + 'HAVE_GETITIMER': 1, + 'HAVE_GETLOADAVG': 1, + 'HAVE_GETLOGIN': 1, + 'HAVE_GETNAMEINFO': 1, + 'HAVE_GETPAGESIZE': 1, + 'HAVE_GETPEERNAME': 1, + 'HAVE_GETPGID': 1, + 'HAVE_GETPGRP': 1, + 'HAVE_GETPID': 1, + 'HAVE_GETPPID': 1, + 'HAVE_GETPRIORITY': 1, + 'HAVE_GETPROTOBYNAME': 1, + 'HAVE_GETPWENT': 1, + 'HAVE_GETPWNAM_R': 1, + 'HAVE_GETPWUID': 1, + 'HAVE_GETPWUID_R': 1, + 'HAVE_GETRANDOM': 1, + 'HAVE_GETRANDOM_SYSCALL': 1, + 'HAVE_GETRESGID': 1, + 'HAVE_GETRESUID': 1, + 'HAVE_GETRUSAGE': 1, + 'HAVE_GETSERVBYNAME': 1, + 'HAVE_GETSERVBYPORT': 1, + 'HAVE_GETSID': 1, + 'HAVE_GETSOCKNAME': 1, + 'HAVE_GETSPENT': 1, + 'HAVE_GETSPNAM': 1, + 'HAVE_GETUID': 1, + 'HAVE_GETWD': 1, + 'HAVE_GLIBC_MEMMOVE_BUG': 0, + 'HAVE_GRP_H': 1, + 'HAVE_HSTRERROR': 1, + 'HAVE_HTOLE64': 1, + 'HAVE_IEEEFP_H': 0, + 'HAVE_IF_NAMEINDEX': 1, + 'HAVE_INET_ATON': 1, + 'HAVE_INET_NTOA': 1, + 'HAVE_INET_PTON': 1, + 'HAVE_INITGROUPS': 1, + 'HAVE_INTTYPES_H': 1, + 'HAVE_IO_H': 0, + 'HAVE_IPA_PURE_CONST_BUG': 0, + 'HAVE_KILL': 1, + 'HAVE_KILLPG': 1, + 'HAVE_KQUEUE': 0, + 'HAVE_LANGINFO_H': 1, + 'HAVE_LARGEFILE_SUPPORT': 0, + 'HAVE_LCHFLAGS': 0, + 'HAVE_LCHMOD': 0, + 'HAVE_LCHOWN': 1, + 'HAVE_LIBB2': 0, + 'HAVE_LIBDB': 0, + 'HAVE_LIBDL': 1, + 'HAVE_LIBDLD': 0, + 'HAVE_LIBGDBM_COMPAT': 0, + 'HAVE_LIBIEEE': 0, + 'HAVE_LIBINTL_H': 1, + 'HAVE_LIBNDBM': 0, + 'HAVE_LIBREADLINE': 1, + 'HAVE_LIBRESOLV': 0, + 'HAVE_LIBSENDFILE': 0, + 'HAVE_LIBSQLITE3': 1, + 'HAVE_LIBUTIL_H': 0, + 'HAVE_LINK': 1, + 'HAVE_LINKAT': 1, + 'HAVE_LINUX_AUXVEC_H': 1, + 'HAVE_LINUX_CAN_BCM_H': 1, + 'HAVE_LINUX_CAN_H': 1, + 'HAVE_LINUX_CAN_J1939_H': 0, + 'HAVE_LINUX_CAN_RAW_FD_FRAMES': 1, + 'HAVE_LINUX_CAN_RAW_H': 1, + 'HAVE_LINUX_CAN_RAW_JOIN_FILTERS': 1, + 'HAVE_LINUX_LIMITS_H': 1, + 'HAVE_LINUX_MEMFD_H': 1, + 'HAVE_LINUX_NETLINK_H': 1, + 'HAVE_LINUX_QRTR_H': 1, + 'HAVE_LINUX_RANDOM_H': 1, + 'HAVE_LINUX_SOUNDCARD_H': 1, + 'HAVE_LINUX_TIPC_H': 1, + 'HAVE_LINUX_VM_SOCKETS_H': 1, + 'HAVE_LINUX_WAIT_H': 1, + 'HAVE_LISTEN': 1, + 'HAVE_LOCKF': 1, + 'HAVE_LOG1P': 1, + 'HAVE_LOG2': 1, + 'HAVE_LOGIN_TTY': 1, + 'HAVE_LONG_DOUBLE': 1, + 'HAVE_LSTAT': 1, + 'HAVE_LUTIMES': 1, + 'HAVE_LZMA_H': 0, + 'HAVE_MADVISE': 1, + 'HAVE_MAKEDEV': 1, + 'HAVE_MBRTOWC': 1, + 'HAVE_MEMFD_CREATE': 1, + 'HAVE_MEMORY_H': 1, + 'HAVE_MEMRCHR': 1, + 'HAVE_MKDIRAT': 1, + 'HAVE_MKFIFO': 1, + 'HAVE_MKFIFOAT': 1, + 'HAVE_MKNOD': 1, + 'HAVE_MKNODAT': 1, + 'HAVE_MKTIME': 1, + 'HAVE_MMAP': 1, + 'HAVE_MREMAP': 1, + 'HAVE_NANOSLEEP': 1, + 'HAVE_NCURSES_H': 1, + 'HAVE_NDBM_H': 0, + 'HAVE_NDIR_H': 0, + 'HAVE_NETCAN_CAN_H': 0, + 'HAVE_NETDB_H': 1, + 'HAVE_NETINET_IN_H': 1, + 'HAVE_NETPACKET_PACKET_H': 1, + 'HAVE_NET_IF_H': 1, + 'HAVE_NICE': 1, + 'HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION': 0, + 'HAVE_OPENAT': 1, + 'HAVE_OPENDIR': 1, + 'HAVE_OPENPTY': 1, + 'HAVE_PATHCONF': 1, + 'HAVE_PAUSE': 1, + 'HAVE_PIPE': 1, + 'HAVE_PIPE2': 1, + 'HAVE_PLOCK': 0, + 'HAVE_POLL': 1, + 'HAVE_POLL_H': 1, + 'HAVE_POSIX_FADVISE': 1, + 'HAVE_POSIX_FALLOCATE': 1, + 'HAVE_POSIX_SPAWN': 1, + 'HAVE_POSIX_SPAWNP': 1, + 'HAVE_PREAD': 1, + 'HAVE_PREADV': 1, + 'HAVE_PREADV2': 1, + 'HAVE_PRLIMIT': 1, + 'HAVE_PROCESS_H': 0, + 'HAVE_PROTOTYPES': 1, + 'HAVE_PTHREAD_CONDATTR_SETCLOCK': 1, + 'HAVE_PTHREAD_DESTRUCTOR': 0, + 'HAVE_PTHREAD_GETCPUCLOCKID': 1, + 'HAVE_PTHREAD_H': 1, + 'HAVE_PTHREAD_INIT': 0, + 'HAVE_PTHREAD_KILL': 1, + 'HAVE_PTHREAD_SIGMASK': 1, + 'HAVE_PTHREAD_STUBS': 0, + 'HAVE_PTY_H': 1, + 'HAVE_PWRITE': 1, + 'HAVE_PWRITEV': 1, + 'HAVE_PWRITEV2': 1, + 'HAVE_READLINK': 1, + 'HAVE_READLINKAT': 1, + 'HAVE_READV': 1, + 'HAVE_REALPATH': 1, + 'HAVE_RECVFROM': 1, + 'HAVE_RENAMEAT': 1, + 'HAVE_RL_APPEND_HISTORY': 1, + 'HAVE_RL_CATCH_SIGNAL': 1, + 'HAVE_RL_COMPDISP_FUNC_T': 1, + 'HAVE_RL_COMPLETION_APPEND_CHARACTER': 1, + 'HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK': 1, + 'HAVE_RL_COMPLETION_MATCHES': 1, + 'HAVE_RL_COMPLETION_SUPPRESS_APPEND': 1, + 'HAVE_RL_PRE_INPUT_HOOK': 1, + 'HAVE_RL_RESIZE_TERMINAL': 1, + 'HAVE_RPC_RPC_H': 0, + 'HAVE_RTPSPAWN': 0, + 'HAVE_SCHED_GET_PRIORITY_MAX': 1, + 'HAVE_SCHED_H': 1, + 'HAVE_SCHED_RR_GET_INTERVAL': 1, + 'HAVE_SCHED_SETAFFINITY': 1, + 'HAVE_SCHED_SETPARAM': 1, + 'HAVE_SCHED_SETSCHEDULER': 1, + 'HAVE_SEM_CLOCKWAIT': 0, + 'HAVE_SEM_GETVALUE': 1, + 'HAVE_SEM_OPEN': 1, + 'HAVE_SEM_TIMEDWAIT': 1, + 'HAVE_SEM_UNLINK': 1, + 'HAVE_SENDFILE': 1, + 'HAVE_SENDTO': 1, + 'HAVE_SETEGID': 1, + 'HAVE_SETEUID': 1, + 'HAVE_SETGID': 1, + 'HAVE_SETGROUPS': 1, + 'HAVE_SETHOSTNAME': 1, + 'HAVE_SETITIMER': 1, + 'HAVE_SETJMP_H': 1, + 'HAVE_SETLOCALE': 1, + 'HAVE_SETPGID': 1, + 'HAVE_SETPGRP': 1, + 'HAVE_SETPRIORITY': 1, + 'HAVE_SETREGID': 1, + 'HAVE_SETRESGID': 1, + 'HAVE_SETRESUID': 1, + 'HAVE_SETREUID': 1, + 'HAVE_SETSID': 1, + 'HAVE_SETSOCKOPT': 1, + 'HAVE_SETUID': 1, + 'HAVE_SETVBUF': 1, + 'HAVE_SHADOW_H': 1, + 'HAVE_SHM_OPEN': 1, + 'HAVE_SHM_UNLINK': 1, + 'HAVE_SHUTDOWN': 1, + 'HAVE_SIGACTION': 1, + 'HAVE_SIGALTSTACK': 1, + 'HAVE_SIGFILLSET': 1, + 'HAVE_SIGINFO_T_SI_BAND': 1, + 'HAVE_SIGINTERRUPT': 1, + 'HAVE_SIGNAL_H': 1, + 'HAVE_SIGPENDING': 1, + 'HAVE_SIGRELSE': 1, + 'HAVE_SIGTIMEDWAIT': 1, + 'HAVE_SIGWAIT': 1, + 'HAVE_SIGWAITINFO': 1, + 'HAVE_SNPRINTF': 1, + 'HAVE_SOCKADDR_ALG': 1, + 'HAVE_SOCKADDR_SA_LEN': 0, + 'HAVE_SOCKADDR_STORAGE': 1, + 'HAVE_SOCKET': 1, + 'HAVE_SOCKETPAIR': 1, + 'HAVE_SPAWN_H': 1, + 'HAVE_SPLICE': 1, + 'HAVE_SSIZE_T': 1, + 'HAVE_STATVFS': 1, + 'HAVE_STAT_TV_NSEC': 1, + 'HAVE_STAT_TV_NSEC2': 0, + 'HAVE_STDARG_PROTOTYPES': 1, + 'HAVE_STDINT_H': 1, + 'HAVE_STDLIB_H': 1, + 'HAVE_STD_ATOMIC': 1, + 'HAVE_STRFTIME': 1, + 'HAVE_STRINGS_H': 1, + 'HAVE_STRING_H': 1, + 'HAVE_STRLCPY': 0, + 'HAVE_STROPTS_H': 0, + 'HAVE_STRSIGNAL': 1, + 'HAVE_STRUCT_PASSWD_PW_GECOS': 1, + 'HAVE_STRUCT_PASSWD_PW_PASSWD': 1, + 'HAVE_STRUCT_STAT_ST_BIRTHTIME': 0, + 'HAVE_STRUCT_STAT_ST_BLKSIZE': 1, + 'HAVE_STRUCT_STAT_ST_BLOCKS': 1, + 'HAVE_STRUCT_STAT_ST_FLAGS': 0, + 'HAVE_STRUCT_STAT_ST_GEN': 0, + 'HAVE_STRUCT_STAT_ST_RDEV': 1, + 'HAVE_STRUCT_TM_TM_ZONE': 1, + 'HAVE_SYMLINK': 1, + 'HAVE_SYMLINKAT': 1, + 'HAVE_SYNC': 1, + 'HAVE_SYSCONF': 1, + 'HAVE_SYSEXITS_H': 1, + 'HAVE_SYSLOG_H': 1, + 'HAVE_SYSTEM': 1, + 'HAVE_SYS_AUDIOIO_H': 0, + 'HAVE_SYS_AUXV_H': 1, + 'HAVE_SYS_BSDTTY_H': 0, + 'HAVE_SYS_DEVPOLL_H': 0, + 'HAVE_SYS_DIR_H': 0, + 'HAVE_SYS_ENDIAN_H': 0, + 'HAVE_SYS_EPOLL_H': 1, + 'HAVE_SYS_EVENTFD_H': 1, + 'HAVE_SYS_EVENT_H': 0, + 'HAVE_SYS_FILE_H': 1, + 'HAVE_SYS_IOCTL_H': 1, + 'HAVE_SYS_KERN_CONTROL_H': 0, + 'HAVE_SYS_LOADAVG_H': 0, + 'HAVE_SYS_LOCK_H': 0, + 'HAVE_SYS_MEMFD_H': 0, + 'HAVE_SYS_MKDEV_H': 0, + 'HAVE_SYS_MMAN_H': 1, + 'HAVE_SYS_MODEM_H': 0, + 'HAVE_SYS_NDIR_H': 0, + 'HAVE_SYS_PARAM_H': 1, + 'HAVE_SYS_POLL_H': 1, + 'HAVE_SYS_RANDOM_H': 1, + 'HAVE_SYS_RESOURCE_H': 1, + 'HAVE_SYS_SELECT_H': 1, + 'HAVE_SYS_SENDFILE_H': 1, + 'HAVE_SYS_SOCKET_H': 1, + 'HAVE_SYS_SOUNDCARD_H': 1, + 'HAVE_SYS_STATVFS_H': 1, + 'HAVE_SYS_STAT_H': 1, + 'HAVE_SYS_SYSCALL_H': 1, + 'HAVE_SYS_SYSMACROS_H': 1, + 'HAVE_SYS_SYS_DOMAIN_H': 0, + 'HAVE_SYS_TERMIO_H': 0, + 'HAVE_SYS_TIMES_H': 1, + 'HAVE_SYS_TIME_H': 1, + 'HAVE_SYS_TYPES_H': 1, + 'HAVE_SYS_UIO_H': 1, + 'HAVE_SYS_UN_H': 1, + 'HAVE_SYS_UTSNAME_H': 1, + 'HAVE_SYS_WAIT_H': 1, + 'HAVE_SYS_XATTR_H': 1, + 'HAVE_TCGETPGRP': 1, + 'HAVE_TCSETPGRP': 1, + 'HAVE_TEMPNAM': 1, + 'HAVE_TERMIOS_H': 1, + 'HAVE_TERM_H': 1, + 'HAVE_TIMEGM': 1, + 'HAVE_TIMES': 1, + 'HAVE_TMPFILE': 1, + 'HAVE_TMPNAM': 1, + 'HAVE_TMPNAM_R': 1, + 'HAVE_TM_ZONE': 1, + 'HAVE_TRUNCATE': 1, + 'HAVE_TTYNAME': 1, + 'HAVE_TZNAME': 0, + 'HAVE_UMASK': 1, + 'HAVE_UNAME': 1, + 'HAVE_UNISTD_H': 1, + 'HAVE_UNLINKAT': 1, + 'HAVE_USABLE_WCHAR_T': 0, + 'HAVE_UTIL_H': 0, + 'HAVE_UTIMENSAT': 1, + 'HAVE_UTIMES': 1, + 'HAVE_UTIME_H': 1, + 'HAVE_UTMP_H': 1, + 'HAVE_UUID_CREATE': 0, + 'HAVE_UUID_ENC_BE': 0, + 'HAVE_UUID_GENERATE_TIME_SAFE': 1, + 'HAVE_UUID_H': 1, + 'HAVE_UUID_UUID_H': 0, + 'HAVE_VFORK': 1, + 'HAVE_WAIT': 1, + 'HAVE_WAIT3': 1, + 'HAVE_WAIT4': 1, + 'HAVE_WAITID': 1, + 'HAVE_WAITPID': 1, + 'HAVE_WCHAR_H': 1, + 'HAVE_WCSCOLL': 1, + 'HAVE_WCSFTIME': 1, + 'HAVE_WCSXFRM': 1, + 'HAVE_WMEMCMP': 1, + 'HAVE_WORKING_TZSET': 1, + 'HAVE_WRITEV': 1, + 'HAVE_ZLIB_COPY': 1, + 'HAVE_ZLIB_H': 0, + 'HAVE__GETPTY': 0, + 'HOSTRUNNER': '', + 'HOST_GNU_TYPE': 'x86_64-conda_cos6-linux-gnu', + 'INCLDIRSTOMAKE': '/usr/local/miniconda3/envs/phantom/include ' + '/usr/local/miniconda3/envs/phantom/include ' + '/usr/local/miniconda3/envs/phantom/include/python3.11 ' + '/usr/local/miniconda3/envs/phantom/include/python3.11', + 'INCLUDEDIR': '/usr/local/miniconda3/envs/phantom/include', + 'INCLUDEPY': '/usr/local/miniconda3/envs/phantom/include/python3.11', + 'INSTALL': '/usr/bin/install -c', + 'INSTALL_DATA': '/usr/bin/install -c -m 644', + 'INSTALL_PROGRAM': '/usr/bin/install -c', + 'INSTALL_SCRIPT': '/usr/bin/install -c', + 'INSTALL_SHARED': '/usr/bin/install -c -m 755', + 'INSTSONAME': 'libpython3.11.a', + 'IO_H': 'Modules/_io/_iomodule.h', + 'IO_OBJS': '\\', + 'LDCXXSHARED': 'x86_64-conda_cos6-linux-gnu-c++ -pthread -shared', + 'LDFLAGS': '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now ' + '-Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now ' + '-Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib', + 'LDLIBRARY': 'libpython3.11.a', + 'LDLIBRARYDIR': '', + 'LDSHARED': 'x86_64-conda_cos6-linux-gnu-gcc -pthread -shared -Wl,-O2 ' + '-Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now ' + '-Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro ' + '-Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib', + 'LDVERSION': '3.11', + 'LIBC': '', + 'LIBDEST': '/usr/local/miniconda3/envs/phantom/lib/python3.11', + 'LIBDIR': '/usr/local/miniconda3/envs/phantom/lib', + 'LIBEXPAT_A': 'Modules/expat/libexpat.a', + 'LIBEXPAT_CFLAGS': '-DNDEBUG -fwrapv -O2 -Wall -march=nocona -mtune=haswell ' + '-ftree-vectorize -fPIC -fstack-protector-strong -fno-plt ' + '-O2 -ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ' + ' -march=nocona -mtune=haswell ' + '-ftree-vectorize -fPIC -fstack-protector-strong -fno-plt ' + '-O2 -ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ' + ' -fno-semantic-interposition ' + ' ' + ' -g -std=c11 ' + '-Werror=implicit-function-declaration -fvisibility=hidden ' + ' ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include/internal ' + '-IObjects -IInclude -IPython -I. ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-fPIC', + 'LIBEXPAT_HEADERS': '\\', + 'LIBEXPAT_OBJS': '\\', + 'LIBFFI_INCLUDEDIR': '/usr/local/miniconda3/envs/phantom/include', + 'LIBM': '-lm', + 'LIBMPDEC_A': 'Modules/_decimal/libmpdec/libmpdec.a', + 'LIBMPDEC_CFLAGS': '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_decimal/libmpdec ' + '-DCONFIG_64=1 -DANSI=1 -DHAVE_UINT128_T=1 -DNDEBUG ' + '-fwrapv -O2 -Wall -march=nocona -mtune=haswell ' + '-ftree-vectorize -fPIC -fstack-protector-strong -fno-plt ' + '-O2 -ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ' + ' -march=nocona -mtune=haswell ' + '-ftree-vectorize -fPIC -fstack-protector-strong -fno-plt ' + '-O2 -ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ' + ' -fno-semantic-interposition ' + ' ' + ' -g -std=c11 ' + '-Werror=implicit-function-declaration -fvisibility=hidden ' + ' ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include/internal ' + '-IObjects -IInclude -IPython -I. ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-fPIC', + 'LIBMPDEC_HEADERS': '\\', + 'LIBMPDEC_OBJS': '\\', + 'LIBOBJDIR': 'Python/', + 'LIBOBJS': '', + 'LIBPC': '/usr/local/miniconda3/envs/phantom/lib/pkgconfig', + 'LIBPL': '/usr/local/miniconda3/envs/phantom/lib/python3.11/config-3.11-x86_64-linux-gnu', + 'LIBPYTHON': '', + 'LIBRARY': 'libpython3.11.a', + 'LIBRARY_DEPS': 'libpython3.11.a', + 'LIBRARY_OBJS': '\\', + 'LIBRARY_OBJS_OMIT_FROZEN': '\\', + 'LIBS': '-lpthread -ldl -lutil', + 'LIBSUBDIRS': 'asyncio \\', + 'LINKCC': 'x86_64-conda_cos6-linux-gnu-gcc -pthread', + 'LINKFORSHARED': '-Xlinker -export-dynamic', + 'LINK_PYTHON_DEPS': 'libpython3.11.a', + 'LINK_PYTHON_OBJS': '\\', + 'LIPO_32BIT_FLAGS': '', + 'LIPO_INTEL64_FLAGS': '', + 'LLVM_PROF_ERR': 'no', + 'LLVM_PROF_FILE': '', + 'LLVM_PROF_MERGER': 'true', + 'LN': 'ln', + 'LOCALMODLIBS': '', + 'MACHDEP': 'linux', + 'MACHDEP_OBJS': '', + 'MACHDESTLIB': '/usr/local/miniconda3/envs/phantom/lib/python3.11', + 'MACOSX_DEPLOYMENT_TARGET': '', + 'MAINCC': 'x86_64-conda_cos6-linux-gnu-gcc -pthread', + 'MAJOR_IN_MKDEV': 0, + 'MAJOR_IN_SYSMACROS': 1, + 'MAKESETUP': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/makesetup', + 'MANDIR': '/usr/local/miniconda3/envs/phantom/share/man', + 'MKDIR_P': '/usr/bin/mkdir -p', + 'MODBUILT_NAMES': 'atexit faulthandler posix _signal _tracemalloc ' + '_codecs _collections errno _io itertools _sre ' + '_thread time _weakref _abc _functools _locale ' + '_operator _stat _symtable pwd xxsubtype', + 'MODDISABLED_NAMES': '', + 'MODLIBS': '', + 'MODOBJS': 'Modules/atexitmodule.o Modules/faulthandler.o ' + 'Modules/posixmodule.o Modules/signalmodule.o ' + 'Modules/_tracemalloc.o Modules/_codecsmodule.o ' + 'Modules/_collectionsmodule.o Modules/errnomodule.o ' + 'Modules/_io/_iomodule.o Modules/_io/iobase.o Modules/_io/fileio.o ' + 'Modules/_io/bytesio.o Modules/_io/bufferedio.o ' + 'Modules/_io/textio.o Modules/_io/stringio.o ' + 'Modules/itertoolsmodule.o Modules/_sre/sre.o ' + 'Modules/_threadmodule.o Modules/timemodule.o ' + 'Modules/_weakref.o Modules/_abc.o Modules/_functoolsmodule.o ' + 'Modules/_localemodule.o Modules/_operator.o Modules/_stat.o ' + 'Modules/symtablemodule.o Modules/pwdmodule.o ' + 'Modules/xxsubtype.o', + 'MODSHARED_NAMES': '', + 'MODULE_ARRAY_STATE': 'yes', + 'MODULE_ATEXIT_LDFLAGS': '', + 'MODULE_AUDIOOP_LDFLAGS': '-lm', + 'MODULE_AUDIOOP_STATE': 'yes', + 'MODULE_BINASCII_CFLAGS': '-DUSE_ZLIB_CRC32 ' + '-I/usr/local/miniconda3/envs/phantom/include', + 'MODULE_BINASCII_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-lz', + 'MODULE_BINASCII_STATE': 'yes', + 'MODULE_CMATH_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_math.h', + 'MODULE_CMATH_LDFLAGS': '-lm', + 'MODULE_CMATH_STATE': 'yes', + 'MODULE_ERRNO_LDFLAGS': '', + 'MODULE_FAULTHANDLER_LDFLAGS': '', + 'MODULE_FCNTL_LDFLAGS': '', + 'MODULE_FCNTL_STATE': 'yes', + 'MODULE_GRP_STATE': 'yes', + 'MODULE_ITERTOOLS_LDFLAGS': '', + 'MODULE_MATH_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_math.h', + 'MODULE_MATH_LDFLAGS': '-lm', + 'MODULE_MATH_STATE': 'yes', + 'MODULE_MMAP_STATE': 'yes', + 'MODULE_NIS_STATE': 'missing', + 'MODULE_OBJS': '\\', + 'MODULE_OSSAUDIODEV_LDFLAGS': '', + 'MODULE_OSSAUDIODEV_STATE': 'yes', + 'MODULE_POSIX_LDFLAGS': '', + 'MODULE_PWD_LDFLAGS': '', + 'MODULE_PWD_STATE': 'yes', + 'MODULE_PYEXPAT_CFLAGS': '', + 'MODULE_PYEXPAT_DEPS': '', + 'MODULE_PYEXPAT_LDFLAGS': '-lexpat', + 'MODULE_PYEXPAT_STATE': 'yes', + 'MODULE_RESOURCE_STATE': 'yes', + 'MODULE_SELECT_STATE': 'yes', + 'MODULE_SPWD_STATE': 'yes', + 'MODULE_SYSLOG_STATE': 'yes', + 'MODULE_TERMIOS_STATE': 'yes', + 'MODULE_TIME_LDFLAGS': '', + 'MODULE_TIME_STATE': 'yes', + 'MODULE_UNICODEDATA_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/unicodedata_db.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/unicodename_db.h', + 'MODULE_UNICODEDATA_STATE': 'yes', + 'MODULE_XXLIMITED_35_STATE': 'yes', + 'MODULE_XXLIMITED_STATE': 'yes', + 'MODULE_XXSUBTYPE_LDFLAGS': '', + 'MODULE_ZLIB_CFLAGS': '-I/usr/local/miniconda3/envs/phantom/include', + 'MODULE_ZLIB_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-lz', + 'MODULE_ZLIB_STATE': 'yes', + 'MODULE__ABC_LDFLAGS': '', + 'MODULE__ASYNCIO_STATE': 'yes', + 'MODULE__BISECT_STATE': 'yes', + 'MODULE__BLAKE2_CFLAGS': '', + 'MODULE__BLAKE2_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2-config.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2-impl.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2b-load-sse2.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2b-load-sse41.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2b-ref.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2b-round.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2b.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2s-load-sse2.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2s-load-sse41.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2s-load-xop.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2s-ref.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2s-round.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2s.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/blake2module.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/hashlib.h', + 'MODULE__BLAKE2_LDFLAGS': '', + 'MODULE__BLAKE2_STATE': 'yes', + 'MODULE__BZ2_CFLAGS': '', + 'MODULE__BZ2_LDFLAGS': '-lbz2', + 'MODULE__BZ2_STATE': 'yes', + 'MODULE__CODECS_CN_STATE': 'yes', + 'MODULE__CODECS_HK_STATE': 'yes', + 'MODULE__CODECS_ISO2022_STATE': 'yes', + 'MODULE__CODECS_JP_STATE': 'yes', + 'MODULE__CODECS_KR_STATE': 'yes', + 'MODULE__CODECS_LDFLAGS': '', + 'MODULE__CODECS_TW_STATE': 'yes', + 'MODULE__COLLECTIONS_LDFLAGS': '', + 'MODULE__CONTEXTVARS_STATE': 'yes', + 'MODULE__CRYPT_CFLAGS': '', + 'MODULE__CRYPT_LDFLAGS': '', + 'MODULE__CRYPT_STATE': 'yes', + 'MODULE__CSV_STATE': 'yes', + 'MODULE__CTYPES_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ctypes/ctypes.h', + 'MODULE__CTYPES_TEST_LDFLAGS': '-lm', + 'MODULE__CTYPES_TEST_STATE': 'yes', + 'MODULE__DATETIME_LDFLAGS': '-lm', + 'MODULE__DATETIME_STATE': 'yes', + 'MODULE__DECIMAL_CFLAGS': '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_decimal/libmpdec ' + '-DCONFIG_64=1 -DANSI=1 -DHAVE_UINT128_T=1', + 'MODULE__DECIMAL_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_decimal/docstrings.h ' + '\\ Modules/_decimal/libmpdec/libmpdec.a', + 'MODULE__DECIMAL_LDFLAGS': '-lm Modules/_decimal/libmpdec/libmpdec.a', + 'MODULE__DECIMAL_STATE': 'yes', + 'MODULE__ELEMENTTREE_CFLAGS': '', + 'MODULE__ELEMENTTREE_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/pyexpat.c', + 'MODULE__ELEMENTTREE_STATE': 'yes', + 'MODULE__FUNCTOOLS_LDFLAGS': '', + 'MODULE__GDBM_STATE': 'missing', + 'MODULE__HASHLIB_CFLAGS': '-I/usr/local/miniconda3/envs/phantom/include', + 'MODULE__HASHLIB_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/hashlib.h', + 'MODULE__HASHLIB_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-lcrypto', + 'MODULE__HASHLIB_STATE': 'yes', + 'MODULE__HEAPQ_STATE': 'yes', + 'MODULE__IO_CFLAGS': '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_io', + 'MODULE__IO_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_io/_iomodule.h', + 'MODULE__IO_LDFLAGS': '', + 'MODULE__IO_STATE': 'yes', + 'MODULE__JSON_STATE': 'yes', + 'MODULE__LOCALE_LDFLAGS': '', + 'MODULE__LSPROF_STATE': 'yes', + 'MODULE__LZMA_CFLAGS': '-I/usr/local/miniconda3/envs/phantom/include', + 'MODULE__LZMA_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-llzma', + 'MODULE__LZMA_STATE': 'yes', + 'MODULE__MD5_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/hashlib.h', + 'MODULE__MD5_STATE': 'yes', + 'MODULE__MULTIBYTECODEC_STATE': 'yes', + 'MODULE__MULTIPROCESSING_CFLAGS': '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_multiprocessing', + 'MODULE__MULTIPROCESSING_STATE': 'yes', + 'MODULE__OPCODE_STATE': 'yes', + 'MODULE__OPERATOR_LDFLAGS': '', + 'MODULE__PICKLE_STATE': 'yes', + 'MODULE__POSIXSHMEM_CFLAGS': '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_multiprocessing', + 'MODULE__POSIXSHMEM_LDFLAGS': '-lrt', + 'MODULE__POSIXSHMEM_STATE': 'yes', + 'MODULE__POSIXSUBPROCESS_STATE': 'yes', + 'MODULE__QUEUE_STATE': 'yes', + 'MODULE__RANDOM_STATE': 'yes', + 'MODULE__SCPROXY_STATE': 'n/a', + 'MODULE__SHA1_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/hashlib.h', + 'MODULE__SHA1_STATE': 'yes', + 'MODULE__SHA256_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/hashlib.h', + 'MODULE__SHA256_STATE': 'yes', + 'MODULE__SHA3_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sha3/sha3.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sha3/sha3.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/hashlib.h', + 'MODULE__SHA3_STATE': 'yes', + 'MODULE__SHA512_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/hashlib.h', + 'MODULE__SHA512_STATE': 'yes', + 'MODULE__SIGNAL_LDFLAGS': '', + 'MODULE__SOCKET_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/socketmodule.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/addrinfo.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/getaddrinfo.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/getnameinfo.c', + 'MODULE__SOCKET_STATE': 'yes', + 'MODULE__SQLITE3_CFLAGS': '-I/usr/local/miniconda3/envs/phantom/include ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite', + 'MODULE__SQLITE3_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite/connection.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite/cursor.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite/microprotocols.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite/module.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite/prepare_protocol.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite/row.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite/util.h', + 'MODULE__SQLITE3_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-lsqlite3', + 'MODULE__SQLITE3_STATE': 'yes', + 'MODULE__SRE_LDFLAGS': '', + 'MODULE__SSL_CFLAGS': '-I/usr/local/miniconda3/envs/phantom/include', + 'MODULE__SSL_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ssl.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ssl/cert.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ssl/debughelpers.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ssl/misc.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ssl_data.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ssl_data_111.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ssl_data_300.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/socketmodule.h', + 'MODULE__SSL_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-lssl -lcrypto', + 'MODULE__SSL_STATE': 'yes', + 'MODULE__STATISTICS_LDFLAGS': '-lm', + 'MODULE__STATISTICS_STATE': 'yes', + 'MODULE__STAT_LDFLAGS': '', + 'MODULE__STRUCT_STATE': 'yes', + 'MODULE__SYMTABLE_LDFLAGS': '', + 'MODULE__TESTBUFFER_STATE': 'yes', + 'MODULE__TESTCAPI_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/testcapi_long.h', + 'MODULE__TESTCAPI_STATE': 'yes', + 'MODULE__TESTCLINIC_STATE': 'yes', + 'MODULE__TESTIMPORTMULTIPLE_STATE': 'yes', + 'MODULE__TESTINTERNALCAPI_STATE': 'yes', + 'MODULE__TESTMULTIPHASE_STATE': 'yes', + 'MODULE__THREAD_LDFLAGS': '', + 'MODULE__TKINTER_CFLAGS': '-I/usr/local/miniconda3/envs/phantom/include ' + '-Wno-strict-prototypes -DWITH_APPINIT=1', + 'MODULE__TKINTER_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-ltk8.6 -ltkstub8.6 -ltcl8.6 -ltclstub8.6', + 'MODULE__TKINTER_STATE': 'yes', + 'MODULE__TRACEMALLOC_LDFLAGS': '', + 'MODULE__TYPING_STATE': 'yes', + 'MODULE__UUID_CFLAGS': '-I/usr/local/miniconda3/envs/phantom/include/uuid', + 'MODULE__UUID_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-luuid', + 'MODULE__UUID_STATE': 'yes', + 'MODULE__WEAKREF_LDFLAGS': '', + 'MODULE__XXSUBINTERPRETERS_STATE': 'yes', + 'MODULE__XXTESTFUZZ_STATE': 'yes', + 'MODULE__ZONEINFO_STATE': 'yes', + 'MULTIARCH': 'x86_64-linux-gnu', + 'MULTIARCH_CPPFLAGS': '-DMULTIARCH=\\"x86_64-linux-gnu\\"', + 'MVWDELCH_IS_EXPRESSION': 1, + 'NO_AS_NEEDED': '-Wl,--no-as-needed', + 'OBJECT_OBJS': '\\', + 'OPENSSL_INCLUDES': '-I/usr/local/miniconda3/envs/phantom/include', + 'OPENSSL_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib', + 'OPENSSL_LIBS': '-lssl -lcrypto', + 'OPENSSL_RPATH': '', + 'OPT': '-DNDEBUG -fwrapv -O2 -Wall', + 'OTHER_LIBTOOL_OPT': '', + 'PACKAGE_BUGREPORT': 0, + 'PACKAGE_NAME': 0, + 'PACKAGE_STRING': 0, + 'PACKAGE_TARNAME': 0, + 'PACKAGE_URL': 0, + 'PACKAGE_VERSION': 0, + 'PARSER_HEADERS': '\\', + 'PARSER_OBJS': '\\ \\ Parser/myreadline.o Parser/tokenizer.o', + 'PEGEN_HEADERS': '\\', + 'PEGEN_OBJS': '\\', + 'PGO_PROF_GEN_FLAG': '-fprofile-generate', + 'PGO_PROF_USE_FLAG': ' ', + 'PLATLIBDIR': 'lib', + 'POBJS': '\\', + 'POSIX_SEMAPHORES_NOT_ENABLED': 0, + 'PROFILE_TASK': '-m test --pgo', + 'PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT': 1, + 'PTHREAD_SYSTEM_SCHED_SUPPORTED': 1, + 'PURIFY': '', + 'PY3LIBRARY': '', + 'PYLONG_BITS_IN_DIGIT': 0, + 'PYTHON': 'python', + 'PYTHONFRAMEWORK': '', + 'PYTHONFRAMEWORKDIR': 'no-framework', + 'PYTHONFRAMEWORKINSTALLDIR': '', + 'PYTHONFRAMEWORKPREFIX': '', + 'PYTHONPATH': '', + 'PYTHON_FOR_BUILD': './python -E', + 'PYTHON_FOR_BUILD_DEPS': 'python', + 'PYTHON_FOR_FREEZE': './_bootstrap_python', + 'PYTHON_FOR_REGEN': '', + 'PYTHON_HEADERS': '\\', + 'PYTHON_OBJS': '\\', + 'PY_BUILTIN_HASHLIB_HASHES': '"md5,sha1,sha256,sha512,sha3,blake2"', + 'PY_BUILTIN_MODULE_CFLAGS': '-DNDEBUG -fwrapv -O2 -Wall -march=nocona ' + '-mtune=haswell -ftree-vectorize -fPIC ' + '-fstack-protector-strong -fno-plt -O2 ' + '-ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ' + ' -march=nocona ' + '-mtune=haswell -ftree-vectorize -fPIC ' + '-fstack-protector-strong -fno-plt -O2 ' + '-ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ' + ' ' + '-fno-semantic-interposition ' + ' ' + ' -g -std=c11 ' + '-Werror=implicit-function-declaration ' + '-fvisibility=hidden ' + ' ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include/internal ' + '-IObjects -IInclude -IPython -I. ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DPy_BUILD_CORE_BUILTIN', + 'PY_CFLAGS': '-DNDEBUG -fwrapv -O2 -Wall -march=nocona -mtune=haswell ' + '-ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 ' + '-ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ' + ' -march=nocona -mtune=haswell -ftree-vectorize -fPIC ' + '-fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe ' + '-isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ' + '', + 'PY_CFLAGS_NODIST': '-fno-semantic-interposition ' + ' -g -std=c11 ' + '-Werror=implicit-function-declaration ' + '-fvisibility=hidden ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include/internal', + 'PY_COERCE_C_LOCALE': 1, + 'PY_CORE_CFLAGS': '-DNDEBUG -fwrapv -O2 -Wall -march=nocona -mtune=haswell ' + '-ftree-vectorize -fPIC -fstack-protector-strong -fno-plt ' + '-O2 -ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ' + ' -march=nocona -mtune=haswell -ftree-vectorize -fPIC ' + '-fstack-protector-strong -fno-plt -O2 -ffunction-sections ' + '-pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ' + ' -fno-semantic-interposition ' + ' ' + '-g -std=c11 -Werror=implicit-function-declaration ' + '-fvisibility=hidden ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include/internal ' + '-IObjects -IInclude -IPython -I. ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DPy_BUILD_CORE', + 'PY_CORE_LDFLAGS': '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro ' + '-Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro ' + '-Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '-fno-semantic-interposition ' + ' -g', + 'PY_CPPFLAGS': '-IObjects -IInclude -IPython -I. ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include', + 'PY_ENABLE_SHARED': 0, + 'PY_FORMAT_SIZE_T': '"z"', + 'PY_LDFLAGS': '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro ' + '-Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro ' + '-Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib', + 'PY_LDFLAGS_NODIST': '-fno-semantic-interposition ' + ' -g', + 'PY_LDFLAGS_NOLTO': '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro ' + '-Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro ' + '-Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '-fno-lto', + 'PY_SQLITE_ENABLE_LOAD_EXTENSION': 1, + 'PY_SQLITE_HAVE_SERIALIZE': 1, + 'PY_SSL_DEFAULT_CIPHERS': 1, + 'PY_SSL_DEFAULT_CIPHER_STRING': 0, + 'PY_STDMODULE_CFLAGS': '-DNDEBUG -fwrapv -O2 -Wall -march=nocona ' + '-mtune=haswell -ftree-vectorize -fPIC ' + '-fstack-protector-strong -fno-plt -O2 ' + '-ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ' + ' -march=nocona ' + '-mtune=haswell -ftree-vectorize -fPIC ' + '-fstack-protector-strong -fno-plt -O2 ' + '-ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ' + ' ' + '-fno-semantic-interposition ' + ' -g -std=c11 ' + '-Werror=implicit-function-declaration ' + '-fvisibility=hidden ' + ' ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include/internal ' + '-IObjects -IInclude -IPython -I. ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include', + 'PY_SUPPORT_TIER': 1, + 'Py_DEBUG': 0, + 'Py_ENABLE_SHARED': 0, + 'Py_HASH_ALGORITHM': 0, + 'Py_STATS': 0, + 'Py_SUNOS_VERSION': 0, + 'Py_TRACE_REFS': 0, + 'QUICKTESTOPTS': '-x test_subprocess test_io test_lib2to3 \\', + 'READELF': 'x86_64-conda_cos6-linux-gnu-readelf', + 'RESSRCDIR': 'Mac/Resources/framework', + 'RETSIGTYPE': 'void', + 'RUNSHARED': '', + 'SCRIPTDIR': '/usr/local/miniconda3/envs/phantom/lib', + 'SETPGRP_HAVE_ARG': 0, + 'SHELL': '/bin/sh', + 'SHLIBS': '-lpthread -ldl -lutil', + 'SHLIB_SUFFIX': '.so', + 'SIGNED_RIGHT_SHIFT_ZERO_FILLS': 0, + 'SITEPATH': '', + 'SIZEOF_DOUBLE': 8, + 'SIZEOF_FLOAT': 4, + 'SIZEOF_FPOS_T': 16, + 'SIZEOF_INT': 4, + 'SIZEOF_LONG': 8, + 'SIZEOF_LONG_DOUBLE': 16, + 'SIZEOF_LONG_LONG': 8, + 'SIZEOF_OFF_T': 8, + 'SIZEOF_PID_T': 4, + 'SIZEOF_PTHREAD_KEY_T': 4, + 'SIZEOF_PTHREAD_T': 8, + 'SIZEOF_SHORT': 2, + 'SIZEOF_SIZE_T': 8, + 'SIZEOF_TIME_T': 8, + 'SIZEOF_UINTPTR_T': 8, + 'SIZEOF_VOID_P': 8, + 'SIZEOF_WCHAR_T': 4, + 'SIZEOF__BOOL': 1, + 'SOABI': 'cpython-311-x86_64-linux-gnu', + 'SRCDIRS': 'Modules Modules/_blake2 Modules/_ctypes Modules/_decimal ' + 'Modules/_decimal/libmpdec Modules/_io ' + 'Modules/_multiprocessing Modules/_sha3 Modules/_sqlite ' + 'Modules/_sre Modules/_xxtestfuzz Modules/cjkcodecs ' + 'Modules/expat Objects Parser Programs Python ' + 'Python/frozen_modules Python/deepfreeze', + 'SRC_GDB_HOOKS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Tools/gdb/libpython.py', + 'STATIC_LIBPYTHON': 1, + 'STDC_HEADERS': 1, + 'STRICT_SYSV_CURSES': "/* Don't use ncurses extensions */", + 'STRIPFLAG': '-s', + 'SUBDIRS': '', + 'SUBDIRSTOO': 'Include Lib Misc', + 'SYSLIBS': '-lm', + 'SYS_SELECT_WITH_SYS_TIME': 1, + 'TESTOPTS': '', + 'TESTPATH': '', + 'TESTPYTHON': './python -E', + 'TESTPYTHONOPTS': '', + 'TESTRUNNER': './python -E ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Tools/scripts/run_tests.py', + 'TESTSUBDIRS': 'ctypes/test \\', + 'TESTTIMEOUT': 1200, + 'TEST_MODULES': 'yes', + 'THREAD_STACK_SIZE': 0, + 'TIMEMODULE_LIB': 0, + 'TIME_WITH_SYS_TIME': 1, + 'TM_IN_SYS_TIME': 0, + 'TZPATH': '/usr/local/miniconda3/envs/phantom/share/zoneinfo:/usr/local/miniconda3/envs/phantom/share/tzinfo', + 'UNICODE_DEPS': '\\', + 'UNIVERSALSDK': '', + 'UPDATE_FILE': '/home/task_177324838993876/croot/python-split_1773249007352/work/Tools/scripts/update_file.py', + 'USE_COMPUTED_GOTOS': 1, + 'VERSION': '3.11', + 'VPATH': '/home/task_177324838993876/croot/python-split_1773249007352/work', + 'WASM_ASSETS_DIR': './usr/local/miniconda3/envs/phantom', + 'WASM_STDLIB': './usr/local/miniconda3/envs/phantom/lib/python3.11/os.py', + 'WHEEL_PKG_DIR': '', + 'WINDOW_HAS_FLAGS': 0, + 'WITH_DECIMAL_CONTEXTVAR': 1, + 'WITH_DOC_STRINGS': 1, + 'WITH_DTRACE': 0, + 'WITH_DYLD': 0, + 'WITH_EDITLINE': 0, + 'WITH_FREELISTS': 1, + 'WITH_LIBINTL': 0, + 'WITH_NEXT_FRAMEWORK': 0, + 'WITH_PYMALLOC': 1, + 'WITH_VALGRIND': 0, + 'X87_DOUBLE_ROUNDING': 0, + 'XMLLIBSUBDIRS': 'xml xml/dom xml/etree xml/parsers xml/sax', + 'abs_builddir': '/home/task_177324838993876/croot/python-split_1773249007352/work/build-static', + 'abs_srcdir': '/home/task_177324838993876/croot/python-split_1773249007352/work', + 'datarootdir': '/usr/local/miniconda3/envs/phantom/share', + 'exec_prefix': '/usr/local/miniconda3/envs/phantom', + 'prefix': '/usr/local/miniconda3/envs/phantom', + 'srcdir': '/home/task_177324838993876/croot/python-split_1773249007352/work'} diff --git a/lib/python3.11/_sysconfigdata_x86_64_conda_linux_gnu.py b/lib/python3.11/_sysconfigdata_x86_64_conda_linux_gnu.py new file mode 100644 index 0000000000000000000000000000000000000000..febeca27665d46fba496f22266b6b16902a4c4b2 --- /dev/null +++ b/lib/python3.11/_sysconfigdata_x86_64_conda_linux_gnu.py @@ -0,0 +1,1339 @@ +# system configuration generated and used by the sysconfig module +build_time_vars = {'ABIFLAGS': '', + 'AC_APPLE_UNIVERSAL_BUILD': 0, + 'AIX_BUILDDATE': 0, + 'AIX_GENUINE_CPLUSPLUS': 0, + 'ALIGNOF_LONG': 8, + 'ALIGNOF_SIZE_T': 8, + 'ALT_SOABI': 0, + 'ANDROID_API_LEVEL': 0, + 'AR': 'x86_64-conda-linux-gnu-ar', + 'ARFLAGS': 'rcs', + 'BASECFLAGS': '', + 'BASECPPFLAGS': '-IObjects -IInclude -IPython', + 'BASEMODLIBS': '', + 'BINDIR': '/usr/local/miniconda3/envs/phantom/bin', + 'BINLIBDEST': '/usr/local/miniconda3/envs/phantom/lib/python3.11', + 'BLDLIBRARY': 'libpython3.11.a', + 'BLDSHARED': 'x86_64-conda-linux-gnu-gcc -pthread -shared -Wl,-O2 ' + '-Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now ' + '-Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro ' + '-Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib', + 'BOOTSTRAP_HEADERS': '\\', + 'BUILDEXE': '', + 'BUILDPYTHON': 'python', + 'BUILD_GNU_TYPE': 'x86_64-conda-linux-gnu', + 'BYTESTR_DEPS': '\\', + 'CC': 'x86_64-conda-linux-gnu-gcc -pthread', + 'CCSHARED': '-fPIC', + 'CFLAGS': '-DNDEBUG -fwrapv -O2 -Wall -march=nocona -mtune=haswell ' + '-ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 ' + '-ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ' + '-march=nocona -mtune=haswell -ftree-vectorize -fPIC ' + '-fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe ' + '-isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ', + 'CFLAGSFORSHARED': '', + 'CFLAGS_ALIASING': '', + 'CONFIGFILES': 'configure configure.ac acconfig.h pyconfig.h.in ' + 'Makefile.pre.in', + 'CONFIGURE_CFLAGS': '-march=nocona -mtune=haswell -ftree-vectorize -fPIC ' + '-fstack-protector-strong -fno-plt -O2 ' + '-ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ' + ' ', + 'CONFIGURE_CFLAGS_NODIST': '-fno-semantic-interposition ' + ' ' + ' -g -std=c11 ' + '-Werror=implicit-function-declaration ' + '-fvisibility=hidden', + 'CONFIGURE_CPPFLAGS': '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include', + 'CONFIGURE_LDFLAGS': '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro ' + '-Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib', + 'CONFIGURE_LDFLAGS_NODIST': '-fno-semantic-interposition ' + ' ' + ' -g', + 'CONFIGURE_LDFLAGS_NOLTO': '-fno-lto', + 'CONFIG_ARGS': "'--prefix=/usr/local/miniconda3/envs/phantom' " + "'--build=x86_64-conda-linux-gnu' " + "'--host=x86_64-conda-linux-gnu' '--enable-ipv6' " + "'--with-ensurepip=no' " + "'--with-tzpath=/usr/local/miniconda3/envs/phantom/share/zoneinfo:/usr/local/miniconda3/envs/phantom/share/tzinfo' " + "'--with-computed-gotos' '--with-system-ffi' " + "'--with-system-expat' '--enable-loadable-sqlite-extensions' " + "'--with-tcltk-includes=-I/usr/local/miniconda3/envs/phantom/include' " + "'--with-tcltk-libs=-L/usr/local/miniconda3/envs/phantom/lib " + "-ltcl8.6 -ltk8.6' '--with-platlibdir=lib' '--with-lto' " + "'--enable-optimizations' " + "'-oldincludedir=/home/task_177324838993876/croot/python-split_1773249007352/_build_env/x86_64-conda-linux-gnu/sysroot/usr/include' " + "'--disable-shared' 'PROFILE_TASK=-m test --pgo' " + "'build_alias=x86_64-conda-linux-gnu' " + "'host_alias=x86_64-conda-linux-gnu' " + "'PKG_CONFIG_PATH=/usr/local/miniconda3/envs/phantom/lib/pkgconfig' " + "'MACHDEP=linux' 'CC=x86_64-conda-linux-gnu-gcc' " + "'CFLAGS=-march=nocona -mtune=haswell -ftree-vectorize -fPIC " + '-fstack-protector-strong -fno-plt -O2 -ffunction-sections ' + '-pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ' + "' 'LDFLAGS=-Wl,-O2 -Wl,--sort-common -Wl,--as-needed " + '-Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags ' + '-Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + "-L/usr/local/miniconda3/envs/phantom/lib' " + "'CPPFLAGS=-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem " + '/usr/local/miniconda3/envs/phantom/include ' + "-I/usr/local/miniconda3/envs/phantom/include' " + "'CPP=/home/task_177324838993876/croot/python-split_1773249007352/_build_env/bin/x86_64-conda-linux-gnu-cpp'", + 'CONFINCLUDEDIR': '/usr/local/miniconda3/envs/phantom/include', + 'CONFINCLUDEPY': '/usr/local/miniconda3/envs/phantom/include/python3.11', + 'COREPYTHONPATH': '', + 'COVERAGE_INFO': '/home/task_177324838993876/croot/python-split_1773249007352/work/build-static/coverage.info', + 'COVERAGE_LCOV_OPTIONS': '--rc lcov_branch_coverage=1', + 'COVERAGE_REPORT': '/home/task_177324838993876/croot/python-split_1773249007352/work/build-static/lcov-report', + 'COVERAGE_REPORT_OPTIONS': '--rc lcov_branch_coverage=1 --branch-coverage ' + '--title "CPython 3.11 LCOV report [commit $(shell ' + ')]"', + 'CPPFLAGS': '-IObjects -IInclude -IPython -I. ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include', + 'CXX': 'x86_64-conda-linux-gnu-c++ -pthread', + 'DECIMAL_CFLAGS': '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_decimal/libmpdec ' + '-DCONFIG_64=1 -DANSI=1 -DHAVE_UINT128_T=1', + 'DECIMAL_LDFLAGS': '-lm Modules/_decimal/libmpdec/libmpdec.a', + 'DEEPFREEZE_C': 'Python/deepfreeze/deepfreeze.c', + 'DEEPFREEZE_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Tools/scripts/deepfreeze.py ' + '_bootstrap_python ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Programs/_freeze_module.py ' + '\\', + 'DEEPFREEZE_OBJS': 'Python/deepfreeze/deepfreeze.o', + 'DESTDIRS': '/usr/local/miniconda3/envs/phantom ' + '/usr/local/miniconda3/envs/phantom/lib ' + '/usr/local/miniconda3/envs/phantom/lib/python3.11 ' + '/usr/local/miniconda3/envs/phantom/lib/python3.11/lib-dynload', + 'DESTLIB': '/usr/local/miniconda3/envs/phantom/lib/python3.11', + 'DESTPATH': '', + 'DESTSHARED': '/usr/local/miniconda3/envs/phantom/lib/python3.11/lib-dynload', + 'DFLAGS': '', + 'DIRMODE': 755, + 'DIST': 'README.rst ChangeLog configure configure.ac acconfig.h pyconfig.h.in ' + 'Makefile.pre.in Include Lib Misc Ext-dummy', + 'DISTDIRS': 'Include Lib Misc Ext-dummy', + 'DISTFILES': 'README.rst ChangeLog configure configure.ac acconfig.h ' + 'pyconfig.h.in Makefile.pre.in', + 'DLINCLDIR': '.', + 'DLLLIBRARY': '', + 'DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754': 0, + 'DOUBLE_IS_BIG_ENDIAN_IEEE754': 0, + 'DOUBLE_IS_LITTLE_ENDIAN_IEEE754': 1, + 'DTRACE': '', + 'DTRACE_DEPS': '\\', + 'DTRACE_HEADERS': '', + 'DTRACE_OBJS': '', + 'DYNLOADFILE': 'dynload_shlib.o', + 'ENABLE_IPV6': 1, + 'ENSUREPIP': 'no', + 'EXE': '', + 'EXEMODE': 755, + 'EXPAT_CFLAGS': '', + 'EXPAT_LDFLAGS': '-lexpat', + 'EXPORTSFROM': '', + 'EXPORTSYMS': '', + 'EXTRATESTOPTS': '', + 'EXT_SUFFIX': '.cpython-311-x86_64-linux-gnu.so', + 'FILEMODE': 644, + 'FLOAT_WORDS_BIGENDIAN': 0, + 'FREEZE_MODULE': './_bootstrap_python ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Programs/_freeze_module.py', + 'FREEZE_MODULE_BOOTSTRAP': './Programs/_freeze_module', + 'FREEZE_MODULE_BOOTSTRAP_DEPS': 'Programs/_freeze_module', + 'FREEZE_MODULE_DEPS': '_bootstrap_python ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Programs/_freeze_module.py', + 'FROZEN_FILES_IN': '\\', + 'FROZEN_FILES_OUT': '\\', + 'GETPGRP_HAVE_ARG': 0, + 'GITBRANCH': '', + 'GITTAG': '', + 'GITVERSION': '', + 'GNULD': 'no', + 'HAVE_ACCEPT': 1, + 'HAVE_ACCEPT4': 1, + 'HAVE_ACOSH': 1, + 'HAVE_ADDRINFO': 1, + 'HAVE_ALARM': 1, + 'HAVE_ALIGNED_REQUIRED': 0, + 'HAVE_ALLOCA_H': 1, + 'HAVE_ALTZONE': 0, + 'HAVE_ASINH': 1, + 'HAVE_ASM_TYPES_H': 1, + 'HAVE_ATANH': 1, + 'HAVE_BIND': 1, + 'HAVE_BIND_TEXTDOMAIN_CODESET': 1, + 'HAVE_BLUETOOTH_BLUETOOTH_H': 0, + 'HAVE_BLUETOOTH_H': 0, + 'HAVE_BROKEN_MBSTOWCS': 0, + 'HAVE_BROKEN_NICE': 0, + 'HAVE_BROKEN_PIPE_BUF': 0, + 'HAVE_BROKEN_POLL': 0, + 'HAVE_BROKEN_POSIX_SEMAPHORES': 0, + 'HAVE_BROKEN_PTHREAD_SIGMASK': 0, + 'HAVE_BROKEN_SEM_GETVALUE': 0, + 'HAVE_BROKEN_UNSETENV': 0, + 'HAVE_BUILTIN_ATOMIC': 1, + 'HAVE_BZLIB_H': 1, + 'HAVE_CHFLAGS': 0, + 'HAVE_CHMOD': 1, + 'HAVE_CHOWN': 1, + 'HAVE_CHROOT': 1, + 'HAVE_CLOCK': 1, + 'HAVE_CLOCK_GETRES': 1, + 'HAVE_CLOCK_GETTIME': 1, + 'HAVE_CLOCK_NANOSLEEP': 1, + 'HAVE_CLOCK_SETTIME': 1, + 'HAVE_CLOSE_RANGE': 0, + 'HAVE_COMPUTED_GOTOS': 1, + 'HAVE_CONFSTR': 1, + 'HAVE_CONIO_H': 0, + 'HAVE_CONNECT': 1, + 'HAVE_COPY_FILE_RANGE': 1, + 'HAVE_CRYPT_H': 0, + 'HAVE_CRYPT_R': 0, + 'HAVE_CTERMID': 1, + 'HAVE_CTERMID_R': 0, + 'HAVE_CURSES_FILTER': 1, + 'HAVE_CURSES_H': 1, + 'HAVE_CURSES_HAS_KEY': 1, + 'HAVE_CURSES_IMMEDOK': 1, + 'HAVE_CURSES_IS_PAD': 1, + 'HAVE_CURSES_IS_TERM_RESIZED': 1, + 'HAVE_CURSES_RESIZETERM': 1, + 'HAVE_CURSES_RESIZE_TERM': 1, + 'HAVE_CURSES_SYNCOK': 1, + 'HAVE_CURSES_TYPEAHEAD': 1, + 'HAVE_CURSES_USE_ENV': 1, + 'HAVE_CURSES_WCHGAT': 1, + 'HAVE_DB_H': 0, + 'HAVE_DECL_RTLD_DEEPBIND': 1, + 'HAVE_DECL_RTLD_GLOBAL': 1, + 'HAVE_DECL_RTLD_LAZY': 1, + 'HAVE_DECL_RTLD_LOCAL': 1, + 'HAVE_DECL_RTLD_MEMBER': 0, + 'HAVE_DECL_RTLD_NODELETE': 1, + 'HAVE_DECL_RTLD_NOLOAD': 1, + 'HAVE_DECL_RTLD_NOW': 1, + 'HAVE_DECL_TZNAME': 0, + 'HAVE_DEVICE_MACROS': 1, + 'HAVE_DEV_PTC': 0, + 'HAVE_DEV_PTMX': 1, + 'HAVE_DIRECT_H': 0, + 'HAVE_DIRENT_D_TYPE': 1, + 'HAVE_DIRENT_H': 1, + 'HAVE_DIRFD': 1, + 'HAVE_DLFCN_H': 1, + 'HAVE_DLOPEN': 1, + 'HAVE_DUP': 1, + 'HAVE_DUP2': 1, + 'HAVE_DUP3': 1, + 'HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH': 0, + 'HAVE_DYNAMIC_LOADING': 1, + 'HAVE_ENDIAN_H': 1, + 'HAVE_EPOLL': 1, + 'HAVE_EPOLL_CREATE1': 1, + 'HAVE_ERF': 1, + 'HAVE_ERFC': 1, + 'HAVE_ERRNO_H': 1, + 'HAVE_EVENTFD': 1, + 'HAVE_EXECV': 1, + 'HAVE_EXPLICIT_BZERO': 1, + 'HAVE_EXPLICIT_MEMSET': 0, + 'HAVE_EXPM1': 1, + 'HAVE_FACCESSAT': 1, + 'HAVE_FCHDIR': 1, + 'HAVE_FCHMOD': 1, + 'HAVE_FCHMODAT': 1, + 'HAVE_FCHOWN': 1, + 'HAVE_FCHOWNAT': 1, + 'HAVE_FCNTL_H': 1, + 'HAVE_FDATASYNC': 1, + 'HAVE_FDOPENDIR': 1, + 'HAVE_FDWALK': 0, + 'HAVE_FEXECVE': 1, + 'HAVE_FLOCK': 1, + 'HAVE_FORK': 1, + 'HAVE_FORK1': 0, + 'HAVE_FORKPTY': 1, + 'HAVE_FPATHCONF': 1, + 'HAVE_FSEEK64': 0, + 'HAVE_FSEEKO': 1, + 'HAVE_FSTATAT': 1, + 'HAVE_FSTATVFS': 1, + 'HAVE_FSYNC': 1, + 'HAVE_FTELL64': 0, + 'HAVE_FTELLO': 1, + 'HAVE_FTIME': 1, + 'HAVE_FTRUNCATE': 1, + 'HAVE_FUTIMENS': 1, + 'HAVE_FUTIMES': 1, + 'HAVE_FUTIMESAT': 1, + 'HAVE_GAI_STRERROR': 1, + 'HAVE_GCC_ASM_FOR_MC68881': 0, + 'HAVE_GCC_ASM_FOR_X64': 1, + 'HAVE_GCC_ASM_FOR_X87': 1, + 'HAVE_GCC_UINT128_T': 1, + 'HAVE_GDBM_DASH_NDBM_H': 0, + 'HAVE_GDBM_H': 0, + 'HAVE_GDBM_NDBM_H': 0, + 'HAVE_GETADDRINFO': 1, + 'HAVE_GETC_UNLOCKED': 1, + 'HAVE_GETEGID': 1, + 'HAVE_GETENTROPY': 1, + 'HAVE_GETEUID': 1, + 'HAVE_GETGID': 1, + 'HAVE_GETGRGID': 1, + 'HAVE_GETGRGID_R': 1, + 'HAVE_GETGRNAM_R': 1, + 'HAVE_GETGROUPLIST': 1, + 'HAVE_GETGROUPS': 1, + 'HAVE_GETHOSTBYADDR': 1, + 'HAVE_GETHOSTBYNAME': 1, + 'HAVE_GETHOSTBYNAME_R': 1, + 'HAVE_GETHOSTBYNAME_R_3_ARG': 0, + 'HAVE_GETHOSTBYNAME_R_5_ARG': 0, + 'HAVE_GETHOSTBYNAME_R_6_ARG': 1, + 'HAVE_GETHOSTNAME': 1, + 'HAVE_GETITIMER': 1, + 'HAVE_GETLOADAVG': 1, + 'HAVE_GETLOGIN': 1, + 'HAVE_GETNAMEINFO': 1, + 'HAVE_GETPAGESIZE': 1, + 'HAVE_GETPEERNAME': 1, + 'HAVE_GETPGID': 1, + 'HAVE_GETPGRP': 1, + 'HAVE_GETPID': 1, + 'HAVE_GETPPID': 1, + 'HAVE_GETPRIORITY': 1, + 'HAVE_GETPROTOBYNAME': 1, + 'HAVE_GETPWENT': 1, + 'HAVE_GETPWNAM_R': 1, + 'HAVE_GETPWUID': 1, + 'HAVE_GETPWUID_R': 1, + 'HAVE_GETRANDOM': 1, + 'HAVE_GETRANDOM_SYSCALL': 1, + 'HAVE_GETRESGID': 1, + 'HAVE_GETRESUID': 1, + 'HAVE_GETRUSAGE': 1, + 'HAVE_GETSERVBYNAME': 1, + 'HAVE_GETSERVBYPORT': 1, + 'HAVE_GETSID': 1, + 'HAVE_GETSOCKNAME': 1, + 'HAVE_GETSPENT': 1, + 'HAVE_GETSPNAM': 1, + 'HAVE_GETUID': 1, + 'HAVE_GETWD': 1, + 'HAVE_GLIBC_MEMMOVE_BUG': 0, + 'HAVE_GRP_H': 1, + 'HAVE_HSTRERROR': 1, + 'HAVE_HTOLE64': 1, + 'HAVE_IEEEFP_H': 0, + 'HAVE_IF_NAMEINDEX': 1, + 'HAVE_INET_ATON': 1, + 'HAVE_INET_NTOA': 1, + 'HAVE_INET_PTON': 1, + 'HAVE_INITGROUPS': 1, + 'HAVE_INTTYPES_H': 1, + 'HAVE_IO_H': 0, + 'HAVE_IPA_PURE_CONST_BUG': 0, + 'HAVE_KILL': 1, + 'HAVE_KILLPG': 1, + 'HAVE_KQUEUE': 0, + 'HAVE_LANGINFO_H': 1, + 'HAVE_LARGEFILE_SUPPORT': 0, + 'HAVE_LCHFLAGS': 0, + 'HAVE_LCHMOD': 0, + 'HAVE_LCHOWN': 1, + 'HAVE_LIBB2': 0, + 'HAVE_LIBDB': 0, + 'HAVE_LIBDL': 1, + 'HAVE_LIBDLD': 0, + 'HAVE_LIBGDBM_COMPAT': 0, + 'HAVE_LIBIEEE': 0, + 'HAVE_LIBINTL_H': 1, + 'HAVE_LIBNDBM': 0, + 'HAVE_LIBREADLINE': 1, + 'HAVE_LIBRESOLV': 0, + 'HAVE_LIBSENDFILE': 0, + 'HAVE_LIBSQLITE3': 1, + 'HAVE_LIBUTIL_H': 0, + 'HAVE_LINK': 1, + 'HAVE_LINKAT': 1, + 'HAVE_LINUX_AUXVEC_H': 1, + 'HAVE_LINUX_CAN_BCM_H': 1, + 'HAVE_LINUX_CAN_H': 1, + 'HAVE_LINUX_CAN_J1939_H': 0, + 'HAVE_LINUX_CAN_RAW_FD_FRAMES': 1, + 'HAVE_LINUX_CAN_RAW_H': 1, + 'HAVE_LINUX_CAN_RAW_JOIN_FILTERS': 1, + 'HAVE_LINUX_LIMITS_H': 1, + 'HAVE_LINUX_MEMFD_H': 1, + 'HAVE_LINUX_NETLINK_H': 1, + 'HAVE_LINUX_QRTR_H': 1, + 'HAVE_LINUX_RANDOM_H': 1, + 'HAVE_LINUX_SOUNDCARD_H': 1, + 'HAVE_LINUX_TIPC_H': 1, + 'HAVE_LINUX_VM_SOCKETS_H': 1, + 'HAVE_LINUX_WAIT_H': 1, + 'HAVE_LISTEN': 1, + 'HAVE_LOCKF': 1, + 'HAVE_LOG1P': 1, + 'HAVE_LOG2': 1, + 'HAVE_LOGIN_TTY': 1, + 'HAVE_LONG_DOUBLE': 1, + 'HAVE_LSTAT': 1, + 'HAVE_LUTIMES': 1, + 'HAVE_LZMA_H': 0, + 'HAVE_MADVISE': 1, + 'HAVE_MAKEDEV': 1, + 'HAVE_MBRTOWC': 1, + 'HAVE_MEMFD_CREATE': 1, + 'HAVE_MEMORY_H': 1, + 'HAVE_MEMRCHR': 1, + 'HAVE_MKDIRAT': 1, + 'HAVE_MKFIFO': 1, + 'HAVE_MKFIFOAT': 1, + 'HAVE_MKNOD': 1, + 'HAVE_MKNODAT': 1, + 'HAVE_MKTIME': 1, + 'HAVE_MMAP': 1, + 'HAVE_MREMAP': 1, + 'HAVE_NANOSLEEP': 1, + 'HAVE_NCURSES_H': 1, + 'HAVE_NDBM_H': 0, + 'HAVE_NDIR_H': 0, + 'HAVE_NETCAN_CAN_H': 0, + 'HAVE_NETDB_H': 1, + 'HAVE_NETINET_IN_H': 1, + 'HAVE_NETPACKET_PACKET_H': 1, + 'HAVE_NET_IF_H': 1, + 'HAVE_NICE': 1, + 'HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION': 0, + 'HAVE_OPENAT': 1, + 'HAVE_OPENDIR': 1, + 'HAVE_OPENPTY': 1, + 'HAVE_PATHCONF': 1, + 'HAVE_PAUSE': 1, + 'HAVE_PIPE': 1, + 'HAVE_PIPE2': 1, + 'HAVE_PLOCK': 0, + 'HAVE_POLL': 1, + 'HAVE_POLL_H': 1, + 'HAVE_POSIX_FADVISE': 1, + 'HAVE_POSIX_FALLOCATE': 1, + 'HAVE_POSIX_SPAWN': 1, + 'HAVE_POSIX_SPAWNP': 1, + 'HAVE_PREAD': 1, + 'HAVE_PREADV': 1, + 'HAVE_PREADV2': 1, + 'HAVE_PRLIMIT': 1, + 'HAVE_PROCESS_H': 0, + 'HAVE_PROTOTYPES': 1, + 'HAVE_PTHREAD_CONDATTR_SETCLOCK': 1, + 'HAVE_PTHREAD_DESTRUCTOR': 0, + 'HAVE_PTHREAD_GETCPUCLOCKID': 1, + 'HAVE_PTHREAD_H': 1, + 'HAVE_PTHREAD_INIT': 0, + 'HAVE_PTHREAD_KILL': 1, + 'HAVE_PTHREAD_SIGMASK': 1, + 'HAVE_PTHREAD_STUBS': 0, + 'HAVE_PTY_H': 1, + 'HAVE_PWRITE': 1, + 'HAVE_PWRITEV': 1, + 'HAVE_PWRITEV2': 1, + 'HAVE_READLINK': 1, + 'HAVE_READLINKAT': 1, + 'HAVE_READV': 1, + 'HAVE_REALPATH': 1, + 'HAVE_RECVFROM': 1, + 'HAVE_RENAMEAT': 1, + 'HAVE_RL_APPEND_HISTORY': 1, + 'HAVE_RL_CATCH_SIGNAL': 1, + 'HAVE_RL_COMPDISP_FUNC_T': 1, + 'HAVE_RL_COMPLETION_APPEND_CHARACTER': 1, + 'HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK': 1, + 'HAVE_RL_COMPLETION_MATCHES': 1, + 'HAVE_RL_COMPLETION_SUPPRESS_APPEND': 1, + 'HAVE_RL_PRE_INPUT_HOOK': 1, + 'HAVE_RL_RESIZE_TERMINAL': 1, + 'HAVE_RPC_RPC_H': 0, + 'HAVE_RTPSPAWN': 0, + 'HAVE_SCHED_GET_PRIORITY_MAX': 1, + 'HAVE_SCHED_H': 1, + 'HAVE_SCHED_RR_GET_INTERVAL': 1, + 'HAVE_SCHED_SETAFFINITY': 1, + 'HAVE_SCHED_SETPARAM': 1, + 'HAVE_SCHED_SETSCHEDULER': 1, + 'HAVE_SEM_CLOCKWAIT': 0, + 'HAVE_SEM_GETVALUE': 1, + 'HAVE_SEM_OPEN': 1, + 'HAVE_SEM_TIMEDWAIT': 1, + 'HAVE_SEM_UNLINK': 1, + 'HAVE_SENDFILE': 1, + 'HAVE_SENDTO': 1, + 'HAVE_SETEGID': 1, + 'HAVE_SETEUID': 1, + 'HAVE_SETGID': 1, + 'HAVE_SETGROUPS': 1, + 'HAVE_SETHOSTNAME': 1, + 'HAVE_SETITIMER': 1, + 'HAVE_SETJMP_H': 1, + 'HAVE_SETLOCALE': 1, + 'HAVE_SETPGID': 1, + 'HAVE_SETPGRP': 1, + 'HAVE_SETPRIORITY': 1, + 'HAVE_SETREGID': 1, + 'HAVE_SETRESGID': 1, + 'HAVE_SETRESUID': 1, + 'HAVE_SETREUID': 1, + 'HAVE_SETSID': 1, + 'HAVE_SETSOCKOPT': 1, + 'HAVE_SETUID': 1, + 'HAVE_SETVBUF': 1, + 'HAVE_SHADOW_H': 1, + 'HAVE_SHM_OPEN': 1, + 'HAVE_SHM_UNLINK': 1, + 'HAVE_SHUTDOWN': 1, + 'HAVE_SIGACTION': 1, + 'HAVE_SIGALTSTACK': 1, + 'HAVE_SIGFILLSET': 1, + 'HAVE_SIGINFO_T_SI_BAND': 1, + 'HAVE_SIGINTERRUPT': 1, + 'HAVE_SIGNAL_H': 1, + 'HAVE_SIGPENDING': 1, + 'HAVE_SIGRELSE': 1, + 'HAVE_SIGTIMEDWAIT': 1, + 'HAVE_SIGWAIT': 1, + 'HAVE_SIGWAITINFO': 1, + 'HAVE_SNPRINTF': 1, + 'HAVE_SOCKADDR_ALG': 1, + 'HAVE_SOCKADDR_SA_LEN': 0, + 'HAVE_SOCKADDR_STORAGE': 1, + 'HAVE_SOCKET': 1, + 'HAVE_SOCKETPAIR': 1, + 'HAVE_SPAWN_H': 1, + 'HAVE_SPLICE': 1, + 'HAVE_SSIZE_T': 1, + 'HAVE_STATVFS': 1, + 'HAVE_STAT_TV_NSEC': 1, + 'HAVE_STAT_TV_NSEC2': 0, + 'HAVE_STDARG_PROTOTYPES': 1, + 'HAVE_STDINT_H': 1, + 'HAVE_STDLIB_H': 1, + 'HAVE_STD_ATOMIC': 1, + 'HAVE_STRFTIME': 1, + 'HAVE_STRINGS_H': 1, + 'HAVE_STRING_H': 1, + 'HAVE_STRLCPY': 0, + 'HAVE_STROPTS_H': 0, + 'HAVE_STRSIGNAL': 1, + 'HAVE_STRUCT_PASSWD_PW_GECOS': 1, + 'HAVE_STRUCT_PASSWD_PW_PASSWD': 1, + 'HAVE_STRUCT_STAT_ST_BIRTHTIME': 0, + 'HAVE_STRUCT_STAT_ST_BLKSIZE': 1, + 'HAVE_STRUCT_STAT_ST_BLOCKS': 1, + 'HAVE_STRUCT_STAT_ST_FLAGS': 0, + 'HAVE_STRUCT_STAT_ST_GEN': 0, + 'HAVE_STRUCT_STAT_ST_RDEV': 1, + 'HAVE_STRUCT_TM_TM_ZONE': 1, + 'HAVE_SYMLINK': 1, + 'HAVE_SYMLINKAT': 1, + 'HAVE_SYNC': 1, + 'HAVE_SYSCONF': 1, + 'HAVE_SYSEXITS_H': 1, + 'HAVE_SYSLOG_H': 1, + 'HAVE_SYSTEM': 1, + 'HAVE_SYS_AUDIOIO_H': 0, + 'HAVE_SYS_AUXV_H': 1, + 'HAVE_SYS_BSDTTY_H': 0, + 'HAVE_SYS_DEVPOLL_H': 0, + 'HAVE_SYS_DIR_H': 0, + 'HAVE_SYS_ENDIAN_H': 0, + 'HAVE_SYS_EPOLL_H': 1, + 'HAVE_SYS_EVENTFD_H': 1, + 'HAVE_SYS_EVENT_H': 0, + 'HAVE_SYS_FILE_H': 1, + 'HAVE_SYS_IOCTL_H': 1, + 'HAVE_SYS_KERN_CONTROL_H': 0, + 'HAVE_SYS_LOADAVG_H': 0, + 'HAVE_SYS_LOCK_H': 0, + 'HAVE_SYS_MEMFD_H': 0, + 'HAVE_SYS_MKDEV_H': 0, + 'HAVE_SYS_MMAN_H': 1, + 'HAVE_SYS_MODEM_H': 0, + 'HAVE_SYS_NDIR_H': 0, + 'HAVE_SYS_PARAM_H': 1, + 'HAVE_SYS_POLL_H': 1, + 'HAVE_SYS_RANDOM_H': 1, + 'HAVE_SYS_RESOURCE_H': 1, + 'HAVE_SYS_SELECT_H': 1, + 'HAVE_SYS_SENDFILE_H': 1, + 'HAVE_SYS_SOCKET_H': 1, + 'HAVE_SYS_SOUNDCARD_H': 1, + 'HAVE_SYS_STATVFS_H': 1, + 'HAVE_SYS_STAT_H': 1, + 'HAVE_SYS_SYSCALL_H': 1, + 'HAVE_SYS_SYSMACROS_H': 1, + 'HAVE_SYS_SYS_DOMAIN_H': 0, + 'HAVE_SYS_TERMIO_H': 0, + 'HAVE_SYS_TIMES_H': 1, + 'HAVE_SYS_TIME_H': 1, + 'HAVE_SYS_TYPES_H': 1, + 'HAVE_SYS_UIO_H': 1, + 'HAVE_SYS_UN_H': 1, + 'HAVE_SYS_UTSNAME_H': 1, + 'HAVE_SYS_WAIT_H': 1, + 'HAVE_SYS_XATTR_H': 1, + 'HAVE_TCGETPGRP': 1, + 'HAVE_TCSETPGRP': 1, + 'HAVE_TEMPNAM': 1, + 'HAVE_TERMIOS_H': 1, + 'HAVE_TERM_H': 1, + 'HAVE_TIMEGM': 1, + 'HAVE_TIMES': 1, + 'HAVE_TMPFILE': 1, + 'HAVE_TMPNAM': 1, + 'HAVE_TMPNAM_R': 1, + 'HAVE_TM_ZONE': 1, + 'HAVE_TRUNCATE': 1, + 'HAVE_TTYNAME': 1, + 'HAVE_TZNAME': 0, + 'HAVE_UMASK': 1, + 'HAVE_UNAME': 1, + 'HAVE_UNISTD_H': 1, + 'HAVE_UNLINKAT': 1, + 'HAVE_USABLE_WCHAR_T': 0, + 'HAVE_UTIL_H': 0, + 'HAVE_UTIMENSAT': 1, + 'HAVE_UTIMES': 1, + 'HAVE_UTIME_H': 1, + 'HAVE_UTMP_H': 1, + 'HAVE_UUID_CREATE': 0, + 'HAVE_UUID_ENC_BE': 0, + 'HAVE_UUID_GENERATE_TIME_SAFE': 1, + 'HAVE_UUID_H': 1, + 'HAVE_UUID_UUID_H': 0, + 'HAVE_VFORK': 1, + 'HAVE_WAIT': 1, + 'HAVE_WAIT3': 1, + 'HAVE_WAIT4': 1, + 'HAVE_WAITID': 1, + 'HAVE_WAITPID': 1, + 'HAVE_WCHAR_H': 1, + 'HAVE_WCSCOLL': 1, + 'HAVE_WCSFTIME': 1, + 'HAVE_WCSXFRM': 1, + 'HAVE_WMEMCMP': 1, + 'HAVE_WORKING_TZSET': 1, + 'HAVE_WRITEV': 1, + 'HAVE_ZLIB_COPY': 1, + 'HAVE_ZLIB_H': 0, + 'HAVE__GETPTY': 0, + 'HOSTRUNNER': '', + 'HOST_GNU_TYPE': 'x86_64-conda-linux-gnu', + 'INCLDIRSTOMAKE': '/usr/local/miniconda3/envs/phantom/include ' + '/usr/local/miniconda3/envs/phantom/include ' + '/usr/local/miniconda3/envs/phantom/include/python3.11 ' + '/usr/local/miniconda3/envs/phantom/include/python3.11', + 'INCLUDEDIR': '/usr/local/miniconda3/envs/phantom/include', + 'INCLUDEPY': '/usr/local/miniconda3/envs/phantom/include/python3.11', + 'INSTALL': '/usr/bin/install -c', + 'INSTALL_DATA': '/usr/bin/install -c -m 644', + 'INSTALL_PROGRAM': '/usr/bin/install -c', + 'INSTALL_SCRIPT': '/usr/bin/install -c', + 'INSTALL_SHARED': '/usr/bin/install -c -m 755', + 'INSTSONAME': 'libpython3.11.a', + 'IO_H': 'Modules/_io/_iomodule.h', + 'IO_OBJS': '\\', + 'LDCXXSHARED': 'x86_64-conda-linux-gnu-c++ -pthread -shared', + 'LDFLAGS': '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now ' + '-Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now ' + '-Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib', + 'LDLIBRARY': 'libpython3.11.a', + 'LDLIBRARYDIR': '', + 'LDSHARED': 'x86_64-conda-linux-gnu-gcc -pthread -shared -Wl,-O2 ' + '-Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now ' + '-Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro ' + '-Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib', + 'LDVERSION': '3.11', + 'LIBC': '', + 'LIBDEST': '/usr/local/miniconda3/envs/phantom/lib/python3.11', + 'LIBDIR': '/usr/local/miniconda3/envs/phantom/lib', + 'LIBEXPAT_A': 'Modules/expat/libexpat.a', + 'LIBEXPAT_CFLAGS': '-DNDEBUG -fwrapv -O2 -Wall -march=nocona -mtune=haswell ' + '-ftree-vectorize -fPIC -fstack-protector-strong -fno-plt ' + '-O2 -ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ' + ' -march=nocona -mtune=haswell ' + '-ftree-vectorize -fPIC -fstack-protector-strong -fno-plt ' + '-O2 -ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ' + ' -fno-semantic-interposition ' + ' ' + ' -g -std=c11 ' + '-Werror=implicit-function-declaration -fvisibility=hidden ' + ' ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include/internal ' + '-IObjects -IInclude -IPython -I. ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-fPIC', + 'LIBEXPAT_HEADERS': '\\', + 'LIBEXPAT_OBJS': '\\', + 'LIBFFI_INCLUDEDIR': '/usr/local/miniconda3/envs/phantom/include', + 'LIBM': '-lm', + 'LIBMPDEC_A': 'Modules/_decimal/libmpdec/libmpdec.a', + 'LIBMPDEC_CFLAGS': '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_decimal/libmpdec ' + '-DCONFIG_64=1 -DANSI=1 -DHAVE_UINT128_T=1 -DNDEBUG ' + '-fwrapv -O2 -Wall -march=nocona -mtune=haswell ' + '-ftree-vectorize -fPIC -fstack-protector-strong -fno-plt ' + '-O2 -ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ' + ' -march=nocona -mtune=haswell ' + '-ftree-vectorize -fPIC -fstack-protector-strong -fno-plt ' + '-O2 -ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ' + ' -fno-semantic-interposition ' + ' ' + ' -g -std=c11 ' + '-Werror=implicit-function-declaration -fvisibility=hidden ' + ' ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include/internal ' + '-IObjects -IInclude -IPython -I. ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-fPIC', + 'LIBMPDEC_HEADERS': '\\', + 'LIBMPDEC_OBJS': '\\', + 'LIBOBJDIR': 'Python/', + 'LIBOBJS': '', + 'LIBPC': '/usr/local/miniconda3/envs/phantom/lib/pkgconfig', + 'LIBPL': '/usr/local/miniconda3/envs/phantom/lib/python3.11/config-3.11-x86_64-linux-gnu', + 'LIBPYTHON': '', + 'LIBRARY': 'libpython3.11.a', + 'LIBRARY_DEPS': 'libpython3.11.a', + 'LIBRARY_OBJS': '\\', + 'LIBRARY_OBJS_OMIT_FROZEN': '\\', + 'LIBS': '-lpthread -ldl -lutil', + 'LIBSUBDIRS': 'asyncio \\', + 'LINKCC': 'x86_64-conda-linux-gnu-gcc -pthread', + 'LINKFORSHARED': '-Xlinker -export-dynamic', + 'LINK_PYTHON_DEPS': 'libpython3.11.a', + 'LINK_PYTHON_OBJS': '\\', + 'LIPO_32BIT_FLAGS': '', + 'LIPO_INTEL64_FLAGS': '', + 'LLVM_PROF_ERR': 'no', + 'LLVM_PROF_FILE': '', + 'LLVM_PROF_MERGER': 'true', + 'LN': 'ln', + 'LOCALMODLIBS': '', + 'MACHDEP': 'linux', + 'MACHDEP_OBJS': '', + 'MACHDESTLIB': '/usr/local/miniconda3/envs/phantom/lib/python3.11', + 'MACOSX_DEPLOYMENT_TARGET': '', + 'MAINCC': 'x86_64-conda-linux-gnu-gcc -pthread', + 'MAJOR_IN_MKDEV': 0, + 'MAJOR_IN_SYSMACROS': 1, + 'MAKESETUP': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/makesetup', + 'MANDIR': '/usr/local/miniconda3/envs/phantom/share/man', + 'MKDIR_P': '/usr/bin/mkdir -p', + 'MODBUILT_NAMES': 'atexit faulthandler posix _signal _tracemalloc ' + '_codecs _collections errno _io itertools _sre ' + '_thread time _weakref _abc _functools _locale ' + '_operator _stat _symtable pwd xxsubtype', + 'MODDISABLED_NAMES': '', + 'MODLIBS': '', + 'MODOBJS': 'Modules/atexitmodule.o Modules/faulthandler.o ' + 'Modules/posixmodule.o Modules/signalmodule.o ' + 'Modules/_tracemalloc.o Modules/_codecsmodule.o ' + 'Modules/_collectionsmodule.o Modules/errnomodule.o ' + 'Modules/_io/_iomodule.o Modules/_io/iobase.o Modules/_io/fileio.o ' + 'Modules/_io/bytesio.o Modules/_io/bufferedio.o ' + 'Modules/_io/textio.o Modules/_io/stringio.o ' + 'Modules/itertoolsmodule.o Modules/_sre/sre.o ' + 'Modules/_threadmodule.o Modules/timemodule.o ' + 'Modules/_weakref.o Modules/_abc.o Modules/_functoolsmodule.o ' + 'Modules/_localemodule.o Modules/_operator.o Modules/_stat.o ' + 'Modules/symtablemodule.o Modules/pwdmodule.o ' + 'Modules/xxsubtype.o', + 'MODSHARED_NAMES': '', + 'MODULE_ARRAY_STATE': 'yes', + 'MODULE_ATEXIT_LDFLAGS': '', + 'MODULE_AUDIOOP_LDFLAGS': '-lm', + 'MODULE_AUDIOOP_STATE': 'yes', + 'MODULE_BINASCII_CFLAGS': '-DUSE_ZLIB_CRC32 ' + '-I/usr/local/miniconda3/envs/phantom/include', + 'MODULE_BINASCII_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-lz', + 'MODULE_BINASCII_STATE': 'yes', + 'MODULE_CMATH_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_math.h', + 'MODULE_CMATH_LDFLAGS': '-lm', + 'MODULE_CMATH_STATE': 'yes', + 'MODULE_ERRNO_LDFLAGS': '', + 'MODULE_FAULTHANDLER_LDFLAGS': '', + 'MODULE_FCNTL_LDFLAGS': '', + 'MODULE_FCNTL_STATE': 'yes', + 'MODULE_GRP_STATE': 'yes', + 'MODULE_ITERTOOLS_LDFLAGS': '', + 'MODULE_MATH_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_math.h', + 'MODULE_MATH_LDFLAGS': '-lm', + 'MODULE_MATH_STATE': 'yes', + 'MODULE_MMAP_STATE': 'yes', + 'MODULE_NIS_STATE': 'missing', + 'MODULE_OBJS': '\\', + 'MODULE_OSSAUDIODEV_LDFLAGS': '', + 'MODULE_OSSAUDIODEV_STATE': 'yes', + 'MODULE_POSIX_LDFLAGS': '', + 'MODULE_PWD_LDFLAGS': '', + 'MODULE_PWD_STATE': 'yes', + 'MODULE_PYEXPAT_CFLAGS': '', + 'MODULE_PYEXPAT_DEPS': '', + 'MODULE_PYEXPAT_LDFLAGS': '-lexpat', + 'MODULE_PYEXPAT_STATE': 'yes', + 'MODULE_RESOURCE_STATE': 'yes', + 'MODULE_SELECT_STATE': 'yes', + 'MODULE_SPWD_STATE': 'yes', + 'MODULE_SYSLOG_STATE': 'yes', + 'MODULE_TERMIOS_STATE': 'yes', + 'MODULE_TIME_LDFLAGS': '', + 'MODULE_TIME_STATE': 'yes', + 'MODULE_UNICODEDATA_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/unicodedata_db.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/unicodename_db.h', + 'MODULE_UNICODEDATA_STATE': 'yes', + 'MODULE_XXLIMITED_35_STATE': 'yes', + 'MODULE_XXLIMITED_STATE': 'yes', + 'MODULE_XXSUBTYPE_LDFLAGS': '', + 'MODULE_ZLIB_CFLAGS': '-I/usr/local/miniconda3/envs/phantom/include', + 'MODULE_ZLIB_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-lz', + 'MODULE_ZLIB_STATE': 'yes', + 'MODULE__ABC_LDFLAGS': '', + 'MODULE__ASYNCIO_STATE': 'yes', + 'MODULE__BISECT_STATE': 'yes', + 'MODULE__BLAKE2_CFLAGS': '', + 'MODULE__BLAKE2_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2-config.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2-impl.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2b-load-sse2.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2b-load-sse41.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2b-ref.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2b-round.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2b.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2s-load-sse2.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2s-load-sse41.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2s-load-xop.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2s-ref.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2s-round.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/impl/blake2s.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_blake2/blake2module.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/hashlib.h', + 'MODULE__BLAKE2_LDFLAGS': '', + 'MODULE__BLAKE2_STATE': 'yes', + 'MODULE__BZ2_CFLAGS': '', + 'MODULE__BZ2_LDFLAGS': '-lbz2', + 'MODULE__BZ2_STATE': 'yes', + 'MODULE__CODECS_CN_STATE': 'yes', + 'MODULE__CODECS_HK_STATE': 'yes', + 'MODULE__CODECS_ISO2022_STATE': 'yes', + 'MODULE__CODECS_JP_STATE': 'yes', + 'MODULE__CODECS_KR_STATE': 'yes', + 'MODULE__CODECS_LDFLAGS': '', + 'MODULE__CODECS_TW_STATE': 'yes', + 'MODULE__COLLECTIONS_LDFLAGS': '', + 'MODULE__CONTEXTVARS_STATE': 'yes', + 'MODULE__CRYPT_CFLAGS': '', + 'MODULE__CRYPT_LDFLAGS': '', + 'MODULE__CRYPT_STATE': 'yes', + 'MODULE__CSV_STATE': 'yes', + 'MODULE__CTYPES_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ctypes/ctypes.h', + 'MODULE__CTYPES_TEST_LDFLAGS': '-lm', + 'MODULE__CTYPES_TEST_STATE': 'yes', + 'MODULE__DATETIME_LDFLAGS': '-lm', + 'MODULE__DATETIME_STATE': 'yes', + 'MODULE__DECIMAL_CFLAGS': '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_decimal/libmpdec ' + '-DCONFIG_64=1 -DANSI=1 -DHAVE_UINT128_T=1', + 'MODULE__DECIMAL_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_decimal/docstrings.h ' + '\\ Modules/_decimal/libmpdec/libmpdec.a', + 'MODULE__DECIMAL_LDFLAGS': '-lm Modules/_decimal/libmpdec/libmpdec.a', + 'MODULE__DECIMAL_STATE': 'yes', + 'MODULE__ELEMENTTREE_CFLAGS': '', + 'MODULE__ELEMENTTREE_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/pyexpat.c', + 'MODULE__ELEMENTTREE_STATE': 'yes', + 'MODULE__FUNCTOOLS_LDFLAGS': '', + 'MODULE__GDBM_STATE': 'missing', + 'MODULE__HASHLIB_CFLAGS': '-I/usr/local/miniconda3/envs/phantom/include', + 'MODULE__HASHLIB_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/hashlib.h', + 'MODULE__HASHLIB_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-lcrypto', + 'MODULE__HASHLIB_STATE': 'yes', + 'MODULE__HEAPQ_STATE': 'yes', + 'MODULE__IO_CFLAGS': '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_io', + 'MODULE__IO_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_io/_iomodule.h', + 'MODULE__IO_LDFLAGS': '', + 'MODULE__IO_STATE': 'yes', + 'MODULE__JSON_STATE': 'yes', + 'MODULE__LOCALE_LDFLAGS': '', + 'MODULE__LSPROF_STATE': 'yes', + 'MODULE__LZMA_CFLAGS': '-I/usr/local/miniconda3/envs/phantom/include', + 'MODULE__LZMA_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-llzma', + 'MODULE__LZMA_STATE': 'yes', + 'MODULE__MD5_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/hashlib.h', + 'MODULE__MD5_STATE': 'yes', + 'MODULE__MULTIBYTECODEC_STATE': 'yes', + 'MODULE__MULTIPROCESSING_CFLAGS': '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_multiprocessing', + 'MODULE__MULTIPROCESSING_STATE': 'yes', + 'MODULE__OPCODE_STATE': 'yes', + 'MODULE__OPERATOR_LDFLAGS': '', + 'MODULE__PICKLE_STATE': 'yes', + 'MODULE__POSIXSHMEM_CFLAGS': '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_multiprocessing', + 'MODULE__POSIXSHMEM_LDFLAGS': '-lrt', + 'MODULE__POSIXSHMEM_STATE': 'yes', + 'MODULE__POSIXSUBPROCESS_STATE': 'yes', + 'MODULE__QUEUE_STATE': 'yes', + 'MODULE__RANDOM_STATE': 'yes', + 'MODULE__SCPROXY_STATE': 'n/a', + 'MODULE__SHA1_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/hashlib.h', + 'MODULE__SHA1_STATE': 'yes', + 'MODULE__SHA256_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/hashlib.h', + 'MODULE__SHA256_STATE': 'yes', + 'MODULE__SHA3_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sha3/sha3.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sha3/sha3.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/hashlib.h', + 'MODULE__SHA3_STATE': 'yes', + 'MODULE__SHA512_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/hashlib.h', + 'MODULE__SHA512_STATE': 'yes', + 'MODULE__SIGNAL_LDFLAGS': '', + 'MODULE__SOCKET_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/socketmodule.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/addrinfo.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/getaddrinfo.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/getnameinfo.c', + 'MODULE__SOCKET_STATE': 'yes', + 'MODULE__SQLITE3_CFLAGS': '-I/usr/local/miniconda3/envs/phantom/include ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite', + 'MODULE__SQLITE3_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite/connection.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite/cursor.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite/microprotocols.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite/module.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite/prepare_protocol.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite/row.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_sqlite/util.h', + 'MODULE__SQLITE3_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-lsqlite3', + 'MODULE__SQLITE3_STATE': 'yes', + 'MODULE__SRE_LDFLAGS': '', + 'MODULE__SSL_CFLAGS': '-I/usr/local/miniconda3/envs/phantom/include', + 'MODULE__SSL_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ssl.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ssl/cert.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ssl/debughelpers.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ssl/misc.c ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ssl_data.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ssl_data_111.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/_ssl_data_300.h ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/socketmodule.h', + 'MODULE__SSL_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-lssl -lcrypto', + 'MODULE__SSL_STATE': 'yes', + 'MODULE__STATISTICS_LDFLAGS': '-lm', + 'MODULE__STATISTICS_STATE': 'yes', + 'MODULE__STAT_LDFLAGS': '', + 'MODULE__STRUCT_STATE': 'yes', + 'MODULE__SYMTABLE_LDFLAGS': '', + 'MODULE__TESTBUFFER_STATE': 'yes', + 'MODULE__TESTCAPI_DEPS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Modules/testcapi_long.h', + 'MODULE__TESTCAPI_STATE': 'yes', + 'MODULE__TESTCLINIC_STATE': 'yes', + 'MODULE__TESTIMPORTMULTIPLE_STATE': 'yes', + 'MODULE__TESTINTERNALCAPI_STATE': 'yes', + 'MODULE__TESTMULTIPHASE_STATE': 'yes', + 'MODULE__THREAD_LDFLAGS': '', + 'MODULE__TKINTER_CFLAGS': '-I/usr/local/miniconda3/envs/phantom/include ' + '-Wno-strict-prototypes -DWITH_APPINIT=1', + 'MODULE__TKINTER_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-ltk8.6 -ltkstub8.6 -ltcl8.6 -ltclstub8.6', + 'MODULE__TKINTER_STATE': 'yes', + 'MODULE__TRACEMALLOC_LDFLAGS': '', + 'MODULE__TYPING_STATE': 'yes', + 'MODULE__UUID_CFLAGS': '-I/usr/local/miniconda3/envs/phantom/include/uuid', + 'MODULE__UUID_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib ' + '-luuid', + 'MODULE__UUID_STATE': 'yes', + 'MODULE__WEAKREF_LDFLAGS': '', + 'MODULE__XXSUBINTERPRETERS_STATE': 'yes', + 'MODULE__XXTESTFUZZ_STATE': 'yes', + 'MODULE__ZONEINFO_STATE': 'yes', + 'MULTIARCH': 'x86_64-linux-gnu', + 'MULTIARCH_CPPFLAGS': '-DMULTIARCH=\\"x86_64-linux-gnu\\"', + 'MVWDELCH_IS_EXPRESSION': 1, + 'NO_AS_NEEDED': '-Wl,--no-as-needed', + 'OBJECT_OBJS': '\\', + 'OPENSSL_INCLUDES': '-I/usr/local/miniconda3/envs/phantom/include', + 'OPENSSL_LDFLAGS': '-L/usr/local/miniconda3/envs/phantom/lib', + 'OPENSSL_LIBS': '-lssl -lcrypto', + 'OPENSSL_RPATH': '', + 'OPT': '-DNDEBUG -fwrapv -O2 -Wall', + 'OTHER_LIBTOOL_OPT': '', + 'PACKAGE_BUGREPORT': 0, + 'PACKAGE_NAME': 0, + 'PACKAGE_STRING': 0, + 'PACKAGE_TARNAME': 0, + 'PACKAGE_URL': 0, + 'PACKAGE_VERSION': 0, + 'PARSER_HEADERS': '\\', + 'PARSER_OBJS': '\\ \\ Parser/myreadline.o Parser/tokenizer.o', + 'PEGEN_HEADERS': '\\', + 'PEGEN_OBJS': '\\', + 'PGO_PROF_GEN_FLAG': '-fprofile-generate', + 'PGO_PROF_USE_FLAG': ' ', + 'PLATLIBDIR': 'lib', + 'POBJS': '\\', + 'POSIX_SEMAPHORES_NOT_ENABLED': 0, + 'PROFILE_TASK': '-m test --pgo', + 'PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT': 1, + 'PTHREAD_SYSTEM_SCHED_SUPPORTED': 1, + 'PURIFY': '', + 'PY3LIBRARY': '', + 'PYLONG_BITS_IN_DIGIT': 0, + 'PYTHON': 'python', + 'PYTHONFRAMEWORK': '', + 'PYTHONFRAMEWORKDIR': 'no-framework', + 'PYTHONFRAMEWORKINSTALLDIR': '', + 'PYTHONFRAMEWORKPREFIX': '', + 'PYTHONPATH': '', + 'PYTHON_FOR_BUILD': './python -E', + 'PYTHON_FOR_BUILD_DEPS': 'python', + 'PYTHON_FOR_FREEZE': './_bootstrap_python', + 'PYTHON_FOR_REGEN': '', + 'PYTHON_HEADERS': '\\', + 'PYTHON_OBJS': '\\', + 'PY_BUILTIN_HASHLIB_HASHES': '"md5,sha1,sha256,sha512,sha3,blake2"', + 'PY_BUILTIN_MODULE_CFLAGS': '-DNDEBUG -fwrapv -O2 -Wall -march=nocona ' + '-mtune=haswell -ftree-vectorize -fPIC ' + '-fstack-protector-strong -fno-plt -O2 ' + '-ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ' + ' -march=nocona ' + '-mtune=haswell -ftree-vectorize -fPIC ' + '-fstack-protector-strong -fno-plt -O2 ' + '-ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ' + ' ' + '-fno-semantic-interposition ' + ' ' + ' -g -std=c11 ' + '-Werror=implicit-function-declaration ' + '-fvisibility=hidden ' + ' ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include/internal ' + '-IObjects -IInclude -IPython -I. ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DPy_BUILD_CORE_BUILTIN', + 'PY_CFLAGS': '-DNDEBUG -fwrapv -O2 -Wall -march=nocona -mtune=haswell ' + '-ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 ' + '-ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ' + ' -march=nocona -mtune=haswell -ftree-vectorize -fPIC ' + '-fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe ' + '-isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ' + '', + 'PY_CFLAGS_NODIST': '-fno-semantic-interposition ' + ' -g -std=c11 ' + '-Werror=implicit-function-declaration ' + '-fvisibility=hidden ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include/internal', + 'PY_COERCE_C_LOCALE': 1, + 'PY_CORE_CFLAGS': '-DNDEBUG -fwrapv -O2 -Wall -march=nocona -mtune=haswell ' + '-ftree-vectorize -fPIC -fstack-protector-strong -fno-plt ' + '-O2 -ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ' + ' -march=nocona -mtune=haswell -ftree-vectorize -fPIC ' + '-fstack-protector-strong -fno-plt -O2 -ffunction-sections ' + '-pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ' + ' -fno-semantic-interposition ' + ' ' + '-g -std=c11 -Werror=implicit-function-declaration ' + '-fvisibility=hidden ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include/internal ' + '-IObjects -IInclude -IPython -I. ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DPy_BUILD_CORE', + 'PY_CORE_LDFLAGS': '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro ' + '-Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro ' + '-Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '-fno-semantic-interposition ' + ' -g', + 'PY_CPPFLAGS': '-IObjects -IInclude -IPython -I. ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include', + 'PY_ENABLE_SHARED': 0, + 'PY_FORMAT_SIZE_T': '"z"', + 'PY_LDFLAGS': '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro ' + '-Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro ' + '-Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib', + 'PY_LDFLAGS_NODIST': '-fno-semantic-interposition ' + ' -g', + 'PY_LDFLAGS_NOLTO': '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro ' + '-Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro ' + '-Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections ' + '-Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib ' + '-Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib ' + '-L/usr/local/miniconda3/envs/phantom/lib ' + '-fno-lto', + 'PY_SQLITE_ENABLE_LOAD_EXTENSION': 1, + 'PY_SQLITE_HAVE_SERIALIZE': 1, + 'PY_SSL_DEFAULT_CIPHERS': 1, + 'PY_SSL_DEFAULT_CIPHER_STRING': 0, + 'PY_STDMODULE_CFLAGS': '-DNDEBUG -fwrapv -O2 -Wall -march=nocona ' + '-mtune=haswell -ftree-vectorize -fPIC ' + '-fstack-protector-strong -fno-plt -O2 ' + '-ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ' + ' -march=nocona ' + '-mtune=haswell -ftree-vectorize -fPIC ' + '-fstack-protector-strong -fno-plt -O2 ' + '-ffunction-sections -pipe -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + ' ' + ' ' + ' ' + ' ' + '-fno-semantic-interposition ' + ' -g -std=c11 ' + '-Werror=implicit-function-declaration ' + '-fvisibility=hidden ' + ' ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include/internal ' + '-IObjects -IInclude -IPython -I. ' + '-I/home/task_177324838993876/croot/python-split_1773249007352/work/Include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include ' + '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem ' + '/usr/local/miniconda3/envs/phantom/include ' + '-I/usr/local/miniconda3/envs/phantom/include', + 'PY_SUPPORT_TIER': 1, + 'Py_DEBUG': 0, + 'Py_ENABLE_SHARED': 0, + 'Py_HASH_ALGORITHM': 0, + 'Py_STATS': 0, + 'Py_SUNOS_VERSION': 0, + 'Py_TRACE_REFS': 0, + 'QUICKTESTOPTS': '-x test_subprocess test_io test_lib2to3 \\', + 'READELF': 'x86_64-conda-linux-gnu-readelf', + 'RESSRCDIR': 'Mac/Resources/framework', + 'RETSIGTYPE': 'void', + 'RUNSHARED': '', + 'SCRIPTDIR': '/usr/local/miniconda3/envs/phantom/lib', + 'SETPGRP_HAVE_ARG': 0, + 'SHELL': '/bin/sh', + 'SHLIBS': '-lpthread -ldl -lutil', + 'SHLIB_SUFFIX': '.so', + 'SIGNED_RIGHT_SHIFT_ZERO_FILLS': 0, + 'SITEPATH': '', + 'SIZEOF_DOUBLE': 8, + 'SIZEOF_FLOAT': 4, + 'SIZEOF_FPOS_T': 16, + 'SIZEOF_INT': 4, + 'SIZEOF_LONG': 8, + 'SIZEOF_LONG_DOUBLE': 16, + 'SIZEOF_LONG_LONG': 8, + 'SIZEOF_OFF_T': 8, + 'SIZEOF_PID_T': 4, + 'SIZEOF_PTHREAD_KEY_T': 4, + 'SIZEOF_PTHREAD_T': 8, + 'SIZEOF_SHORT': 2, + 'SIZEOF_SIZE_T': 8, + 'SIZEOF_TIME_T': 8, + 'SIZEOF_UINTPTR_T': 8, + 'SIZEOF_VOID_P': 8, + 'SIZEOF_WCHAR_T': 4, + 'SIZEOF__BOOL': 1, + 'SOABI': 'cpython-311-x86_64-linux-gnu', + 'SRCDIRS': 'Modules Modules/_blake2 Modules/_ctypes Modules/_decimal ' + 'Modules/_decimal/libmpdec Modules/_io ' + 'Modules/_multiprocessing Modules/_sha3 Modules/_sqlite ' + 'Modules/_sre Modules/_xxtestfuzz Modules/cjkcodecs ' + 'Modules/expat Objects Parser Programs Python ' + 'Python/frozen_modules Python/deepfreeze', + 'SRC_GDB_HOOKS': '/home/task_177324838993876/croot/python-split_1773249007352/work/Tools/gdb/libpython.py', + 'STATIC_LIBPYTHON': 1, + 'STDC_HEADERS': 1, + 'STRICT_SYSV_CURSES': "/* Don't use ncurses extensions */", + 'STRIPFLAG': '-s', + 'SUBDIRS': '', + 'SUBDIRSTOO': 'Include Lib Misc', + 'SYSLIBS': '-lm', + 'SYS_SELECT_WITH_SYS_TIME': 1, + 'TESTOPTS': '', + 'TESTPATH': '', + 'TESTPYTHON': './python -E', + 'TESTPYTHONOPTS': '', + 'TESTRUNNER': './python -E ' + '/home/task_177324838993876/croot/python-split_1773249007352/work/Tools/scripts/run_tests.py', + 'TESTSUBDIRS': 'ctypes/test \\', + 'TESTTIMEOUT': 1200, + 'TEST_MODULES': 'yes', + 'THREAD_STACK_SIZE': 0, + 'TIMEMODULE_LIB': 0, + 'TIME_WITH_SYS_TIME': 1, + 'TM_IN_SYS_TIME': 0, + 'TZPATH': '/usr/local/miniconda3/envs/phantom/share/zoneinfo:/usr/local/miniconda3/envs/phantom/share/tzinfo', + 'UNICODE_DEPS': '\\', + 'UNIVERSALSDK': '', + 'UPDATE_FILE': '/home/task_177324838993876/croot/python-split_1773249007352/work/Tools/scripts/update_file.py', + 'USE_COMPUTED_GOTOS': 1, + 'VERSION': '3.11', + 'VPATH': '/home/task_177324838993876/croot/python-split_1773249007352/work', + 'WASM_ASSETS_DIR': './usr/local/miniconda3/envs/phantom', + 'WASM_STDLIB': './usr/local/miniconda3/envs/phantom/lib/python3.11/os.py', + 'WHEEL_PKG_DIR': '', + 'WINDOW_HAS_FLAGS': 0, + 'WITH_DECIMAL_CONTEXTVAR': 1, + 'WITH_DOC_STRINGS': 1, + 'WITH_DTRACE': 0, + 'WITH_DYLD': 0, + 'WITH_EDITLINE': 0, + 'WITH_FREELISTS': 1, + 'WITH_LIBINTL': 0, + 'WITH_NEXT_FRAMEWORK': 0, + 'WITH_PYMALLOC': 1, + 'WITH_VALGRIND': 0, + 'X87_DOUBLE_ROUNDING': 0, + 'XMLLIBSUBDIRS': 'xml xml/dom xml/etree xml/parsers xml/sax', + 'abs_builddir': '/home/task_177324838993876/croot/python-split_1773249007352/work/build-static', + 'abs_srcdir': '/home/task_177324838993876/croot/python-split_1773249007352/work', + 'datarootdir': '/usr/local/miniconda3/envs/phantom/share', + 'exec_prefix': '/usr/local/miniconda3/envs/phantom', + 'prefix': '/usr/local/miniconda3/envs/phantom', + 'srcdir': '/home/task_177324838993876/croot/python-split_1773249007352/work'} diff --git a/lib/python3.11/_threading_local.py b/lib/python3.11/_threading_local.py new file mode 100644 index 0000000000000000000000000000000000000000..b006d76c4e23df7dbf09bc7e668b9eb87e4044af --- /dev/null +++ b/lib/python3.11/_threading_local.py @@ -0,0 +1,242 @@ +"""Thread-local objects. + +(Note that this module provides a Python version of the threading.local + class. Depending on the version of Python you're using, there may be a + faster one available. You should always import the `local` class from + `threading`.) + +Thread-local objects support the management of thread-local data. +If you have data that you want to be local to a thread, simply create +a thread-local object and use its attributes: + + >>> mydata = local() + >>> mydata.number = 42 + >>> mydata.number + 42 + +You can also access the local-object's dictionary: + + >>> mydata.__dict__ + {'number': 42} + >>> mydata.__dict__.setdefault('widgets', []) + [] + >>> mydata.widgets + [] + +What's important about thread-local objects is that their data are +local to a thread. If we access the data in a different thread: + + >>> log = [] + >>> def f(): + ... items = sorted(mydata.__dict__.items()) + ... log.append(items) + ... mydata.number = 11 + ... log.append(mydata.number) + + >>> import threading + >>> thread = threading.Thread(target=f) + >>> thread.start() + >>> thread.join() + >>> log + [[], 11] + +we get different data. Furthermore, changes made in the other thread +don't affect data seen in this thread: + + >>> mydata.number + 42 + +Of course, values you get from a local object, including a __dict__ +attribute, are for whatever thread was current at the time the +attribute was read. For that reason, you generally don't want to save +these values across threads, as they apply only to the thread they +came from. + +You can create custom local objects by subclassing the local class: + + >>> class MyLocal(local): + ... number = 2 + ... def __init__(self, /, **kw): + ... self.__dict__.update(kw) + ... def squared(self): + ... return self.number ** 2 + +This can be useful to support default values, methods and +initialization. Note that if you define an __init__ method, it will be +called each time the local object is used in a separate thread. This +is necessary to initialize each thread's dictionary. + +Now if we create a local object: + + >>> mydata = MyLocal(color='red') + +Now we have a default number: + + >>> mydata.number + 2 + +an initial color: + + >>> mydata.color + 'red' + >>> del mydata.color + +And a method that operates on the data: + + >>> mydata.squared() + 4 + +As before, we can access the data in a separate thread: + + >>> log = [] + >>> thread = threading.Thread(target=f) + >>> thread.start() + >>> thread.join() + >>> log + [[('color', 'red')], 11] + +without affecting this thread's data: + + >>> mydata.number + 2 + >>> mydata.color + Traceback (most recent call last): + ... + AttributeError: 'MyLocal' object has no attribute 'color' + +Note that subclasses can define slots, but they are not thread +local. They are shared across threads: + + >>> class MyLocal(local): + ... __slots__ = 'number' + + >>> mydata = MyLocal() + >>> mydata.number = 42 + >>> mydata.color = 'red' + +So, the separate thread: + + >>> thread = threading.Thread(target=f) + >>> thread.start() + >>> thread.join() + +affects what we see: + + >>> mydata.number + 11 + +>>> del mydata +""" + +from weakref import ref +from contextlib import contextmanager + +__all__ = ["local"] + +# We need to use objects from the threading module, but the threading +# module may also want to use our `local` class, if support for locals +# isn't compiled in to the `thread` module. This creates potential problems +# with circular imports. For that reason, we don't import `threading` +# until the bottom of this file (a hack sufficient to worm around the +# potential problems). Note that all platforms on CPython do have support +# for locals in the `thread` module, and there is no circular import problem +# then, so problems introduced by fiddling the order of imports here won't +# manifest. + +class _localimpl: + """A class managing thread-local dicts""" + __slots__ = 'key', 'dicts', 'localargs', 'locallock', '__weakref__' + + def __init__(self): + # The key used in the Thread objects' attribute dicts. + # We keep it a string for speed but make it unlikely to clash with + # a "real" attribute. + self.key = '_threading_local._localimpl.' + str(id(self)) + # { id(Thread) -> (ref(Thread), thread-local dict) } + self.dicts = {} + + def get_dict(self): + """Return the dict for the current thread. Raises KeyError if none + defined.""" + thread = current_thread() + return self.dicts[id(thread)][1] + + def create_dict(self): + """Create a new dict for the current thread, and return it.""" + localdict = {} + key = self.key + thread = current_thread() + idt = id(thread) + def local_deleted(_, key=key): + # When the localimpl is deleted, remove the thread attribute. + thread = wrthread() + if thread is not None: + del thread.__dict__[key] + def thread_deleted(_, idt=idt): + # When the thread is deleted, remove the local dict. + # Note that this is suboptimal if the thread object gets + # caught in a reference loop. We would like to be called + # as soon as the OS-level thread ends instead. + local = wrlocal() + if local is not None: + dct = local.dicts.pop(idt) + wrlocal = ref(self, local_deleted) + wrthread = ref(thread, thread_deleted) + thread.__dict__[key] = wrlocal + self.dicts[idt] = wrthread, localdict + return localdict + + +@contextmanager +def _patch(self): + impl = object.__getattribute__(self, '_local__impl') + try: + dct = impl.get_dict() + except KeyError: + dct = impl.create_dict() + args, kw = impl.localargs + self.__init__(*args, **kw) + with impl.locallock: + object.__setattr__(self, '__dict__', dct) + yield + + +class local: + __slots__ = '_local__impl', '__dict__' + + def __new__(cls, /, *args, **kw): + if (args or kw) and (cls.__init__ is object.__init__): + raise TypeError("Initialization arguments are not supported") + self = object.__new__(cls) + impl = _localimpl() + impl.localargs = (args, kw) + impl.locallock = RLock() + object.__setattr__(self, '_local__impl', impl) + # We need to create the thread dict in anticipation of + # __init__ being called, to make sure we don't call it + # again ourselves. + impl.create_dict() + return self + + def __getattribute__(self, name): + with _patch(self): + return object.__getattribute__(self, name) + + def __setattr__(self, name, value): + if name == '__dict__': + raise AttributeError( + "%r object attribute '__dict__' is read-only" + % self.__class__.__name__) + with _patch(self): + return object.__setattr__(self, name, value) + + def __delattr__(self, name): + if name == '__dict__': + raise AttributeError( + "%r object attribute '__dict__' is read-only" + % self.__class__.__name__) + with _patch(self): + return object.__delattr__(self, name) + + +from threading import current_thread, RLock diff --git a/lib/python3.11/_weakrefset.py b/lib/python3.11/_weakrefset.py new file mode 100644 index 0000000000000000000000000000000000000000..489eec714e0d4881e0803b0e2781776c8a462c5d --- /dev/null +++ b/lib/python3.11/_weakrefset.py @@ -0,0 +1,205 @@ +# Access WeakSet through the weakref module. +# This code is separated-out because it is needed +# by abc.py to load everything else at startup. + +from _weakref import ref +from types import GenericAlias + +__all__ = ['WeakSet'] + + +class _IterationGuard: + # This context manager registers itself in the current iterators of the + # weak container, such as to delay all removals until the context manager + # exits. + # This technique should be relatively thread-safe (since sets are). + + def __init__(self, weakcontainer): + # Don't create cycles + self.weakcontainer = ref(weakcontainer) + + def __enter__(self): + w = self.weakcontainer() + if w is not None: + w._iterating.add(self) + return self + + def __exit__(self, e, t, b): + w = self.weakcontainer() + if w is not None: + s = w._iterating + s.remove(self) + if not s: + w._commit_removals() + + +class WeakSet: + def __init__(self, data=None): + self.data = set() + def _remove(item, selfref=ref(self)): + self = selfref() + if self is not None: + if self._iterating: + self._pending_removals.append(item) + else: + self.data.discard(item) + self._remove = _remove + # A list of keys to be removed + self._pending_removals = [] + self._iterating = set() + if data is not None: + self.update(data) + + def _commit_removals(self): + pop = self._pending_removals.pop + discard = self.data.discard + while True: + try: + item = pop() + except IndexError: + return + discard(item) + + def __iter__(self): + with _IterationGuard(self): + for itemref in self.data: + item = itemref() + if item is not None: + # Caveat: the iterator will keep a strong reference to + # `item` until it is resumed or closed. + yield item + + def __len__(self): + return len(self.data) - len(self._pending_removals) + + def __contains__(self, item): + try: + wr = ref(item) + except TypeError: + return False + return wr in self.data + + def __reduce__(self): + return self.__class__, (list(self),), self.__getstate__() + + def add(self, item): + if self._pending_removals: + self._commit_removals() + self.data.add(ref(item, self._remove)) + + def clear(self): + if self._pending_removals: + self._commit_removals() + self.data.clear() + + def copy(self): + return self.__class__(self) + + def pop(self): + if self._pending_removals: + self._commit_removals() + while True: + try: + itemref = self.data.pop() + except KeyError: + raise KeyError('pop from empty WeakSet') from None + item = itemref() + if item is not None: + return item + + def remove(self, item): + if self._pending_removals: + self._commit_removals() + self.data.remove(ref(item)) + + def discard(self, item): + if self._pending_removals: + self._commit_removals() + self.data.discard(ref(item)) + + def update(self, other): + if self._pending_removals: + self._commit_removals() + for element in other: + self.add(element) + + def __ior__(self, other): + self.update(other) + return self + + def difference(self, other): + newset = self.copy() + newset.difference_update(other) + return newset + __sub__ = difference + + def difference_update(self, other): + self.__isub__(other) + def __isub__(self, other): + if self._pending_removals: + self._commit_removals() + if self is other: + self.data.clear() + else: + self.data.difference_update(ref(item) for item in other) + return self + + def intersection(self, other): + return self.__class__(item for item in other if item in self) + __and__ = intersection + + def intersection_update(self, other): + self.__iand__(other) + def __iand__(self, other): + if self._pending_removals: + self._commit_removals() + self.data.intersection_update(ref(item) for item in other) + return self + + def issubset(self, other): + return self.data.issubset(ref(item) for item in other) + __le__ = issubset + + def __lt__(self, other): + return self.data < set(map(ref, other)) + + def issuperset(self, other): + return self.data.issuperset(ref(item) for item in other) + __ge__ = issuperset + + def __gt__(self, other): + return self.data > set(map(ref, other)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return NotImplemented + return self.data == set(map(ref, other)) + + def symmetric_difference(self, other): + newset = self.copy() + newset.symmetric_difference_update(other) + return newset + __xor__ = symmetric_difference + + def symmetric_difference_update(self, other): + self.__ixor__(other) + def __ixor__(self, other): + if self._pending_removals: + self._commit_removals() + if self is other: + self.data.clear() + else: + self.data.symmetric_difference_update(ref(item, self._remove) for item in other) + return self + + def union(self, other): + return self.__class__(e for s in (self, other) for e in s) + __or__ = union + + def isdisjoint(self, other): + return len(self.intersection(other)) == 0 + + def __repr__(self): + return repr(self.data) + + __class_getitem__ = classmethod(GenericAlias) diff --git a/lib/python3.11/abc.py b/lib/python3.11/abc.py new file mode 100644 index 0000000000000000000000000000000000000000..f8a4e11ce9c3b1e7a8afeae5626a73af81a7a208 --- /dev/null +++ b/lib/python3.11/abc.py @@ -0,0 +1,188 @@ +# Copyright 2007 Google, Inc. All Rights Reserved. +# Licensed to PSF under a Contributor Agreement. + +"""Abstract Base Classes (ABCs) according to PEP 3119.""" + + +def abstractmethod(funcobj): + """A decorator indicating abstract methods. + + Requires that the metaclass is ABCMeta or derived from it. A + class that has a metaclass derived from ABCMeta cannot be + instantiated unless all of its abstract methods are overridden. + The abstract methods can be called using any of the normal + 'super' call mechanisms. abstractmethod() may be used to declare + abstract methods for properties and descriptors. + + Usage: + + class C(metaclass=ABCMeta): + @abstractmethod + def my_abstract_method(self, arg1, arg2, argN): + ... + """ + funcobj.__isabstractmethod__ = True + return funcobj + + +class abstractclassmethod(classmethod): + """A decorator indicating abstract classmethods. + + Deprecated, use 'classmethod' with 'abstractmethod' instead: + + class C(ABC): + @classmethod + @abstractmethod + def my_abstract_classmethod(cls, ...): + ... + + """ + + __isabstractmethod__ = True + + def __init__(self, callable): + callable.__isabstractmethod__ = True + super().__init__(callable) + + +class abstractstaticmethod(staticmethod): + """A decorator indicating abstract staticmethods. + + Deprecated, use 'staticmethod' with 'abstractmethod' instead: + + class C(ABC): + @staticmethod + @abstractmethod + def my_abstract_staticmethod(...): + ... + + """ + + __isabstractmethod__ = True + + def __init__(self, callable): + callable.__isabstractmethod__ = True + super().__init__(callable) + + +class abstractproperty(property): + """A decorator indicating abstract properties. + + Deprecated, use 'property' with 'abstractmethod' instead: + + class C(ABC): + @property + @abstractmethod + def my_abstract_property(self): + ... + + """ + + __isabstractmethod__ = True + + +try: + from _abc import (get_cache_token, _abc_init, _abc_register, + _abc_instancecheck, _abc_subclasscheck, _get_dump, + _reset_registry, _reset_caches) +except ImportError: + from _py_abc import ABCMeta, get_cache_token + ABCMeta.__module__ = 'abc' +else: + class ABCMeta(type): + """Metaclass for defining Abstract Base Classes (ABCs). + + Use this metaclass to create an ABC. An ABC can be subclassed + directly, and then acts as a mix-in class. You can also register + unrelated concrete classes (even built-in classes) and unrelated + ABCs as 'virtual subclasses' -- these and their descendants will + be considered subclasses of the registering ABC by the built-in + issubclass() function, but the registering ABC won't show up in + their MRO (Method Resolution Order) nor will method + implementations defined by the registering ABC be callable (not + even via super()). + """ + def __new__(mcls, name, bases, namespace, /, **kwargs): + cls = super().__new__(mcls, name, bases, namespace, **kwargs) + _abc_init(cls) + return cls + + def register(cls, subclass): + """Register a virtual subclass of an ABC. + + Returns the subclass, to allow usage as a class decorator. + """ + return _abc_register(cls, subclass) + + def __instancecheck__(cls, instance): + """Override for isinstance(instance, cls).""" + return _abc_instancecheck(cls, instance) + + def __subclasscheck__(cls, subclass): + """Override for issubclass(subclass, cls).""" + return _abc_subclasscheck(cls, subclass) + + def _dump_registry(cls, file=None): + """Debug helper to print the ABC registry.""" + print(f"Class: {cls.__module__}.{cls.__qualname__}", file=file) + print(f"Inv. counter: {get_cache_token()}", file=file) + (_abc_registry, _abc_cache, _abc_negative_cache, + _abc_negative_cache_version) = _get_dump(cls) + print(f"_abc_registry: {_abc_registry!r}", file=file) + print(f"_abc_cache: {_abc_cache!r}", file=file) + print(f"_abc_negative_cache: {_abc_negative_cache!r}", file=file) + print(f"_abc_negative_cache_version: {_abc_negative_cache_version!r}", + file=file) + + def _abc_registry_clear(cls): + """Clear the registry (for debugging or testing).""" + _reset_registry(cls) + + def _abc_caches_clear(cls): + """Clear the caches (for debugging or testing).""" + _reset_caches(cls) + + +def update_abstractmethods(cls): + """Recalculate the set of abstract methods of an abstract class. + + If a class has had one of its abstract methods implemented after the + class was created, the method will not be considered implemented until + this function is called. Alternatively, if a new abstract method has been + added to the class, it will only be considered an abstract method of the + class after this function is called. + + This function should be called before any use is made of the class, + usually in class decorators that add methods to the subject class. + + Returns cls, to allow usage as a class decorator. + + If cls is not an instance of ABCMeta, does nothing. + """ + if not hasattr(cls, '__abstractmethods__'): + # We check for __abstractmethods__ here because cls might by a C + # implementation or a python implementation (especially during + # testing), and we want to handle both cases. + return cls + + abstracts = set() + # Check the existing abstract methods of the parents, keep only the ones + # that are not implemented. + for scls in cls.__bases__: + for name in getattr(scls, '__abstractmethods__', ()): + value = getattr(cls, name, None) + if getattr(value, "__isabstractmethod__", False): + abstracts.add(name) + # Also add any other newly added abstract methods. + for name, value in cls.__dict__.items(): + if getattr(value, "__isabstractmethod__", False): + abstracts.add(name) + cls.__abstractmethods__ = frozenset(abstracts) + return cls + + +class ABC(metaclass=ABCMeta): + """Helper class that provides a standard way to create an ABC using + inheritance. + """ + __slots__ = () diff --git a/lib/python3.11/aifc.py b/lib/python3.11/aifc.py new file mode 100644 index 0000000000000000000000000000000000000000..5254987e22bc16716af52bdfafd67702c7dbf734 --- /dev/null +++ b/lib/python3.11/aifc.py @@ -0,0 +1,984 @@ +"""Stuff to parse AIFF-C and AIFF files. + +Unless explicitly stated otherwise, the description below is true +both for AIFF-C files and AIFF files. + +An AIFF-C file has the following structure. + + +-----------------+ + | FORM | + +-----------------+ + | | + +----+------------+ + | | AIFC | + | +------------+ + | | | + | | . | + | | . | + | | . | + +----+------------+ + +An AIFF file has the string "AIFF" instead of "AIFC". + +A chunk consists of an identifier (4 bytes) followed by a size (4 bytes, +big endian order), followed by the data. The size field does not include +the size of the 8 byte header. + +The following chunk types are recognized. + + FVER + (AIFF-C only). + MARK + <# of markers> (2 bytes) + list of markers: + (2 bytes, must be > 0) + (4 bytes) + ("pstring") + COMM + <# of channels> (2 bytes) + <# of sound frames> (4 bytes) + (2 bytes) + (10 bytes, IEEE 80-bit extended + floating point) + in AIFF-C files only: + (4 bytes) + ("pstring") + SSND + (4 bytes, not used by this program) + (4 bytes, not used by this program) + + +A pstring consists of 1 byte length, a string of characters, and 0 or 1 +byte pad to make the total length even. + +Usage. + +Reading AIFF files: + f = aifc.open(file, 'r') +where file is either the name of a file or an open file pointer. +The open file pointer must have methods read(), seek(), and close(). +In some types of audio files, if the setpos() method is not used, +the seek() method is not necessary. + +This returns an instance of a class with the following public methods: + getnchannels() -- returns number of audio channels (1 for + mono, 2 for stereo) + getsampwidth() -- returns sample width in bytes + getframerate() -- returns sampling frequency + getnframes() -- returns number of audio frames + getcomptype() -- returns compression type ('NONE' for AIFF files) + getcompname() -- returns human-readable version of + compression type ('not compressed' for AIFF files) + getparams() -- returns a namedtuple consisting of all of the + above in the above order + getmarkers() -- get the list of marks in the audio file or None + if there are no marks + getmark(id) -- get mark with the specified id (raises an error + if the mark does not exist) + readframes(n) -- returns at most n frames of audio + rewind() -- rewind to the beginning of the audio stream + setpos(pos) -- seek to the specified position + tell() -- return the current position + close() -- close the instance (make it unusable) +The position returned by tell(), the position given to setpos() and +the position of marks are all compatible and have nothing to do with +the actual position in the file. +The close() method is called automatically when the class instance +is destroyed. + +Writing AIFF files: + f = aifc.open(file, 'w') +where file is either the name of a file or an open file pointer. +The open file pointer must have methods write(), tell(), seek(), and +close(). + +This returns an instance of a class with the following public methods: + aiff() -- create an AIFF file (AIFF-C default) + aifc() -- create an AIFF-C file + setnchannels(n) -- set the number of channels + setsampwidth(n) -- set the sample width + setframerate(n) -- set the frame rate + setnframes(n) -- set the number of frames + setcomptype(type, name) + -- set the compression type and the + human-readable compression type + setparams(tuple) + -- set all parameters at once + setmark(id, pos, name) + -- add specified mark to the list of marks + tell() -- return current position in output file (useful + in combination with setmark()) + writeframesraw(data) + -- write audio frames without pathing up the + file header + writeframes(data) + -- write audio frames and patch up the file header + close() -- patch up the file header and close the + output file +You should set the parameters before the first writeframesraw or +writeframes. The total number of frames does not need to be set, +but when it is set to the correct value, the header does not have to +be patched up. +It is best to first set all parameters, perhaps possibly the +compression type, and then write audio frames using writeframesraw. +When all frames have been written, either call writeframes(b'') or +close() to patch up the sizes in the header. +Marks can be added anytime. If there are any marks, you must call +close() after all frames have been written. +The close() method is called automatically when the class instance +is destroyed. + +When a file is opened with the extension '.aiff', an AIFF file is +written, otherwise an AIFF-C file is written. This default can be +changed by calling aiff() or aifc() before the first writeframes or +writeframesraw. +""" + +import struct +import builtins +import warnings + +__all__ = ["Error", "open"] + + +warnings._deprecated(__name__, remove=(3, 13)) + + +class Error(Exception): + pass + +_AIFC_version = 0xA2805140 # Version 1 of AIFF-C + +def _read_long(file): + try: + return struct.unpack('>l', file.read(4))[0] + except struct.error: + raise EOFError from None + +def _read_ulong(file): + try: + return struct.unpack('>L', file.read(4))[0] + except struct.error: + raise EOFError from None + +def _read_short(file): + try: + return struct.unpack('>h', file.read(2))[0] + except struct.error: + raise EOFError from None + +def _read_ushort(file): + try: + return struct.unpack('>H', file.read(2))[0] + except struct.error: + raise EOFError from None + +def _read_string(file): + length = ord(file.read(1)) + if length == 0: + data = b'' + else: + data = file.read(length) + if length & 1 == 0: + dummy = file.read(1) + return data + +_HUGE_VAL = 1.79769313486231e+308 # See + +def _read_float(f): # 10 bytes + expon = _read_short(f) # 2 bytes + sign = 1 + if expon < 0: + sign = -1 + expon = expon + 0x8000 + himant = _read_ulong(f) # 4 bytes + lomant = _read_ulong(f) # 4 bytes + if expon == himant == lomant == 0: + f = 0.0 + elif expon == 0x7FFF: + f = _HUGE_VAL + else: + expon = expon - 16383 + f = (himant * 0x100000000 + lomant) * pow(2.0, expon - 63) + return sign * f + +def _write_short(f, x): + f.write(struct.pack('>h', x)) + +def _write_ushort(f, x): + f.write(struct.pack('>H', x)) + +def _write_long(f, x): + f.write(struct.pack('>l', x)) + +def _write_ulong(f, x): + f.write(struct.pack('>L', x)) + +def _write_string(f, s): + if len(s) > 255: + raise ValueError("string exceeds maximum pstring length") + f.write(struct.pack('B', len(s))) + f.write(s) + if len(s) & 1 == 0: + f.write(b'\x00') + +def _write_float(f, x): + import math + if x < 0: + sign = 0x8000 + x = x * -1 + else: + sign = 0 + if x == 0: + expon = 0 + himant = 0 + lomant = 0 + else: + fmant, expon = math.frexp(x) + if expon > 16384 or fmant >= 1 or fmant != fmant: # Infinity or NaN + expon = sign|0x7FFF + himant = 0 + lomant = 0 + else: # Finite + expon = expon + 16382 + if expon < 0: # denormalized + fmant = math.ldexp(fmant, expon) + expon = 0 + expon = expon | sign + fmant = math.ldexp(fmant, 32) + fsmant = math.floor(fmant) + himant = int(fsmant) + fmant = math.ldexp(fmant - fsmant, 32) + fsmant = math.floor(fmant) + lomant = int(fsmant) + _write_ushort(f, expon) + _write_ulong(f, himant) + _write_ulong(f, lomant) + +with warnings.catch_warnings(): + warnings.simplefilter("ignore", DeprecationWarning) + from chunk import Chunk +from collections import namedtuple + +_aifc_params = namedtuple('_aifc_params', + 'nchannels sampwidth framerate nframes comptype compname') + +_aifc_params.nchannels.__doc__ = 'Number of audio channels (1 for mono, 2 for stereo)' +_aifc_params.sampwidth.__doc__ = 'Sample width in bytes' +_aifc_params.framerate.__doc__ = 'Sampling frequency' +_aifc_params.nframes.__doc__ = 'Number of audio frames' +_aifc_params.comptype.__doc__ = 'Compression type ("NONE" for AIFF files)' +_aifc_params.compname.__doc__ = ("""\ +A human-readable version of the compression type +('not compressed' for AIFF files)""") + + +class Aifc_read: + # Variables used in this class: + # + # These variables are available to the user though appropriate + # methods of this class: + # _file -- the open file with methods read(), close(), and seek() + # set through the __init__() method + # _nchannels -- the number of audio channels + # available through the getnchannels() method + # _nframes -- the number of audio frames + # available through the getnframes() method + # _sampwidth -- the number of bytes per audio sample + # available through the getsampwidth() method + # _framerate -- the sampling frequency + # available through the getframerate() method + # _comptype -- the AIFF-C compression type ('NONE' if AIFF) + # available through the getcomptype() method + # _compname -- the human-readable AIFF-C compression type + # available through the getcomptype() method + # _markers -- the marks in the audio file + # available through the getmarkers() and getmark() + # methods + # _soundpos -- the position in the audio stream + # available through the tell() method, set through the + # setpos() method + # + # These variables are used internally only: + # _version -- the AIFF-C version number + # _decomp -- the decompressor from builtin module cl + # _comm_chunk_read -- 1 iff the COMM chunk has been read + # _aifc -- 1 iff reading an AIFF-C file + # _ssnd_seek_needed -- 1 iff positioned correctly in audio + # file for readframes() + # _ssnd_chunk -- instantiation of a chunk class for the SSND chunk + # _framesize -- size of one frame in the file + + _file = None # Set here since __del__ checks it + + def initfp(self, file): + self._version = 0 + self._convert = None + self._markers = [] + self._soundpos = 0 + self._file = file + chunk = Chunk(file) + if chunk.getname() != b'FORM': + raise Error('file does not start with FORM id') + formdata = chunk.read(4) + if formdata == b'AIFF': + self._aifc = 0 + elif formdata == b'AIFC': + self._aifc = 1 + else: + raise Error('not an AIFF or AIFF-C file') + self._comm_chunk_read = 0 + self._ssnd_chunk = None + while 1: + self._ssnd_seek_needed = 1 + try: + chunk = Chunk(self._file) + except EOFError: + break + chunkname = chunk.getname() + if chunkname == b'COMM': + self._read_comm_chunk(chunk) + self._comm_chunk_read = 1 + elif chunkname == b'SSND': + self._ssnd_chunk = chunk + dummy = chunk.read(8) + self._ssnd_seek_needed = 0 + elif chunkname == b'FVER': + self._version = _read_ulong(chunk) + elif chunkname == b'MARK': + self._readmark(chunk) + chunk.skip() + if not self._comm_chunk_read or not self._ssnd_chunk: + raise Error('COMM chunk and/or SSND chunk missing') + + def __init__(self, f): + if isinstance(f, str): + file_object = builtins.open(f, 'rb') + try: + self.initfp(file_object) + except: + file_object.close() + raise + else: + # assume it is an open file object already + self.initfp(f) + + def __enter__(self): + return self + + def __exit__(self, *args): + self.close() + + # + # User visible methods. + # + def getfp(self): + return self._file + + def rewind(self): + self._ssnd_seek_needed = 1 + self._soundpos = 0 + + def close(self): + file = self._file + if file is not None: + self._file = None + file.close() + + def tell(self): + return self._soundpos + + def getnchannels(self): + return self._nchannels + + def getnframes(self): + return self._nframes + + def getsampwidth(self): + return self._sampwidth + + def getframerate(self): + return self._framerate + + def getcomptype(self): + return self._comptype + + def getcompname(self): + return self._compname + +## def getversion(self): +## return self._version + + def getparams(self): + return _aifc_params(self.getnchannels(), self.getsampwidth(), + self.getframerate(), self.getnframes(), + self.getcomptype(), self.getcompname()) + + def getmarkers(self): + if len(self._markers) == 0: + return None + return self._markers + + def getmark(self, id): + for marker in self._markers: + if id == marker[0]: + return marker + raise Error('marker {0!r} does not exist'.format(id)) + + def setpos(self, pos): + if pos < 0 or pos > self._nframes: + raise Error('position not in range') + self._soundpos = pos + self._ssnd_seek_needed = 1 + + def readframes(self, nframes): + if self._ssnd_seek_needed: + self._ssnd_chunk.seek(0) + dummy = self._ssnd_chunk.read(8) + pos = self._soundpos * self._framesize + if pos: + self._ssnd_chunk.seek(pos + 8) + self._ssnd_seek_needed = 0 + if nframes == 0: + return b'' + data = self._ssnd_chunk.read(nframes * self._framesize) + if self._convert and data: + data = self._convert(data) + self._soundpos = self._soundpos + len(data) // (self._nchannels + * self._sampwidth) + return data + + # + # Internal methods. + # + + def _alaw2lin(self, data): + with warnings.catch_warnings(): + warnings.simplefilter('ignore', category=DeprecationWarning) + import audioop + return audioop.alaw2lin(data, 2) + + def _ulaw2lin(self, data): + with warnings.catch_warnings(): + warnings.simplefilter('ignore', category=DeprecationWarning) + import audioop + return audioop.ulaw2lin(data, 2) + + def _adpcm2lin(self, data): + with warnings.catch_warnings(): + warnings.simplefilter('ignore', category=DeprecationWarning) + import audioop + if not hasattr(self, '_adpcmstate'): + # first time + self._adpcmstate = None + data, self._adpcmstate = audioop.adpcm2lin(data, 2, self._adpcmstate) + return data + + def _sowt2lin(self, data): + with warnings.catch_warnings(): + warnings.simplefilter('ignore', category=DeprecationWarning) + import audioop + return audioop.byteswap(data, 2) + + def _read_comm_chunk(self, chunk): + self._nchannels = _read_short(chunk) + self._nframes = _read_long(chunk) + self._sampwidth = (_read_short(chunk) + 7) // 8 + self._framerate = int(_read_float(chunk)) + if self._sampwidth <= 0: + raise Error('bad sample width') + if self._nchannels <= 0: + raise Error('bad # of channels') + self._framesize = self._nchannels * self._sampwidth + if self._aifc: + #DEBUG: SGI's soundeditor produces a bad size :-( + kludge = 0 + if chunk.chunksize == 18: + kludge = 1 + warnings.warn('Warning: bad COMM chunk size') + chunk.chunksize = 23 + #DEBUG end + self._comptype = chunk.read(4) + #DEBUG start + if kludge: + length = ord(chunk.file.read(1)) + if length & 1 == 0: + length = length + 1 + chunk.chunksize = chunk.chunksize + length + chunk.file.seek(-1, 1) + #DEBUG end + self._compname = _read_string(chunk) + if self._comptype != b'NONE': + if self._comptype == b'G722': + self._convert = self._adpcm2lin + elif self._comptype in (b'ulaw', b'ULAW'): + self._convert = self._ulaw2lin + elif self._comptype in (b'alaw', b'ALAW'): + self._convert = self._alaw2lin + elif self._comptype in (b'sowt', b'SOWT'): + self._convert = self._sowt2lin + else: + raise Error('unsupported compression type') + self._sampwidth = 2 + else: + self._comptype = b'NONE' + self._compname = b'not compressed' + + def _readmark(self, chunk): + nmarkers = _read_short(chunk) + # Some files appear to contain invalid counts. + # Cope with this by testing for EOF. + try: + for i in range(nmarkers): + id = _read_short(chunk) + pos = _read_long(chunk) + name = _read_string(chunk) + if pos or name: + # some files appear to have + # dummy markers consisting of + # a position 0 and name '' + self._markers.append((id, pos, name)) + except EOFError: + w = ('Warning: MARK chunk contains only %s marker%s instead of %s' % + (len(self._markers), '' if len(self._markers) == 1 else 's', + nmarkers)) + warnings.warn(w) + +class Aifc_write: + # Variables used in this class: + # + # These variables are user settable through appropriate methods + # of this class: + # _file -- the open file with methods write(), close(), tell(), seek() + # set through the __init__() method + # _comptype -- the AIFF-C compression type ('NONE' in AIFF) + # set through the setcomptype() or setparams() method + # _compname -- the human-readable AIFF-C compression type + # set through the setcomptype() or setparams() method + # _nchannels -- the number of audio channels + # set through the setnchannels() or setparams() method + # _sampwidth -- the number of bytes per audio sample + # set through the setsampwidth() or setparams() method + # _framerate -- the sampling frequency + # set through the setframerate() or setparams() method + # _nframes -- the number of audio frames written to the header + # set through the setnframes() or setparams() method + # _aifc -- whether we're writing an AIFF-C file or an AIFF file + # set through the aifc() method, reset through the + # aiff() method + # + # These variables are used internally only: + # _version -- the AIFF-C version number + # _comp -- the compressor from builtin module cl + # _nframeswritten -- the number of audio frames actually written + # _datalength -- the size of the audio samples written to the header + # _datawritten -- the size of the audio samples actually written + + _file = None # Set here since __del__ checks it + + def __init__(self, f): + if isinstance(f, str): + file_object = builtins.open(f, 'wb') + try: + self.initfp(file_object) + except: + file_object.close() + raise + + # treat .aiff file extensions as non-compressed audio + if f.endswith('.aiff'): + self._aifc = 0 + else: + # assume it is an open file object already + self.initfp(f) + + def initfp(self, file): + self._file = file + self._version = _AIFC_version + self._comptype = b'NONE' + self._compname = b'not compressed' + self._convert = None + self._nchannels = 0 + self._sampwidth = 0 + self._framerate = 0 + self._nframes = 0 + self._nframeswritten = 0 + self._datawritten = 0 + self._datalength = 0 + self._markers = [] + self._marklength = 0 + self._aifc = 1 # AIFF-C is default + + def __del__(self): + self.close() + + def __enter__(self): + return self + + def __exit__(self, *args): + self.close() + + # + # User visible methods. + # + def aiff(self): + if self._nframeswritten: + raise Error('cannot change parameters after starting to write') + self._aifc = 0 + + def aifc(self): + if self._nframeswritten: + raise Error('cannot change parameters after starting to write') + self._aifc = 1 + + def setnchannels(self, nchannels): + if self._nframeswritten: + raise Error('cannot change parameters after starting to write') + if nchannels < 1: + raise Error('bad # of channels') + self._nchannels = nchannels + + def getnchannels(self): + if not self._nchannels: + raise Error('number of channels not set') + return self._nchannels + + def setsampwidth(self, sampwidth): + if self._nframeswritten: + raise Error('cannot change parameters after starting to write') + if sampwidth < 1 or sampwidth > 4: + raise Error('bad sample width') + self._sampwidth = sampwidth + + def getsampwidth(self): + if not self._sampwidth: + raise Error('sample width not set') + return self._sampwidth + + def setframerate(self, framerate): + if self._nframeswritten: + raise Error('cannot change parameters after starting to write') + if framerate <= 0: + raise Error('bad frame rate') + self._framerate = framerate + + def getframerate(self): + if not self._framerate: + raise Error('frame rate not set') + return self._framerate + + def setnframes(self, nframes): + if self._nframeswritten: + raise Error('cannot change parameters after starting to write') + self._nframes = nframes + + def getnframes(self): + return self._nframeswritten + + def setcomptype(self, comptype, compname): + if self._nframeswritten: + raise Error('cannot change parameters after starting to write') + if comptype not in (b'NONE', b'ulaw', b'ULAW', + b'alaw', b'ALAW', b'G722', b'sowt', b'SOWT'): + raise Error('unsupported compression type') + self._comptype = comptype + self._compname = compname + + def getcomptype(self): + return self._comptype + + def getcompname(self): + return self._compname + +## def setversion(self, version): +## if self._nframeswritten: +## raise Error, 'cannot change parameters after starting to write' +## self._version = version + + def setparams(self, params): + nchannels, sampwidth, framerate, nframes, comptype, compname = params + if self._nframeswritten: + raise Error('cannot change parameters after starting to write') + if comptype not in (b'NONE', b'ulaw', b'ULAW', + b'alaw', b'ALAW', b'G722', b'sowt', b'SOWT'): + raise Error('unsupported compression type') + self.setnchannels(nchannels) + self.setsampwidth(sampwidth) + self.setframerate(framerate) + self.setnframes(nframes) + self.setcomptype(comptype, compname) + + def getparams(self): + if not self._nchannels or not self._sampwidth or not self._framerate: + raise Error('not all parameters set') + return _aifc_params(self._nchannels, self._sampwidth, self._framerate, + self._nframes, self._comptype, self._compname) + + def setmark(self, id, pos, name): + if id <= 0: + raise Error('marker ID must be > 0') + if pos < 0: + raise Error('marker position must be >= 0') + if not isinstance(name, bytes): + raise Error('marker name must be bytes') + for i in range(len(self._markers)): + if id == self._markers[i][0]: + self._markers[i] = id, pos, name + return + self._markers.append((id, pos, name)) + + def getmark(self, id): + for marker in self._markers: + if id == marker[0]: + return marker + raise Error('marker {0!r} does not exist'.format(id)) + + def getmarkers(self): + if len(self._markers) == 0: + return None + return self._markers + + def tell(self): + return self._nframeswritten + + def writeframesraw(self, data): + if not isinstance(data, (bytes, bytearray)): + data = memoryview(data).cast('B') + self._ensure_header_written(len(data)) + nframes = len(data) // (self._sampwidth * self._nchannels) + if self._convert: + data = self._convert(data) + self._file.write(data) + self._nframeswritten = self._nframeswritten + nframes + self._datawritten = self._datawritten + len(data) + + def writeframes(self, data): + self.writeframesraw(data) + if self._nframeswritten != self._nframes or \ + self._datalength != self._datawritten: + self._patchheader() + + def close(self): + if self._file is None: + return + try: + self._ensure_header_written(0) + if self._datawritten & 1: + # quick pad to even size + self._file.write(b'\x00') + self._datawritten = self._datawritten + 1 + self._writemarkers() + if self._nframeswritten != self._nframes or \ + self._datalength != self._datawritten or \ + self._marklength: + self._patchheader() + finally: + # Prevent ref cycles + self._convert = None + f = self._file + self._file = None + f.close() + + # + # Internal methods. + # + + def _lin2alaw(self, data): + with warnings.catch_warnings(): + warnings.simplefilter('ignore', category=DeprecationWarning) + import audioop + return audioop.lin2alaw(data, 2) + + def _lin2ulaw(self, data): + with warnings.catch_warnings(): + warnings.simplefilter('ignore', category=DeprecationWarning) + import audioop + return audioop.lin2ulaw(data, 2) + + def _lin2adpcm(self, data): + with warnings.catch_warnings(): + warnings.simplefilter('ignore', category=DeprecationWarning) + import audioop + if not hasattr(self, '_adpcmstate'): + self._adpcmstate = None + data, self._adpcmstate = audioop.lin2adpcm(data, 2, self._adpcmstate) + return data + + def _lin2sowt(self, data): + with warnings.catch_warnings(): + warnings.simplefilter('ignore', category=DeprecationWarning) + import audioop + return audioop.byteswap(data, 2) + + def _ensure_header_written(self, datasize): + if not self._nframeswritten: + if self._comptype in (b'ULAW', b'ulaw', + b'ALAW', b'alaw', b'G722', + b'sowt', b'SOWT'): + if not self._sampwidth: + self._sampwidth = 2 + if self._sampwidth != 2: + raise Error('sample width must be 2 when compressing ' + 'with ulaw/ULAW, alaw/ALAW, sowt/SOWT ' + 'or G7.22 (ADPCM)') + if not self._nchannels: + raise Error('# channels not specified') + if not self._sampwidth: + raise Error('sample width not specified') + if not self._framerate: + raise Error('sampling rate not specified') + self._write_header(datasize) + + def _init_compression(self): + if self._comptype == b'G722': + self._convert = self._lin2adpcm + elif self._comptype in (b'ulaw', b'ULAW'): + self._convert = self._lin2ulaw + elif self._comptype in (b'alaw', b'ALAW'): + self._convert = self._lin2alaw + elif self._comptype in (b'sowt', b'SOWT'): + self._convert = self._lin2sowt + + def _write_header(self, initlength): + if self._aifc and self._comptype != b'NONE': + self._init_compression() + self._file.write(b'FORM') + if not self._nframes: + self._nframes = initlength // (self._nchannels * self._sampwidth) + self._datalength = self._nframes * self._nchannels * self._sampwidth + if self._datalength & 1: + self._datalength = self._datalength + 1 + if self._aifc: + if self._comptype in (b'ulaw', b'ULAW', b'alaw', b'ALAW'): + self._datalength = self._datalength // 2 + if self._datalength & 1: + self._datalength = self._datalength + 1 + elif self._comptype == b'G722': + self._datalength = (self._datalength + 3) // 4 + if self._datalength & 1: + self._datalength = self._datalength + 1 + try: + self._form_length_pos = self._file.tell() + except (AttributeError, OSError): + self._form_length_pos = None + commlength = self._write_form_length(self._datalength) + if self._aifc: + self._file.write(b'AIFC') + self._file.write(b'FVER') + _write_ulong(self._file, 4) + _write_ulong(self._file, self._version) + else: + self._file.write(b'AIFF') + self._file.write(b'COMM') + _write_ulong(self._file, commlength) + _write_short(self._file, self._nchannels) + if self._form_length_pos is not None: + self._nframes_pos = self._file.tell() + _write_ulong(self._file, self._nframes) + if self._comptype in (b'ULAW', b'ulaw', b'ALAW', b'alaw', b'G722'): + _write_short(self._file, 8) + else: + _write_short(self._file, self._sampwidth * 8) + _write_float(self._file, self._framerate) + if self._aifc: + self._file.write(self._comptype) + _write_string(self._file, self._compname) + self._file.write(b'SSND') + if self._form_length_pos is not None: + self._ssnd_length_pos = self._file.tell() + _write_ulong(self._file, self._datalength + 8) + _write_ulong(self._file, 0) + _write_ulong(self._file, 0) + + def _write_form_length(self, datalength): + if self._aifc: + commlength = 18 + 5 + len(self._compname) + if commlength & 1: + commlength = commlength + 1 + verslength = 12 + else: + commlength = 18 + verslength = 0 + _write_ulong(self._file, 4 + verslength + self._marklength + \ + 8 + commlength + 16 + datalength) + return commlength + + def _patchheader(self): + curpos = self._file.tell() + if self._datawritten & 1: + datalength = self._datawritten + 1 + self._file.write(b'\x00') + else: + datalength = self._datawritten + if datalength == self._datalength and \ + self._nframes == self._nframeswritten and \ + self._marklength == 0: + self._file.seek(curpos, 0) + return + self._file.seek(self._form_length_pos, 0) + dummy = self._write_form_length(datalength) + self._file.seek(self._nframes_pos, 0) + _write_ulong(self._file, self._nframeswritten) + self._file.seek(self._ssnd_length_pos, 0) + _write_ulong(self._file, datalength + 8) + self._file.seek(curpos, 0) + self._nframes = self._nframeswritten + self._datalength = datalength + + def _writemarkers(self): + if len(self._markers) == 0: + return + self._file.write(b'MARK') + length = 2 + for marker in self._markers: + id, pos, name = marker + length = length + len(name) + 1 + 6 + if len(name) & 1 == 0: + length = length + 1 + _write_ulong(self._file, length) + self._marklength = length + 8 + _write_short(self._file, len(self._markers)) + for marker in self._markers: + id, pos, name = marker + _write_short(self._file, id) + _write_ulong(self._file, pos) + _write_string(self._file, name) + +def open(f, mode=None): + if mode is None: + if hasattr(f, 'mode'): + mode = f.mode + else: + mode = 'rb' + if mode in ('r', 'rb'): + return Aifc_read(f) + elif mode in ('w', 'wb'): + return Aifc_write(f) + else: + raise Error("mode must be 'r', 'rb', 'w', or 'wb'") + + +if __name__ == '__main__': + import sys + if not sys.argv[1:]: + sys.argv.append('/usr/demos/data/audio/bach.aiff') + fn = sys.argv[1] + with open(fn, 'r') as f: + print("Reading", fn) + print("nchannels =", f.getnchannels()) + print("nframes =", f.getnframes()) + print("sampwidth =", f.getsampwidth()) + print("framerate =", f.getframerate()) + print("comptype =", f.getcomptype()) + print("compname =", f.getcompname()) + if sys.argv[2:]: + gn = sys.argv[2] + print("Writing", gn) + with open(gn, 'w') as g: + g.setparams(f.getparams()) + while 1: + data = f.readframes(1024) + if not data: + break + g.writeframes(data) + print("Done.") diff --git a/lib/python3.11/antigravity.py b/lib/python3.11/antigravity.py new file mode 100644 index 0000000000000000000000000000000000000000..6dc520733577af68cd7926105204baf807251a39 --- /dev/null +++ b/lib/python3.11/antigravity.py @@ -0,0 +1,17 @@ + +import webbrowser +import hashlib + +webbrowser.open("https://xkcd.com/353/") + +def geohash(latitude, longitude, datedow): + '''Compute geohash() using the Munroe algorithm. + + >>> geohash(37.421542, -122.085589, b'2005-05-26-10458.68') + 37.857713 -122.544543 + + ''' + # https://xkcd.com/426/ + h = hashlib.md5(datedow, usedforsecurity=False).hexdigest() + p, q = [('%f' % float.fromhex('0.' + x)) for x in (h[:16], h[16:32])] + print('%d%s %d%s' % (latitude, p[1:], longitude, q[1:])) diff --git a/lib/python3.11/argparse.py b/lib/python3.11/argparse.py new file mode 100644 index 0000000000000000000000000000000000000000..2f5ecda9239eb5ba006b3b3c91ca636fc34108cd --- /dev/null +++ b/lib/python3.11/argparse.py @@ -0,0 +1,2640 @@ +# Author: Steven J. Bethard . +# New maintainer as of 29 August 2019: Raymond Hettinger + +"""Command-line parsing library + +This module is an optparse-inspired command-line parsing library that: + + - handles both optional and positional arguments + - produces highly informative usage messages + - supports parsers that dispatch to sub-parsers + +The following is a simple usage example that sums integers from the +command-line and writes the result to a file:: + + parser = argparse.ArgumentParser( + description='sum the integers at the command line') + parser.add_argument( + 'integers', metavar='int', nargs='+', type=int, + help='an integer to be summed') + parser.add_argument( + '--log', default=sys.stdout, type=argparse.FileType('w'), + help='the file where the sum should be written') + args = parser.parse_args() + args.log.write('%s' % sum(args.integers)) + args.log.close() + +The module contains the following public classes: + + - ArgumentParser -- The main entry point for command-line parsing. As the + example above shows, the add_argument() method is used to populate + the parser with actions for optional and positional arguments. Then + the parse_args() method is invoked to convert the args at the + command-line into an object with attributes. + + - ArgumentError -- The exception raised by ArgumentParser objects when + there are errors with the parser's actions. Errors raised while + parsing the command-line are caught by ArgumentParser and emitted + as command-line messages. + + - FileType -- A factory for defining types of files to be created. As the + example above shows, instances of FileType are typically passed as + the type= argument of add_argument() calls. + + - Action -- The base class for parser actions. Typically actions are + selected by passing strings like 'store_true' or 'append_const' to + the action= argument of add_argument(). However, for greater + customization of ArgumentParser actions, subclasses of Action may + be defined and passed as the action= argument. + + - HelpFormatter, RawDescriptionHelpFormatter, RawTextHelpFormatter, + ArgumentDefaultsHelpFormatter -- Formatter classes which + may be passed as the formatter_class= argument to the + ArgumentParser constructor. HelpFormatter is the default, + RawDescriptionHelpFormatter and RawTextHelpFormatter tell the parser + not to change the formatting for help text, and + ArgumentDefaultsHelpFormatter adds information about argument defaults + to the help. + +All other classes in this module are considered implementation details. +(Also note that HelpFormatter and RawDescriptionHelpFormatter are only +considered public as object names -- the API of the formatter objects is +still considered an implementation detail.) +""" + +__version__ = '1.1' +__all__ = [ + 'ArgumentParser', + 'ArgumentError', + 'ArgumentTypeError', + 'BooleanOptionalAction', + 'FileType', + 'HelpFormatter', + 'ArgumentDefaultsHelpFormatter', + 'RawDescriptionHelpFormatter', + 'RawTextHelpFormatter', + 'MetavarTypeHelpFormatter', + 'Namespace', + 'Action', + 'ONE_OR_MORE', + 'OPTIONAL', + 'PARSER', + 'REMAINDER', + 'SUPPRESS', + 'ZERO_OR_MORE', +] + + +import os as _os +import re as _re +import sys as _sys + +import warnings + +from gettext import gettext as _, ngettext + +SUPPRESS = '==SUPPRESS==' + +OPTIONAL = '?' +ZERO_OR_MORE = '*' +ONE_OR_MORE = '+' +PARSER = 'A...' +REMAINDER = '...' +_UNRECOGNIZED_ARGS_ATTR = '_unrecognized_args' + +# ============================= +# Utility functions and classes +# ============================= + +class _AttributeHolder(object): + """Abstract base class that provides __repr__. + + The __repr__ method returns a string in the format:: + ClassName(attr=name, attr=name, ...) + The attributes are determined either by a class-level attribute, + '_kwarg_names', or by inspecting the instance __dict__. + """ + + def __repr__(self): + type_name = type(self).__name__ + arg_strings = [] + star_args = {} + for arg in self._get_args(): + arg_strings.append(repr(arg)) + for name, value in self._get_kwargs(): + if name.isidentifier(): + arg_strings.append('%s=%r' % (name, value)) + else: + star_args[name] = value + if star_args: + arg_strings.append('**%s' % repr(star_args)) + return '%s(%s)' % (type_name, ', '.join(arg_strings)) + + def _get_kwargs(self): + return list(self.__dict__.items()) + + def _get_args(self): + return [] + + +def _copy_items(items): + if items is None: + return [] + # The copy module is used only in the 'append' and 'append_const' + # actions, and it is needed only when the default value isn't a list. + # Delay its import for speeding up the common case. + if type(items) is list: + return items[:] + import copy + return copy.copy(items) + + +# =============== +# Formatting Help +# =============== + + +class HelpFormatter(object): + """Formatter for generating usage messages and argument help strings. + + Only the name of this class is considered a public API. All the methods + provided by the class are considered an implementation detail. + """ + + def __init__(self, + prog, + indent_increment=2, + max_help_position=24, + width=None): + + # default setting for width + if width is None: + import shutil + width = shutil.get_terminal_size().columns + width -= 2 + + self._prog = prog + self._indent_increment = indent_increment + self._max_help_position = min(max_help_position, + max(width - 20, indent_increment * 2)) + self._width = width + + self._current_indent = 0 + self._level = 0 + self._action_max_length = 0 + + self._root_section = self._Section(self, None) + self._current_section = self._root_section + + self._whitespace_matcher = _re.compile(r'\s+', _re.ASCII) + self._long_break_matcher = _re.compile(r'\n\n\n+') + + # =============================== + # Section and indentation methods + # =============================== + def _indent(self): + self._current_indent += self._indent_increment + self._level += 1 + + def _dedent(self): + self._current_indent -= self._indent_increment + assert self._current_indent >= 0, 'Indent decreased below 0.' + self._level -= 1 + + class _Section(object): + + def __init__(self, formatter, parent, heading=None): + self.formatter = formatter + self.parent = parent + self.heading = heading + self.items = [] + + def format_help(self): + # format the indented section + if self.parent is not None: + self.formatter._indent() + join = self.formatter._join_parts + item_help = join([func(*args) for func, args in self.items]) + if self.parent is not None: + self.formatter._dedent() + + # return nothing if the section was empty + if not item_help: + return '' + + # add the heading if the section was non-empty + if self.heading is not SUPPRESS and self.heading is not None: + current_indent = self.formatter._current_indent + heading_text = _('%(heading)s:') % dict(heading=self.heading) + heading = '%*s%s\n' % (current_indent, '', heading_text) + else: + heading = '' + + # join the section-initial newline, the heading and the help + return join(['\n', heading, item_help, '\n']) + + def _add_item(self, func, args): + self._current_section.items.append((func, args)) + + # ======================== + # Message building methods + # ======================== + def start_section(self, heading): + self._indent() + section = self._Section(self, self._current_section, heading) + self._add_item(section.format_help, []) + self._current_section = section + + def end_section(self): + self._current_section = self._current_section.parent + self._dedent() + + def add_text(self, text): + if text is not SUPPRESS and text is not None: + self._add_item(self._format_text, [text]) + + def add_usage(self, usage, actions, groups, prefix=None): + if usage is not SUPPRESS: + args = usage, actions, groups, prefix + self._add_item(self._format_usage, args) + + def add_argument(self, action): + if action.help is not SUPPRESS: + + # find all invocations + get_invocation = self._format_action_invocation + invocations = [get_invocation(action)] + for subaction in self._iter_indented_subactions(action): + invocations.append(get_invocation(subaction)) + + # update the maximum item length + invocation_length = max(map(len, invocations)) + action_length = invocation_length + self._current_indent + self._action_max_length = max(self._action_max_length, + action_length) + + # add the item to the list + self._add_item(self._format_action, [action]) + + def add_arguments(self, actions): + for action in actions: + self.add_argument(action) + + # ======================= + # Help-formatting methods + # ======================= + def format_help(self): + help = self._root_section.format_help() + if help: + help = self._long_break_matcher.sub('\n\n', help) + help = help.strip('\n') + '\n' + return help + + def _join_parts(self, part_strings): + return ''.join([part + for part in part_strings + if part and part is not SUPPRESS]) + + def _format_usage(self, usage, actions, groups, prefix): + if prefix is None: + prefix = _('usage: ') + + # if usage is specified, use that + if usage is not None: + usage = usage % dict(prog=self._prog) + + # if no optionals or positionals are available, usage is just prog + elif usage is None and not actions: + usage = '%(prog)s' % dict(prog=self._prog) + + # if optionals and positionals are available, calculate usage + elif usage is None: + prog = '%(prog)s' % dict(prog=self._prog) + + # split optionals from positionals + optionals = [] + positionals = [] + for action in actions: + if action.option_strings: + optionals.append(action) + else: + positionals.append(action) + + # build full usage string + format = self._format_actions_usage + action_usage = format(optionals + positionals, groups) + usage = ' '.join([s for s in [prog, action_usage] if s]) + + # wrap the usage parts if it's too long + text_width = self._width - self._current_indent + if len(prefix) + len(usage) > text_width: + + # break usage into wrappable parts + part_regexp = ( + r'\(.*?\)+(?=\s|$)|' + r'\[.*?\]+(?=\s|$)|' + r'\S+' + ) + opt_usage = format(optionals, groups) + pos_usage = format(positionals, groups) + opt_parts = _re.findall(part_regexp, opt_usage) + pos_parts = _re.findall(part_regexp, pos_usage) + assert ' '.join(opt_parts) == opt_usage + assert ' '.join(pos_parts) == pos_usage + + # helper for wrapping lines + def get_lines(parts, indent, prefix=None): + lines = [] + line = [] + if prefix is not None: + line_len = len(prefix) - 1 + else: + line_len = len(indent) - 1 + for part in parts: + if line_len + 1 + len(part) > text_width and line: + lines.append(indent + ' '.join(line)) + line = [] + line_len = len(indent) - 1 + line.append(part) + line_len += len(part) + 1 + if line: + lines.append(indent + ' '.join(line)) + if prefix is not None: + lines[0] = lines[0][len(indent):] + return lines + + # if prog is short, follow it with optionals or positionals + if len(prefix) + len(prog) <= 0.75 * text_width: + indent = ' ' * (len(prefix) + len(prog) + 1) + if opt_parts: + lines = get_lines([prog] + opt_parts, indent, prefix) + lines.extend(get_lines(pos_parts, indent)) + elif pos_parts: + lines = get_lines([prog] + pos_parts, indent, prefix) + else: + lines = [prog] + + # if prog is long, put it on its own line + else: + indent = ' ' * len(prefix) + parts = opt_parts + pos_parts + lines = get_lines(parts, indent) + if len(lines) > 1: + lines = [] + lines.extend(get_lines(opt_parts, indent)) + lines.extend(get_lines(pos_parts, indent)) + lines = [prog] + lines + + # join lines into usage + usage = '\n'.join(lines) + + # prefix with 'usage:' + return '%s%s\n\n' % (prefix, usage) + + def _format_actions_usage(self, actions, groups): + # find group indices and identify actions in groups + group_actions = set() + inserts = {} + for group in groups: + if not group._group_actions: + raise ValueError(f'empty group {group}') + + try: + start = actions.index(group._group_actions[0]) + except ValueError: + continue + else: + group_action_count = len(group._group_actions) + end = start + group_action_count + if actions[start:end] == group._group_actions: + + suppressed_actions_count = 0 + for action in group._group_actions: + group_actions.add(action) + if action.help is SUPPRESS: + suppressed_actions_count += 1 + + exposed_actions_count = group_action_count - suppressed_actions_count + if not exposed_actions_count: + continue + + if not group.required: + if start in inserts: + inserts[start] += ' [' + else: + inserts[start] = '[' + if end in inserts: + inserts[end] += ']' + else: + inserts[end] = ']' + elif exposed_actions_count > 1: + if start in inserts: + inserts[start] += ' (' + else: + inserts[start] = '(' + if end in inserts: + inserts[end] += ')' + else: + inserts[end] = ')' + for i in range(start + 1, end): + inserts[i] = '|' + + # collect all actions format strings + parts = [] + for i, action in enumerate(actions): + + # suppressed arguments are marked with None + # remove | separators for suppressed arguments + if action.help is SUPPRESS: + parts.append(None) + if inserts.get(i) == '|': + inserts.pop(i) + elif inserts.get(i + 1) == '|': + inserts.pop(i + 1) + + # produce all arg strings + elif not action.option_strings: + default = self._get_default_metavar_for_positional(action) + part = self._format_args(action, default) + + # if it's in a group, strip the outer [] + if action in group_actions: + if part[0] == '[' and part[-1] == ']': + part = part[1:-1] + + # add the action string to the list + parts.append(part) + + # produce the first way to invoke the option in brackets + else: + option_string = action.option_strings[0] + + # if the Optional doesn't take a value, format is: + # -s or --long + if action.nargs == 0: + part = action.format_usage() + + # if the Optional takes a value, format is: + # -s ARGS or --long ARGS + else: + default = self._get_default_metavar_for_optional(action) + args_string = self._format_args(action, default) + part = '%s %s' % (option_string, args_string) + + # make it look optional if it's not required or in a group + if not action.required and action not in group_actions: + part = '[%s]' % part + + # add the action string to the list + parts.append(part) + + # insert things at the necessary indices + for i in sorted(inserts, reverse=True): + parts[i:i] = [inserts[i]] + + # join all the action items with spaces + text = ' '.join([item for item in parts if item is not None]) + + # clean up separators for mutually exclusive groups + open = r'[\[(]' + close = r'[\])]' + text = _re.sub(r'(%s) ' % open, r'\1', text) + text = _re.sub(r' (%s)' % close, r'\1', text) + text = _re.sub(r'%s *%s' % (open, close), r'', text) + text = text.strip() + + # return the text + return text + + def _format_text(self, text): + if '%(prog)' in text: + text = text % dict(prog=self._prog) + text_width = max(self._width - self._current_indent, 11) + indent = ' ' * self._current_indent + return self._fill_text(text, text_width, indent) + '\n\n' + + def _format_action(self, action): + # determine the required width and the entry label + help_position = min(self._action_max_length + 2, + self._max_help_position) + help_width = max(self._width - help_position, 11) + action_width = help_position - self._current_indent - 2 + action_header = self._format_action_invocation(action) + + # no help; start on same line and add a final newline + if not action.help: + tup = self._current_indent, '', action_header + action_header = '%*s%s\n' % tup + + # short action name; start on the same line and pad two spaces + elif len(action_header) <= action_width: + tup = self._current_indent, '', action_width, action_header + action_header = '%*s%-*s ' % tup + indent_first = 0 + + # long action name; start on the next line + else: + tup = self._current_indent, '', action_header + action_header = '%*s%s\n' % tup + indent_first = help_position + + # collect the pieces of the action help + parts = [action_header] + + # if there was help for the action, add lines of help text + if action.help and action.help.strip(): + help_text = self._expand_help(action) + if help_text: + help_lines = self._split_lines(help_text, help_width) + parts.append('%*s%s\n' % (indent_first, '', help_lines[0])) + for line in help_lines[1:]: + parts.append('%*s%s\n' % (help_position, '', line)) + + # or add a newline if the description doesn't end with one + elif not action_header.endswith('\n'): + parts.append('\n') + + # if there are any sub-actions, add their help as well + for subaction in self._iter_indented_subactions(action): + parts.append(self._format_action(subaction)) + + # return a single string + return self._join_parts(parts) + + def _format_action_invocation(self, action): + if not action.option_strings: + default = self._get_default_metavar_for_positional(action) + metavar, = self._metavar_formatter(action, default)(1) + return metavar + + else: + parts = [] + + # if the Optional doesn't take a value, format is: + # -s, --long + if action.nargs == 0: + parts.extend(action.option_strings) + + # if the Optional takes a value, format is: + # -s ARGS, --long ARGS + else: + default = self._get_default_metavar_for_optional(action) + args_string = self._format_args(action, default) + for option_string in action.option_strings: + parts.append('%s %s' % (option_string, args_string)) + + return ', '.join(parts) + + def _metavar_formatter(self, action, default_metavar): + if action.metavar is not None: + result = action.metavar + elif action.choices is not None: + choice_strs = [str(choice) for choice in action.choices] + result = '{%s}' % ','.join(choice_strs) + else: + result = default_metavar + + def format(tuple_size): + if isinstance(result, tuple): + return result + else: + return (result, ) * tuple_size + return format + + def _format_args(self, action, default_metavar): + get_metavar = self._metavar_formatter(action, default_metavar) + if action.nargs is None: + result = '%s' % get_metavar(1) + elif action.nargs == OPTIONAL: + result = '[%s]' % get_metavar(1) + elif action.nargs == ZERO_OR_MORE: + metavar = get_metavar(1) + if len(metavar) == 2: + result = '[%s [%s ...]]' % metavar + else: + result = '[%s ...]' % metavar + elif action.nargs == ONE_OR_MORE: + result = '%s [%s ...]' % get_metavar(2) + elif action.nargs == REMAINDER: + result = '...' + elif action.nargs == PARSER: + result = '%s ...' % get_metavar(1) + elif action.nargs == SUPPRESS: + result = '' + else: + try: + formats = ['%s' for _ in range(action.nargs)] + except TypeError: + raise ValueError("invalid nargs value") from None + result = ' '.join(formats) % get_metavar(action.nargs) + return result + + def _expand_help(self, action): + params = dict(vars(action), prog=self._prog) + for name in list(params): + if params[name] is SUPPRESS: + del params[name] + for name in list(params): + if hasattr(params[name], '__name__'): + params[name] = params[name].__name__ + if params.get('choices') is not None: + choices_str = ', '.join([str(c) for c in params['choices']]) + params['choices'] = choices_str + return self._get_help_string(action) % params + + def _iter_indented_subactions(self, action): + try: + get_subactions = action._get_subactions + except AttributeError: + pass + else: + self._indent() + yield from get_subactions() + self._dedent() + + def _split_lines(self, text, width): + text = self._whitespace_matcher.sub(' ', text).strip() + # The textwrap module is used only for formatting help. + # Delay its import for speeding up the common usage of argparse. + import textwrap + return textwrap.wrap(text, width) + + def _fill_text(self, text, width, indent): + text = self._whitespace_matcher.sub(' ', text).strip() + import textwrap + return textwrap.fill(text, width, + initial_indent=indent, + subsequent_indent=indent) + + def _get_help_string(self, action): + return action.help + + def _get_default_metavar_for_optional(self, action): + return action.dest.upper() + + def _get_default_metavar_for_positional(self, action): + return action.dest + + +class RawDescriptionHelpFormatter(HelpFormatter): + """Help message formatter which retains any formatting in descriptions. + + Only the name of this class is considered a public API. All the methods + provided by the class are considered an implementation detail. + """ + + def _fill_text(self, text, width, indent): + return ''.join(indent + line for line in text.splitlines(keepends=True)) + + +class RawTextHelpFormatter(RawDescriptionHelpFormatter): + """Help message formatter which retains formatting of all help text. + + Only the name of this class is considered a public API. All the methods + provided by the class are considered an implementation detail. + """ + + def _split_lines(self, text, width): + return text.splitlines() + + +class ArgumentDefaultsHelpFormatter(HelpFormatter): + """Help message formatter which adds default values to argument help. + + Only the name of this class is considered a public API. All the methods + provided by the class are considered an implementation detail. + """ + + def _get_help_string(self, action): + """ + Add the default value to the option help message. + + ArgumentDefaultsHelpFormatter and BooleanOptionalAction when it isn't + already present. This code will do that, detecting cornercases to + prevent duplicates or cases where it wouldn't make sense to the end + user. + """ + help = action.help + if help is None: + help = '' + + if '%(default)' not in help: + if action.default is not SUPPRESS: + defaulting_nargs = [OPTIONAL, ZERO_OR_MORE] + if action.option_strings or action.nargs in defaulting_nargs: + help += _(' (default: %(default)s)') + return help + + + +class MetavarTypeHelpFormatter(HelpFormatter): + """Help message formatter which uses the argument 'type' as the default + metavar value (instead of the argument 'dest') + + Only the name of this class is considered a public API. All the methods + provided by the class are considered an implementation detail. + """ + + def _get_default_metavar_for_optional(self, action): + return action.type.__name__ + + def _get_default_metavar_for_positional(self, action): + return action.type.__name__ + + +# ===================== +# Options and Arguments +# ===================== + +def _get_action_name(argument): + if argument is None: + return None + elif argument.option_strings: + return '/'.join(argument.option_strings) + elif argument.metavar not in (None, SUPPRESS): + return argument.metavar + elif argument.dest not in (None, SUPPRESS): + return argument.dest + elif argument.choices: + return '{' + ','.join(argument.choices) + '}' + else: + return None + + +class ArgumentError(Exception): + """An error from creating or using an argument (optional or positional). + + The string value of this exception is the message, augmented with + information about the argument that caused it. + """ + + def __init__(self, argument, message): + self.argument_name = _get_action_name(argument) + self.message = message + + def __str__(self): + if self.argument_name is None: + format = '%(message)s' + else: + format = _('argument %(argument_name)s: %(message)s') + return format % dict(message=self.message, + argument_name=self.argument_name) + + +class ArgumentTypeError(Exception): + """An error from trying to convert a command line string to a type.""" + pass + + +# ============== +# Action classes +# ============== + +class Action(_AttributeHolder): + """Information about how to convert command line strings to Python objects. + + Action objects are used by an ArgumentParser to represent the information + needed to parse a single argument from one or more strings from the + command line. The keyword arguments to the Action constructor are also + all attributes of Action instances. + + Keyword Arguments: + + - option_strings -- A list of command-line option strings which + should be associated with this action. + + - dest -- The name of the attribute to hold the created object(s) + + - nargs -- The number of command-line arguments that should be + consumed. By default, one argument will be consumed and a single + value will be produced. Other values include: + - N (an integer) consumes N arguments (and produces a list) + - '?' consumes zero or one arguments + - '*' consumes zero or more arguments (and produces a list) + - '+' consumes one or more arguments (and produces a list) + Note that the difference between the default and nargs=1 is that + with the default, a single value will be produced, while with + nargs=1, a list containing a single value will be produced. + + - const -- The value to be produced if the option is specified and the + option uses an action that takes no values. + + - default -- The value to be produced if the option is not specified. + + - type -- A callable that accepts a single string argument, and + returns the converted value. The standard Python types str, int, + float, and complex are useful examples of such callables. If None, + str is used. + + - choices -- A container of values that should be allowed. If not None, + after a command-line argument has been converted to the appropriate + type, an exception will be raised if it is not a member of this + collection. + + - required -- True if the action must always be specified at the + command line. This is only meaningful for optional command-line + arguments. + + - help -- The help string describing the argument. + + - metavar -- The name to be used for the option's argument with the + help string. If None, the 'dest' value will be used as the name. + """ + + def __init__(self, + option_strings, + dest, + nargs=None, + const=None, + default=None, + type=None, + choices=None, + required=False, + help=None, + metavar=None): + self.option_strings = option_strings + self.dest = dest + self.nargs = nargs + self.const = const + self.default = default + self.type = type + self.choices = choices + self.required = required + self.help = help + self.metavar = metavar + + def _get_kwargs(self): + names = [ + 'option_strings', + 'dest', + 'nargs', + 'const', + 'default', + 'type', + 'choices', + 'required', + 'help', + 'metavar', + ] + return [(name, getattr(self, name)) for name in names] + + def format_usage(self): + return self.option_strings[0] + + def __call__(self, parser, namespace, values, option_string=None): + raise NotImplementedError(_('.__call__() not defined')) + + +class BooleanOptionalAction(Action): + def __init__(self, + option_strings, + dest, + default=None, + type=None, + choices=None, + required=False, + help=None, + metavar=None): + + _option_strings = [] + for option_string in option_strings: + _option_strings.append(option_string) + + if option_string.startswith('--'): + option_string = '--no-' + option_string[2:] + _option_strings.append(option_string) + + super().__init__( + option_strings=_option_strings, + dest=dest, + nargs=0, + default=default, + type=type, + choices=choices, + required=required, + help=help, + metavar=metavar) + + + def __call__(self, parser, namespace, values, option_string=None): + if option_string in self.option_strings: + setattr(namespace, self.dest, not option_string.startswith('--no-')) + + def format_usage(self): + return ' | '.join(self.option_strings) + + +class _StoreAction(Action): + + def __init__(self, + option_strings, + dest, + nargs=None, + const=None, + default=None, + type=None, + choices=None, + required=False, + help=None, + metavar=None): + if nargs == 0: + raise ValueError('nargs for store actions must be != 0; if you ' + 'have nothing to store, actions such as store ' + 'true or store const may be more appropriate') + if const is not None and nargs != OPTIONAL: + raise ValueError('nargs must be %r to supply const' % OPTIONAL) + super(_StoreAction, self).__init__( + option_strings=option_strings, + dest=dest, + nargs=nargs, + const=const, + default=default, + type=type, + choices=choices, + required=required, + help=help, + metavar=metavar) + + def __call__(self, parser, namespace, values, option_string=None): + setattr(namespace, self.dest, values) + + +class _StoreConstAction(Action): + + def __init__(self, + option_strings, + dest, + const=None, + default=None, + required=False, + help=None, + metavar=None): + super(_StoreConstAction, self).__init__( + option_strings=option_strings, + dest=dest, + nargs=0, + const=const, + default=default, + required=required, + help=help) + + def __call__(self, parser, namespace, values, option_string=None): + setattr(namespace, self.dest, self.const) + + +class _StoreTrueAction(_StoreConstAction): + + def __init__(self, + option_strings, + dest, + default=False, + required=False, + help=None): + super(_StoreTrueAction, self).__init__( + option_strings=option_strings, + dest=dest, + const=True, + default=default, + required=required, + help=help) + + +class _StoreFalseAction(_StoreConstAction): + + def __init__(self, + option_strings, + dest, + default=True, + required=False, + help=None): + super(_StoreFalseAction, self).__init__( + option_strings=option_strings, + dest=dest, + const=False, + default=default, + required=required, + help=help) + + +class _AppendAction(Action): + + def __init__(self, + option_strings, + dest, + nargs=None, + const=None, + default=None, + type=None, + choices=None, + required=False, + help=None, + metavar=None): + if nargs == 0: + raise ValueError('nargs for append actions must be != 0; if arg ' + 'strings are not supplying the value to append, ' + 'the append const action may be more appropriate') + if const is not None and nargs != OPTIONAL: + raise ValueError('nargs must be %r to supply const' % OPTIONAL) + super(_AppendAction, self).__init__( + option_strings=option_strings, + dest=dest, + nargs=nargs, + const=const, + default=default, + type=type, + choices=choices, + required=required, + help=help, + metavar=metavar) + + def __call__(self, parser, namespace, values, option_string=None): + items = getattr(namespace, self.dest, None) + items = _copy_items(items) + items.append(values) + setattr(namespace, self.dest, items) + + +class _AppendConstAction(Action): + + def __init__(self, + option_strings, + dest, + const=None, + default=None, + required=False, + help=None, + metavar=None): + super(_AppendConstAction, self).__init__( + option_strings=option_strings, + dest=dest, + nargs=0, + const=const, + default=default, + required=required, + help=help, + metavar=metavar) + + def __call__(self, parser, namespace, values, option_string=None): + items = getattr(namespace, self.dest, None) + items = _copy_items(items) + items.append(self.const) + setattr(namespace, self.dest, items) + + +class _CountAction(Action): + + def __init__(self, + option_strings, + dest, + default=None, + required=False, + help=None): + super(_CountAction, self).__init__( + option_strings=option_strings, + dest=dest, + nargs=0, + default=default, + required=required, + help=help) + + def __call__(self, parser, namespace, values, option_string=None): + count = getattr(namespace, self.dest, None) + if count is None: + count = 0 + setattr(namespace, self.dest, count + 1) + + +class _HelpAction(Action): + + def __init__(self, + option_strings, + dest=SUPPRESS, + default=SUPPRESS, + help=None): + super(_HelpAction, self).__init__( + option_strings=option_strings, + dest=dest, + default=default, + nargs=0, + help=help) + + def __call__(self, parser, namespace, values, option_string=None): + parser.print_help() + parser.exit() + + +class _VersionAction(Action): + + def __init__(self, + option_strings, + version=None, + dest=SUPPRESS, + default=SUPPRESS, + help=None): + if help is None: + help = _("show program's version number and exit") + super(_VersionAction, self).__init__( + option_strings=option_strings, + dest=dest, + default=default, + nargs=0, + help=help) + self.version = version + + def __call__(self, parser, namespace, values, option_string=None): + version = self.version + if version is None: + version = parser.version + formatter = parser._get_formatter() + formatter.add_text(version) + parser._print_message(formatter.format_help(), _sys.stdout) + parser.exit() + + +class _SubParsersAction(Action): + + class _ChoicesPseudoAction(Action): + + def __init__(self, name, aliases, help): + metavar = dest = name + if aliases: + metavar += ' (%s)' % ', '.join(aliases) + sup = super(_SubParsersAction._ChoicesPseudoAction, self) + sup.__init__(option_strings=[], dest=dest, help=help, + metavar=metavar) + + def __init__(self, + option_strings, + prog, + parser_class, + dest=SUPPRESS, + required=False, + help=None, + metavar=None): + + self._prog_prefix = prog + self._parser_class = parser_class + self._name_parser_map = {} + self._choices_actions = [] + + super(_SubParsersAction, self).__init__( + option_strings=option_strings, + dest=dest, + nargs=PARSER, + choices=self._name_parser_map, + required=required, + help=help, + metavar=metavar) + + def add_parser(self, name, **kwargs): + # set prog from the existing prefix + if kwargs.get('prog') is None: + kwargs['prog'] = '%s %s' % (self._prog_prefix, name) + + aliases = kwargs.pop('aliases', ()) + + if name in self._name_parser_map: + raise ArgumentError(self, _('conflicting subparser: %s') % name) + for alias in aliases: + if alias in self._name_parser_map: + raise ArgumentError( + self, _('conflicting subparser alias: %s') % alias) + + # create a pseudo-action to hold the choice help + if 'help' in kwargs: + help = kwargs.pop('help') + choice_action = self._ChoicesPseudoAction(name, aliases, help) + self._choices_actions.append(choice_action) + + # create the parser and add it to the map + parser = self._parser_class(**kwargs) + self._name_parser_map[name] = parser + + # make parser available under aliases also + for alias in aliases: + self._name_parser_map[alias] = parser + + return parser + + def _get_subactions(self): + return self._choices_actions + + def __call__(self, parser, namespace, values, option_string=None): + parser_name = values[0] + arg_strings = values[1:] + + # set the parser name if requested + if self.dest is not SUPPRESS: + setattr(namespace, self.dest, parser_name) + + # select the parser + try: + parser = self._name_parser_map[parser_name] + except KeyError: + args = {'parser_name': parser_name, + 'choices': ', '.join(self._name_parser_map)} + msg = _('unknown parser %(parser_name)r (choices: %(choices)s)') % args + raise ArgumentError(self, msg) + + # parse all the remaining options into the namespace + # store any unrecognized options on the object, so that the top + # level parser can decide what to do with them + + # In case this subparser defines new defaults, we parse them + # in a new namespace object and then update the original + # namespace for the relevant parts. + subnamespace, arg_strings = parser.parse_known_args(arg_strings, None) + for key, value in vars(subnamespace).items(): + setattr(namespace, key, value) + + if arg_strings: + vars(namespace).setdefault(_UNRECOGNIZED_ARGS_ATTR, []) + getattr(namespace, _UNRECOGNIZED_ARGS_ATTR).extend(arg_strings) + +class _ExtendAction(_AppendAction): + def __call__(self, parser, namespace, values, option_string=None): + items = getattr(namespace, self.dest, None) + items = _copy_items(items) + items.extend(values) + setattr(namespace, self.dest, items) + +# ============== +# Type classes +# ============== + +class FileType(object): + """Factory for creating file object types + + Instances of FileType are typically passed as type= arguments to the + ArgumentParser add_argument() method. + + Keyword Arguments: + - mode -- A string indicating how the file is to be opened. Accepts the + same values as the builtin open() function. + - bufsize -- The file's desired buffer size. Accepts the same values as + the builtin open() function. + - encoding -- The file's encoding. Accepts the same values as the + builtin open() function. + - errors -- A string indicating how encoding and decoding errors are to + be handled. Accepts the same value as the builtin open() function. + """ + + def __init__(self, mode='r', bufsize=-1, encoding=None, errors=None): + self._mode = mode + self._bufsize = bufsize + self._encoding = encoding + self._errors = errors + + def __call__(self, string): + # the special argument "-" means sys.std{in,out} + if string == '-': + if 'r' in self._mode: + return _sys.stdin.buffer if 'b' in self._mode else _sys.stdin + elif any(c in self._mode for c in 'wax'): + return _sys.stdout.buffer if 'b' in self._mode else _sys.stdout + else: + msg = _('argument "-" with mode %r') % self._mode + raise ValueError(msg) + + # all other arguments are used as file names + try: + return open(string, self._mode, self._bufsize, self._encoding, + self._errors) + except OSError as e: + args = {'filename': string, 'error': e} + message = _("can't open '%(filename)s': %(error)s") + raise ArgumentTypeError(message % args) + + def __repr__(self): + args = self._mode, self._bufsize + kwargs = [('encoding', self._encoding), ('errors', self._errors)] + args_str = ', '.join([repr(arg) for arg in args if arg != -1] + + ['%s=%r' % (kw, arg) for kw, arg in kwargs + if arg is not None]) + return '%s(%s)' % (type(self).__name__, args_str) + +# =========================== +# Optional and Positional Parsing +# =========================== + +class Namespace(_AttributeHolder): + """Simple object for storing attributes. + + Implements equality by attribute names and values, and provides a simple + string representation. + """ + + def __init__(self, **kwargs): + for name in kwargs: + setattr(self, name, kwargs[name]) + + def __eq__(self, other): + if not isinstance(other, Namespace): + return NotImplemented + return vars(self) == vars(other) + + def __contains__(self, key): + return key in self.__dict__ + + +class _ActionsContainer(object): + + def __init__(self, + description, + prefix_chars, + argument_default, + conflict_handler): + super(_ActionsContainer, self).__init__() + + self.description = description + self.argument_default = argument_default + self.prefix_chars = prefix_chars + self.conflict_handler = conflict_handler + + # set up registries + self._registries = {} + + # register actions + self.register('action', None, _StoreAction) + self.register('action', 'store', _StoreAction) + self.register('action', 'store_const', _StoreConstAction) + self.register('action', 'store_true', _StoreTrueAction) + self.register('action', 'store_false', _StoreFalseAction) + self.register('action', 'append', _AppendAction) + self.register('action', 'append_const', _AppendConstAction) + self.register('action', 'count', _CountAction) + self.register('action', 'help', _HelpAction) + self.register('action', 'version', _VersionAction) + self.register('action', 'parsers', _SubParsersAction) + self.register('action', 'extend', _ExtendAction) + + # raise an exception if the conflict handler is invalid + self._get_handler() + + # action storage + self._actions = [] + self._option_string_actions = {} + + # groups + self._action_groups = [] + self._mutually_exclusive_groups = [] + + # defaults storage + self._defaults = {} + + # determines whether an "option" looks like a negative number + self._negative_number_matcher = _re.compile(r'^-\d+$|^-\d*\.\d+$') + + # whether or not there are any optionals that look like negative + # numbers -- uses a list so it can be shared and edited + self._has_negative_number_optionals = [] + + # ==================== + # Registration methods + # ==================== + def register(self, registry_name, value, object): + registry = self._registries.setdefault(registry_name, {}) + registry[value] = object + + def _registry_get(self, registry_name, value, default=None): + return self._registries[registry_name].get(value, default) + + # ================================== + # Namespace default accessor methods + # ================================== + def set_defaults(self, **kwargs): + self._defaults.update(kwargs) + + # if these defaults match any existing arguments, replace + # the previous default on the object with the new one + for action in self._actions: + if action.dest in kwargs: + action.default = kwargs[action.dest] + + def get_default(self, dest): + for action in self._actions: + if action.dest == dest and action.default is not None: + return action.default + return self._defaults.get(dest, None) + + + # ======================= + # Adding argument actions + # ======================= + def add_argument(self, *args, **kwargs): + """ + add_argument(dest, ..., name=value, ...) + add_argument(option_string, option_string, ..., name=value, ...) + """ + + # if no positional args are supplied or only one is supplied and + # it doesn't look like an option string, parse a positional + # argument + chars = self.prefix_chars + if not args or len(args) == 1 and args[0][0] not in chars: + if args and 'dest' in kwargs: + raise ValueError('dest supplied twice for positional argument') + kwargs = self._get_positional_kwargs(*args, **kwargs) + + # otherwise, we're adding an optional argument + else: + kwargs = self._get_optional_kwargs(*args, **kwargs) + + # if no default was supplied, use the parser-level default + if 'default' not in kwargs: + dest = kwargs['dest'] + if dest in self._defaults: + kwargs['default'] = self._defaults[dest] + elif self.argument_default is not None: + kwargs['default'] = self.argument_default + + # create the action object, and add it to the parser + action_class = self._pop_action_class(kwargs) + if not callable(action_class): + raise ValueError('unknown action "%s"' % (action_class,)) + action = action_class(**kwargs) + + # raise an error if the action type is not callable + type_func = self._registry_get('type', action.type, action.type) + if not callable(type_func): + raise ValueError('%r is not callable' % (type_func,)) + + if type_func is FileType: + raise ValueError('%r is a FileType class object, instance of it' + ' must be passed' % (type_func,)) + + # raise an error if the metavar does not match the type + if hasattr(self, "_get_formatter"): + try: + self._get_formatter()._format_args(action, None) + except TypeError: + raise ValueError("length of metavar tuple does not match nargs") + + return self._add_action(action) + + def add_argument_group(self, *args, **kwargs): + group = _ArgumentGroup(self, *args, **kwargs) + self._action_groups.append(group) + return group + + def add_mutually_exclusive_group(self, **kwargs): + group = _MutuallyExclusiveGroup(self, **kwargs) + self._mutually_exclusive_groups.append(group) + return group + + def _add_action(self, action): + # resolve any conflicts + self._check_conflict(action) + + # add to actions list + self._actions.append(action) + action.container = self + + # index the action by any option strings it has + for option_string in action.option_strings: + self._option_string_actions[option_string] = action + + # set the flag if any option strings look like negative numbers + for option_string in action.option_strings: + if self._negative_number_matcher.match(option_string): + if not self._has_negative_number_optionals: + self._has_negative_number_optionals.append(True) + + # return the created action + return action + + def _remove_action(self, action): + self._actions.remove(action) + + def _add_container_actions(self, container): + # collect groups by titles + title_group_map = {} + for group in self._action_groups: + if group.title in title_group_map: + msg = _('cannot merge actions - two groups are named %r') + raise ValueError(msg % (group.title)) + title_group_map[group.title] = group + + # map each action to its group + group_map = {} + for group in container._action_groups: + + # if a group with the title exists, use that, otherwise + # create a new group matching the container's group + if group.title not in title_group_map: + title_group_map[group.title] = self.add_argument_group( + title=group.title, + description=group.description, + conflict_handler=group.conflict_handler) + + # map the actions to their new group + for action in group._group_actions: + group_map[action] = title_group_map[group.title] + + # add container's mutually exclusive groups + # NOTE: if add_mutually_exclusive_group ever gains title= and + # description= then this code will need to be expanded as above + for group in container._mutually_exclusive_groups: + mutex_group = self.add_mutually_exclusive_group( + required=group.required) + + # map the actions to their new mutex group + for action in group._group_actions: + group_map[action] = mutex_group + + # add all actions to this container or their group + for action in container._actions: + group_map.get(action, self)._add_action(action) + + def _get_positional_kwargs(self, dest, **kwargs): + # make sure required is not specified + if 'required' in kwargs: + msg = _("'required' is an invalid argument for positionals") + raise TypeError(msg) + + # mark positional arguments as required if at least one is + # always required + if kwargs.get('nargs') not in [OPTIONAL, ZERO_OR_MORE]: + kwargs['required'] = True + if kwargs.get('nargs') == ZERO_OR_MORE and 'default' not in kwargs: + kwargs['required'] = True + + # return the keyword arguments with no option strings + return dict(kwargs, dest=dest, option_strings=[]) + + def _get_optional_kwargs(self, *args, **kwargs): + # determine short and long option strings + option_strings = [] + long_option_strings = [] + for option_string in args: + # error on strings that don't start with an appropriate prefix + if not option_string[0] in self.prefix_chars: + args = {'option': option_string, + 'prefix_chars': self.prefix_chars} + msg = _('invalid option string %(option)r: ' + 'must start with a character %(prefix_chars)r') + raise ValueError(msg % args) + + # strings starting with two prefix characters are long options + option_strings.append(option_string) + if len(option_string) > 1 and option_string[1] in self.prefix_chars: + long_option_strings.append(option_string) + + # infer destination, '--foo-bar' -> 'foo_bar' and '-x' -> 'x' + dest = kwargs.pop('dest', None) + if dest is None: + if long_option_strings: + dest_option_string = long_option_strings[0] + else: + dest_option_string = option_strings[0] + dest = dest_option_string.lstrip(self.prefix_chars) + if not dest: + msg = _('dest= is required for options like %r') + raise ValueError(msg % option_string) + dest = dest.replace('-', '_') + + # return the updated keyword arguments + return dict(kwargs, dest=dest, option_strings=option_strings) + + def _pop_action_class(self, kwargs, default=None): + action = kwargs.pop('action', default) + return self._registry_get('action', action, action) + + def _get_handler(self): + # determine function from conflict handler string + handler_func_name = '_handle_conflict_%s' % self.conflict_handler + try: + return getattr(self, handler_func_name) + except AttributeError: + msg = _('invalid conflict_resolution value: %r') + raise ValueError(msg % self.conflict_handler) + + def _check_conflict(self, action): + + # find all options that conflict with this option + confl_optionals = [] + for option_string in action.option_strings: + if option_string in self._option_string_actions: + confl_optional = self._option_string_actions[option_string] + confl_optionals.append((option_string, confl_optional)) + + # resolve any conflicts + if confl_optionals: + conflict_handler = self._get_handler() + conflict_handler(action, confl_optionals) + + def _handle_conflict_error(self, action, conflicting_actions): + message = ngettext('conflicting option string: %s', + 'conflicting option strings: %s', + len(conflicting_actions)) + conflict_string = ', '.join([option_string + for option_string, action + in conflicting_actions]) + raise ArgumentError(action, message % conflict_string) + + def _handle_conflict_resolve(self, action, conflicting_actions): + + # remove all conflicting options + for option_string, action in conflicting_actions: + + # remove the conflicting option + action.option_strings.remove(option_string) + self._option_string_actions.pop(option_string, None) + + # if the option now has no option string, remove it from the + # container holding it + if not action.option_strings: + action.container._remove_action(action) + + +class _ArgumentGroup(_ActionsContainer): + + def __init__(self, container, title=None, description=None, **kwargs): + # add any missing keyword arguments by checking the container + update = kwargs.setdefault + update('conflict_handler', container.conflict_handler) + update('prefix_chars', container.prefix_chars) + update('argument_default', container.argument_default) + super_init = super(_ArgumentGroup, self).__init__ + super_init(description=description, **kwargs) + + # group attributes + self.title = title + self._group_actions = [] + + # share most attributes with the container + self._registries = container._registries + self._actions = container._actions + self._option_string_actions = container._option_string_actions + self._defaults = container._defaults + self._has_negative_number_optionals = \ + container._has_negative_number_optionals + self._mutually_exclusive_groups = container._mutually_exclusive_groups + + def _add_action(self, action): + action = super(_ArgumentGroup, self)._add_action(action) + self._group_actions.append(action) + return action + + def _remove_action(self, action): + super(_ArgumentGroup, self)._remove_action(action) + self._group_actions.remove(action) + + def add_argument_group(self, *args, **kwargs): + warnings.warn( + "Nesting argument groups is deprecated.", + category=DeprecationWarning, + stacklevel=2 + ) + return super().add_argument_group(*args, **kwargs) + + +class _MutuallyExclusiveGroup(_ArgumentGroup): + + def __init__(self, container, required=False): + super(_MutuallyExclusiveGroup, self).__init__(container) + self.required = required + self._container = container + + def _add_action(self, action): + if action.required: + msg = _('mutually exclusive arguments must be optional') + raise ValueError(msg) + action = self._container._add_action(action) + self._group_actions.append(action) + return action + + def _remove_action(self, action): + self._container._remove_action(action) + self._group_actions.remove(action) + + def add_mutually_exclusive_group(self, *args, **kwargs): + warnings.warn( + "Nesting mutually exclusive groups is deprecated.", + category=DeprecationWarning, + stacklevel=2 + ) + return super().add_mutually_exclusive_group(*args, **kwargs) + + +class ArgumentParser(_AttributeHolder, _ActionsContainer): + """Object for parsing command line strings into Python objects. + + Keyword Arguments: + - prog -- The name of the program (default: + ``os.path.basename(sys.argv[0])``) + - usage -- A usage message (default: auto-generated from arguments) + - description -- A description of what the program does + - epilog -- Text following the argument descriptions + - parents -- Parsers whose arguments should be copied into this one + - formatter_class -- HelpFormatter class for printing help messages + - prefix_chars -- Characters that prefix optional arguments + - fromfile_prefix_chars -- Characters that prefix files containing + additional arguments + - argument_default -- The default value for all arguments + - conflict_handler -- String indicating how to handle conflicts + - add_help -- Add a -h/-help option + - allow_abbrev -- Allow long options to be abbreviated unambiguously + - exit_on_error -- Determines whether or not ArgumentParser exits with + error info when an error occurs + """ + + def __init__(self, + prog=None, + usage=None, + description=None, + epilog=None, + parents=[], + formatter_class=HelpFormatter, + prefix_chars='-', + fromfile_prefix_chars=None, + argument_default=None, + conflict_handler='error', + add_help=True, + allow_abbrev=True, + exit_on_error=True): + + superinit = super(ArgumentParser, self).__init__ + superinit(description=description, + prefix_chars=prefix_chars, + argument_default=argument_default, + conflict_handler=conflict_handler) + + # default setting for prog + if prog is None: + prog = _os.path.basename(_sys.argv[0]) + + self.prog = prog + self.usage = usage + self.epilog = epilog + self.formatter_class = formatter_class + self.fromfile_prefix_chars = fromfile_prefix_chars + self.add_help = add_help + self.allow_abbrev = allow_abbrev + self.exit_on_error = exit_on_error + + add_group = self.add_argument_group + self._positionals = add_group(_('positional arguments')) + self._optionals = add_group(_('options')) + self._subparsers = None + + # register types + def identity(string): + return string + self.register('type', None, identity) + + # add help argument if necessary + # (using explicit default to override global argument_default) + default_prefix = '-' if '-' in prefix_chars else prefix_chars[0] + if self.add_help: + self.add_argument( + default_prefix+'h', default_prefix*2+'help', + action='help', default=SUPPRESS, + help=_('show this help message and exit')) + + # add parent arguments and defaults + for parent in parents: + self._add_container_actions(parent) + try: + defaults = parent._defaults + except AttributeError: + pass + else: + self._defaults.update(defaults) + + # ======================= + # Pretty __repr__ methods + # ======================= + def _get_kwargs(self): + names = [ + 'prog', + 'usage', + 'description', + 'formatter_class', + 'conflict_handler', + 'add_help', + ] + return [(name, getattr(self, name)) for name in names] + + # ================================== + # Optional/Positional adding methods + # ================================== + def add_subparsers(self, **kwargs): + if self._subparsers is not None: + self.error(_('cannot have multiple subparser arguments')) + + # add the parser class to the arguments if it's not present + kwargs.setdefault('parser_class', type(self)) + + if 'title' in kwargs or 'description' in kwargs: + title = _(kwargs.pop('title', 'subcommands')) + description = _(kwargs.pop('description', None)) + self._subparsers = self.add_argument_group(title, description) + else: + self._subparsers = self._positionals + + # prog defaults to the usage message of this parser, skipping + # optional arguments and with no "usage:" prefix + if kwargs.get('prog') is None: + formatter = self._get_formatter() + positionals = self._get_positional_actions() + groups = self._mutually_exclusive_groups + formatter.add_usage(self.usage, positionals, groups, '') + kwargs['prog'] = formatter.format_help().strip() + + # create the parsers action and add it to the positionals list + parsers_class = self._pop_action_class(kwargs, 'parsers') + action = parsers_class(option_strings=[], **kwargs) + self._subparsers._add_action(action) + + # return the created parsers action + return action + + def _add_action(self, action): + if action.option_strings: + self._optionals._add_action(action) + else: + self._positionals._add_action(action) + return action + + def _get_optional_actions(self): + return [action + for action in self._actions + if action.option_strings] + + def _get_positional_actions(self): + return [action + for action in self._actions + if not action.option_strings] + + # ===================================== + # Command line argument parsing methods + # ===================================== + def parse_args(self, args=None, namespace=None): + args, argv = self.parse_known_args(args, namespace) + if argv: + msg = _('unrecognized arguments: %s') + self.error(msg % ' '.join(argv)) + return args + + def parse_known_args(self, args=None, namespace=None): + if args is None: + # args default to the system args + args = _sys.argv[1:] + else: + # make sure that args are mutable + args = list(args) + + # default Namespace built from parser defaults + if namespace is None: + namespace = Namespace() + + # add any action defaults that aren't present + for action in self._actions: + if action.dest is not SUPPRESS: + if not hasattr(namespace, action.dest): + if action.default is not SUPPRESS: + setattr(namespace, action.dest, action.default) + + # add any parser defaults that aren't present + for dest in self._defaults: + if not hasattr(namespace, dest): + setattr(namespace, dest, self._defaults[dest]) + + # parse the arguments and exit if there are any errors + if self.exit_on_error: + try: + namespace, args = self._parse_known_args(args, namespace) + except ArgumentError as err: + self.error(str(err)) + else: + namespace, args = self._parse_known_args(args, namespace) + + if hasattr(namespace, _UNRECOGNIZED_ARGS_ATTR): + args.extend(getattr(namespace, _UNRECOGNIZED_ARGS_ATTR)) + delattr(namespace, _UNRECOGNIZED_ARGS_ATTR) + return namespace, args + + def _parse_known_args(self, arg_strings, namespace): + # replace arg strings that are file references + if self.fromfile_prefix_chars is not None: + arg_strings = self._read_args_from_files(arg_strings) + + # map all mutually exclusive arguments to the other arguments + # they can't occur with + action_conflicts = {} + for mutex_group in self._mutually_exclusive_groups: + group_actions = mutex_group._group_actions + for i, mutex_action in enumerate(mutex_group._group_actions): + conflicts = action_conflicts.setdefault(mutex_action, []) + conflicts.extend(group_actions[:i]) + conflicts.extend(group_actions[i + 1:]) + + # find all option indices, and determine the arg_string_pattern + # which has an 'O' if there is an option at an index, + # an 'A' if there is an argument, or a '-' if there is a '--' + option_string_indices = {} + arg_string_pattern_parts = [] + arg_strings_iter = iter(arg_strings) + for i, arg_string in enumerate(arg_strings_iter): + + # all args after -- are non-options + if arg_string == '--': + arg_string_pattern_parts.append('-') + for arg_string in arg_strings_iter: + arg_string_pattern_parts.append('A') + + # otherwise, add the arg to the arg strings + # and note the index if it was an option + else: + option_tuple = self._parse_optional(arg_string) + if option_tuple is None: + pattern = 'A' + else: + option_string_indices[i] = option_tuple + pattern = 'O' + arg_string_pattern_parts.append(pattern) + + # join the pieces together to form the pattern + arg_strings_pattern = ''.join(arg_string_pattern_parts) + + # converts arg strings to the appropriate and then takes the action + seen_actions = set() + seen_non_default_actions = set() + + def take_action(action, argument_strings, option_string=None): + seen_actions.add(action) + argument_values = self._get_values(action, argument_strings) + + # error if this argument is not allowed with other previously + # seen arguments, assuming that actions that use the default + # value don't really count as "present" + if argument_values is not action.default: + seen_non_default_actions.add(action) + for conflict_action in action_conflicts.get(action, []): + if conflict_action in seen_non_default_actions: + msg = _('not allowed with argument %s') + action_name = _get_action_name(conflict_action) + raise ArgumentError(action, msg % action_name) + + # take the action if we didn't receive a SUPPRESS value + # (e.g. from a default) + if argument_values is not SUPPRESS: + action(self, namespace, argument_values, option_string) + + # function to convert arg_strings into an optional action + def consume_optional(start_index): + + # get the optional identified at this index + option_tuple = option_string_indices[start_index] + action, option_string, sep, explicit_arg = option_tuple + + # identify additional optionals in the same arg string + # (e.g. -xyz is the same as -x -y -z if no args are required) + match_argument = self._match_argument + action_tuples = [] + while True: + + # if we found no optional action, skip it + if action is None: + extras.append(arg_strings[start_index]) + return start_index + 1 + + # if there is an explicit argument, try to match the + # optional's string arguments to only this + if explicit_arg is not None: + arg_count = match_argument(action, 'A') + + # if the action is a single-dash option and takes no + # arguments, try to parse more single-dash options out + # of the tail of the option string + chars = self.prefix_chars + if ( + arg_count == 0 + and option_string[1] not in chars + and explicit_arg != '' + ): + if sep or explicit_arg[0] in chars: + msg = _('ignored explicit argument %r') + raise ArgumentError(action, msg % explicit_arg) + action_tuples.append((action, [], option_string)) + char = option_string[0] + option_string = char + explicit_arg[0] + optionals_map = self._option_string_actions + if option_string in optionals_map: + action = optionals_map[option_string] + explicit_arg = explicit_arg[1:] + if not explicit_arg: + sep = explicit_arg = None + elif explicit_arg[0] == '=': + sep = '=' + explicit_arg = explicit_arg[1:] + else: + sep = '' + else: + extras.append(char + explicit_arg) + stop = start_index + 1 + break + # if the action expect exactly one argument, we've + # successfully matched the option; exit the loop + elif arg_count == 1: + stop = start_index + 1 + args = [explicit_arg] + action_tuples.append((action, args, option_string)) + break + + # error if a double-dash option did not use the + # explicit argument + else: + msg = _('ignored explicit argument %r') + raise ArgumentError(action, msg % explicit_arg) + + # if there is no explicit argument, try to match the + # optional's string arguments with the following strings + # if successful, exit the loop + else: + start = start_index + 1 + selected_patterns = arg_strings_pattern[start:] + arg_count = match_argument(action, selected_patterns) + stop = start + arg_count + args = arg_strings[start:stop] + action_tuples.append((action, args, option_string)) + break + + # add the Optional to the list and return the index at which + # the Optional's string args stopped + assert action_tuples + for action, args, option_string in action_tuples: + take_action(action, args, option_string) + return stop + + # the list of Positionals left to be parsed; this is modified + # by consume_positionals() + positionals = self._get_positional_actions() + + # function to convert arg_strings into positional actions + def consume_positionals(start_index): + # match as many Positionals as possible + match_partial = self._match_arguments_partial + selected_pattern = arg_strings_pattern[start_index:] + arg_counts = match_partial(positionals, selected_pattern) + + # slice off the appropriate arg strings for each Positional + # and add the Positional and its args to the list + for action, arg_count in zip(positionals, arg_counts): + args = arg_strings[start_index: start_index + arg_count] + start_index += arg_count + take_action(action, args) + + # slice off the Positionals that we just parsed and return the + # index at which the Positionals' string args stopped + positionals[:] = positionals[len(arg_counts):] + return start_index + + # consume Positionals and Optionals alternately, until we have + # passed the last option string + extras = [] + start_index = 0 + if option_string_indices: + max_option_string_index = max(option_string_indices) + else: + max_option_string_index = -1 + while start_index <= max_option_string_index: + + # consume any Positionals preceding the next option + next_option_string_index = min([ + index + for index in option_string_indices + if index >= start_index]) + if start_index != next_option_string_index: + positionals_end_index = consume_positionals(start_index) + + # only try to parse the next optional if we didn't consume + # the option string during the positionals parsing + if positionals_end_index > start_index: + start_index = positionals_end_index + continue + else: + start_index = positionals_end_index + + # if we consumed all the positionals we could and we're not + # at the index of an option string, there were extra arguments + if start_index not in option_string_indices: + strings = arg_strings[start_index:next_option_string_index] + extras.extend(strings) + start_index = next_option_string_index + + # consume the next optional and any arguments for it + start_index = consume_optional(start_index) + + # consume any positionals following the last Optional + stop_index = consume_positionals(start_index) + + # if we didn't consume all the argument strings, there were extras + extras.extend(arg_strings[stop_index:]) + + # make sure all required actions were present and also convert + # action defaults which were not given as arguments + required_actions = [] + for action in self._actions: + if action not in seen_actions: + if action.required: + required_actions.append(_get_action_name(action)) + else: + # Convert action default now instead of doing it before + # parsing arguments to avoid calling convert functions + # twice (which may fail) if the argument was given, but + # only if it was defined already in the namespace + if (action.default is not None and + isinstance(action.default, str) and + hasattr(namespace, action.dest) and + action.default is getattr(namespace, action.dest)): + setattr(namespace, action.dest, + self._get_value(action, action.default)) + + if required_actions: + self.error(_('the following arguments are required: %s') % + ', '.join(required_actions)) + + # make sure all required groups had one option present + for group in self._mutually_exclusive_groups: + if group.required: + for action in group._group_actions: + if action in seen_non_default_actions: + break + + # if no actions were used, report the error + else: + names = [_get_action_name(action) + for action in group._group_actions + if action.help is not SUPPRESS] + msg = _('one of the arguments %s is required') + self.error(msg % ' '.join(names)) + + # return the updated namespace and the extra arguments + return namespace, extras + + def _read_args_from_files(self, arg_strings): + # expand arguments referencing files + new_arg_strings = [] + for arg_string in arg_strings: + + # for regular arguments, just add them back into the list + if not arg_string or arg_string[0] not in self.fromfile_prefix_chars: + new_arg_strings.append(arg_string) + + # replace arguments referencing files with the file content + else: + try: + with open(arg_string[1:]) as args_file: + arg_strings = [] + for arg_line in args_file.read().splitlines(): + for arg in self.convert_arg_line_to_args(arg_line): + arg_strings.append(arg) + arg_strings = self._read_args_from_files(arg_strings) + new_arg_strings.extend(arg_strings) + except OSError as err: + self.error(str(err)) + + # return the modified argument list + return new_arg_strings + + def convert_arg_line_to_args(self, arg_line): + return [arg_line] + + def _match_argument(self, action, arg_strings_pattern): + # match the pattern for this action to the arg strings + nargs_pattern = self._get_nargs_pattern(action) + match = _re.match(nargs_pattern, arg_strings_pattern) + + # raise an exception if we weren't able to find a match + if match is None: + nargs_errors = { + None: _('expected one argument'), + OPTIONAL: _('expected at most one argument'), + ONE_OR_MORE: _('expected at least one argument'), + } + msg = nargs_errors.get(action.nargs) + if msg is None: + msg = ngettext('expected %s argument', + 'expected %s arguments', + action.nargs) % action.nargs + raise ArgumentError(action, msg) + + # return the number of arguments matched + return len(match.group(1)) + + def _match_arguments_partial(self, actions, arg_strings_pattern): + # progressively shorten the actions list by slicing off the + # final actions until we find a match + result = [] + for i in range(len(actions), 0, -1): + actions_slice = actions[:i] + pattern = ''.join([self._get_nargs_pattern(action) + for action in actions_slice]) + match = _re.match(pattern, arg_strings_pattern) + if match is not None: + result.extend([len(string) for string in match.groups()]) + break + + # return the list of arg string counts + return result + + def _parse_optional(self, arg_string): + # if it's an empty string, it was meant to be a positional + if not arg_string: + return None + + # if it doesn't start with a prefix, it was meant to be positional + if not arg_string[0] in self.prefix_chars: + return None + + # if the option string is present in the parser, return the action + if arg_string in self._option_string_actions: + action = self._option_string_actions[arg_string] + return action, arg_string, None, None + + # if it's just a single character, it was meant to be positional + if len(arg_string) == 1: + return None + + # if the option string before the "=" is present, return the action + option_string, sep, explicit_arg = arg_string.partition('=') + if sep and option_string in self._option_string_actions: + action = self._option_string_actions[option_string] + return action, option_string, sep, explicit_arg + + # search through all possible prefixes of the option string + # and all actions in the parser for possible interpretations + option_tuples = self._get_option_tuples(arg_string) + + # if multiple actions match, the option string was ambiguous + if len(option_tuples) > 1: + options = ', '.join([option_string + for action, option_string, sep, explicit_arg in option_tuples]) + args = {'option': arg_string, 'matches': options} + msg = _('ambiguous option: %(option)s could match %(matches)s') + self.error(msg % args) + + # if exactly one action matched, this segmentation is good, + # so return the parsed action + elif len(option_tuples) == 1: + option_tuple, = option_tuples + return option_tuple + + # if it was not found as an option, but it looks like a negative + # number, it was meant to be positional + # unless there are negative-number-like options + if self._negative_number_matcher.match(arg_string): + if not self._has_negative_number_optionals: + return None + + # if it contains a space, it was meant to be a positional + if ' ' in arg_string: + return None + + # it was meant to be an optional but there is no such option + # in this parser (though it might be a valid option in a subparser) + return None, arg_string, None, None + + def _get_option_tuples(self, option_string): + result = [] + + # option strings starting with two prefix characters are only + # split at the '=' + chars = self.prefix_chars + if option_string[0] in chars and option_string[1] in chars: + if self.allow_abbrev: + option_prefix, sep, explicit_arg = option_string.partition('=') + if not sep: + sep = explicit_arg = None + for option_string in self._option_string_actions: + if option_string.startswith(option_prefix): + action = self._option_string_actions[option_string] + tup = action, option_string, sep, explicit_arg + result.append(tup) + + # single character options can be concatenated with their arguments + # but multiple character options always have to have their argument + # separate + elif option_string[0] in chars and option_string[1] not in chars: + option_prefix = option_string + short_option_prefix = option_string[:2] + short_explicit_arg = option_string[2:] + + for option_string in self._option_string_actions: + if option_string == short_option_prefix: + action = self._option_string_actions[option_string] + tup = action, option_string, '', short_explicit_arg + result.append(tup) + elif option_string.startswith(option_prefix): + action = self._option_string_actions[option_string] + tup = action, option_string, None, None + result.append(tup) + + # shouldn't ever get here + else: + self.error(_('unexpected option string: %s') % option_string) + + # return the collected option tuples + return result + + def _get_nargs_pattern(self, action): + # in all examples below, we have to allow for '--' args + # which are represented as '-' in the pattern + nargs = action.nargs + + # the default (None) is assumed to be a single argument + if nargs is None: + nargs_pattern = '(-*A-*)' + + # allow zero or one arguments + elif nargs == OPTIONAL: + nargs_pattern = '(-*A?-*)' + + # allow zero or more arguments + elif nargs == ZERO_OR_MORE: + nargs_pattern = '(-*[A-]*)' + + # allow one or more arguments + elif nargs == ONE_OR_MORE: + nargs_pattern = '(-*A[A-]*)' + + # allow any number of options or arguments + elif nargs == REMAINDER: + nargs_pattern = '([-AO]*)' + + # allow one argument followed by any number of options or arguments + elif nargs == PARSER: + nargs_pattern = '(-*A[-AO]*)' + + # suppress action, like nargs=0 + elif nargs == SUPPRESS: + nargs_pattern = '(-*-*)' + + # all others should be integers + else: + nargs_pattern = '(-*%s-*)' % '-*'.join('A' * nargs) + + # if this is an optional action, -- is not allowed + if action.option_strings: + nargs_pattern = nargs_pattern.replace('-*', '') + nargs_pattern = nargs_pattern.replace('-', '') + + # return the pattern + return nargs_pattern + + # ======================== + # Alt command line argument parsing, allowing free intermix + # ======================== + + def parse_intermixed_args(self, args=None, namespace=None): + args, argv = self.parse_known_intermixed_args(args, namespace) + if argv: + msg = _('unrecognized arguments: %s') + self.error(msg % ' '.join(argv)) + return args + + def parse_known_intermixed_args(self, args=None, namespace=None): + # returns a namespace and list of extras + # + # positional can be freely intermixed with optionals. optionals are + # first parsed with all positional arguments deactivated. The 'extras' + # are then parsed. If the parser definition is incompatible with the + # intermixed assumptions (e.g. use of REMAINDER, subparsers) a + # TypeError is raised. + # + # positionals are 'deactivated' by setting nargs and default to + # SUPPRESS. This blocks the addition of that positional to the + # namespace + + positionals = self._get_positional_actions() + a = [action for action in positionals + if action.nargs in [PARSER, REMAINDER]] + if a: + raise TypeError('parse_intermixed_args: positional arg' + ' with nargs=%s'%a[0].nargs) + + if [action.dest for group in self._mutually_exclusive_groups + for action in group._group_actions if action in positionals]: + raise TypeError('parse_intermixed_args: positional in' + ' mutuallyExclusiveGroup') + + try: + save_usage = self.usage + try: + if self.usage is None: + # capture the full usage for use in error messages + self.usage = self.format_usage()[7:] + for action in positionals: + # deactivate positionals + action.save_nargs = action.nargs + # action.nargs = 0 + action.nargs = SUPPRESS + action.save_default = action.default + action.default = SUPPRESS + namespace, remaining_args = self.parse_known_args(args, + namespace) + for action in positionals: + # remove the empty positional values from namespace + if (hasattr(namespace, action.dest) + and getattr(namespace, action.dest)==[]): + from warnings import warn + warn('Do not expect %s in %s' % (action.dest, namespace)) + delattr(namespace, action.dest) + finally: + # restore nargs and usage before exiting + for action in positionals: + action.nargs = action.save_nargs + action.default = action.save_default + optionals = self._get_optional_actions() + try: + # parse positionals. optionals aren't normally required, but + # they could be, so make sure they aren't. + for action in optionals: + action.save_required = action.required + action.required = False + for group in self._mutually_exclusive_groups: + group.save_required = group.required + group.required = False + namespace, extras = self.parse_known_args(remaining_args, + namespace) + finally: + # restore parser values before exiting + for action in optionals: + action.required = action.save_required + for group in self._mutually_exclusive_groups: + group.required = group.save_required + finally: + self.usage = save_usage + return namespace, extras + + # ======================== + # Value conversion methods + # ======================== + def _get_values(self, action, arg_strings): + # for everything but PARSER, REMAINDER args, strip out first '--' + if not action.option_strings and action.nargs not in [PARSER, REMAINDER]: + try: + arg_strings.remove('--') + except ValueError: + pass + + # optional argument produces a default when not present + if not arg_strings and action.nargs == OPTIONAL: + if action.option_strings: + value = action.const + else: + value = action.default + if isinstance(value, str): + value = self._get_value(action, value) + self._check_value(action, value) + + # when nargs='*' on a positional, if there were no command-line + # args, use the default if it is anything other than None + elif (not arg_strings and action.nargs == ZERO_OR_MORE and + not action.option_strings): + if action.default is not None: + value = action.default + else: + value = arg_strings + self._check_value(action, value) + + # single argument or optional argument produces a single value + elif len(arg_strings) == 1 and action.nargs in [None, OPTIONAL]: + arg_string, = arg_strings + value = self._get_value(action, arg_string) + self._check_value(action, value) + + # REMAINDER arguments convert all values, checking none + elif action.nargs == REMAINDER: + value = [self._get_value(action, v) for v in arg_strings] + + # PARSER arguments convert all values, but check only the first + elif action.nargs == PARSER: + value = [self._get_value(action, v) for v in arg_strings] + self._check_value(action, value[0]) + + # SUPPRESS argument does not put anything in the namespace + elif action.nargs == SUPPRESS: + value = SUPPRESS + + # all other types of nargs produce a list + else: + value = [self._get_value(action, v) for v in arg_strings] + for v in value: + self._check_value(action, v) + + # return the converted value + return value + + def _get_value(self, action, arg_string): + type_func = self._registry_get('type', action.type, action.type) + if not callable(type_func): + msg = _('%r is not callable') + raise ArgumentError(action, msg % type_func) + + # convert the value to the appropriate type + try: + result = type_func(arg_string) + + # ArgumentTypeErrors indicate errors + except ArgumentTypeError as err: + name = getattr(action.type, '__name__', repr(action.type)) + msg = str(err) + raise ArgumentError(action, msg) + + # TypeErrors or ValueErrors also indicate errors + except (TypeError, ValueError): + name = getattr(action.type, '__name__', repr(action.type)) + args = {'type': name, 'value': arg_string} + msg = _('invalid %(type)s value: %(value)r') + raise ArgumentError(action, msg % args) + + # return the converted value + return result + + def _check_value(self, action, value): + # converted value must be one of the choices (if specified) + if action.choices is not None and value not in action.choices: + args = {'value': value, + 'choices': ', '.join(map(repr, action.choices))} + msg = _('invalid choice: %(value)r (choose from %(choices)s)') + raise ArgumentError(action, msg % args) + + # ======================= + # Help-formatting methods + # ======================= + def format_usage(self): + formatter = self._get_formatter() + formatter.add_usage(self.usage, self._actions, + self._mutually_exclusive_groups) + return formatter.format_help() + + def format_help(self): + formatter = self._get_formatter() + + # usage + formatter.add_usage(self.usage, self._actions, + self._mutually_exclusive_groups) + + # description + formatter.add_text(self.description) + + # positionals, optionals and user-defined groups + for action_group in self._action_groups: + formatter.start_section(action_group.title) + formatter.add_text(action_group.description) + formatter.add_arguments(action_group._group_actions) + formatter.end_section() + + # epilog + formatter.add_text(self.epilog) + + # determine help from format above + return formatter.format_help() + + def _get_formatter(self): + return self.formatter_class(prog=self.prog) + + # ===================== + # Help-printing methods + # ===================== + def print_usage(self, file=None): + if file is None: + file = _sys.stdout + self._print_message(self.format_usage(), file) + + def print_help(self, file=None): + if file is None: + file = _sys.stdout + self._print_message(self.format_help(), file) + + def _print_message(self, message, file=None): + if message: + file = file or _sys.stderr + try: + file.write(message) + except (AttributeError, OSError): + pass + + # =============== + # Exiting methods + # =============== + def exit(self, status=0, message=None): + if message: + self._print_message(message, _sys.stderr) + _sys.exit(status) + + def error(self, message): + """error(message: string) + + Prints a usage message incorporating the message to stderr and + exits. + + If you override this in a subclass, it should not return -- it + should either exit or raise an exception. + """ + self.print_usage(_sys.stderr) + args = {'prog': self.prog, 'message': message} + self.exit(2, _('%(prog)s: error: %(message)s\n') % args) diff --git a/lib/python3.11/ast.py b/lib/python3.11/ast.py new file mode 100644 index 0000000000000000000000000000000000000000..d84d75e1f3a8e1babe50174119de2c603d28a66c --- /dev/null +++ b/lib/python3.11/ast.py @@ -0,0 +1,1752 @@ +""" + ast + ~~~ + + The `ast` module helps Python applications to process trees of the Python + abstract syntax grammar. The abstract syntax itself might change with + each Python release; this module helps to find out programmatically what + the current grammar looks like and allows modifications of it. + + An abstract syntax tree can be generated by passing `ast.PyCF_ONLY_AST` as + a flag to the `compile()` builtin function or by using the `parse()` + function from this module. The result will be a tree of objects whose + classes all inherit from `ast.AST`. + + A modified abstract syntax tree can be compiled into a Python code object + using the built-in `compile()` function. + + Additionally various helper functions are provided that make working with + the trees simpler. The main intention of the helper functions and this + module in general is to provide an easy to use interface for libraries + that work tightly with the python syntax (template engines for example). + + + :copyright: Copyright 2008 by Armin Ronacher. + :license: Python License. +""" +import sys +from _ast import * +from contextlib import contextmanager, nullcontext +from enum import IntEnum, auto, _simple_enum + + +def parse(source, filename='', mode='exec', *, + type_comments=False, feature_version=None): + """ + Parse the source into an AST node. + Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). + Pass type_comments=True to get back type comments where the syntax allows. + """ + flags = PyCF_ONLY_AST + if type_comments: + flags |= PyCF_TYPE_COMMENTS + if isinstance(feature_version, tuple): + major, minor = feature_version # Should be a 2-tuple. + assert major == 3 + feature_version = minor + elif feature_version is None: + feature_version = -1 + # Else it should be an int giving the minor version for 3.x. + return compile(source, filename, mode, flags, + _feature_version=feature_version) + + +def literal_eval(node_or_string): + """ + Evaluate an expression node or a string containing only a Python + expression. The string or node provided may only consist of the following + Python literal structures: strings, bytes, numbers, tuples, lists, dicts, + sets, booleans, and None. + + Caution: A complex expression can overflow the C stack and cause a crash. + """ + if isinstance(node_or_string, str): + node_or_string = parse(node_or_string.lstrip(" \t"), mode='eval') + if isinstance(node_or_string, Expression): + node_or_string = node_or_string.body + def _raise_malformed_node(node): + msg = "malformed node or string" + if lno := getattr(node, 'lineno', None): + msg += f' on line {lno}' + raise ValueError(msg + f': {node!r}') + def _convert_num(node): + if not isinstance(node, Constant) or type(node.value) not in (int, float, complex): + _raise_malformed_node(node) + return node.value + def _convert_signed_num(node): + if isinstance(node, UnaryOp) and isinstance(node.op, (UAdd, USub)): + operand = _convert_num(node.operand) + if isinstance(node.op, UAdd): + return + operand + else: + return - operand + return _convert_num(node) + def _convert(node): + if isinstance(node, Constant): + return node.value + elif isinstance(node, Tuple): + return tuple(map(_convert, node.elts)) + elif isinstance(node, List): + return list(map(_convert, node.elts)) + elif isinstance(node, Set): + return set(map(_convert, node.elts)) + elif (isinstance(node, Call) and isinstance(node.func, Name) and + node.func.id == 'set' and node.args == node.keywords == []): + return set() + elif isinstance(node, Dict): + if len(node.keys) != len(node.values): + _raise_malformed_node(node) + return dict(zip(map(_convert, node.keys), + map(_convert, node.values))) + elif isinstance(node, BinOp) and isinstance(node.op, (Add, Sub)): + left = _convert_signed_num(node.left) + right = _convert_num(node.right) + if isinstance(left, (int, float)) and isinstance(right, complex): + if isinstance(node.op, Add): + return left + right + else: + return left - right + return _convert_signed_num(node) + return _convert(node_or_string) + + +def dump(node, annotate_fields=True, include_attributes=False, *, indent=None): + """ + Return a formatted dump of the tree in node. This is mainly useful for + debugging purposes. If annotate_fields is true (by default), + the returned string will show the names and the values for fields. + If annotate_fields is false, the result string will be more compact by + omitting unambiguous field names. Attributes such as line + numbers and column offsets are not dumped by default. If this is wanted, + include_attributes can be set to true. If indent is a non-negative + integer or string, then the tree will be pretty-printed with that indent + level. None (the default) selects the single line representation. + """ + def _format(node, level=0): + if indent is not None: + level += 1 + prefix = '\n' + indent * level + sep = ',\n' + indent * level + else: + prefix = '' + sep = ', ' + if isinstance(node, AST): + cls = type(node) + args = [] + allsimple = True + keywords = annotate_fields + for name in node._fields: + try: + value = getattr(node, name) + except AttributeError: + keywords = True + continue + if value is None and getattr(cls, name, ...) is None: + keywords = True + continue + value, simple = _format(value, level) + allsimple = allsimple and simple + if keywords: + args.append('%s=%s' % (name, value)) + else: + args.append(value) + if include_attributes and node._attributes: + for name in node._attributes: + try: + value = getattr(node, name) + except AttributeError: + continue + if value is None and getattr(cls, name, ...) is None: + continue + value, simple = _format(value, level) + allsimple = allsimple and simple + args.append('%s=%s' % (name, value)) + if allsimple and len(args) <= 3: + return '%s(%s)' % (node.__class__.__name__, ', '.join(args)), not args + return '%s(%s%s)' % (node.__class__.__name__, prefix, sep.join(args)), False + elif isinstance(node, list): + if not node: + return '[]', True + return '[%s%s]' % (prefix, sep.join(_format(x, level)[0] for x in node)), False + return repr(node), True + + if not isinstance(node, AST): + raise TypeError('expected AST, got %r' % node.__class__.__name__) + if indent is not None and not isinstance(indent, str): + indent = ' ' * indent + return _format(node)[0] + + +def copy_location(new_node, old_node): + """ + Copy source location (`lineno`, `col_offset`, `end_lineno`, and `end_col_offset` + attributes) from *old_node* to *new_node* if possible, and return *new_node*. + """ + for attr in 'lineno', 'col_offset', 'end_lineno', 'end_col_offset': + if attr in old_node._attributes and attr in new_node._attributes: + value = getattr(old_node, attr, None) + # end_lineno and end_col_offset are optional attributes, and they + # should be copied whether the value is None or not. + if value is not None or ( + hasattr(old_node, attr) and attr.startswith("end_") + ): + setattr(new_node, attr, value) + return new_node + + +def fix_missing_locations(node): + """ + When you compile a node tree with compile(), the compiler expects lineno and + col_offset attributes for every node that supports them. This is rather + tedious to fill in for generated nodes, so this helper adds these attributes + recursively where not already set, by setting them to the values of the + parent node. It works recursively starting at *node*. + """ + def _fix(node, lineno, col_offset, end_lineno, end_col_offset): + if 'lineno' in node._attributes: + if not hasattr(node, 'lineno'): + node.lineno = lineno + else: + lineno = node.lineno + if 'end_lineno' in node._attributes: + if getattr(node, 'end_lineno', None) is None: + node.end_lineno = end_lineno + else: + end_lineno = node.end_lineno + if 'col_offset' in node._attributes: + if not hasattr(node, 'col_offset'): + node.col_offset = col_offset + else: + col_offset = node.col_offset + if 'end_col_offset' in node._attributes: + if getattr(node, 'end_col_offset', None) is None: + node.end_col_offset = end_col_offset + else: + end_col_offset = node.end_col_offset + for child in iter_child_nodes(node): + _fix(child, lineno, col_offset, end_lineno, end_col_offset) + _fix(node, 1, 0, 1, 0) + return node + + +def increment_lineno(node, n=1): + """ + Increment the line number and end line number of each node in the tree + starting at *node* by *n*. This is useful to "move code" to a different + location in a file. + """ + for child in walk(node): + # TypeIgnore is a special case where lineno is not an attribute + # but rather a field of the node itself. + if isinstance(child, TypeIgnore): + child.lineno = getattr(child, 'lineno', 0) + n + continue + + if 'lineno' in child._attributes: + child.lineno = getattr(child, 'lineno', 0) + n + if ( + "end_lineno" in child._attributes + and (end_lineno := getattr(child, "end_lineno", 0)) is not None + ): + child.end_lineno = end_lineno + n + return node + + +def iter_fields(node): + """ + Yield a tuple of ``(fieldname, value)`` for each field in ``node._fields`` + that is present on *node*. + """ + for field in node._fields: + try: + yield field, getattr(node, field) + except AttributeError: + pass + + +def iter_child_nodes(node): + """ + Yield all direct child nodes of *node*, that is, all fields that are nodes + and all items of fields that are lists of nodes. + """ + for name, field in iter_fields(node): + if isinstance(field, AST): + yield field + elif isinstance(field, list): + for item in field: + if isinstance(item, AST): + yield item + + +def get_docstring(node, clean=True): + """ + Return the docstring for the given node or None if no docstring can + be found. If the node provided does not have docstrings a TypeError + will be raised. + + If *clean* is `True`, all tabs are expanded to spaces and any whitespace + that can be uniformly removed from the second line onwards is removed. + """ + if not isinstance(node, (AsyncFunctionDef, FunctionDef, ClassDef, Module)): + raise TypeError("%r can't have docstrings" % node.__class__.__name__) + if not(node.body and isinstance(node.body[0], Expr)): + return None + node = node.body[0].value + if isinstance(node, Str): + text = node.s + elif isinstance(node, Constant) and isinstance(node.value, str): + text = node.value + else: + return None + if clean: + import inspect + text = inspect.cleandoc(text) + return text + + +def _splitlines_no_ff(source): + """Split a string into lines ignoring form feed and other chars. + + This mimics how the Python parser splits source code. + """ + idx = 0 + lines = [] + next_line = '' + while idx < len(source): + c = source[idx] + next_line += c + idx += 1 + # Keep \r\n together + if c == '\r' and idx < len(source) and source[idx] == '\n': + next_line += '\n' + idx += 1 + if c in '\r\n': + lines.append(next_line) + next_line = '' + + if next_line: + lines.append(next_line) + return lines + + +def _pad_whitespace(source): + r"""Replace all chars except '\f\t' in a line with spaces.""" + result = '' + for c in source: + if c in '\f\t': + result += c + else: + result += ' ' + return result + + +def get_source_segment(source, node, *, padded=False): + """Get source code segment of the *source* that generated *node*. + + If some location information (`lineno`, `end_lineno`, `col_offset`, + or `end_col_offset`) is missing, return None. + + If *padded* is `True`, the first line of a multi-line statement will + be padded with spaces to match its original position. + """ + try: + if node.end_lineno is None or node.end_col_offset is None: + return None + lineno = node.lineno - 1 + end_lineno = node.end_lineno - 1 + col_offset = node.col_offset + end_col_offset = node.end_col_offset + except AttributeError: + return None + + lines = _splitlines_no_ff(source) + if end_lineno == lineno: + return lines[lineno].encode()[col_offset:end_col_offset].decode() + + if padded: + padding = _pad_whitespace(lines[lineno].encode()[:col_offset].decode()) + else: + padding = '' + + first = padding + lines[lineno].encode()[col_offset:].decode() + last = lines[end_lineno].encode()[:end_col_offset].decode() + lines = lines[lineno+1:end_lineno] + + lines.insert(0, first) + lines.append(last) + return ''.join(lines) + + +def walk(node): + """ + Recursively yield all descendant nodes in the tree starting at *node* + (including *node* itself), in no specified order. This is useful if you + only want to modify nodes in place and don't care about the context. + """ + from collections import deque + todo = deque([node]) + while todo: + node = todo.popleft() + todo.extend(iter_child_nodes(node)) + yield node + + +class NodeVisitor(object): + """ + A node visitor base class that walks the abstract syntax tree and calls a + visitor function for every node found. This function may return a value + which is forwarded by the `visit` method. + + This class is meant to be subclassed, with the subclass adding visitor + methods. + + Per default the visitor functions for the nodes are ``'visit_'`` + + class name of the node. So a `TryFinally` node visit function would + be `visit_TryFinally`. This behavior can be changed by overriding + the `visit` method. If no visitor function exists for a node + (return value `None`) the `generic_visit` visitor is used instead. + + Don't use the `NodeVisitor` if you want to apply changes to nodes during + traversing. For this a special visitor exists (`NodeTransformer`) that + allows modifications. + """ + + def visit(self, node): + """Visit a node.""" + method = 'visit_' + node.__class__.__name__ + visitor = getattr(self, method, self.generic_visit) + return visitor(node) + + def generic_visit(self, node): + """Called if no explicit visitor function exists for a node.""" + for field, value in iter_fields(node): + if isinstance(value, list): + for item in value: + if isinstance(item, AST): + self.visit(item) + elif isinstance(value, AST): + self.visit(value) + + def visit_Constant(self, node): + value = node.value + type_name = _const_node_type_names.get(type(value)) + if type_name is None: + for cls, name in _const_node_type_names.items(): + if isinstance(value, cls): + type_name = name + break + if type_name is not None: + method = 'visit_' + type_name + try: + visitor = getattr(self, method) + except AttributeError: + pass + else: + import warnings + warnings.warn(f"{method} is deprecated; add visit_Constant", + DeprecationWarning, 2) + return visitor(node) + return self.generic_visit(node) + + +class NodeTransformer(NodeVisitor): + """ + A :class:`NodeVisitor` subclass that walks the abstract syntax tree and + allows modification of nodes. + + The `NodeTransformer` will walk the AST and use the return value of the + visitor methods to replace or remove the old node. If the return value of + the visitor method is ``None``, the node will be removed from its location, + otherwise it is replaced with the return value. The return value may be the + original node in which case no replacement takes place. + + Here is an example transformer that rewrites all occurrences of name lookups + (``foo``) to ``data['foo']``:: + + class RewriteName(NodeTransformer): + + def visit_Name(self, node): + return Subscript( + value=Name(id='data', ctx=Load()), + slice=Constant(value=node.id), + ctx=node.ctx + ) + + Keep in mind that if the node you're operating on has child nodes you must + either transform the child nodes yourself or call the :meth:`generic_visit` + method for the node first. + + For nodes that were part of a collection of statements (that applies to all + statement nodes), the visitor may also return a list of nodes rather than + just a single node. + + Usually you use the transformer like this:: + + node = YourTransformer().visit(node) + """ + + def generic_visit(self, node): + for field, old_value in iter_fields(node): + if isinstance(old_value, list): + new_values = [] + for value in old_value: + if isinstance(value, AST): + value = self.visit(value) + if value is None: + continue + elif not isinstance(value, AST): + new_values.extend(value) + continue + new_values.append(value) + old_value[:] = new_values + elif isinstance(old_value, AST): + new_node = self.visit(old_value) + if new_node is None: + delattr(node, field) + else: + setattr(node, field, new_node) + return node + + +# If the ast module is loaded more than once, only add deprecated methods once +if not hasattr(Constant, 'n'): + # The following code is for backward compatibility. + # It will be removed in future. + + def _getter(self): + """Deprecated. Use value instead.""" + return self.value + + def _setter(self, value): + self.value = value + + Constant.n = property(_getter, _setter) + Constant.s = property(_getter, _setter) + +class _ABC(type): + + def __init__(cls, *args): + cls.__doc__ = """Deprecated AST node class. Use ast.Constant instead""" + + def __instancecheck__(cls, inst): + if not isinstance(inst, Constant): + return False + if cls in _const_types: + try: + value = inst.value + except AttributeError: + return False + else: + return ( + isinstance(value, _const_types[cls]) and + not isinstance(value, _const_types_not.get(cls, ())) + ) + return type.__instancecheck__(cls, inst) + +def _new(cls, *args, **kwargs): + for key in kwargs: + if key not in cls._fields: + # arbitrary keyword arguments are accepted + continue + pos = cls._fields.index(key) + if pos < len(args): + raise TypeError(f"{cls.__name__} got multiple values for argument {key!r}") + if cls in _const_types: + return Constant(*args, **kwargs) + return Constant.__new__(cls, *args, **kwargs) + +class Num(Constant, metaclass=_ABC): + _fields = ('n',) + __new__ = _new + +class Str(Constant, metaclass=_ABC): + _fields = ('s',) + __new__ = _new + +class Bytes(Constant, metaclass=_ABC): + _fields = ('s',) + __new__ = _new + +class NameConstant(Constant, metaclass=_ABC): + __new__ = _new + +class Ellipsis(Constant, metaclass=_ABC): + _fields = () + + def __new__(cls, *args, **kwargs): + if cls is Ellipsis: + return Constant(..., *args, **kwargs) + return Constant.__new__(cls, *args, **kwargs) + +_const_types = { + Num: (int, float, complex), + Str: (str,), + Bytes: (bytes,), + NameConstant: (type(None), bool), + Ellipsis: (type(...),), +} +_const_types_not = { + Num: (bool,), +} + +_const_node_type_names = { + bool: 'NameConstant', # should be before int + type(None): 'NameConstant', + int: 'Num', + float: 'Num', + complex: 'Num', + str: 'Str', + bytes: 'Bytes', + type(...): 'Ellipsis', +} + +class slice(AST): + """Deprecated AST node class.""" + +class Index(slice): + """Deprecated AST node class. Use the index value directly instead.""" + def __new__(cls, value, **kwargs): + return value + +class ExtSlice(slice): + """Deprecated AST node class. Use ast.Tuple instead.""" + def __new__(cls, dims=(), **kwargs): + return Tuple(list(dims), Load(), **kwargs) + +# If the ast module is loaded more than once, only add deprecated methods once +if not hasattr(Tuple, 'dims'): + # The following code is for backward compatibility. + # It will be removed in future. + + def _dims_getter(self): + """Deprecated. Use elts instead.""" + return self.elts + + def _dims_setter(self, value): + self.elts = value + + Tuple.dims = property(_dims_getter, _dims_setter) + +class Suite(mod): + """Deprecated AST node class. Unused in Python 3.""" + +class AugLoad(expr_context): + """Deprecated AST node class. Unused in Python 3.""" + +class AugStore(expr_context): + """Deprecated AST node class. Unused in Python 3.""" + +class Param(expr_context): + """Deprecated AST node class. Unused in Python 3.""" + + +# Large float and imaginary literals get turned into infinities in the AST. +# We unparse those infinities to INFSTR. +_INFSTR = "1e" + repr(sys.float_info.max_10_exp + 1) + +@_simple_enum(IntEnum) +class _Precedence: + """Precedence table that originated from python grammar.""" + + NAMED_EXPR = auto() # := + TUPLE = auto() # , + YIELD = auto() # 'yield', 'yield from' + TEST = auto() # 'if'-'else', 'lambda' + OR = auto() # 'or' + AND = auto() # 'and' + NOT = auto() # 'not' + CMP = auto() # '<', '>', '==', '>=', '<=', '!=', + # 'in', 'not in', 'is', 'is not' + EXPR = auto() + BOR = EXPR # '|' + BXOR = auto() # '^' + BAND = auto() # '&' + SHIFT = auto() # '<<', '>>' + ARITH = auto() # '+', '-' + TERM = auto() # '*', '@', '/', '%', '//' + FACTOR = auto() # unary '+', '-', '~' + POWER = auto() # '**' + AWAIT = auto() # 'await' + ATOM = auto() + + def next(self): + try: + return self.__class__(self + 1) + except ValueError: + return self + + +_SINGLE_QUOTES = ("'", '"') +_MULTI_QUOTES = ('"""', "'''") +_ALL_QUOTES = (*_SINGLE_QUOTES, *_MULTI_QUOTES) + +class _Unparser(NodeVisitor): + """Methods in this class recursively traverse an AST and + output source code for the abstract syntax; original formatting + is disregarded.""" + + def __init__(self, *, _avoid_backslashes=False): + self._source = [] + self._precedences = {} + self._type_ignores = {} + self._indent = 0 + self._avoid_backslashes = _avoid_backslashes + self._in_try_star = False + + def interleave(self, inter, f, seq): + """Call f on each item in seq, calling inter() in between.""" + seq = iter(seq) + try: + f(next(seq)) + except StopIteration: + pass + else: + for x in seq: + inter() + f(x) + + def items_view(self, traverser, items): + """Traverse and separate the given *items* with a comma and append it to + the buffer. If *items* is a single item sequence, a trailing comma + will be added.""" + if len(items) == 1: + traverser(items[0]) + self.write(",") + else: + self.interleave(lambda: self.write(", "), traverser, items) + + def maybe_newline(self): + """Adds a newline if it isn't the start of generated source""" + if self._source: + self.write("\n") + + def fill(self, text=""): + """Indent a piece of text and append it, according to the current + indentation level""" + self.maybe_newline() + self.write(" " * self._indent + text) + + def write(self, *text): + """Add new source parts""" + self._source.extend(text) + + @contextmanager + def buffered(self, buffer = None): + if buffer is None: + buffer = [] + + original_source = self._source + self._source = buffer + yield buffer + self._source = original_source + + @contextmanager + def block(self, *, extra = None): + """A context manager for preparing the source for blocks. It adds + the character':', increases the indentation on enter and decreases + the indentation on exit. If *extra* is given, it will be directly + appended after the colon character. + """ + self.write(":") + if extra: + self.write(extra) + self._indent += 1 + yield + self._indent -= 1 + + @contextmanager + def delimit(self, start, end): + """A context manager for preparing the source for expressions. It adds + *start* to the buffer and enters, after exit it adds *end*.""" + + self.write(start) + yield + self.write(end) + + def delimit_if(self, start, end, condition): + if condition: + return self.delimit(start, end) + else: + return nullcontext() + + def require_parens(self, precedence, node): + """Shortcut to adding precedence related parens""" + return self.delimit_if("(", ")", self.get_precedence(node) > precedence) + + def get_precedence(self, node): + return self._precedences.get(node, _Precedence.TEST) + + def set_precedence(self, precedence, *nodes): + for node in nodes: + self._precedences[node] = precedence + + def get_raw_docstring(self, node): + """If a docstring node is found in the body of the *node* parameter, + return that docstring node, None otherwise. + + Logic mirrored from ``_PyAST_GetDocString``.""" + if not isinstance( + node, (AsyncFunctionDef, FunctionDef, ClassDef, Module) + ) or len(node.body) < 1: + return None + node = node.body[0] + if not isinstance(node, Expr): + return None + node = node.value + if isinstance(node, Constant) and isinstance(node.value, str): + return node + + def get_type_comment(self, node): + comment = self._type_ignores.get(node.lineno) or node.type_comment + if comment is not None: + return f" # type: {comment}" + + def traverse(self, node): + if isinstance(node, list): + for item in node: + self.traverse(item) + else: + super().visit(node) + + # Note: as visit() resets the output text, do NOT rely on + # NodeVisitor.generic_visit to handle any nodes (as it calls back in to + # the subclass visit() method, which resets self._source to an empty list) + def visit(self, node): + """Outputs a source code string that, if converted back to an ast + (using ast.parse) will generate an AST equivalent to *node*""" + self._source = [] + self.traverse(node) + return "".join(self._source) + + def _write_docstring_and_traverse_body(self, node): + if (docstring := self.get_raw_docstring(node)): + self._write_docstring(docstring) + self.traverse(node.body[1:]) + else: + self.traverse(node.body) + + def visit_Module(self, node): + self._type_ignores = { + ignore.lineno: f"ignore{ignore.tag}" + for ignore in node.type_ignores + } + self._write_docstring_and_traverse_body(node) + self._type_ignores.clear() + + def visit_FunctionType(self, node): + with self.delimit("(", ")"): + self.interleave( + lambda: self.write(", "), self.traverse, node.argtypes + ) + + self.write(" -> ") + self.traverse(node.returns) + + def visit_Expr(self, node): + self.fill() + self.set_precedence(_Precedence.YIELD, node.value) + self.traverse(node.value) + + def visit_NamedExpr(self, node): + with self.require_parens(_Precedence.NAMED_EXPR, node): + self.set_precedence(_Precedence.ATOM, node.target, node.value) + self.traverse(node.target) + self.write(" := ") + self.traverse(node.value) + + def visit_Import(self, node): + self.fill("import ") + self.interleave(lambda: self.write(", "), self.traverse, node.names) + + def visit_ImportFrom(self, node): + self.fill("from ") + self.write("." * (node.level or 0)) + if node.module: + self.write(node.module) + self.write(" import ") + self.interleave(lambda: self.write(", "), self.traverse, node.names) + + def visit_Assign(self, node): + self.fill() + for target in node.targets: + self.set_precedence(_Precedence.TUPLE, target) + self.traverse(target) + self.write(" = ") + self.traverse(node.value) + if type_comment := self.get_type_comment(node): + self.write(type_comment) + + def visit_AugAssign(self, node): + self.fill() + self.traverse(node.target) + self.write(" " + self.binop[node.op.__class__.__name__] + "= ") + self.traverse(node.value) + + def visit_AnnAssign(self, node): + self.fill() + with self.delimit_if("(", ")", not node.simple and isinstance(node.target, Name)): + self.traverse(node.target) + self.write(": ") + self.traverse(node.annotation) + if node.value: + self.write(" = ") + self.traverse(node.value) + + def visit_Return(self, node): + self.fill("return") + if node.value: + self.write(" ") + self.traverse(node.value) + + def visit_Pass(self, node): + self.fill("pass") + + def visit_Break(self, node): + self.fill("break") + + def visit_Continue(self, node): + self.fill("continue") + + def visit_Delete(self, node): + self.fill("del ") + self.interleave(lambda: self.write(", "), self.traverse, node.targets) + + def visit_Assert(self, node): + self.fill("assert ") + self.traverse(node.test) + if node.msg: + self.write(", ") + self.traverse(node.msg) + + def visit_Global(self, node): + self.fill("global ") + self.interleave(lambda: self.write(", "), self.write, node.names) + + def visit_Nonlocal(self, node): + self.fill("nonlocal ") + self.interleave(lambda: self.write(", "), self.write, node.names) + + def visit_Await(self, node): + with self.require_parens(_Precedence.AWAIT, node): + self.write("await") + if node.value: + self.write(" ") + self.set_precedence(_Precedence.ATOM, node.value) + self.traverse(node.value) + + def visit_Yield(self, node): + with self.require_parens(_Precedence.YIELD, node): + self.write("yield") + if node.value: + self.write(" ") + self.set_precedence(_Precedence.ATOM, node.value) + self.traverse(node.value) + + def visit_YieldFrom(self, node): + with self.require_parens(_Precedence.YIELD, node): + self.write("yield from ") + if not node.value: + raise ValueError("Node can't be used without a value attribute.") + self.set_precedence(_Precedence.ATOM, node.value) + self.traverse(node.value) + + def visit_Raise(self, node): + self.fill("raise") + if not node.exc: + if node.cause: + raise ValueError(f"Node can't use cause without an exception.") + return + self.write(" ") + self.traverse(node.exc) + if node.cause: + self.write(" from ") + self.traverse(node.cause) + + def do_visit_try(self, node): + self.fill("try") + with self.block(): + self.traverse(node.body) + for ex in node.handlers: + self.traverse(ex) + if node.orelse: + self.fill("else") + with self.block(): + self.traverse(node.orelse) + if node.finalbody: + self.fill("finally") + with self.block(): + self.traverse(node.finalbody) + + def visit_Try(self, node): + prev_in_try_star = self._in_try_star + try: + self._in_try_star = False + self.do_visit_try(node) + finally: + self._in_try_star = prev_in_try_star + + def visit_TryStar(self, node): + prev_in_try_star = self._in_try_star + try: + self._in_try_star = True + self.do_visit_try(node) + finally: + self._in_try_star = prev_in_try_star + + def visit_ExceptHandler(self, node): + self.fill("except*" if self._in_try_star else "except") + if node.type: + self.write(" ") + self.traverse(node.type) + if node.name: + self.write(" as ") + self.write(node.name) + with self.block(): + self.traverse(node.body) + + def visit_ClassDef(self, node): + self.maybe_newline() + for deco in node.decorator_list: + self.fill("@") + self.traverse(deco) + self.fill("class " + node.name) + with self.delimit_if("(", ")", condition = node.bases or node.keywords): + comma = False + for e in node.bases: + if comma: + self.write(", ") + else: + comma = True + self.traverse(e) + for e in node.keywords: + if comma: + self.write(", ") + else: + comma = True + self.traverse(e) + + with self.block(): + self._write_docstring_and_traverse_body(node) + + def visit_FunctionDef(self, node): + self._function_helper(node, "def") + + def visit_AsyncFunctionDef(self, node): + self._function_helper(node, "async def") + + def _function_helper(self, node, fill_suffix): + self.maybe_newline() + for deco in node.decorator_list: + self.fill("@") + self.traverse(deco) + def_str = fill_suffix + " " + node.name + self.fill(def_str) + with self.delimit("(", ")"): + self.traverse(node.args) + if node.returns: + self.write(" -> ") + self.traverse(node.returns) + with self.block(extra=self.get_type_comment(node)): + self._write_docstring_and_traverse_body(node) + + def visit_For(self, node): + self._for_helper("for ", node) + + def visit_AsyncFor(self, node): + self._for_helper("async for ", node) + + def _for_helper(self, fill, node): + self.fill(fill) + self.set_precedence(_Precedence.TUPLE, node.target) + self.traverse(node.target) + self.write(" in ") + self.traverse(node.iter) + with self.block(extra=self.get_type_comment(node)): + self.traverse(node.body) + if node.orelse: + self.fill("else") + with self.block(): + self.traverse(node.orelse) + + def visit_If(self, node): + self.fill("if ") + self.traverse(node.test) + with self.block(): + self.traverse(node.body) + # collapse nested ifs into equivalent elifs. + while node.orelse and len(node.orelse) == 1 and isinstance(node.orelse[0], If): + node = node.orelse[0] + self.fill("elif ") + self.traverse(node.test) + with self.block(): + self.traverse(node.body) + # final else + if node.orelse: + self.fill("else") + with self.block(): + self.traverse(node.orelse) + + def visit_While(self, node): + self.fill("while ") + self.traverse(node.test) + with self.block(): + self.traverse(node.body) + if node.orelse: + self.fill("else") + with self.block(): + self.traverse(node.orelse) + + def visit_With(self, node): + self.fill("with ") + self.interleave(lambda: self.write(", "), self.traverse, node.items) + with self.block(extra=self.get_type_comment(node)): + self.traverse(node.body) + + def visit_AsyncWith(self, node): + self.fill("async with ") + self.interleave(lambda: self.write(", "), self.traverse, node.items) + with self.block(extra=self.get_type_comment(node)): + self.traverse(node.body) + + def _str_literal_helper( + self, string, *, quote_types=_ALL_QUOTES, escape_special_whitespace=False + ): + """Helper for writing string literals, minimizing escapes. + Returns the tuple (string literal to write, possible quote types). + """ + def escape_char(c): + # \n and \t are non-printable, but we only escape them if + # escape_special_whitespace is True + if not escape_special_whitespace and c in "\n\t": + return c + # Always escape backslashes and other non-printable characters + if c == "\\" or not c.isprintable(): + return c.encode("unicode_escape").decode("ascii") + return c + + escaped_string = "".join(map(escape_char, string)) + possible_quotes = quote_types + if "\n" in escaped_string: + possible_quotes = [q for q in possible_quotes if q in _MULTI_QUOTES] + possible_quotes = [q for q in possible_quotes if q not in escaped_string] + if not possible_quotes: + # If there aren't any possible_quotes, fallback to using repr + # on the original string. Try to use a quote from quote_types, + # e.g., so that we use triple quotes for docstrings. + string = repr(string) + quote = next((q for q in quote_types if string[0] in q), string[0]) + return string[1:-1], [quote] + if escaped_string: + # Sort so that we prefer '''"''' over """\"""" + possible_quotes.sort(key=lambda q: q[0] == escaped_string[-1]) + # If we're using triple quotes and we'd need to escape a final + # quote, escape it + if possible_quotes[0][0] == escaped_string[-1]: + assert len(possible_quotes[0]) == 3 + escaped_string = escaped_string[:-1] + "\\" + escaped_string[-1] + return escaped_string, possible_quotes + + def _write_str_avoiding_backslashes(self, string, *, quote_types=_ALL_QUOTES): + """Write string literal value with a best effort attempt to avoid backslashes.""" + string, quote_types = self._str_literal_helper(string, quote_types=quote_types) + quote_type = quote_types[0] + self.write(f"{quote_type}{string}{quote_type}") + + def visit_JoinedStr(self, node): + self.write("f") + if self._avoid_backslashes: + with self.buffered() as buffer: + self._write_fstring_inner(node) + return self._write_str_avoiding_backslashes("".join(buffer)) + + # If we don't need to avoid backslashes globally (i.e., we only need + # to avoid them inside FormattedValues), it's cosmetically preferred + # to use escaped whitespace. That is, it's preferred to use backslashes + # for cases like: f"{x}\n". To accomplish this, we keep track of what + # in our buffer corresponds to FormattedValues and what corresponds to + # Constant parts of the f-string, and allow escapes accordingly. + fstring_parts = [] + for value in node.values: + with self.buffered() as buffer: + self._write_fstring_inner(value) + fstring_parts.append( + ("".join(buffer), isinstance(value, Constant)) + ) + + new_fstring_parts = [] + quote_types = list(_ALL_QUOTES) + fallback_to_repr = False + for value, is_constant in fstring_parts: + value, new_quote_types = self._str_literal_helper( + value, + quote_types=quote_types, + escape_special_whitespace=is_constant, + ) + new_fstring_parts.append(value) + if set(new_quote_types).isdisjoint(quote_types): + fallback_to_repr = True + break + quote_types = new_quote_types + + if fallback_to_repr: + # If we weren't able to find a quote type that works for all parts + # of the JoinedStr, fallback to using repr and triple single quotes. + quote_types = ["'''"] + new_fstring_parts.clear() + for value, is_constant in fstring_parts: + value = repr('"' + value) # force repr to use single quotes + expected_prefix = "'\"" + assert value.startswith(expected_prefix), repr(value) + new_fstring_parts.append(value[len(expected_prefix):-1]) + + value = "".join(new_fstring_parts) + quote_type = quote_types[0] + self.write(f"{quote_type}{value}{quote_type}") + + def _write_fstring_inner(self, node): + if isinstance(node, JoinedStr): + # for both the f-string itself, and format_spec + for value in node.values: + self._write_fstring_inner(value) + elif isinstance(node, Constant) and isinstance(node.value, str): + value = node.value.replace("{", "{{").replace("}", "}}") + self.write(value) + elif isinstance(node, FormattedValue): + self.visit_FormattedValue(node) + else: + raise ValueError(f"Unexpected node inside JoinedStr, {node!r}") + + def visit_FormattedValue(self, node): + def unparse_inner(inner): + unparser = type(self)(_avoid_backslashes=True) + unparser.set_precedence(_Precedence.TEST.next(), inner) + return unparser.visit(inner) + + with self.delimit("{", "}"): + expr = unparse_inner(node.value) + if "\\" in expr: + raise ValueError( + "Unable to avoid backslash in f-string expression part" + ) + if expr.startswith("{"): + # Separate pair of opening brackets as "{ {" + self.write(" ") + self.write(expr) + if node.conversion != -1: + self.write(f"!{chr(node.conversion)}") + if node.format_spec: + self.write(":") + self._write_fstring_inner(node.format_spec) + + def visit_Name(self, node): + self.write(node.id) + + def _write_docstring(self, node): + self.fill() + if node.kind == "u": + self.write("u") + self._write_str_avoiding_backslashes(node.value, quote_types=_MULTI_QUOTES) + + def _write_constant(self, value): + if isinstance(value, (float, complex)): + # Substitute overflowing decimal literal for AST infinities, + # and inf - inf for NaNs. + self.write( + repr(value) + .replace("inf", _INFSTR) + .replace("nan", f"({_INFSTR}-{_INFSTR})") + ) + elif self._avoid_backslashes and isinstance(value, str): + self._write_str_avoiding_backslashes(value) + else: + self.write(repr(value)) + + def visit_Constant(self, node): + value = node.value + if isinstance(value, tuple): + with self.delimit("(", ")"): + self.items_view(self._write_constant, value) + elif value is ...: + self.write("...") + else: + if node.kind == "u": + self.write("u") + self._write_constant(node.value) + + def visit_List(self, node): + with self.delimit("[", "]"): + self.interleave(lambda: self.write(", "), self.traverse, node.elts) + + def visit_ListComp(self, node): + with self.delimit("[", "]"): + self.traverse(node.elt) + for gen in node.generators: + self.traverse(gen) + + def visit_GeneratorExp(self, node): + with self.delimit("(", ")"): + self.traverse(node.elt) + for gen in node.generators: + self.traverse(gen) + + def visit_SetComp(self, node): + with self.delimit("{", "}"): + self.traverse(node.elt) + for gen in node.generators: + self.traverse(gen) + + def visit_DictComp(self, node): + with self.delimit("{", "}"): + self.traverse(node.key) + self.write(": ") + self.traverse(node.value) + for gen in node.generators: + self.traverse(gen) + + def visit_comprehension(self, node): + if node.is_async: + self.write(" async for ") + else: + self.write(" for ") + self.set_precedence(_Precedence.TUPLE, node.target) + self.traverse(node.target) + self.write(" in ") + self.set_precedence(_Precedence.TEST.next(), node.iter, *node.ifs) + self.traverse(node.iter) + for if_clause in node.ifs: + self.write(" if ") + self.traverse(if_clause) + + def visit_IfExp(self, node): + with self.require_parens(_Precedence.TEST, node): + self.set_precedence(_Precedence.TEST.next(), node.body, node.test) + self.traverse(node.body) + self.write(" if ") + self.traverse(node.test) + self.write(" else ") + self.set_precedence(_Precedence.TEST, node.orelse) + self.traverse(node.orelse) + + def visit_Set(self, node): + if node.elts: + with self.delimit("{", "}"): + self.interleave(lambda: self.write(", "), self.traverse, node.elts) + else: + # `{}` would be interpreted as a dictionary literal, and + # `set` might be shadowed. Thus: + self.write('{*()}') + + def visit_Dict(self, node): + def write_key_value_pair(k, v): + self.traverse(k) + self.write(": ") + self.traverse(v) + + def write_item(item): + k, v = item + if k is None: + # for dictionary unpacking operator in dicts {**{'y': 2}} + # see PEP 448 for details + self.write("**") + self.set_precedence(_Precedence.EXPR, v) + self.traverse(v) + else: + write_key_value_pair(k, v) + + with self.delimit("{", "}"): + self.interleave( + lambda: self.write(", "), write_item, zip(node.keys, node.values) + ) + + def visit_Tuple(self, node): + with self.delimit_if( + "(", + ")", + len(node.elts) == 0 or self.get_precedence(node) > _Precedence.TUPLE + ): + self.items_view(self.traverse, node.elts) + + unop = {"Invert": "~", "Not": "not", "UAdd": "+", "USub": "-"} + unop_precedence = { + "not": _Precedence.NOT, + "~": _Precedence.FACTOR, + "+": _Precedence.FACTOR, + "-": _Precedence.FACTOR, + } + + def visit_UnaryOp(self, node): + operator = self.unop[node.op.__class__.__name__] + operator_precedence = self.unop_precedence[operator] + with self.require_parens(operator_precedence, node): + self.write(operator) + # factor prefixes (+, -, ~) shouldn't be separated + # from the value they belong, (e.g: +1 instead of + 1) + if operator_precedence is not _Precedence.FACTOR: + self.write(" ") + self.set_precedence(operator_precedence, node.operand) + self.traverse(node.operand) + + binop = { + "Add": "+", + "Sub": "-", + "Mult": "*", + "MatMult": "@", + "Div": "/", + "Mod": "%", + "LShift": "<<", + "RShift": ">>", + "BitOr": "|", + "BitXor": "^", + "BitAnd": "&", + "FloorDiv": "//", + "Pow": "**", + } + + binop_precedence = { + "+": _Precedence.ARITH, + "-": _Precedence.ARITH, + "*": _Precedence.TERM, + "@": _Precedence.TERM, + "/": _Precedence.TERM, + "%": _Precedence.TERM, + "<<": _Precedence.SHIFT, + ">>": _Precedence.SHIFT, + "|": _Precedence.BOR, + "^": _Precedence.BXOR, + "&": _Precedence.BAND, + "//": _Precedence.TERM, + "**": _Precedence.POWER, + } + + binop_rassoc = frozenset(("**",)) + def visit_BinOp(self, node): + operator = self.binop[node.op.__class__.__name__] + operator_precedence = self.binop_precedence[operator] + with self.require_parens(operator_precedence, node): + if operator in self.binop_rassoc: + left_precedence = operator_precedence.next() + right_precedence = operator_precedence + else: + left_precedence = operator_precedence + right_precedence = operator_precedence.next() + + self.set_precedence(left_precedence, node.left) + self.traverse(node.left) + self.write(f" {operator} ") + self.set_precedence(right_precedence, node.right) + self.traverse(node.right) + + cmpops = { + "Eq": "==", + "NotEq": "!=", + "Lt": "<", + "LtE": "<=", + "Gt": ">", + "GtE": ">=", + "Is": "is", + "IsNot": "is not", + "In": "in", + "NotIn": "not in", + } + + def visit_Compare(self, node): + with self.require_parens(_Precedence.CMP, node): + self.set_precedence(_Precedence.CMP.next(), node.left, *node.comparators) + self.traverse(node.left) + for o, e in zip(node.ops, node.comparators): + self.write(" " + self.cmpops[o.__class__.__name__] + " ") + self.traverse(e) + + boolops = {"And": "and", "Or": "or"} + boolop_precedence = {"and": _Precedence.AND, "or": _Precedence.OR} + + def visit_BoolOp(self, node): + operator = self.boolops[node.op.__class__.__name__] + operator_precedence = self.boolop_precedence[operator] + + def increasing_level_traverse(node): + nonlocal operator_precedence + operator_precedence = operator_precedence.next() + self.set_precedence(operator_precedence, node) + self.traverse(node) + + with self.require_parens(operator_precedence, node): + s = f" {operator} " + self.interleave(lambda: self.write(s), increasing_level_traverse, node.values) + + def visit_Attribute(self, node): + self.set_precedence(_Precedence.ATOM, node.value) + self.traverse(node.value) + # Special case: 3.__abs__() is a syntax error, so if node.value + # is an integer literal then we need to either parenthesize + # it or add an extra space to get 3 .__abs__(). + if isinstance(node.value, Constant) and isinstance(node.value.value, int): + self.write(" ") + self.write(".") + self.write(node.attr) + + def visit_Call(self, node): + self.set_precedence(_Precedence.ATOM, node.func) + self.traverse(node.func) + with self.delimit("(", ")"): + comma = False + for e in node.args: + if comma: + self.write(", ") + else: + comma = True + self.traverse(e) + for e in node.keywords: + if comma: + self.write(", ") + else: + comma = True + self.traverse(e) + + def visit_Subscript(self, node): + def is_non_empty_tuple(slice_value): + return ( + isinstance(slice_value, Tuple) + and slice_value.elts + ) + + self.set_precedence(_Precedence.ATOM, node.value) + self.traverse(node.value) + with self.delimit("[", "]"): + if is_non_empty_tuple(node.slice): + # parentheses can be omitted if the tuple isn't empty + self.items_view(self.traverse, node.slice.elts) + else: + self.traverse(node.slice) + + def visit_Starred(self, node): + self.write("*") + self.set_precedence(_Precedence.EXPR, node.value) + self.traverse(node.value) + + def visit_Ellipsis(self, node): + self.write("...") + + def visit_Slice(self, node): + if node.lower: + self.traverse(node.lower) + self.write(":") + if node.upper: + self.traverse(node.upper) + if node.step: + self.write(":") + self.traverse(node.step) + + def visit_Match(self, node): + self.fill("match ") + self.traverse(node.subject) + with self.block(): + for case in node.cases: + self.traverse(case) + + def visit_arg(self, node): + self.write(node.arg) + if node.annotation: + self.write(": ") + self.traverse(node.annotation) + + def visit_arguments(self, node): + first = True + # normal arguments + all_args = node.posonlyargs + node.args + defaults = [None] * (len(all_args) - len(node.defaults)) + node.defaults + for index, elements in enumerate(zip(all_args, defaults), 1): + a, d = elements + if first: + first = False + else: + self.write(", ") + self.traverse(a) + if d: + self.write("=") + self.traverse(d) + if index == len(node.posonlyargs): + self.write(", /") + + # varargs, or bare '*' if no varargs but keyword-only arguments present + if node.vararg or node.kwonlyargs: + if first: + first = False + else: + self.write(", ") + self.write("*") + if node.vararg: + self.write(node.vararg.arg) + if node.vararg.annotation: + self.write(": ") + self.traverse(node.vararg.annotation) + + # keyword-only arguments + if node.kwonlyargs: + for a, d in zip(node.kwonlyargs, node.kw_defaults): + self.write(", ") + self.traverse(a) + if d: + self.write("=") + self.traverse(d) + + # kwargs + if node.kwarg: + if first: + first = False + else: + self.write(", ") + self.write("**" + node.kwarg.arg) + if node.kwarg.annotation: + self.write(": ") + self.traverse(node.kwarg.annotation) + + def visit_keyword(self, node): + if node.arg is None: + self.write("**") + else: + self.write(node.arg) + self.write("=") + self.traverse(node.value) + + def visit_Lambda(self, node): + with self.require_parens(_Precedence.TEST, node): + self.write("lambda") + with self.buffered() as buffer: + self.traverse(node.args) + if buffer: + self.write(" ", *buffer) + self.write(": ") + self.set_precedence(_Precedence.TEST, node.body) + self.traverse(node.body) + + def visit_alias(self, node): + self.write(node.name) + if node.asname: + self.write(" as " + node.asname) + + def visit_withitem(self, node): + self.traverse(node.context_expr) + if node.optional_vars: + self.write(" as ") + self.traverse(node.optional_vars) + + def visit_match_case(self, node): + self.fill("case ") + self.traverse(node.pattern) + if node.guard: + self.write(" if ") + self.traverse(node.guard) + with self.block(): + self.traverse(node.body) + + def visit_MatchValue(self, node): + self.traverse(node.value) + + def visit_MatchSingleton(self, node): + self._write_constant(node.value) + + def visit_MatchSequence(self, node): + with self.delimit("[", "]"): + self.interleave( + lambda: self.write(", "), self.traverse, node.patterns + ) + + def visit_MatchStar(self, node): + name = node.name + if name is None: + name = "_" + self.write(f"*{name}") + + def visit_MatchMapping(self, node): + def write_key_pattern_pair(pair): + k, p = pair + self.traverse(k) + self.write(": ") + self.traverse(p) + + with self.delimit("{", "}"): + keys = node.keys + self.interleave( + lambda: self.write(", "), + write_key_pattern_pair, + zip(keys, node.patterns, strict=True), + ) + rest = node.rest + if rest is not None: + if keys: + self.write(", ") + self.write(f"**{rest}") + + def visit_MatchClass(self, node): + self.set_precedence(_Precedence.ATOM, node.cls) + self.traverse(node.cls) + with self.delimit("(", ")"): + patterns = node.patterns + self.interleave( + lambda: self.write(", "), self.traverse, patterns + ) + attrs = node.kwd_attrs + if attrs: + def write_attr_pattern(pair): + attr, pattern = pair + self.write(f"{attr}=") + self.traverse(pattern) + + if patterns: + self.write(", ") + self.interleave( + lambda: self.write(", "), + write_attr_pattern, + zip(attrs, node.kwd_patterns, strict=True), + ) + + def visit_MatchAs(self, node): + name = node.name + pattern = node.pattern + if name is None: + self.write("_") + elif pattern is None: + self.write(node.name) + else: + with self.require_parens(_Precedence.TEST, node): + self.set_precedence(_Precedence.BOR, node.pattern) + self.traverse(node.pattern) + self.write(f" as {node.name}") + + def visit_MatchOr(self, node): + with self.require_parens(_Precedence.BOR, node): + self.set_precedence(_Precedence.BOR.next(), *node.patterns) + self.interleave(lambda: self.write(" | "), self.traverse, node.patterns) + +def unparse(ast_obj): + unparser = _Unparser() + return unparser.visit(ast_obj) + + +def main(): + import argparse + + parser = argparse.ArgumentParser(prog='python -m ast') + parser.add_argument('infile', type=argparse.FileType(mode='rb'), nargs='?', + default='-', + help='the file to parse; defaults to stdin') + parser.add_argument('-m', '--mode', default='exec', + choices=('exec', 'single', 'eval', 'func_type'), + help='specify what kind of code must be parsed') + parser.add_argument('--no-type-comments', default=True, action='store_false', + help="don't add information about type comments") + parser.add_argument('-a', '--include-attributes', action='store_true', + help='include attributes such as line numbers and ' + 'column offsets') + parser.add_argument('-i', '--indent', type=int, default=3, + help='indentation of nodes (number of spaces)') + args = parser.parse_args() + + with args.infile as infile: + source = infile.read() + tree = parse(source, args.infile.name, args.mode, type_comments=args.no_type_comments) + print(dump(tree, include_attributes=args.include_attributes, indent=args.indent)) + +if __name__ == '__main__': + main() diff --git a/lib/python3.11/asynchat.py b/lib/python3.11/asynchat.py new file mode 100644 index 0000000000000000000000000000000000000000..bed797e989e13665eca74c0be5baf527b669a6ef --- /dev/null +++ b/lib/python3.11/asynchat.py @@ -0,0 +1,314 @@ +# -*- Mode: Python; tab-width: 4 -*- +# Id: asynchat.py,v 2.26 2000/09/07 22:29:26 rushing Exp +# Author: Sam Rushing + +# ====================================================================== +# Copyright 1996 by Sam Rushing +# +# All Rights Reserved +# +# Permission to use, copy, modify, and distribute this software and +# its documentation for any purpose and without fee is hereby +# granted, provided that the above copyright notice appear in all +# copies and that both that copyright notice and this permission +# notice appear in supporting documentation, and that the name of Sam +# Rushing not be used in advertising or publicity pertaining to +# distribution of the software without specific, written prior +# permission. +# +# SAM RUSHING DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN +# NO EVENT SHALL SAM RUSHING BE LIABLE FOR ANY SPECIAL, INDIRECT OR +# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +# OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, +# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# ====================================================================== + +r"""A class supporting chat-style (command/response) protocols. + +This class adds support for 'chat' style protocols - where one side +sends a 'command', and the other sends a response (examples would be +the common internet protocols - smtp, nntp, ftp, etc..). + +The handle_read() method looks at the input stream for the current +'terminator' (usually '\r\n' for single-line responses, '\r\n.\r\n' +for multi-line output), calling self.found_terminator() on its +receipt. + +for example: +Say you build an async nntp client using this class. At the start +of the connection, you'll have self.terminator set to '\r\n', in +order to process the single-line greeting. Just before issuing a +'LIST' command you'll set it to '\r\n.\r\n'. The output of the LIST +command will be accumulated (using your own 'collect_incoming_data' +method) up to the terminator, and then control will be returned to +you - by calling your self.found_terminator() method. +""" +import asyncore +from collections import deque + +from warnings import _deprecated + +_DEPRECATION_MSG = ('The {name} module is deprecated and will be removed in ' + 'Python {remove}. The recommended replacement is asyncio') +_deprecated(__name__, _DEPRECATION_MSG, remove=(3, 12)) + + + +class async_chat(asyncore.dispatcher): + """This is an abstract class. You must derive from this class, and add + the two methods collect_incoming_data() and found_terminator()""" + + # these are overridable defaults + + ac_in_buffer_size = 65536 + ac_out_buffer_size = 65536 + + # we don't want to enable the use of encoding by default, because that is a + # sign of an application bug that we don't want to pass silently + + use_encoding = 0 + encoding = 'latin-1' + + def __init__(self, sock=None, map=None): + # for string terminator matching + self.ac_in_buffer = b'' + + # we use a list here rather than io.BytesIO for a few reasons... + # del lst[:] is faster than bio.truncate(0) + # lst = [] is faster than bio.truncate(0) + self.incoming = [] + + # we toss the use of the "simple producer" and replace it with + # a pure deque, which the original fifo was a wrapping of + self.producer_fifo = deque() + asyncore.dispatcher.__init__(self, sock, map) + + def collect_incoming_data(self, data): + raise NotImplementedError("must be implemented in subclass") + + def _collect_incoming_data(self, data): + self.incoming.append(data) + + def _get_data(self): + d = b''.join(self.incoming) + del self.incoming[:] + return d + + def found_terminator(self): + raise NotImplementedError("must be implemented in subclass") + + def set_terminator(self, term): + """Set the input delimiter. + + Can be a fixed string of any length, an integer, or None. + """ + if isinstance(term, str) and self.use_encoding: + term = bytes(term, self.encoding) + elif isinstance(term, int) and term < 0: + raise ValueError('the number of received bytes must be positive') + self.terminator = term + + def get_terminator(self): + return self.terminator + + # grab some more data from the socket, + # throw it to the collector method, + # check for the terminator, + # if found, transition to the next state. + + def handle_read(self): + + try: + data = self.recv(self.ac_in_buffer_size) + except BlockingIOError: + return + except OSError: + self.handle_error() + return + + if isinstance(data, str) and self.use_encoding: + data = bytes(str, self.encoding) + self.ac_in_buffer = self.ac_in_buffer + data + + # Continue to search for self.terminator in self.ac_in_buffer, + # while calling self.collect_incoming_data. The while loop + # is necessary because we might read several data+terminator + # combos with a single recv(4096). + + while self.ac_in_buffer: + lb = len(self.ac_in_buffer) + terminator = self.get_terminator() + if not terminator: + # no terminator, collect it all + self.collect_incoming_data(self.ac_in_buffer) + self.ac_in_buffer = b'' + elif isinstance(terminator, int): + # numeric terminator + n = terminator + if lb < n: + self.collect_incoming_data(self.ac_in_buffer) + self.ac_in_buffer = b'' + self.terminator = self.terminator - lb + else: + self.collect_incoming_data(self.ac_in_buffer[:n]) + self.ac_in_buffer = self.ac_in_buffer[n:] + self.terminator = 0 + self.found_terminator() + else: + # 3 cases: + # 1) end of buffer matches terminator exactly: + # collect data, transition + # 2) end of buffer matches some prefix: + # collect data to the prefix + # 3) end of buffer does not match any prefix: + # collect data + terminator_len = len(terminator) + index = self.ac_in_buffer.find(terminator) + if index != -1: + # we found the terminator + if index > 0: + # don't bother reporting the empty string + # (source of subtle bugs) + self.collect_incoming_data(self.ac_in_buffer[:index]) + self.ac_in_buffer = self.ac_in_buffer[index+terminator_len:] + # This does the Right Thing if the terminator + # is changed here. + self.found_terminator() + else: + # check for a prefix of the terminator + index = find_prefix_at_end(self.ac_in_buffer, terminator) + if index: + if index != lb: + # we found a prefix, collect up to the prefix + self.collect_incoming_data(self.ac_in_buffer[:-index]) + self.ac_in_buffer = self.ac_in_buffer[-index:] + break + else: + # no prefix, collect it all + self.collect_incoming_data(self.ac_in_buffer) + self.ac_in_buffer = b'' + + def handle_write(self): + self.initiate_send() + + def handle_close(self): + self.close() + + def push(self, data): + if not isinstance(data, (bytes, bytearray, memoryview)): + raise TypeError('data argument must be byte-ish (%r)', + type(data)) + sabs = self.ac_out_buffer_size + if len(data) > sabs: + for i in range(0, len(data), sabs): + self.producer_fifo.append(data[i:i+sabs]) + else: + self.producer_fifo.append(data) + self.initiate_send() + + def push_with_producer(self, producer): + self.producer_fifo.append(producer) + self.initiate_send() + + def readable(self): + "predicate for inclusion in the readable for select()" + # cannot use the old predicate, it violates the claim of the + # set_terminator method. + + # return (len(self.ac_in_buffer) <= self.ac_in_buffer_size) + return 1 + + def writable(self): + "predicate for inclusion in the writable for select()" + return self.producer_fifo or (not self.connected) + + def close_when_done(self): + "automatically close this channel once the outgoing queue is empty" + self.producer_fifo.append(None) + + def initiate_send(self): + while self.producer_fifo and self.connected: + first = self.producer_fifo[0] + # handle empty string/buffer or None entry + if not first: + del self.producer_fifo[0] + if first is None: + self.handle_close() + return + + # handle classic producer behavior + obs = self.ac_out_buffer_size + try: + data = first[:obs] + except TypeError: + data = first.more() + if data: + self.producer_fifo.appendleft(data) + else: + del self.producer_fifo[0] + continue + + if isinstance(data, str) and self.use_encoding: + data = bytes(data, self.encoding) + + # send the data + try: + num_sent = self.send(data) + except OSError: + self.handle_error() + return + + if num_sent: + if num_sent < len(data) or obs < len(first): + self.producer_fifo[0] = first[num_sent:] + else: + del self.producer_fifo[0] + # we tried to send some actual data + return + + def discard_buffers(self): + # Emergencies only! + self.ac_in_buffer = b'' + del self.incoming[:] + self.producer_fifo.clear() + + +class simple_producer: + + def __init__(self, data, buffer_size=512): + self.data = data + self.buffer_size = buffer_size + + def more(self): + if len(self.data) > self.buffer_size: + result = self.data[:self.buffer_size] + self.data = self.data[self.buffer_size:] + return result + else: + result = self.data + self.data = b'' + return result + + +# Given 'haystack', see if any prefix of 'needle' is at its end. This +# assumes an exact match has already been checked. Return the number of +# characters matched. +# for example: +# f_p_a_e("qwerty\r", "\r\n") => 1 +# f_p_a_e("qwertydkjf", "\r\n") => 0 +# f_p_a_e("qwerty\r\n", "\r\n") => + +# this could maybe be made faster with a computed regex? +# [answer: no; circa Python-2.0, Jan 2001] +# new python: 28961/s +# old python: 18307/s +# re: 12820/s +# regex: 14035/s + +def find_prefix_at_end(haystack, needle): + l = len(needle) - 1 + while l and not haystack.endswith(needle[:l]): + l -= 1 + return l diff --git a/lib/python3.11/asyncore.py b/lib/python3.11/asyncore.py new file mode 100644 index 0000000000000000000000000000000000000000..57c86871f3dcf09afc2bfc5e84be4c54b6b6e740 --- /dev/null +++ b/lib/python3.11/asyncore.py @@ -0,0 +1,647 @@ +# -*- Mode: Python -*- +# Id: asyncore.py,v 2.51 2000/09/07 22:29:26 rushing Exp +# Author: Sam Rushing + +# ====================================================================== +# Copyright 1996 by Sam Rushing +# +# All Rights Reserved +# +# Permission to use, copy, modify, and distribute this software and +# its documentation for any purpose and without fee is hereby +# granted, provided that the above copyright notice appear in all +# copies and that both that copyright notice and this permission +# notice appear in supporting documentation, and that the name of Sam +# Rushing not be used in advertising or publicity pertaining to +# distribution of the software without specific, written prior +# permission. +# +# SAM RUSHING DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN +# NO EVENT SHALL SAM RUSHING BE LIABLE FOR ANY SPECIAL, INDIRECT OR +# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +# OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, +# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# ====================================================================== + +"""Basic infrastructure for asynchronous socket service clients and servers. + +There are only two ways to have a program on a single processor do "more +than one thing at a time". Multi-threaded programming is the simplest and +most popular way to do it, but there is another very different technique, +that lets you have nearly all the advantages of multi-threading, without +actually using multiple threads. it's really only practical if your program +is largely I/O bound. If your program is CPU bound, then pre-emptive +scheduled threads are probably what you really need. Network servers are +rarely CPU-bound, however. + +If your operating system supports the select() system call in its I/O +library (and nearly all do), then you can use it to juggle multiple +communication channels at once; doing other work while your I/O is taking +place in the "background." Although this strategy can seem strange and +complex, especially at first, it is in many ways easier to understand and +control than multi-threaded programming. The module documented here solves +many of the difficult problems for you, making the task of building +sophisticated high-performance network servers and clients a snap. +""" + +import select +import socket +import sys +import time +import warnings + +import os +from errno import EALREADY, EINPROGRESS, EWOULDBLOCK, ECONNRESET, EINVAL, \ + ENOTCONN, ESHUTDOWN, EISCONN, EBADF, ECONNABORTED, EPIPE, EAGAIN, \ + errorcode + +_DEPRECATION_MSG = ('The {name} module is deprecated and will be removed in ' + 'Python {remove}. The recommended replacement is asyncio') +warnings._deprecated(__name__, _DEPRECATION_MSG, remove=(3, 12)) + + +_DISCONNECTED = frozenset({ECONNRESET, ENOTCONN, ESHUTDOWN, ECONNABORTED, EPIPE, + EBADF}) + +try: + socket_map +except NameError: + socket_map = {} + +def _strerror(err): + try: + return os.strerror(err) + except (ValueError, OverflowError, NameError): + if err in errorcode: + return errorcode[err] + return "Unknown error %s" %err + +class ExitNow(Exception): + pass + +_reraised_exceptions = (ExitNow, KeyboardInterrupt, SystemExit) + +def read(obj): + try: + obj.handle_read_event() + except _reraised_exceptions: + raise + except: + obj.handle_error() + +def write(obj): + try: + obj.handle_write_event() + except _reraised_exceptions: + raise + except: + obj.handle_error() + +def _exception(obj): + try: + obj.handle_expt_event() + except _reraised_exceptions: + raise + except: + obj.handle_error() + +def readwrite(obj, flags): + try: + if flags & select.POLLIN: + obj.handle_read_event() + if flags & select.POLLOUT: + obj.handle_write_event() + if flags & select.POLLPRI: + obj.handle_expt_event() + if flags & (select.POLLHUP | select.POLLERR | select.POLLNVAL): + obj.handle_close() + except OSError as e: + if e.errno not in _DISCONNECTED: + obj.handle_error() + else: + obj.handle_close() + except _reraised_exceptions: + raise + except: + obj.handle_error() + +def poll(timeout=0.0, map=None): + if map is None: + map = socket_map + if map: + r = []; w = []; e = [] + for fd, obj in list(map.items()): + is_r = obj.readable() + is_w = obj.writable() + if is_r: + r.append(fd) + # accepting sockets should not be writable + if is_w and not obj.accepting: + w.append(fd) + if is_r or is_w: + e.append(fd) + if [] == r == w == e: + time.sleep(timeout) + return + + r, w, e = select.select(r, w, e, timeout) + + for fd in r: + obj = map.get(fd) + if obj is None: + continue + read(obj) + + for fd in w: + obj = map.get(fd) + if obj is None: + continue + write(obj) + + for fd in e: + obj = map.get(fd) + if obj is None: + continue + _exception(obj) + +def poll2(timeout=0.0, map=None): + # Use the poll() support added to the select module in Python 2.0 + if map is None: + map = socket_map + if timeout is not None: + # timeout is in milliseconds + timeout = int(timeout*1000) + pollster = select.poll() + if map: + for fd, obj in list(map.items()): + flags = 0 + if obj.readable(): + flags |= select.POLLIN | select.POLLPRI + # accepting sockets should not be writable + if obj.writable() and not obj.accepting: + flags |= select.POLLOUT + if flags: + pollster.register(fd, flags) + + r = pollster.poll(timeout) + for fd, flags in r: + obj = map.get(fd) + if obj is None: + continue + readwrite(obj, flags) + +poll3 = poll2 # Alias for backward compatibility + +def loop(timeout=30.0, use_poll=False, map=None, count=None): + if map is None: + map = socket_map + + if use_poll and hasattr(select, 'poll'): + poll_fun = poll2 + else: + poll_fun = poll + + if count is None: + while map: + poll_fun(timeout, map) + + else: + while map and count > 0: + poll_fun(timeout, map) + count = count - 1 + +class dispatcher: + + debug = False + connected = False + accepting = False + connecting = False + closing = False + addr = None + ignore_log_types = frozenset({'warning'}) + + def __init__(self, sock=None, map=None): + if map is None: + self._map = socket_map + else: + self._map = map + + self._fileno = None + + if sock: + # Set to nonblocking just to make sure for cases where we + # get a socket from a blocking source. + sock.setblocking(False) + self.set_socket(sock, map) + self.connected = True + # The constructor no longer requires that the socket + # passed be connected. + try: + self.addr = sock.getpeername() + except OSError as err: + if err.errno in (ENOTCONN, EINVAL): + # To handle the case where we got an unconnected + # socket. + self.connected = False + else: + # The socket is broken in some unknown way, alert + # the user and remove it from the map (to prevent + # polling of broken sockets). + self.del_channel(map) + raise + else: + self.socket = None + + def __repr__(self): + status = [self.__class__.__module__+"."+self.__class__.__qualname__] + if self.accepting and self.addr: + status.append('listening') + elif self.connected: + status.append('connected') + if self.addr is not None: + try: + status.append('%s:%d' % self.addr) + except TypeError: + status.append(repr(self.addr)) + return '<%s at %#x>' % (' '.join(status), id(self)) + + def add_channel(self, map=None): + #self.log_info('adding channel %s' % self) + if map is None: + map = self._map + map[self._fileno] = self + + def del_channel(self, map=None): + fd = self._fileno + if map is None: + map = self._map + if fd in map: + #self.log_info('closing channel %d:%s' % (fd, self)) + del map[fd] + self._fileno = None + + def create_socket(self, family=socket.AF_INET, type=socket.SOCK_STREAM): + self.family_and_type = family, type + sock = socket.socket(family, type) + sock.setblocking(False) + self.set_socket(sock) + + def set_socket(self, sock, map=None): + self.socket = sock + self._fileno = sock.fileno() + self.add_channel(map) + + def set_reuse_addr(self): + # try to re-use a server port if possible + try: + self.socket.setsockopt( + socket.SOL_SOCKET, socket.SO_REUSEADDR, + self.socket.getsockopt(socket.SOL_SOCKET, + socket.SO_REUSEADDR) | 1 + ) + except OSError: + pass + + # ================================================== + # predicates for select() + # these are used as filters for the lists of sockets + # to pass to select(). + # ================================================== + + def readable(self): + return True + + def writable(self): + return True + + # ================================================== + # socket object methods. + # ================================================== + + def listen(self, num): + self.accepting = True + if os.name == 'nt' and num > 5: + num = 5 + return self.socket.listen(num) + + def bind(self, addr): + self.addr = addr + return self.socket.bind(addr) + + def connect(self, address): + self.connected = False + self.connecting = True + err = self.socket.connect_ex(address) + if err in (EINPROGRESS, EALREADY, EWOULDBLOCK) \ + or err == EINVAL and os.name == 'nt': + self.addr = address + return + if err in (0, EISCONN): + self.addr = address + self.handle_connect_event() + else: + raise OSError(err, errorcode[err]) + + def accept(self): + # XXX can return either an address pair or None + try: + conn, addr = self.socket.accept() + except TypeError: + return None + except OSError as why: + if why.errno in (EWOULDBLOCK, ECONNABORTED, EAGAIN): + return None + else: + raise + else: + return conn, addr + + def send(self, data): + try: + result = self.socket.send(data) + return result + except OSError as why: + if why.errno == EWOULDBLOCK: + return 0 + elif why.errno in _DISCONNECTED: + self.handle_close() + return 0 + else: + raise + + def recv(self, buffer_size): + try: + data = self.socket.recv(buffer_size) + if not data: + # a closed connection is indicated by signaling + # a read condition, and having recv() return 0. + self.handle_close() + return b'' + else: + return data + except OSError as why: + # winsock sometimes raises ENOTCONN + if why.errno in _DISCONNECTED: + self.handle_close() + return b'' + else: + raise + + def close(self): + self.connected = False + self.accepting = False + self.connecting = False + self.del_channel() + if self.socket is not None: + try: + self.socket.close() + except OSError as why: + if why.errno not in (ENOTCONN, EBADF): + raise + + # log and log_info may be overridden to provide more sophisticated + # logging and warning methods. In general, log is for 'hit' logging + # and 'log_info' is for informational, warning and error logging. + + def log(self, message): + sys.stderr.write('log: %s\n' % str(message)) + + def log_info(self, message, type='info'): + if type not in self.ignore_log_types: + print('%s: %s' % (type, message)) + + def handle_read_event(self): + if self.accepting: + # accepting sockets are never connected, they "spawn" new + # sockets that are connected + self.handle_accept() + elif not self.connected: + if self.connecting: + self.handle_connect_event() + self.handle_read() + else: + self.handle_read() + + def handle_connect_event(self): + err = self.socket.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) + if err != 0: + raise OSError(err, _strerror(err)) + self.handle_connect() + self.connected = True + self.connecting = False + + def handle_write_event(self): + if self.accepting: + # Accepting sockets shouldn't get a write event. + # We will pretend it didn't happen. + return + + if not self.connected: + if self.connecting: + self.handle_connect_event() + self.handle_write() + + def handle_expt_event(self): + # handle_expt_event() is called if there might be an error on the + # socket, or if there is OOB data + # check for the error condition first + err = self.socket.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) + if err != 0: + # we can get here when select.select() says that there is an + # exceptional condition on the socket + # since there is an error, we'll go ahead and close the socket + # like we would in a subclassed handle_read() that received no + # data + self.handle_close() + else: + self.handle_expt() + + def handle_error(self): + nil, t, v, tbinfo = compact_traceback() + + # sometimes a user repr method will crash. + try: + self_repr = repr(self) + except: + self_repr = '<__repr__(self) failed for object at %0x>' % id(self) + + self.log_info( + 'uncaptured python exception, closing channel %s (%s:%s %s)' % ( + self_repr, + t, + v, + tbinfo + ), + 'error' + ) + self.handle_close() + + def handle_expt(self): + self.log_info('unhandled incoming priority event', 'warning') + + def handle_read(self): + self.log_info('unhandled read event', 'warning') + + def handle_write(self): + self.log_info('unhandled write event', 'warning') + + def handle_connect(self): + self.log_info('unhandled connect event', 'warning') + + def handle_accept(self): + pair = self.accept() + if pair is not None: + self.handle_accepted(*pair) + + def handle_accepted(self, sock, addr): + sock.close() + self.log_info('unhandled accepted event', 'warning') + + def handle_close(self): + self.log_info('unhandled close event', 'warning') + self.close() + +# --------------------------------------------------------------------------- +# adds simple buffered output capability, useful for simple clients. +# [for more sophisticated usage use asynchat.async_chat] +# --------------------------------------------------------------------------- + +class dispatcher_with_send(dispatcher): + + def __init__(self, sock=None, map=None): + dispatcher.__init__(self, sock, map) + self.out_buffer = b'' + + def initiate_send(self): + num_sent = 0 + num_sent = dispatcher.send(self, self.out_buffer[:65536]) + self.out_buffer = self.out_buffer[num_sent:] + + def handle_write(self): + self.initiate_send() + + def writable(self): + return (not self.connected) or len(self.out_buffer) + + def send(self, data): + if self.debug: + self.log_info('sending %s' % repr(data)) + self.out_buffer = self.out_buffer + data + self.initiate_send() + +# --------------------------------------------------------------------------- +# used for debugging. +# --------------------------------------------------------------------------- + +def compact_traceback(): + t, v, tb = sys.exc_info() + tbinfo = [] + if not tb: # Must have a traceback + raise AssertionError("traceback does not exist") + while tb: + tbinfo.append(( + tb.tb_frame.f_code.co_filename, + tb.tb_frame.f_code.co_name, + str(tb.tb_lineno) + )) + tb = tb.tb_next + + # just to be safe + del tb + + file, function, line = tbinfo[-1] + info = ' '.join(['[%s|%s|%s]' % x for x in tbinfo]) + return (file, function, line), t, v, info + +def close_all(map=None, ignore_all=False): + if map is None: + map = socket_map + for x in list(map.values()): + try: + x.close() + except OSError as x: + if x.errno == EBADF: + pass + elif not ignore_all: + raise + except _reraised_exceptions: + raise + except: + if not ignore_all: + raise + map.clear() + +# Asynchronous File I/O: +# +# After a little research (reading man pages on various unixen, and +# digging through the linux kernel), I've determined that select() +# isn't meant for doing asynchronous file i/o. +# Heartening, though - reading linux/mm/filemap.c shows that linux +# supports asynchronous read-ahead. So _MOST_ of the time, the data +# will be sitting in memory for us already when we go to read it. +# +# What other OS's (besides NT) support async file i/o? [VMS?] +# +# Regardless, this is useful for pipes, and stdin/stdout... + +if os.name == 'posix': + class file_wrapper: + # Here we override just enough to make a file + # look like a socket for the purposes of asyncore. + # The passed fd is automatically os.dup()'d + + def __init__(self, fd): + self.fd = os.dup(fd) + + def __del__(self): + if self.fd >= 0: + warnings.warn("unclosed file %r" % self, ResourceWarning, + source=self) + self.close() + + def recv(self, *args): + return os.read(self.fd, *args) + + def send(self, *args): + return os.write(self.fd, *args) + + def getsockopt(self, level, optname, buflen=None): + if (level == socket.SOL_SOCKET and + optname == socket.SO_ERROR and + not buflen): + return 0 + raise NotImplementedError("Only asyncore specific behaviour " + "implemented.") + + read = recv + write = send + + def close(self): + if self.fd < 0: + return + fd = self.fd + self.fd = -1 + os.close(fd) + + def fileno(self): + return self.fd + + class file_dispatcher(dispatcher): + + def __init__(self, fd, map=None): + dispatcher.__init__(self, None, map) + self.connected = True + try: + fd = fd.fileno() + except AttributeError: + pass + self.set_file(fd) + # set it to non-blocking mode + os.set_blocking(fd, False) + + def set_file(self, fd): + self.socket = file_wrapper(fd) + self._fileno = self.socket.fileno() + self.add_channel() diff --git a/lib/python3.11/base64.py b/lib/python3.11/base64.py new file mode 100644 index 0000000000000000000000000000000000000000..7e9c2a2ca477ff08b763c4eedda1de616b57a0ae --- /dev/null +++ b/lib/python3.11/base64.py @@ -0,0 +1,607 @@ +#! /usr/bin/env python3 + +"""Base16, Base32, Base64 (RFC 3548), Base85 and Ascii85 data encodings""" + +# Modified 04-Oct-1995 by Jack Jansen to use binascii module +# Modified 30-Dec-2003 by Barry Warsaw to add full RFC 3548 support +# Modified 22-May-2007 by Guido van Rossum to use bytes everywhere + +import re +import struct +import binascii + + +__all__ = [ + # Legacy interface exports traditional RFC 2045 Base64 encodings + 'encode', 'decode', 'encodebytes', 'decodebytes', + # Generalized interface for other encodings + 'b64encode', 'b64decode', 'b32encode', 'b32decode', + 'b32hexencode', 'b32hexdecode', 'b16encode', 'b16decode', + # Base85 and Ascii85 encodings + 'b85encode', 'b85decode', 'a85encode', 'a85decode', + # Standard Base64 encoding + 'standard_b64encode', 'standard_b64decode', + # Some common Base64 alternatives. As referenced by RFC 3458, see thread + # starting at: + # + # http://zgp.org/pipermail/p2p-hackers/2001-September/000316.html + 'urlsafe_b64encode', 'urlsafe_b64decode', + ] + + +bytes_types = (bytes, bytearray) # Types acceptable as binary data + +def _bytes_from_decode_data(s): + if isinstance(s, str): + try: + return s.encode('ascii') + except UnicodeEncodeError: + raise ValueError('string argument should contain only ASCII characters') + if isinstance(s, bytes_types): + return s + try: + return memoryview(s).tobytes() + except TypeError: + raise TypeError("argument should be a bytes-like object or ASCII " + "string, not %r" % s.__class__.__name__) from None + + +# Base64 encoding/decoding uses binascii + +def b64encode(s, altchars=None): + """Encode the bytes-like object s using Base64 and return a bytes object. + + Optional altchars should be a byte string of length 2 which specifies an + alternative alphabet for the '+' and '/' characters. This allows an + application to e.g. generate url or filesystem safe Base64 strings. + """ + encoded = binascii.b2a_base64(s, newline=False) + if altchars is not None: + assert len(altchars) == 2, repr(altchars) + return encoded.translate(bytes.maketrans(b'+/', altchars)) + return encoded + + +def b64decode(s, altchars=None, validate=False): + """Decode the Base64 encoded bytes-like object or ASCII string s. + + Optional altchars must be a bytes-like object or ASCII string of length 2 + which specifies the alternative alphabet used instead of the '+' and '/' + characters. + + The result is returned as a bytes object. A binascii.Error is raised if + s is incorrectly padded. + + If validate is False (the default), characters that are neither in the + normal base-64 alphabet nor the alternative alphabet are discarded prior + to the padding check. If validate is True, these non-alphabet characters + in the input result in a binascii.Error. + For more information about the strict base64 check, see: + + https://docs.python.org/3.11/library/binascii.html#binascii.a2b_base64 + """ + s = _bytes_from_decode_data(s) + if altchars is not None: + altchars = _bytes_from_decode_data(altchars) + assert len(altchars) == 2, repr(altchars) + s = s.translate(bytes.maketrans(altchars, b'+/')) + return binascii.a2b_base64(s, strict_mode=validate) + + +def standard_b64encode(s): + """Encode bytes-like object s using the standard Base64 alphabet. + + The result is returned as a bytes object. + """ + return b64encode(s) + +def standard_b64decode(s): + """Decode bytes encoded with the standard Base64 alphabet. + + Argument s is a bytes-like object or ASCII string to decode. The result + is returned as a bytes object. A binascii.Error is raised if the input + is incorrectly padded. Characters that are not in the standard alphabet + are discarded prior to the padding check. + """ + return b64decode(s) + + +_urlsafe_encode_translation = bytes.maketrans(b'+/', b'-_') +_urlsafe_decode_translation = bytes.maketrans(b'-_', b'+/') + +def urlsafe_b64encode(s): + """Encode bytes using the URL- and filesystem-safe Base64 alphabet. + + Argument s is a bytes-like object to encode. The result is returned as a + bytes object. The alphabet uses '-' instead of '+' and '_' instead of + '/'. + """ + return b64encode(s).translate(_urlsafe_encode_translation) + +def urlsafe_b64decode(s): + """Decode bytes using the URL- and filesystem-safe Base64 alphabet. + + Argument s is a bytes-like object or ASCII string to decode. The result + is returned as a bytes object. A binascii.Error is raised if the input + is incorrectly padded. Characters that are not in the URL-safe base-64 + alphabet, and are not a plus '+' or slash '/', are discarded prior to the + padding check. + + The alphabet uses '-' instead of '+' and '_' instead of '/'. + """ + s = _bytes_from_decode_data(s) + s = s.translate(_urlsafe_decode_translation) + return b64decode(s) + + + +# Base32 encoding/decoding must be done in Python +_B32_ENCODE_DOCSTRING = ''' +Encode the bytes-like objects using {encoding} and return a bytes object. +''' +_B32_DECODE_DOCSTRING = ''' +Decode the {encoding} encoded bytes-like object or ASCII string s. + +Optional casefold is a flag specifying whether a lowercase alphabet is +acceptable as input. For security purposes, the default is False. +{extra_args} +The result is returned as a bytes object. A binascii.Error is raised if +the input is incorrectly padded or if there are non-alphabet +characters present in the input. +''' +_B32_DECODE_MAP01_DOCSTRING = ''' +RFC 3548 allows for optional mapping of the digit 0 (zero) to the +letter O (oh), and for optional mapping of the digit 1 (one) to +either the letter I (eye) or letter L (el). The optional argument +map01 when not None, specifies which letter the digit 1 should be +mapped to (when map01 is not None, the digit 0 is always mapped to +the letter O). For security purposes the default is None, so that +0 and 1 are not allowed in the input. +''' +_b32alphabet = b'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567' +_b32hexalphabet = b'0123456789ABCDEFGHIJKLMNOPQRSTUV' +_b32tab2 = {} +_b32rev = {} + +def _b32encode(alphabet, s): + global _b32tab2 + # Delay the initialization of the table to not waste memory + # if the function is never called + if alphabet not in _b32tab2: + b32tab = [bytes((i,)) for i in alphabet] + _b32tab2[alphabet] = [a + b for a in b32tab for b in b32tab] + b32tab = None + + if not isinstance(s, bytes_types): + s = memoryview(s).tobytes() + leftover = len(s) % 5 + # Pad the last quantum with zero bits if necessary + if leftover: + s = s + b'\0' * (5 - leftover) # Don't use += ! + encoded = bytearray() + from_bytes = int.from_bytes + b32tab2 = _b32tab2[alphabet] + for i in range(0, len(s), 5): + c = from_bytes(s[i: i + 5]) # big endian + encoded += (b32tab2[c >> 30] + # bits 1 - 10 + b32tab2[(c >> 20) & 0x3ff] + # bits 11 - 20 + b32tab2[(c >> 10) & 0x3ff] + # bits 21 - 30 + b32tab2[c & 0x3ff] # bits 31 - 40 + ) + # Adjust for any leftover partial quanta + if leftover == 1: + encoded[-6:] = b'======' + elif leftover == 2: + encoded[-4:] = b'====' + elif leftover == 3: + encoded[-3:] = b'===' + elif leftover == 4: + encoded[-1:] = b'=' + return bytes(encoded) + +def _b32decode(alphabet, s, casefold=False, map01=None): + global _b32rev + # Delay the initialization of the table to not waste memory + # if the function is never called + if alphabet not in _b32rev: + _b32rev[alphabet] = {v: k for k, v in enumerate(alphabet)} + s = _bytes_from_decode_data(s) + if len(s) % 8: + raise binascii.Error('Incorrect padding') + # Handle section 2.4 zero and one mapping. The flag map01 will be either + # False, or the character to map the digit 1 (one) to. It should be + # either L (el) or I (eye). + if map01 is not None: + map01 = _bytes_from_decode_data(map01) + assert len(map01) == 1, repr(map01) + s = s.translate(bytes.maketrans(b'01', b'O' + map01)) + if casefold: + s = s.upper() + # Strip off pad characters from the right. We need to count the pad + # characters because this will tell us how many null bytes to remove from + # the end of the decoded string. + l = len(s) + s = s.rstrip(b'=') + padchars = l - len(s) + # Now decode the full quanta + decoded = bytearray() + b32rev = _b32rev[alphabet] + for i in range(0, len(s), 8): + quanta = s[i: i + 8] + acc = 0 + try: + for c in quanta: + acc = (acc << 5) + b32rev[c] + except KeyError: + raise binascii.Error('Non-base32 digit found') from None + decoded += acc.to_bytes(5) # big endian + # Process the last, partial quanta + if l % 8 or padchars not in {0, 1, 3, 4, 6}: + raise binascii.Error('Incorrect padding') + if padchars and decoded: + acc <<= 5 * padchars + last = acc.to_bytes(5) # big endian + leftover = (43 - 5 * padchars) // 8 # 1: 4, 3: 3, 4: 2, 6: 1 + decoded[-5:] = last[:leftover] + return bytes(decoded) + + +def b32encode(s): + return _b32encode(_b32alphabet, s) +b32encode.__doc__ = _B32_ENCODE_DOCSTRING.format(encoding='base32') + +def b32decode(s, casefold=False, map01=None): + return _b32decode(_b32alphabet, s, casefold, map01) +b32decode.__doc__ = _B32_DECODE_DOCSTRING.format(encoding='base32', + extra_args=_B32_DECODE_MAP01_DOCSTRING) + +def b32hexencode(s): + return _b32encode(_b32hexalphabet, s) +b32hexencode.__doc__ = _B32_ENCODE_DOCSTRING.format(encoding='base32hex') + +def b32hexdecode(s, casefold=False): + # base32hex does not have the 01 mapping + return _b32decode(_b32hexalphabet, s, casefold) +b32hexdecode.__doc__ = _B32_DECODE_DOCSTRING.format(encoding='base32hex', + extra_args='') + + +# RFC 3548, Base 16 Alphabet specifies uppercase, but hexlify() returns +# lowercase. The RFC also recommends against accepting input case +# insensitively. +def b16encode(s): + """Encode the bytes-like object s using Base16 and return a bytes object. + """ + return binascii.hexlify(s).upper() + + +def b16decode(s, casefold=False): + """Decode the Base16 encoded bytes-like object or ASCII string s. + + Optional casefold is a flag specifying whether a lowercase alphabet is + acceptable as input. For security purposes, the default is False. + + The result is returned as a bytes object. A binascii.Error is raised if + s is incorrectly padded or if there are non-alphabet characters present + in the input. + """ + s = _bytes_from_decode_data(s) + if casefold: + s = s.upper() + if re.search(b'[^0-9A-F]', s): + raise binascii.Error('Non-base16 digit found') + return binascii.unhexlify(s) + +# +# Ascii85 encoding/decoding +# + +_a85chars = None +_a85chars2 = None +_A85START = b"<~" +_A85END = b"~>" + +def _85encode(b, chars, chars2, pad=False, foldnuls=False, foldspaces=False): + # Helper function for a85encode and b85encode + if not isinstance(b, bytes_types): + b = memoryview(b).tobytes() + + padding = (-len(b)) % 4 + if padding: + b = b + b'\0' * padding + words = struct.Struct('!%dI' % (len(b) // 4)).unpack(b) + + chunks = [b'z' if foldnuls and not word else + b'y' if foldspaces and word == 0x20202020 else + (chars2[word // 614125] + + chars2[word // 85 % 7225] + + chars[word % 85]) + for word in words] + + if padding and not pad: + if chunks[-1] == b'z': + chunks[-1] = chars[0] * 5 + chunks[-1] = chunks[-1][:-padding] + + return b''.join(chunks) + +def a85encode(b, *, foldspaces=False, wrapcol=0, pad=False, adobe=False): + """Encode bytes-like object b using Ascii85 and return a bytes object. + + foldspaces is an optional flag that uses the special short sequence 'y' + instead of 4 consecutive spaces (ASCII 0x20) as supported by 'btoa'. This + feature is not supported by the "standard" Adobe encoding. + + wrapcol controls whether the output should have newline (b'\\n') characters + added to it. If this is non-zero, each output line will be at most this + many characters long. + + pad controls whether the input is padded to a multiple of 4 before + encoding. Note that the btoa implementation always pads. + + adobe controls whether the encoded byte sequence is framed with <~ and ~>, + which is used by the Adobe implementation. + """ + global _a85chars, _a85chars2 + # Delay the initialization of tables to not waste memory + # if the function is never called + if _a85chars2 is None: + _a85chars = [bytes((i,)) for i in range(33, 118)] + _a85chars2 = [(a + b) for a in _a85chars for b in _a85chars] + + result = _85encode(b, _a85chars, _a85chars2, pad, True, foldspaces) + + if adobe: + result = _A85START + result + if wrapcol: + wrapcol = max(2 if adobe else 1, wrapcol) + chunks = [result[i: i + wrapcol] + for i in range(0, len(result), wrapcol)] + if adobe: + if len(chunks[-1]) + 2 > wrapcol: + chunks.append(b'') + result = b'\n'.join(chunks) + if adobe: + result += _A85END + + return result + +def a85decode(b, *, foldspaces=False, adobe=False, ignorechars=b' \t\n\r\v'): + """Decode the Ascii85 encoded bytes-like object or ASCII string b. + + foldspaces is a flag that specifies whether the 'y' short sequence should be + accepted as shorthand for 4 consecutive spaces (ASCII 0x20). This feature is + not supported by the "standard" Adobe encoding. + + adobe controls whether the input sequence is in Adobe Ascii85 format (i.e. + is framed with <~ and ~>). + + ignorechars should be a byte string containing characters to ignore from the + input. This should only contain whitespace characters, and by default + contains all whitespace characters in ASCII. + + The result is returned as a bytes object. + """ + b = _bytes_from_decode_data(b) + if adobe: + if not b.endswith(_A85END): + raise ValueError( + "Ascii85 encoded byte sequences must end " + "with {!r}".format(_A85END) + ) + if b.startswith(_A85START): + b = b[2:-2] # Strip off start/end markers + else: + b = b[:-2] + # + # We have to go through this stepwise, so as to ignore spaces and handle + # special short sequences + # + packI = struct.Struct('!I').pack + decoded = [] + decoded_append = decoded.append + curr = [] + curr_append = curr.append + curr_clear = curr.clear + for x in b + b'u' * 4: + if b'!'[0] <= x <= b'u'[0]: + curr_append(x) + if len(curr) == 5: + acc = 0 + for x in curr: + acc = 85 * acc + (x - 33) + try: + decoded_append(packI(acc)) + except struct.error: + raise ValueError('Ascii85 overflow') from None + curr_clear() + elif x == b'z'[0]: + if curr: + raise ValueError('z inside Ascii85 5-tuple') + decoded_append(b'\0\0\0\0') + elif foldspaces and x == b'y'[0]: + if curr: + raise ValueError('y inside Ascii85 5-tuple') + decoded_append(b'\x20\x20\x20\x20') + elif x in ignorechars: + # Skip whitespace + continue + else: + raise ValueError('Non-Ascii85 digit found: %c' % x) + + result = b''.join(decoded) + padding = 4 - len(curr) + if padding: + # Throw away the extra padding + result = result[:-padding] + return result + +# The following code is originally taken (with permission) from Mercurial + +_b85alphabet = (b"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" + b"abcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_`{|}~") +_b85chars = None +_b85chars2 = None +_b85dec = None + +def b85encode(b, pad=False): + """Encode bytes-like object b in base85 format and return a bytes object. + + If pad is true, the input is padded with b'\\0' so its length is a multiple of + 4 bytes before encoding. + """ + global _b85chars, _b85chars2 + # Delay the initialization of tables to not waste memory + # if the function is never called + if _b85chars2 is None: + _b85chars = [bytes((i,)) for i in _b85alphabet] + _b85chars2 = [(a + b) for a in _b85chars for b in _b85chars] + return _85encode(b, _b85chars, _b85chars2, pad) + +def b85decode(b): + """Decode the base85-encoded bytes-like object or ASCII string b + + The result is returned as a bytes object. + """ + global _b85dec + # Delay the initialization of tables to not waste memory + # if the function is never called + if _b85dec is None: + _b85dec = [None] * 256 + for i, c in enumerate(_b85alphabet): + _b85dec[c] = i + + b = _bytes_from_decode_data(b) + padding = (-len(b)) % 5 + b = b + b'~' * padding + out = [] + packI = struct.Struct('!I').pack + for i in range(0, len(b), 5): + chunk = b[i:i + 5] + acc = 0 + try: + for c in chunk: + acc = acc * 85 + _b85dec[c] + except TypeError: + for j, c in enumerate(chunk): + if _b85dec[c] is None: + raise ValueError('bad base85 character at position %d' + % (i + j)) from None + raise + try: + out.append(packI(acc)) + except struct.error: + raise ValueError('base85 overflow in hunk starting at byte %d' + % i) from None + + result = b''.join(out) + if padding: + result = result[:-padding] + return result + +# Legacy interface. This code could be cleaned up since I don't believe +# binascii has any line length limitations. It just doesn't seem worth it +# though. The files should be opened in binary mode. + +MAXLINESIZE = 76 # Excluding the CRLF +MAXBINSIZE = (MAXLINESIZE//4)*3 + +def encode(input, output): + """Encode a file; input and output are binary files.""" + while True: + s = input.read(MAXBINSIZE) + if not s: + break + while len(s) < MAXBINSIZE: + ns = input.read(MAXBINSIZE-len(s)) + if not ns: + break + s += ns + line = binascii.b2a_base64(s) + output.write(line) + + +def decode(input, output): + """Decode a file; input and output are binary files.""" + while True: + line = input.readline() + if not line: + break + s = binascii.a2b_base64(line) + output.write(s) + +def _input_type_check(s): + try: + m = memoryview(s) + except TypeError as err: + msg = "expected bytes-like object, not %s" % s.__class__.__name__ + raise TypeError(msg) from err + if m.format not in ('c', 'b', 'B'): + msg = ("expected single byte elements, not %r from %s" % + (m.format, s.__class__.__name__)) + raise TypeError(msg) + if m.ndim != 1: + msg = ("expected 1-D data, not %d-D data from %s" % + (m.ndim, s.__class__.__name__)) + raise TypeError(msg) + + +def encodebytes(s): + """Encode a bytestring into a bytes object containing multiple lines + of base-64 data.""" + _input_type_check(s) + pieces = [] + for i in range(0, len(s), MAXBINSIZE): + chunk = s[i : i + MAXBINSIZE] + pieces.append(binascii.b2a_base64(chunk)) + return b"".join(pieces) + + +def decodebytes(s): + """Decode a bytestring of base-64 data into a bytes object.""" + _input_type_check(s) + return binascii.a2b_base64(s) + + +# Usable as a script... +def main(): + """Small main program""" + import sys, getopt + usage = """usage: %s [-h|-d|-e|-u|-t] [file|-] + -h: print this help message and exit + -d, -u: decode + -e: encode (default) + -t: encode and decode string 'Aladdin:open sesame'"""%sys.argv[0] + try: + opts, args = getopt.getopt(sys.argv[1:], 'hdeut') + except getopt.error as msg: + sys.stdout = sys.stderr + print(msg) + print(usage) + sys.exit(2) + func = encode + for o, a in opts: + if o == '-e': func = encode + if o == '-d': func = decode + if o == '-u': func = decode + if o == '-t': test(); return + if o == '-h': print(usage); return + if args and args[0] != '-': + with open(args[0], 'rb') as f: + func(f, sys.stdout.buffer) + else: + func(sys.stdin.buffer, sys.stdout.buffer) + + +def test(): + s0 = b"Aladdin:open sesame" + print(repr(s0)) + s1 = encodebytes(s0) + print(repr(s1)) + s2 = decodebytes(s1) + print(repr(s2)) + assert s0 == s2 + + +if __name__ == '__main__': + main() diff --git a/lib/python3.11/bdb.py b/lib/python3.11/bdb.py new file mode 100644 index 0000000000000000000000000000000000000000..0f3eec653baaad49553f0dffe238b3e0aa5f0550 --- /dev/null +++ b/lib/python3.11/bdb.py @@ -0,0 +1,893 @@ +"""Debugger basics""" + +import fnmatch +import sys +import os +from inspect import CO_GENERATOR, CO_COROUTINE, CO_ASYNC_GENERATOR + +__all__ = ["BdbQuit", "Bdb", "Breakpoint"] + +GENERATOR_AND_COROUTINE_FLAGS = CO_GENERATOR | CO_COROUTINE | CO_ASYNC_GENERATOR + + +class BdbQuit(Exception): + """Exception to give up completely.""" + + +class Bdb: + """Generic Python debugger base class. + + This class takes care of details of the trace facility; + a derived class should implement user interaction. + The standard debugger class (pdb.Pdb) is an example. + + The optional skip argument must be an iterable of glob-style + module name patterns. The debugger will not step into frames + that originate in a module that matches one of these patterns. + Whether a frame is considered to originate in a certain module + is determined by the __name__ in the frame globals. + """ + + def __init__(self, skip=None): + self.skip = set(skip) if skip else None + self.breaks = {} + self.fncache = {} + self.frame_returning = None + + self._load_breaks() + + def canonic(self, filename): + """Return canonical form of filename. + + For real filenames, the canonical form is a case-normalized (on + case insensitive filesystems) absolute path. 'Filenames' with + angle brackets, such as "", generated in interactive + mode, are returned unchanged. + """ + if filename == "<" + filename[1:-1] + ">": + return filename + canonic = self.fncache.get(filename) + if not canonic: + canonic = os.path.abspath(filename) + canonic = os.path.normcase(canonic) + self.fncache[filename] = canonic + return canonic + + def reset(self): + """Set values of attributes as ready to start debugging.""" + import linecache + linecache.checkcache() + self.botframe = None + self._set_stopinfo(None, None) + + def trace_dispatch(self, frame, event, arg): + """Dispatch a trace function for debugged frames based on the event. + + This function is installed as the trace function for debugged + frames. Its return value is the new trace function, which is + usually itself. The default implementation decides how to + dispatch a frame, depending on the type of event (passed in as a + string) that is about to be executed. + + The event can be one of the following: + line: A new line of code is going to be executed. + call: A function is about to be called or another code block + is entered. + return: A function or other code block is about to return. + exception: An exception has occurred. + c_call: A C function is about to be called. + c_return: A C function has returned. + c_exception: A C function has raised an exception. + + For the Python events, specialized functions (see the dispatch_*() + methods) are called. For the C events, no action is taken. + + The arg parameter depends on the previous event. + """ + if self.quitting: + return # None + if event == 'line': + return self.dispatch_line(frame) + if event == 'call': + return self.dispatch_call(frame, arg) + if event == 'return': + return self.dispatch_return(frame, arg) + if event == 'exception': + return self.dispatch_exception(frame, arg) + if event == 'c_call': + return self.trace_dispatch + if event == 'c_exception': + return self.trace_dispatch + if event == 'c_return': + return self.trace_dispatch + print('bdb.Bdb.dispatch: unknown debugging event:', repr(event)) + return self.trace_dispatch + + def dispatch_line(self, frame): + """Invoke user function and return trace function for line event. + + If the debugger stops on the current line, invoke + self.user_line(). Raise BdbQuit if self.quitting is set. + Return self.trace_dispatch to continue tracing in this scope. + """ + if self.stop_here(frame) or self.break_here(frame): + self.user_line(frame) + if self.quitting: raise BdbQuit + return self.trace_dispatch + + def dispatch_call(self, frame, arg): + """Invoke user function and return trace function for call event. + + If the debugger stops on this function call, invoke + self.user_call(). Raise BdbQuit if self.quitting is set. + Return self.trace_dispatch to continue tracing in this scope. + """ + # XXX 'arg' is no longer used + if self.botframe is None: + # First call of dispatch since reset() + self.botframe = frame.f_back # (CT) Note that this may also be None! + return self.trace_dispatch + if not (self.stop_here(frame) or self.break_anywhere(frame)): + # No need to trace this function + return # None + # Ignore call events in generator except when stepping. + if self.stopframe and frame.f_code.co_flags & GENERATOR_AND_COROUTINE_FLAGS: + return self.trace_dispatch + self.user_call(frame, arg) + if self.quitting: raise BdbQuit + return self.trace_dispatch + + def dispatch_return(self, frame, arg): + """Invoke user function and return trace function for return event. + + If the debugger stops on this function return, invoke + self.user_return(). Raise BdbQuit if self.quitting is set. + Return self.trace_dispatch to continue tracing in this scope. + """ + if self.stop_here(frame) or frame == self.returnframe: + # Ignore return events in generator except when stepping. + if self.stopframe and frame.f_code.co_flags & GENERATOR_AND_COROUTINE_FLAGS: + return self.trace_dispatch + try: + self.frame_returning = frame + self.user_return(frame, arg) + finally: + self.frame_returning = None + if self.quitting: raise BdbQuit + # The user issued a 'next' or 'until' command. + if self.stopframe is frame and self.stoplineno != -1: + self._set_stopinfo(None, None) + return self.trace_dispatch + + def dispatch_exception(self, frame, arg): + """Invoke user function and return trace function for exception event. + + If the debugger stops on this exception, invoke + self.user_exception(). Raise BdbQuit if self.quitting is set. + Return self.trace_dispatch to continue tracing in this scope. + """ + if self.stop_here(frame): + # When stepping with next/until/return in a generator frame, skip + # the internal StopIteration exception (with no traceback) + # triggered by a subiterator run with the 'yield from' statement. + if not (frame.f_code.co_flags & GENERATOR_AND_COROUTINE_FLAGS + and arg[0] is StopIteration and arg[2] is None): + self.user_exception(frame, arg) + if self.quitting: raise BdbQuit + # Stop at the StopIteration or GeneratorExit exception when the user + # has set stopframe in a generator by issuing a return command, or a + # next/until command at the last statement in the generator before the + # exception. + elif (self.stopframe and frame is not self.stopframe + and self.stopframe.f_code.co_flags & GENERATOR_AND_COROUTINE_FLAGS + and arg[0] in (StopIteration, GeneratorExit)): + self.user_exception(frame, arg) + if self.quitting: raise BdbQuit + + return self.trace_dispatch + + # Normally derived classes don't override the following + # methods, but they may if they want to redefine the + # definition of stopping and breakpoints. + + def is_skipped_module(self, module_name): + "Return True if module_name matches any skip pattern." + if module_name is None: # some modules do not have names + return False + for pattern in self.skip: + if fnmatch.fnmatch(module_name, pattern): + return True + return False + + def stop_here(self, frame): + "Return True if frame is below the starting frame in the stack." + # (CT) stopframe may now also be None, see dispatch_call. + # (CT) the former test for None is therefore removed from here. + if self.skip and \ + self.is_skipped_module(frame.f_globals.get('__name__')): + return False + if frame is self.stopframe: + if self.stoplineno == -1: + return False + return frame.f_lineno >= self.stoplineno + if not self.stopframe: + return True + return False + + def break_here(self, frame): + """Return True if there is an effective breakpoint for this line. + + Check for line or function breakpoint and if in effect. + Delete temporary breakpoints if effective() says to. + """ + filename = self.canonic(frame.f_code.co_filename) + if filename not in self.breaks: + return False + lineno = frame.f_lineno + if lineno not in self.breaks[filename]: + # The line itself has no breakpoint, but maybe the line is the + # first line of a function with breakpoint set by function name. + lineno = frame.f_code.co_firstlineno + if lineno not in self.breaks[filename]: + return False + + # flag says ok to delete temp. bp + (bp, flag) = effective(filename, lineno, frame) + if bp: + self.currentbp = bp.number + if (flag and bp.temporary): + self.do_clear(str(bp.number)) + return True + else: + return False + + def do_clear(self, arg): + """Remove temporary breakpoint. + + Must implement in derived classes or get NotImplementedError. + """ + raise NotImplementedError("subclass of bdb must implement do_clear()") + + def break_anywhere(self, frame): + """Return True if there is any breakpoint for frame's filename. + """ + return self.canonic(frame.f_code.co_filename) in self.breaks + + # Derived classes should override the user_* methods + # to gain control. + + def user_call(self, frame, argument_list): + """Called if we might stop in a function.""" + pass + + def user_line(self, frame): + """Called when we stop or break at a line.""" + pass + + def user_return(self, frame, return_value): + """Called when a return trap is set here.""" + pass + + def user_exception(self, frame, exc_info): + """Called when we stop on an exception.""" + pass + + def _set_stopinfo(self, stopframe, returnframe, stoplineno=0): + """Set the attributes for stopping. + + If stoplineno is greater than or equal to 0, then stop at line + greater than or equal to the stopline. If stoplineno is -1, then + don't stop at all. + """ + self.stopframe = stopframe + self.returnframe = returnframe + self.quitting = False + # stoplineno >= 0 means: stop at line >= the stoplineno + # stoplineno -1 means: don't stop at all + self.stoplineno = stoplineno + + # Derived classes and clients can call the following methods + # to affect the stepping state. + + def set_until(self, frame, lineno=None): + """Stop when the line with the lineno greater than the current one is + reached or when returning from current frame.""" + # the name "until" is borrowed from gdb + if lineno is None: + lineno = frame.f_lineno + 1 + self._set_stopinfo(frame, frame, lineno) + + def set_step(self): + """Stop after one line of code.""" + # Issue #13183: pdb skips frames after hitting a breakpoint and running + # step commands. + # Restore the trace function in the caller (that may not have been set + # for performance reasons) when returning from the current frame. + if self.frame_returning: + caller_frame = self.frame_returning.f_back + if caller_frame and not caller_frame.f_trace: + caller_frame.f_trace = self.trace_dispatch + self._set_stopinfo(None, None) + + def set_next(self, frame): + """Stop on the next line in or below the given frame.""" + self._set_stopinfo(frame, None) + + def set_return(self, frame): + """Stop when returning from the given frame.""" + if frame.f_code.co_flags & GENERATOR_AND_COROUTINE_FLAGS: + self._set_stopinfo(frame, None, -1) + else: + self._set_stopinfo(frame.f_back, frame) + + def set_trace(self, frame=None): + """Start debugging from frame. + + If frame is not specified, debugging starts from caller's frame. + """ + if frame is None: + frame = sys._getframe().f_back + self.reset() + while frame: + frame.f_trace = self.trace_dispatch + self.botframe = frame + frame = frame.f_back + self.set_step() + sys.settrace(self.trace_dispatch) + + def set_continue(self): + """Stop only at breakpoints or when finished. + + If there are no breakpoints, set the system trace function to None. + """ + # Don't stop except at breakpoints or when finished + self._set_stopinfo(self.botframe, None, -1) + if not self.breaks: + # no breakpoints; run without debugger overhead + sys.settrace(None) + frame = sys._getframe().f_back + while frame and frame is not self.botframe: + del frame.f_trace + frame = frame.f_back + + def set_quit(self): + """Set quitting attribute to True. + + Raises BdbQuit exception in the next call to a dispatch_*() method. + """ + self.stopframe = self.botframe + self.returnframe = None + self.quitting = True + sys.settrace(None) + + # Derived classes and clients can call the following methods + # to manipulate breakpoints. These methods return an + # error message if something went wrong, None if all is well. + # Set_break prints out the breakpoint line and file:lineno. + # Call self.get_*break*() to see the breakpoints or better + # for bp in Breakpoint.bpbynumber: if bp: bp.bpprint(). + + def _add_to_breaks(self, filename, lineno): + """Add breakpoint to breaks, if not already there.""" + bp_linenos = self.breaks.setdefault(filename, []) + if lineno not in bp_linenos: + bp_linenos.append(lineno) + + def set_break(self, filename, lineno, temporary=False, cond=None, + funcname=None): + """Set a new breakpoint for filename:lineno. + + If lineno doesn't exist for the filename, return an error message. + The filename should be in canonical form. + """ + filename = self.canonic(filename) + import linecache # Import as late as possible + line = linecache.getline(filename, lineno) + if not line: + return 'Line %s:%d does not exist' % (filename, lineno) + self._add_to_breaks(filename, lineno) + bp = Breakpoint(filename, lineno, temporary, cond, funcname) + return None + + def _load_breaks(self): + """Apply all breakpoints (set in other instances) to this one. + + Populates this instance's breaks list from the Breakpoint class's + list, which can have breakpoints set by another Bdb instance. This + is necessary for interactive sessions to keep the breakpoints + active across multiple calls to run(). + """ + for (filename, lineno) in Breakpoint.bplist.keys(): + self._add_to_breaks(filename, lineno) + + def _prune_breaks(self, filename, lineno): + """Prune breakpoints for filename:lineno. + + A list of breakpoints is maintained in the Bdb instance and in + the Breakpoint class. If a breakpoint in the Bdb instance no + longer exists in the Breakpoint class, then it's removed from the + Bdb instance. + """ + if (filename, lineno) not in Breakpoint.bplist: + self.breaks[filename].remove(lineno) + if not self.breaks[filename]: + del self.breaks[filename] + + def clear_break(self, filename, lineno): + """Delete breakpoints for filename:lineno. + + If no breakpoints were set, return an error message. + """ + filename = self.canonic(filename) + if filename not in self.breaks: + return 'There are no breakpoints in %s' % filename + if lineno not in self.breaks[filename]: + return 'There is no breakpoint at %s:%d' % (filename, lineno) + # If there's only one bp in the list for that file,line + # pair, then remove the breaks entry + for bp in Breakpoint.bplist[filename, lineno][:]: + bp.deleteMe() + self._prune_breaks(filename, lineno) + return None + + def clear_bpbynumber(self, arg): + """Delete a breakpoint by its index in Breakpoint.bpbynumber. + + If arg is invalid, return an error message. + """ + try: + bp = self.get_bpbynumber(arg) + except ValueError as err: + return str(err) + bp.deleteMe() + self._prune_breaks(bp.file, bp.line) + return None + + def clear_all_file_breaks(self, filename): + """Delete all breakpoints in filename. + + If none were set, return an error message. + """ + filename = self.canonic(filename) + if filename not in self.breaks: + return 'There are no breakpoints in %s' % filename + for line in self.breaks[filename]: + blist = Breakpoint.bplist[filename, line] + for bp in blist: + bp.deleteMe() + del self.breaks[filename] + return None + + def clear_all_breaks(self): + """Delete all existing breakpoints. + + If none were set, return an error message. + """ + if not self.breaks: + return 'There are no breakpoints' + for bp in Breakpoint.bpbynumber: + if bp: + bp.deleteMe() + self.breaks = {} + return None + + def get_bpbynumber(self, arg): + """Return a breakpoint by its index in Breakpoint.bybpnumber. + + For invalid arg values or if the breakpoint doesn't exist, + raise a ValueError. + """ + if not arg: + raise ValueError('Breakpoint number expected') + try: + number = int(arg) + except ValueError: + raise ValueError('Non-numeric breakpoint number %s' % arg) from None + try: + bp = Breakpoint.bpbynumber[number] + except IndexError: + raise ValueError('Breakpoint number %d out of range' % number) from None + if bp is None: + raise ValueError('Breakpoint %d already deleted' % number) + return bp + + def get_break(self, filename, lineno): + """Return True if there is a breakpoint for filename:lineno.""" + filename = self.canonic(filename) + return filename in self.breaks and \ + lineno in self.breaks[filename] + + def get_breaks(self, filename, lineno): + """Return all breakpoints for filename:lineno. + + If no breakpoints are set, return an empty list. + """ + filename = self.canonic(filename) + return filename in self.breaks and \ + lineno in self.breaks[filename] and \ + Breakpoint.bplist[filename, lineno] or [] + + def get_file_breaks(self, filename): + """Return all lines with breakpoints for filename. + + If no breakpoints are set, return an empty list. + """ + filename = self.canonic(filename) + if filename in self.breaks: + return self.breaks[filename] + else: + return [] + + def get_all_breaks(self): + """Return all breakpoints that are set.""" + return self.breaks + + # Derived classes and clients can call the following method + # to get a data structure representing a stack trace. + + def get_stack(self, f, t): + """Return a list of (frame, lineno) in a stack trace and a size. + + List starts with original calling frame, if there is one. + Size may be number of frames above or below f. + """ + stack = [] + if t and t.tb_frame is f: + t = t.tb_next + while f is not None: + stack.append((f, f.f_lineno)) + if f is self.botframe: + break + f = f.f_back + stack.reverse() + i = max(0, len(stack) - 1) + while t is not None: + stack.append((t.tb_frame, t.tb_lineno)) + t = t.tb_next + if f is None: + i = max(0, len(stack) - 1) + return stack, i + + def format_stack_entry(self, frame_lineno, lprefix=': '): + """Return a string with information about a stack entry. + + The stack entry frame_lineno is a (frame, lineno) tuple. The + return string contains the canonical filename, the function name + or '', the input arguments, the return value, and the + line of code (if it exists). + + """ + import linecache, reprlib + frame, lineno = frame_lineno + filename = self.canonic(frame.f_code.co_filename) + s = '%s(%r)' % (filename, lineno) + if frame.f_code.co_name: + s += frame.f_code.co_name + else: + s += "" + s += '()' + if '__return__' in frame.f_locals: + rv = frame.f_locals['__return__'] + s += '->' + s += reprlib.repr(rv) + if lineno is not None: + line = linecache.getline(filename, lineno, frame.f_globals) + if line: + s += lprefix + line.strip() + else: + s += f'{lprefix}Warning: lineno is None' + return s + + # The following methods can be called by clients to use + # a debugger to debug a statement or an expression. + # Both can be given as a string, or a code object. + + def run(self, cmd, globals=None, locals=None): + """Debug a statement executed via the exec() function. + + globals defaults to __main__.dict; locals defaults to globals. + """ + if globals is None: + import __main__ + globals = __main__.__dict__ + if locals is None: + locals = globals + self.reset() + if isinstance(cmd, str): + cmd = compile(cmd, "", "exec") + sys.settrace(self.trace_dispatch) + try: + exec(cmd, globals, locals) + except BdbQuit: + pass + finally: + self.quitting = True + sys.settrace(None) + + def runeval(self, expr, globals=None, locals=None): + """Debug an expression executed via the eval() function. + + globals defaults to __main__.dict; locals defaults to globals. + """ + if globals is None: + import __main__ + globals = __main__.__dict__ + if locals is None: + locals = globals + self.reset() + sys.settrace(self.trace_dispatch) + try: + return eval(expr, globals, locals) + except BdbQuit: + pass + finally: + self.quitting = True + sys.settrace(None) + + def runctx(self, cmd, globals, locals): + """For backwards-compatibility. Defers to run().""" + # B/W compatibility + self.run(cmd, globals, locals) + + # This method is more useful to debug a single function call. + + def runcall(self, func, /, *args, **kwds): + """Debug a single function call. + + Return the result of the function call. + """ + self.reset() + sys.settrace(self.trace_dispatch) + res = None + try: + res = func(*args, **kwds) + except BdbQuit: + pass + finally: + self.quitting = True + sys.settrace(None) + return res + + +def set_trace(): + """Start debugging with a Bdb instance from the caller's frame.""" + Bdb().set_trace() + + +class Breakpoint: + """Breakpoint class. + + Implements temporary breakpoints, ignore counts, disabling and + (re)-enabling, and conditionals. + + Breakpoints are indexed by number through bpbynumber and by + the (file, line) tuple using bplist. The former points to a + single instance of class Breakpoint. The latter points to a + list of such instances since there may be more than one + breakpoint per line. + + When creating a breakpoint, its associated filename should be + in canonical form. If funcname is defined, a breakpoint hit will be + counted when the first line of that function is executed. A + conditional breakpoint always counts a hit. + """ + + # XXX Keeping state in the class is a mistake -- this means + # you cannot have more than one active Bdb instance. + + next = 1 # Next bp to be assigned + bplist = {} # indexed by (file, lineno) tuple + bpbynumber = [None] # Each entry is None or an instance of Bpt + # index 0 is unused, except for marking an + # effective break .... see effective() + + def __init__(self, file, line, temporary=False, cond=None, funcname=None): + self.funcname = funcname + # Needed if funcname is not None. + self.func_first_executable_line = None + self.file = file # This better be in canonical form! + self.line = line + self.temporary = temporary + self.cond = cond + self.enabled = True + self.ignore = 0 + self.hits = 0 + self.number = Breakpoint.next + Breakpoint.next += 1 + # Build the two lists + self.bpbynumber.append(self) + if (file, line) in self.bplist: + self.bplist[file, line].append(self) + else: + self.bplist[file, line] = [self] + + @staticmethod + def clearBreakpoints(): + Breakpoint.next = 1 + Breakpoint.bplist = {} + Breakpoint.bpbynumber = [None] + + def deleteMe(self): + """Delete the breakpoint from the list associated to a file:line. + + If it is the last breakpoint in that position, it also deletes + the entry for the file:line. + """ + + index = (self.file, self.line) + self.bpbynumber[self.number] = None # No longer in list + self.bplist[index].remove(self) + if not self.bplist[index]: + # No more bp for this f:l combo + del self.bplist[index] + + def enable(self): + """Mark the breakpoint as enabled.""" + self.enabled = True + + def disable(self): + """Mark the breakpoint as disabled.""" + self.enabled = False + + def bpprint(self, out=None): + """Print the output of bpformat(). + + The optional out argument directs where the output is sent + and defaults to standard output. + """ + if out is None: + out = sys.stdout + print(self.bpformat(), file=out) + + def bpformat(self): + """Return a string with information about the breakpoint. + + The information includes the breakpoint number, temporary + status, file:line position, break condition, number of times to + ignore, and number of times hit. + + """ + if self.temporary: + disp = 'del ' + else: + disp = 'keep ' + if self.enabled: + disp = disp + 'yes ' + else: + disp = disp + 'no ' + ret = '%-4dbreakpoint %s at %s:%d' % (self.number, disp, + self.file, self.line) + if self.cond: + ret += '\n\tstop only if %s' % (self.cond,) + if self.ignore: + ret += '\n\tignore next %d hits' % (self.ignore,) + if self.hits: + if self.hits > 1: + ss = 's' + else: + ss = '' + ret += '\n\tbreakpoint already hit %d time%s' % (self.hits, ss) + return ret + + def __str__(self): + "Return a condensed description of the breakpoint." + return 'breakpoint %s at %s:%s' % (self.number, self.file, self.line) + +# -----------end of Breakpoint class---------- + + +def checkfuncname(b, frame): + """Return True if break should happen here. + + Whether a break should happen depends on the way that b (the breakpoint) + was set. If it was set via line number, check if b.line is the same as + the one in the frame. If it was set via function name, check if this is + the right function and if it is on the first executable line. + """ + if not b.funcname: + # Breakpoint was set via line number. + if b.line != frame.f_lineno: + # Breakpoint was set at a line with a def statement and the function + # defined is called: don't break. + return False + return True + + # Breakpoint set via function name. + if frame.f_code.co_name != b.funcname: + # It's not a function call, but rather execution of def statement. + return False + + # We are in the right frame. + if not b.func_first_executable_line: + # The function is entered for the 1st time. + b.func_first_executable_line = frame.f_lineno + + if b.func_first_executable_line != frame.f_lineno: + # But we are not at the first line number: don't break. + return False + return True + + +def effective(file, line, frame): + """Return (active breakpoint, delete temporary flag) or (None, None) as + breakpoint to act upon. + + The "active breakpoint" is the first entry in bplist[line, file] (which + must exist) that is enabled, for which checkfuncname is True, and that + has neither a False condition nor a positive ignore count. The flag, + meaning that a temporary breakpoint should be deleted, is False only + when the condiion cannot be evaluated (in which case, ignore count is + ignored). + + If no such entry exists, then (None, None) is returned. + """ + possibles = Breakpoint.bplist[file, line] + for b in possibles: + if not b.enabled: + continue + if not checkfuncname(b, frame): + continue + # Count every hit when bp is enabled + b.hits += 1 + if not b.cond: + # If unconditional, and ignoring go on to next, else break + if b.ignore > 0: + b.ignore -= 1 + continue + else: + # breakpoint and marker that it's ok to delete if temporary + return (b, True) + else: + # Conditional bp. + # Ignore count applies only to those bpt hits where the + # condition evaluates to true. + try: + val = eval(b.cond, frame.f_globals, frame.f_locals) + if val: + if b.ignore > 0: + b.ignore -= 1 + # continue + else: + return (b, True) + # else: + # continue + except: + # if eval fails, most conservative thing is to stop on + # breakpoint regardless of ignore count. Don't delete + # temporary, as another hint to user. + return (b, False) + return (None, None) + + +# -------------------- testing -------------------- + +class Tdb(Bdb): + def user_call(self, frame, args): + name = frame.f_code.co_name + if not name: name = '???' + print('+++ call', name, args) + def user_line(self, frame): + import linecache + name = frame.f_code.co_name + if not name: name = '???' + fn = self.canonic(frame.f_code.co_filename) + line = linecache.getline(fn, frame.f_lineno, frame.f_globals) + print('+++', fn, frame.f_lineno, name, ':', line.strip()) + def user_return(self, frame, retval): + print('+++ return', retval) + def user_exception(self, frame, exc_stuff): + print('+++ exception', exc_stuff) + self.set_continue() + +def foo(n): + print('foo(', n, ')') + x = bar(n*10) + print('bar returned', x) + +def bar(a): + print('bar(', a, ')') + return a/2 + +def test(): + t = Tdb() + t.run('import bdb; bdb.foo(10)') diff --git a/lib/python3.11/bisect.py b/lib/python3.11/bisect.py new file mode 100644 index 0000000000000000000000000000000000000000..d37da74f7b4055c6cb476d55b22d90a9cf8769bb --- /dev/null +++ b/lib/python3.11/bisect.py @@ -0,0 +1,110 @@ +"""Bisection algorithms.""" + + +def insort_right(a, x, lo=0, hi=None, *, key=None): + """Insert item x in list a, and keep it sorted assuming a is sorted. + + If x is already in a, insert it to the right of the rightmost x. + + Optional args lo (default 0) and hi (default len(a)) bound the + slice of a to be searched. + """ + if key is None: + lo = bisect_right(a, x, lo, hi) + else: + lo = bisect_right(a, key(x), lo, hi, key=key) + a.insert(lo, x) + + +def bisect_right(a, x, lo=0, hi=None, *, key=None): + """Return the index where to insert item x in list a, assuming a is sorted. + + The return value i is such that all e in a[:i] have e <= x, and all e in + a[i:] have e > x. So if x already appears in the list, a.insert(i, x) will + insert just after the rightmost x already there. + + Optional args lo (default 0) and hi (default len(a)) bound the + slice of a to be searched. + """ + + if lo < 0: + raise ValueError('lo must be non-negative') + if hi is None: + hi = len(a) + # Note, the comparison uses "<" to match the + # __lt__() logic in list.sort() and in heapq. + if key is None: + while lo < hi: + mid = (lo + hi) // 2 + if x < a[mid]: + hi = mid + else: + lo = mid + 1 + else: + while lo < hi: + mid = (lo + hi) // 2 + if x < key(a[mid]): + hi = mid + else: + lo = mid + 1 + return lo + + +def insort_left(a, x, lo=0, hi=None, *, key=None): + """Insert item x in list a, and keep it sorted assuming a is sorted. + + If x is already in a, insert it to the left of the leftmost x. + + Optional args lo (default 0) and hi (default len(a)) bound the + slice of a to be searched. + """ + + if key is None: + lo = bisect_left(a, x, lo, hi) + else: + lo = bisect_left(a, key(x), lo, hi, key=key) + a.insert(lo, x) + +def bisect_left(a, x, lo=0, hi=None, *, key=None): + """Return the index where to insert item x in list a, assuming a is sorted. + + The return value i is such that all e in a[:i] have e < x, and all e in + a[i:] have e >= x. So if x already appears in the list, a.insert(i, x) will + insert just before the leftmost x already there. + + Optional args lo (default 0) and hi (default len(a)) bound the + slice of a to be searched. + """ + + if lo < 0: + raise ValueError('lo must be non-negative') + if hi is None: + hi = len(a) + # Note, the comparison uses "<" to match the + # __lt__() logic in list.sort() and in heapq. + if key is None: + while lo < hi: + mid = (lo + hi) // 2 + if a[mid] < x: + lo = mid + 1 + else: + hi = mid + else: + while lo < hi: + mid = (lo + hi) // 2 + if key(a[mid]) < x: + lo = mid + 1 + else: + hi = mid + return lo + + +# Overwrite above definitions with a fast C implementation +try: + from _bisect import * +except ImportError: + pass + +# Create aliases +bisect = bisect_right +insort = insort_right diff --git a/lib/python3.11/bz2.py b/lib/python3.11/bz2.py new file mode 100644 index 0000000000000000000000000000000000000000..fabe4f73c8d8085cffc2792dee4c1629a87b8b35 --- /dev/null +++ b/lib/python3.11/bz2.py @@ -0,0 +1,344 @@ +"""Interface to the libbzip2 compression library. + +This module provides a file interface, classes for incremental +(de)compression, and functions for one-shot (de)compression. +""" + +__all__ = ["BZ2File", "BZ2Compressor", "BZ2Decompressor", + "open", "compress", "decompress"] + +__author__ = "Nadeem Vawda " + +from builtins import open as _builtin_open +import io +import os +import _compression + +from _bz2 import BZ2Compressor, BZ2Decompressor + + +_MODE_CLOSED = 0 +_MODE_READ = 1 +# Value 2 no longer used +_MODE_WRITE = 3 + + +class BZ2File(_compression.BaseStream): + + """A file object providing transparent bzip2 (de)compression. + + A BZ2File can act as a wrapper for an existing file object, or refer + directly to a named file on disk. + + Note that BZ2File provides a *binary* file interface - data read is + returned as bytes, and data to be written should be given as bytes. + """ + + def __init__(self, filename, mode="r", *, compresslevel=9): + """Open a bzip2-compressed file. + + If filename is a str, bytes, or PathLike object, it gives the + name of the file to be opened. Otherwise, it should be a file + object, which will be used to read or write the compressed data. + + mode can be 'r' for reading (default), 'w' for (over)writing, + 'x' for creating exclusively, or 'a' for appending. These can + equivalently be given as 'rb', 'wb', 'xb', and 'ab'. + + If mode is 'w', 'x' or 'a', compresslevel can be a number between 1 + and 9 specifying the level of compression: 1 produces the least + compression, and 9 (default) produces the most compression. + + If mode is 'r', the input file may be the concatenation of + multiple compressed streams. + """ + self._fp = None + self._closefp = False + self._mode = _MODE_CLOSED + + if not (1 <= compresslevel <= 9): + raise ValueError("compresslevel must be between 1 and 9") + + if mode in ("", "r", "rb"): + mode = "rb" + mode_code = _MODE_READ + elif mode in ("w", "wb"): + mode = "wb" + mode_code = _MODE_WRITE + self._compressor = BZ2Compressor(compresslevel) + elif mode in ("x", "xb"): + mode = "xb" + mode_code = _MODE_WRITE + self._compressor = BZ2Compressor(compresslevel) + elif mode in ("a", "ab"): + mode = "ab" + mode_code = _MODE_WRITE + self._compressor = BZ2Compressor(compresslevel) + else: + raise ValueError("Invalid mode: %r" % (mode,)) + + if isinstance(filename, (str, bytes, os.PathLike)): + self._fp = _builtin_open(filename, mode) + self._closefp = True + self._mode = mode_code + elif hasattr(filename, "read") or hasattr(filename, "write"): + self._fp = filename + self._mode = mode_code + else: + raise TypeError("filename must be a str, bytes, file or PathLike object") + + if self._mode == _MODE_READ: + raw = _compression.DecompressReader(self._fp, + BZ2Decompressor, trailing_error=OSError) + self._buffer = io.BufferedReader(raw) + else: + self._pos = 0 + + def close(self): + """Flush and close the file. + + May be called more than once without error. Once the file is + closed, any other operation on it will raise a ValueError. + """ + if self._mode == _MODE_CLOSED: + return + try: + if self._mode == _MODE_READ: + self._buffer.close() + elif self._mode == _MODE_WRITE: + self._fp.write(self._compressor.flush()) + self._compressor = None + finally: + try: + if self._closefp: + self._fp.close() + finally: + self._fp = None + self._closefp = False + self._mode = _MODE_CLOSED + self._buffer = None + + @property + def closed(self): + """True if this file is closed.""" + return self._mode == _MODE_CLOSED + + def fileno(self): + """Return the file descriptor for the underlying file.""" + self._check_not_closed() + return self._fp.fileno() + + def seekable(self): + """Return whether the file supports seeking.""" + return self.readable() and self._buffer.seekable() + + def readable(self): + """Return whether the file was opened for reading.""" + self._check_not_closed() + return self._mode == _MODE_READ + + def writable(self): + """Return whether the file was opened for writing.""" + self._check_not_closed() + return self._mode == _MODE_WRITE + + def peek(self, n=0): + """Return buffered data without advancing the file position. + + Always returns at least one byte of data, unless at EOF. + The exact number of bytes returned is unspecified. + """ + self._check_can_read() + # Relies on the undocumented fact that BufferedReader.peek() + # always returns at least one byte (except at EOF), independent + # of the value of n + return self._buffer.peek(n) + + def read(self, size=-1): + """Read up to size uncompressed bytes from the file. + + If size is negative or omitted, read until EOF is reached. + Returns b'' if the file is already at EOF. + """ + self._check_can_read() + return self._buffer.read(size) + + def read1(self, size=-1): + """Read up to size uncompressed bytes, while trying to avoid + making multiple reads from the underlying stream. Reads up to a + buffer's worth of data if size is negative. + + Returns b'' if the file is at EOF. + """ + self._check_can_read() + if size < 0: + size = io.DEFAULT_BUFFER_SIZE + return self._buffer.read1(size) + + def readinto(self, b): + """Read bytes into b. + + Returns the number of bytes read (0 for EOF). + """ + self._check_can_read() + return self._buffer.readinto(b) + + def readline(self, size=-1): + """Read a line of uncompressed bytes from the file. + + The terminating newline (if present) is retained. If size is + non-negative, no more than size bytes will be read (in which + case the line may be incomplete). Returns b'' if already at EOF. + """ + if not isinstance(size, int): + if not hasattr(size, "__index__"): + raise TypeError("Integer argument expected") + size = size.__index__() + self._check_can_read() + return self._buffer.readline(size) + + def readlines(self, size=-1): + """Read a list of lines of uncompressed bytes from the file. + + size can be specified to control the number of lines read: no + further lines will be read once the total size of the lines read + so far equals or exceeds size. + """ + if not isinstance(size, int): + if not hasattr(size, "__index__"): + raise TypeError("Integer argument expected") + size = size.__index__() + self._check_can_read() + return self._buffer.readlines(size) + + def write(self, data): + """Write a byte string to the file. + + Returns the number of uncompressed bytes written, which is + always the length of data in bytes. Note that due to buffering, + the file on disk may not reflect the data written until close() + is called. + """ + self._check_can_write() + if isinstance(data, (bytes, bytearray)): + length = len(data) + else: + # accept any data that supports the buffer protocol + data = memoryview(data) + length = data.nbytes + + compressed = self._compressor.compress(data) + self._fp.write(compressed) + self._pos += length + return length + + def writelines(self, seq): + """Write a sequence of byte strings to the file. + + Returns the number of uncompressed bytes written. + seq can be any iterable yielding byte strings. + + Line separators are not added between the written byte strings. + """ + return _compression.BaseStream.writelines(self, seq) + + def seek(self, offset, whence=io.SEEK_SET): + """Change the file position. + + The new position is specified by offset, relative to the + position indicated by whence. Values for whence are: + + 0: start of stream (default); offset must not be negative + 1: current stream position + 2: end of stream; offset must not be positive + + Returns the new file position. + + Note that seeking is emulated, so depending on the parameters, + this operation may be extremely slow. + """ + self._check_can_seek() + return self._buffer.seek(offset, whence) + + def tell(self): + """Return the current file position.""" + self._check_not_closed() + if self._mode == _MODE_READ: + return self._buffer.tell() + return self._pos + + +def open(filename, mode="rb", compresslevel=9, + encoding=None, errors=None, newline=None): + """Open a bzip2-compressed file in binary or text mode. + + The filename argument can be an actual filename (a str, bytes, or + PathLike object), or an existing file object to read from or write + to. + + The mode argument can be "r", "rb", "w", "wb", "x", "xb", "a" or + "ab" for binary mode, or "rt", "wt", "xt" or "at" for text mode. + The default mode is "rb", and the default compresslevel is 9. + + For binary mode, this function is equivalent to the BZ2File + constructor: BZ2File(filename, mode, compresslevel). In this case, + the encoding, errors and newline arguments must not be provided. + + For text mode, a BZ2File object is created, and wrapped in an + io.TextIOWrapper instance with the specified encoding, error + handling behavior, and line ending(s). + + """ + if "t" in mode: + if "b" in mode: + raise ValueError("Invalid mode: %r" % (mode,)) + else: + if encoding is not None: + raise ValueError("Argument 'encoding' not supported in binary mode") + if errors is not None: + raise ValueError("Argument 'errors' not supported in binary mode") + if newline is not None: + raise ValueError("Argument 'newline' not supported in binary mode") + + bz_mode = mode.replace("t", "") + binary_file = BZ2File(filename, bz_mode, compresslevel=compresslevel) + + if "t" in mode: + encoding = io.text_encoding(encoding) + return io.TextIOWrapper(binary_file, encoding, errors, newline) + else: + return binary_file + + +def compress(data, compresslevel=9): + """Compress a block of data. + + compresslevel, if given, must be a number between 1 and 9. + + For incremental compression, use a BZ2Compressor object instead. + """ + comp = BZ2Compressor(compresslevel) + return comp.compress(data) + comp.flush() + + +def decompress(data): + """Decompress a block of data. + + For incremental decompression, use a BZ2Decompressor object instead. + """ + results = [] + while data: + decomp = BZ2Decompressor() + try: + res = decomp.decompress(data) + except OSError: + if results: + break # Leftover data is not a valid bzip2 stream; ignore it. + else: + raise # Error on the first iteration; bail out. + results.append(res) + if not decomp.eof: + raise ValueError("Compressed data ended before the " + "end-of-stream marker was reached") + data = decomp.unused_data + return b"".join(results) diff --git a/lib/python3.11/cProfile.py b/lib/python3.11/cProfile.py new file mode 100644 index 0000000000000000000000000000000000000000..44c028fe5e70e0153dd105a17918aa8aa4cdadee --- /dev/null +++ b/lib/python3.11/cProfile.py @@ -0,0 +1,191 @@ +#! /usr/bin/env python3 + +"""Python interface for the 'lsprof' profiler. + Compatible with the 'profile' module. +""" + +__all__ = ["run", "runctx", "Profile"] + +import _lsprof +import io +import profile as _pyprofile + +# ____________________________________________________________ +# Simple interface + +def run(statement, filename=None, sort=-1): + return _pyprofile._Utils(Profile).run(statement, filename, sort) + +def runctx(statement, globals, locals, filename=None, sort=-1): + return _pyprofile._Utils(Profile).runctx(statement, globals, locals, + filename, sort) + +run.__doc__ = _pyprofile.run.__doc__ +runctx.__doc__ = _pyprofile.runctx.__doc__ + +# ____________________________________________________________ + +class Profile(_lsprof.Profiler): + """Profile(timer=None, timeunit=None, subcalls=True, builtins=True) + + Builds a profiler object using the specified timer function. + The default timer is a fast built-in one based on real time. + For custom timer functions returning integers, timeunit can + be a float specifying a scale (i.e. how long each integer unit + is, in seconds). + """ + + # Most of the functionality is in the base class. + # This subclass only adds convenient and backward-compatible methods. + + def print_stats(self, sort=-1): + import pstats + pstats.Stats(self).strip_dirs().sort_stats(sort).print_stats() + + def dump_stats(self, file): + import marshal + with open(file, 'wb') as f: + self.create_stats() + marshal.dump(self.stats, f) + + def create_stats(self): + self.disable() + self.snapshot_stats() + + def snapshot_stats(self): + entries = self.getstats() + self.stats = {} + callersdicts = {} + # call information + for entry in entries: + func = label(entry.code) + nc = entry.callcount # ncalls column of pstats (before '/') + cc = nc - entry.reccallcount # ncalls column of pstats (after '/') + tt = entry.inlinetime # tottime column of pstats + ct = entry.totaltime # cumtime column of pstats + callers = {} + callersdicts[id(entry.code)] = callers + self.stats[func] = cc, nc, tt, ct, callers + # subcall information + for entry in entries: + if entry.calls: + func = label(entry.code) + for subentry in entry.calls: + try: + callers = callersdicts[id(subentry.code)] + except KeyError: + continue + nc = subentry.callcount + cc = nc - subentry.reccallcount + tt = subentry.inlinetime + ct = subentry.totaltime + if func in callers: + prev = callers[func] + nc += prev[0] + cc += prev[1] + tt += prev[2] + ct += prev[3] + callers[func] = nc, cc, tt, ct + + # The following two methods can be called by clients to use + # a profiler to profile a statement, given as a string. + + def run(self, cmd): + import __main__ + dict = __main__.__dict__ + return self.runctx(cmd, dict, dict) + + def runctx(self, cmd, globals, locals): + self.enable() + try: + exec(cmd, globals, locals) + finally: + self.disable() + return self + + # This method is more useful to profile a single function call. + def runcall(self, func, /, *args, **kw): + self.enable() + try: + return func(*args, **kw) + finally: + self.disable() + + def __enter__(self): + self.enable() + return self + + def __exit__(self, *exc_info): + self.disable() + +# ____________________________________________________________ + +def label(code): + if isinstance(code, str): + return ('~', 0, code) # built-in functions ('~' sorts at the end) + else: + return (code.co_filename, code.co_firstlineno, code.co_name) + +# ____________________________________________________________ + +def main(): + import os + import sys + import runpy + import pstats + from optparse import OptionParser + usage = "cProfile.py [-o output_file_path] [-s sort] [-m module | scriptfile] [arg] ..." + parser = OptionParser(usage=usage) + parser.allow_interspersed_args = False + parser.add_option('-o', '--outfile', dest="outfile", + help="Save stats to ", default=None) + parser.add_option('-s', '--sort', dest="sort", + help="Sort order when printing to stdout, based on pstats.Stats class", + default=2, + choices=sorted(pstats.Stats.sort_arg_dict_default)) + parser.add_option('-m', dest="module", action="store_true", + help="Profile a library module", default=False) + + if not sys.argv[1:]: + parser.print_usage() + sys.exit(2) + + (options, args) = parser.parse_args() + sys.argv[:] = args + + # The script that we're profiling may chdir, so capture the absolute path + # to the output file at startup. + if options.outfile is not None: + options.outfile = os.path.abspath(options.outfile) + + if len(args) > 0: + if options.module: + code = "run_module(modname, run_name='__main__')" + globs = { + 'run_module': runpy.run_module, + 'modname': args[0] + } + else: + progname = args[0] + sys.path.insert(0, os.path.dirname(progname)) + with io.open_code(progname) as fp: + code = compile(fp.read(), progname, 'exec') + globs = { + '__file__': progname, + '__name__': '__main__', + '__package__': None, + '__cached__': None, + } + try: + runctx(code, globs, None, options.outfile, options.sort) + except BrokenPipeError as exc: + # Prevent "Exception ignored" during interpreter shutdown. + sys.stdout = None + sys.exit(exc.errno) + else: + parser.print_usage() + return parser + +# When invoked as main program, invoke the profiler on a script +if __name__ == '__main__': + main() diff --git a/lib/python3.11/calendar.py b/lib/python3.11/calendar.py new file mode 100644 index 0000000000000000000000000000000000000000..27a1e093620c3ca36e01e0d9d6296a7c79a2e2d8 --- /dev/null +++ b/lib/python3.11/calendar.py @@ -0,0 +1,768 @@ +"""Calendar printing functions + +Note when comparing these calendars to the ones printed by cal(1): By +default, these calendars have Monday as the first day of the week, and +Sunday as the last (the European convention). Use setfirstweekday() to +set the first day of the week (0=Monday, 6=Sunday).""" + +import sys +import datetime +import locale as _locale +from itertools import repeat + +__all__ = ["IllegalMonthError", "IllegalWeekdayError", "setfirstweekday", + "firstweekday", "isleap", "leapdays", "weekday", "monthrange", + "monthcalendar", "prmonth", "month", "prcal", "calendar", + "timegm", "month_name", "month_abbr", "day_name", "day_abbr", + "Calendar", "TextCalendar", "HTMLCalendar", "LocaleTextCalendar", + "LocaleHTMLCalendar", "weekheader", + "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", + "SATURDAY", "SUNDAY"] + +# Exception raised for bad input (with string parameter for details) +error = ValueError + +# Exceptions raised for bad input +class IllegalMonthError(ValueError): + def __init__(self, month): + self.month = month + def __str__(self): + return "bad month number %r; must be 1-12" % self.month + + +class IllegalWeekdayError(ValueError): + def __init__(self, weekday): + self.weekday = weekday + def __str__(self): + return "bad weekday number %r; must be 0 (Monday) to 6 (Sunday)" % self.weekday + + +# Constants for months referenced later +January = 1 +February = 2 + +# Number of days per month (except for February in leap years) +mdays = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] + +# This module used to have hard-coded lists of day and month names, as +# English strings. The classes following emulate a read-only version of +# that, but supply localized names. Note that the values are computed +# fresh on each call, in case the user changes locale between calls. + +class _localized_month: + + _months = [datetime.date(2001, i+1, 1).strftime for i in range(12)] + _months.insert(0, lambda x: "") + + def __init__(self, format): + self.format = format + + def __getitem__(self, i): + funcs = self._months[i] + if isinstance(i, slice): + return [f(self.format) for f in funcs] + else: + return funcs(self.format) + + def __len__(self): + return 13 + + +class _localized_day: + + # January 1, 2001, was a Monday. + _days = [datetime.date(2001, 1, i+1).strftime for i in range(7)] + + def __init__(self, format): + self.format = format + + def __getitem__(self, i): + funcs = self._days[i] + if isinstance(i, slice): + return [f(self.format) for f in funcs] + else: + return funcs(self.format) + + def __len__(self): + return 7 + + +# Full and abbreviated names of weekdays +day_name = _localized_day('%A') +day_abbr = _localized_day('%a') + +# Full and abbreviated names of months (1-based arrays!!!) +month_name = _localized_month('%B') +month_abbr = _localized_month('%b') + +# Constants for weekdays +(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY) = range(7) + + +def isleap(year): + """Return True for leap years, False for non-leap years.""" + return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) + + +def leapdays(y1, y2): + """Return number of leap years in range [y1, y2). + Assume y1 <= y2.""" + y1 -= 1 + y2 -= 1 + return (y2//4 - y1//4) - (y2//100 - y1//100) + (y2//400 - y1//400) + + +def weekday(year, month, day): + """Return weekday (0-6 ~ Mon-Sun) for year, month (1-12), day (1-31).""" + if not datetime.MINYEAR <= year <= datetime.MAXYEAR: + year = 2000 + year % 400 + return datetime.date(year, month, day).weekday() + + +def monthrange(year, month): + """Return weekday (0-6 ~ Mon-Sun) and number of days (28-31) for + year, month.""" + if not 1 <= month <= 12: + raise IllegalMonthError(month) + day1 = weekday(year, month, 1) + ndays = mdays[month] + (month == February and isleap(year)) + return day1, ndays + + +def _monthlen(year, month): + return mdays[month] + (month == February and isleap(year)) + + +def _prevmonth(year, month): + if month == 1: + return year-1, 12 + else: + return year, month-1 + + +def _nextmonth(year, month): + if month == 12: + return year+1, 1 + else: + return year, month+1 + + +class Calendar(object): + """ + Base calendar class. This class doesn't do any formatting. It simply + provides data to subclasses. + """ + + def __init__(self, firstweekday=0): + self.firstweekday = firstweekday # 0 = Monday, 6 = Sunday + + def getfirstweekday(self): + return self._firstweekday % 7 + + def setfirstweekday(self, firstweekday): + self._firstweekday = firstweekday + + firstweekday = property(getfirstweekday, setfirstweekday) + + def iterweekdays(self): + """ + Return an iterator for one week of weekday numbers starting with the + configured first one. + """ + for i in range(self.firstweekday, self.firstweekday + 7): + yield i%7 + + def itermonthdates(self, year, month): + """ + Return an iterator for one month. The iterator will yield datetime.date + values and will always iterate through complete weeks, so it will yield + dates outside the specified month. + """ + for y, m, d in self.itermonthdays3(year, month): + yield datetime.date(y, m, d) + + def itermonthdays(self, year, month): + """ + Like itermonthdates(), but will yield day numbers. For days outside + the specified month the day number is 0. + """ + day1, ndays = monthrange(year, month) + days_before = (day1 - self.firstweekday) % 7 + yield from repeat(0, days_before) + yield from range(1, ndays + 1) + days_after = (self.firstweekday - day1 - ndays) % 7 + yield from repeat(0, days_after) + + def itermonthdays2(self, year, month): + """ + Like itermonthdates(), but will yield (day number, weekday number) + tuples. For days outside the specified month the day number is 0. + """ + for i, d in enumerate(self.itermonthdays(year, month), self.firstweekday): + yield d, i % 7 + + def itermonthdays3(self, year, month): + """ + Like itermonthdates(), but will yield (year, month, day) tuples. Can be + used for dates outside of datetime.date range. + """ + day1, ndays = monthrange(year, month) + days_before = (day1 - self.firstweekday) % 7 + days_after = (self.firstweekday - day1 - ndays) % 7 + y, m = _prevmonth(year, month) + end = _monthlen(y, m) + 1 + for d in range(end-days_before, end): + yield y, m, d + for d in range(1, ndays + 1): + yield year, month, d + y, m = _nextmonth(year, month) + for d in range(1, days_after + 1): + yield y, m, d + + def itermonthdays4(self, year, month): + """ + Like itermonthdates(), but will yield (year, month, day, day_of_week) tuples. + Can be used for dates outside of datetime.date range. + """ + for i, (y, m, d) in enumerate(self.itermonthdays3(year, month)): + yield y, m, d, (self.firstweekday + i) % 7 + + def monthdatescalendar(self, year, month): + """ + Return a matrix (list of lists) representing a month's calendar. + Each row represents a week; week entries are datetime.date values. + """ + dates = list(self.itermonthdates(year, month)) + return [ dates[i:i+7] for i in range(0, len(dates), 7) ] + + def monthdays2calendar(self, year, month): + """ + Return a matrix representing a month's calendar. + Each row represents a week; week entries are + (day number, weekday number) tuples. Day numbers outside this month + are zero. + """ + days = list(self.itermonthdays2(year, month)) + return [ days[i:i+7] for i in range(0, len(days), 7) ] + + def monthdayscalendar(self, year, month): + """ + Return a matrix representing a month's calendar. + Each row represents a week; days outside this month are zero. + """ + days = list(self.itermonthdays(year, month)) + return [ days[i:i+7] for i in range(0, len(days), 7) ] + + def yeardatescalendar(self, year, width=3): + """ + Return the data for the specified year ready for formatting. The return + value is a list of month rows. Each month row contains up to width months. + Each month contains between 4 and 6 weeks and each week contains 1-7 + days. Days are datetime.date objects. + """ + months = [ + self.monthdatescalendar(year, i) + for i in range(January, January+12) + ] + return [months[i:i+width] for i in range(0, len(months), width) ] + + def yeardays2calendar(self, year, width=3): + """ + Return the data for the specified year ready for formatting (similar to + yeardatescalendar()). Entries in the week lists are + (day number, weekday number) tuples. Day numbers outside this month are + zero. + """ + months = [ + self.monthdays2calendar(year, i) + for i in range(January, January+12) + ] + return [months[i:i+width] for i in range(0, len(months), width) ] + + def yeardayscalendar(self, year, width=3): + """ + Return the data for the specified year ready for formatting (similar to + yeardatescalendar()). Entries in the week lists are day numbers. + Day numbers outside this month are zero. + """ + months = [ + self.monthdayscalendar(year, i) + for i in range(January, January+12) + ] + return [months[i:i+width] for i in range(0, len(months), width) ] + + +class TextCalendar(Calendar): + """ + Subclass of Calendar that outputs a calendar as a simple plain text + similar to the UNIX program cal. + """ + + def prweek(self, theweek, width): + """ + Print a single week (no newline). + """ + print(self.formatweek(theweek, width), end='') + + def formatday(self, day, weekday, width): + """ + Returns a formatted day. + """ + if day == 0: + s = '' + else: + s = '%2i' % day # right-align single-digit days + return s.center(width) + + def formatweek(self, theweek, width): + """ + Returns a single week in a string (no newline). + """ + return ' '.join(self.formatday(d, wd, width) for (d, wd) in theweek) + + def formatweekday(self, day, width): + """ + Returns a formatted week day name. + """ + if width >= 9: + names = day_name + else: + names = day_abbr + return names[day][:width].center(width) + + def formatweekheader(self, width): + """ + Return a header for a week. + """ + return ' '.join(self.formatweekday(i, width) for i in self.iterweekdays()) + + def formatmonthname(self, theyear, themonth, width, withyear=True): + """ + Return a formatted month name. + """ + s = month_name[themonth] + if withyear: + s = "%s %r" % (s, theyear) + return s.center(width) + + def prmonth(self, theyear, themonth, w=0, l=0): + """ + Print a month's calendar. + """ + print(self.formatmonth(theyear, themonth, w, l), end='') + + def formatmonth(self, theyear, themonth, w=0, l=0): + """ + Return a month's calendar string (multi-line). + """ + w = max(2, w) + l = max(1, l) + s = self.formatmonthname(theyear, themonth, 7 * (w + 1) - 1) + s = s.rstrip() + s += '\n' * l + s += self.formatweekheader(w).rstrip() + s += '\n' * l + for week in self.monthdays2calendar(theyear, themonth): + s += self.formatweek(week, w).rstrip() + s += '\n' * l + return s + + def formatyear(self, theyear, w=2, l=1, c=6, m=3): + """ + Returns a year's calendar as a multi-line string. + """ + w = max(2, w) + l = max(1, l) + c = max(2, c) + colwidth = (w + 1) * 7 - 1 + v = [] + a = v.append + a(repr(theyear).center(colwidth*m+c*(m-1)).rstrip()) + a('\n'*l) + header = self.formatweekheader(w) + for (i, row) in enumerate(self.yeardays2calendar(theyear, m)): + # months in this row + months = range(m*i+1, min(m*(i+1)+1, 13)) + a('\n'*l) + names = (self.formatmonthname(theyear, k, colwidth, False) + for k in months) + a(formatstring(names, colwidth, c).rstrip()) + a('\n'*l) + headers = (header for k in months) + a(formatstring(headers, colwidth, c).rstrip()) + a('\n'*l) + # max number of weeks for this row + height = max(len(cal) for cal in row) + for j in range(height): + weeks = [] + for cal in row: + if j >= len(cal): + weeks.append('') + else: + weeks.append(self.formatweek(cal[j], w)) + a(formatstring(weeks, colwidth, c).rstrip()) + a('\n' * l) + return ''.join(v) + + def pryear(self, theyear, w=0, l=0, c=6, m=3): + """Print a year's calendar.""" + print(self.formatyear(theyear, w, l, c, m), end='') + + +class HTMLCalendar(Calendar): + """ + This calendar returns complete HTML pages. + """ + + # CSS classes for the day s + cssclasses = ["mon", "tue", "wed", "thu", "fri", "sat", "sun"] + + # CSS classes for the day s + cssclasses_weekday_head = cssclasses + + # CSS class for the days before and after current month + cssclass_noday = "noday" + + # CSS class for the month's head + cssclass_month_head = "month" + + # CSS class for the month + cssclass_month = "month" + + # CSS class for the year's table head + cssclass_year_head = "year" + + # CSS class for the whole year table + cssclass_year = "year" + + def formatday(self, day, weekday): + """ + Return a day as a table cell. + """ + if day == 0: + # day outside month + return ' ' % self.cssclass_noday + else: + return '%d' % (self.cssclasses[weekday], day) + + def formatweek(self, theweek): + """ + Return a complete week as a table row. + """ + s = ''.join(self.formatday(d, wd) for (d, wd) in theweek) + return '%s' % s + + def formatweekday(self, day): + """ + Return a weekday name as a table header. + """ + return '%s' % ( + self.cssclasses_weekday_head[day], day_abbr[day]) + + def formatweekheader(self): + """ + Return a header for a week as a table row. + """ + s = ''.join(self.formatweekday(i) for i in self.iterweekdays()) + return '%s' % s + + def formatmonthname(self, theyear, themonth, withyear=True): + """ + Return a month name as a table row. + """ + if withyear: + s = '%s %s' % (month_name[themonth], theyear) + else: + s = '%s' % month_name[themonth] + return '%s' % ( + self.cssclass_month_head, s) + + def formatmonth(self, theyear, themonth, withyear=True): + """ + Return a formatted month as a table. + """ + v = [] + a = v.append + a('' % ( + self.cssclass_month)) + a('\n') + a(self.formatmonthname(theyear, themonth, withyear=withyear)) + a('\n') + a(self.formatweekheader()) + a('\n') + for week in self.monthdays2calendar(theyear, themonth): + a(self.formatweek(week)) + a('\n') + a('
') + a('\n') + return ''.join(v) + + def formatyear(self, theyear, width=3): + """ + Return a formatted year as a table of tables. + """ + v = [] + a = v.append + width = max(width, 1) + a('' % + self.cssclass_year) + a('\n') + a('' % ( + width, self.cssclass_year_head, theyear)) + for i in range(January, January+12, width): + # months in this row + months = range(i, min(i+width, 13)) + a('') + for m in months: + a('') + a('') + a('
%s
') + a(self.formatmonth(theyear, m, withyear=False)) + a('
') + return ''.join(v) + + def formatyearpage(self, theyear, width=3, css='calendar.css', encoding=None): + """ + Return a formatted year as a complete HTML page. + """ + if encoding is None: + encoding = sys.getdefaultencoding() + v = [] + a = v.append + a('\n' % encoding) + a('\n') + a('\n') + a('\n') + a('\n' % encoding) + if css is not None: + a('\n' % css) + a('Calendar for %d\n' % theyear) + a('\n') + a('\n') + a(self.formatyear(theyear, width)) + a('\n') + a('\n') + return ''.join(v).encode(encoding, "xmlcharrefreplace") + + +class different_locale: + def __init__(self, locale): + self.locale = locale + self.oldlocale = None + + def __enter__(self): + self.oldlocale = _locale.setlocale(_locale.LC_TIME, None) + _locale.setlocale(_locale.LC_TIME, self.locale) + + def __exit__(self, *args): + if self.oldlocale is None: + return + _locale.setlocale(_locale.LC_TIME, self.oldlocale) + + +def _get_default_locale(): + locale = _locale.setlocale(_locale.LC_TIME, None) + if locale == "C": + with different_locale(""): + # The LC_TIME locale does not seem to be configured: + # get the user preferred locale. + locale = _locale.setlocale(_locale.LC_TIME, None) + return locale + + +class LocaleTextCalendar(TextCalendar): + """ + This class can be passed a locale name in the constructor and will return + month and weekday names in the specified locale. + """ + + def __init__(self, firstweekday=0, locale=None): + TextCalendar.__init__(self, firstweekday) + if locale is None: + locale = _get_default_locale() + self.locale = locale + + def formatweekday(self, day, width): + with different_locale(self.locale): + return super().formatweekday(day, width) + + def formatmonthname(self, theyear, themonth, width, withyear=True): + with different_locale(self.locale): + return super().formatmonthname(theyear, themonth, width, withyear) + + +class LocaleHTMLCalendar(HTMLCalendar): + """ + This class can be passed a locale name in the constructor and will return + month and weekday names in the specified locale. + """ + def __init__(self, firstweekday=0, locale=None): + HTMLCalendar.__init__(self, firstweekday) + if locale is None: + locale = _get_default_locale() + self.locale = locale + + def formatweekday(self, day): + with different_locale(self.locale): + return super().formatweekday(day) + + def formatmonthname(self, theyear, themonth, withyear=True): + with different_locale(self.locale): + return super().formatmonthname(theyear, themonth, withyear) + +# Support for old module level interface +c = TextCalendar() + +firstweekday = c.getfirstweekday + +def setfirstweekday(firstweekday): + if not MONDAY <= firstweekday <= SUNDAY: + raise IllegalWeekdayError(firstweekday) + c.firstweekday = firstweekday + +monthcalendar = c.monthdayscalendar +prweek = c.prweek +week = c.formatweek +weekheader = c.formatweekheader +prmonth = c.prmonth +month = c.formatmonth +calendar = c.formatyear +prcal = c.pryear + + +# Spacing of month columns for multi-column year calendar +_colwidth = 7*3 - 1 # Amount printed by prweek() +_spacing = 6 # Number of spaces between columns + + +def format(cols, colwidth=_colwidth, spacing=_spacing): + """Prints multi-column formatting for year calendars""" + print(formatstring(cols, colwidth, spacing)) + + +def formatstring(cols, colwidth=_colwidth, spacing=_spacing): + """Returns a string formatted from n strings, centered within n columns.""" + spacing *= ' ' + return spacing.join(c.center(colwidth) for c in cols) + + +EPOCH = 1970 +_EPOCH_ORD = datetime.date(EPOCH, 1, 1).toordinal() + + +def timegm(tuple): + """Unrelated but handy function to calculate Unix timestamp from GMT.""" + year, month, day, hour, minute, second = tuple[:6] + days = datetime.date(year, month, 1).toordinal() - _EPOCH_ORD + day - 1 + hours = days*24 + hour + minutes = hours*60 + minute + seconds = minutes*60 + second + return seconds + + +def main(args): + import argparse + parser = argparse.ArgumentParser() + textgroup = parser.add_argument_group('text only arguments') + htmlgroup = parser.add_argument_group('html only arguments') + textgroup.add_argument( + "-w", "--width", + type=int, default=2, + help="width of date column (default 2)" + ) + textgroup.add_argument( + "-l", "--lines", + type=int, default=1, + help="number of lines for each week (default 1)" + ) + textgroup.add_argument( + "-s", "--spacing", + type=int, default=6, + help="spacing between months (default 6)" + ) + textgroup.add_argument( + "-m", "--months", + type=int, default=3, + help="months per row (default 3)" + ) + htmlgroup.add_argument( + "-c", "--css", + default="calendar.css", + help="CSS to use for page" + ) + parser.add_argument( + "-L", "--locale", + default=None, + help="locale to use for month and weekday names" + ) + parser.add_argument( + "-e", "--encoding", + default=None, + help="encoding to use for output" + ) + parser.add_argument( + "-t", "--type", + default="text", + choices=("text", "html"), + help="output type (text or html)" + ) + parser.add_argument( + "year", + nargs='?', type=int, + help="year number" + ) + parser.add_argument( + "month", + nargs='?', type=int, + help="month number (1-12, text only)" + ) + + options = parser.parse_args(args[1:]) + + if options.locale and not options.encoding: + parser.error("if --locale is specified --encoding is required") + sys.exit(1) + + locale = options.locale, options.encoding + + if options.type == "html": + if options.locale: + cal = LocaleHTMLCalendar(locale=locale) + else: + cal = HTMLCalendar() + encoding = options.encoding + if encoding is None: + encoding = sys.getdefaultencoding() + optdict = dict(encoding=encoding, css=options.css) + write = sys.stdout.buffer.write + if options.year is None: + write(cal.formatyearpage(datetime.date.today().year, **optdict)) + elif options.month is None: + write(cal.formatyearpage(options.year, **optdict)) + else: + parser.error("incorrect number of arguments") + sys.exit(1) + else: + if options.locale: + cal = LocaleTextCalendar(locale=locale) + else: + cal = TextCalendar() + optdict = dict(w=options.width, l=options.lines) + if options.month is None: + optdict["c"] = options.spacing + optdict["m"] = options.months + if options.year is None: + result = cal.formatyear(datetime.date.today().year, **optdict) + elif options.month is None: + result = cal.formatyear(options.year, **optdict) + else: + result = cal.formatmonth(options.year, options.month, **optdict) + write = sys.stdout.write + if options.encoding: + result = result.encode(options.encoding) + write = sys.stdout.buffer.write + write(result) + + +if __name__ == "__main__": + main(sys.argv) diff --git a/lib/python3.11/cgi.py b/lib/python3.11/cgi.py new file mode 100644 index 0000000000000000000000000000000000000000..8787567be7c081c1012016302d4ec38644b0f0c3 --- /dev/null +++ b/lib/python3.11/cgi.py @@ -0,0 +1,1012 @@ +#! /usr/local/bin/python + +# NOTE: the above "/usr/local/bin/python" is NOT a mistake. It is +# intentionally NOT "/usr/bin/env python". On many systems +# (e.g. Solaris), /usr/local/bin is not in $PATH as passed to CGI +# scripts, and /usr/local/bin is the default directory where Python is +# installed, so /usr/bin/env would be unable to find python. Granted, +# binary installations by Linux vendors often install Python in +# /usr/bin. So let those vendors patch cgi.py to match their choice +# of installation. + +"""Support module for CGI (Common Gateway Interface) scripts. + +This module defines a number of utilities for use by CGI scripts +written in Python. + +The global variable maxlen can be set to an integer indicating the maximum size +of a POST request. POST requests larger than this size will result in a +ValueError being raised during parsing. The default value of this variable is 0, +meaning the request size is unlimited. +""" + +# History +# ------- +# +# Michael McLay started this module. Steve Majewski changed the +# interface to SvFormContentDict and FormContentDict. The multipart +# parsing was inspired by code submitted by Andreas Paepcke. Guido van +# Rossum rewrote, reformatted and documented the module and is currently +# responsible for its maintenance. +# + +__version__ = "2.6" + + +# Imports +# ======= + +from io import StringIO, BytesIO, TextIOWrapper +from collections.abc import Mapping +import sys +import os +import urllib.parse +from email.parser import FeedParser +from email.message import Message +import html +import locale +import tempfile +import warnings + +__all__ = ["MiniFieldStorage", "FieldStorage", "parse", "parse_multipart", + "parse_header", "test", "print_exception", "print_environ", + "print_form", "print_directory", "print_arguments", + "print_environ_usage"] + + +warnings._deprecated(__name__, remove=(3,13)) + +# Logging support +# =============== + +logfile = "" # Filename to log to, if not empty +logfp = None # File object to log to, if not None + +def initlog(*allargs): + """Write a log message, if there is a log file. + + Even though this function is called initlog(), you should always + use log(); log is a variable that is set either to initlog + (initially), to dolog (once the log file has been opened), or to + nolog (when logging is disabled). + + The first argument is a format string; the remaining arguments (if + any) are arguments to the % operator, so e.g. + log("%s: %s", "a", "b") + will write "a: b" to the log file, followed by a newline. + + If the global logfp is not None, it should be a file object to + which log data is written. + + If the global logfp is None, the global logfile may be a string + giving a filename to open, in append mode. This file should be + world writable!!! If the file can't be opened, logging is + silently disabled (since there is no safe place where we could + send an error message). + + """ + global log, logfile, logfp + warnings.warn("cgi.log() is deprecated as of 3.10. Use logging instead", + DeprecationWarning, stacklevel=2) + if logfile and not logfp: + try: + logfp = open(logfile, "a", encoding="locale") + except OSError: + pass + if not logfp: + log = nolog + else: + log = dolog + log(*allargs) + +def dolog(fmt, *args): + """Write a log message to the log file. See initlog() for docs.""" + logfp.write(fmt%args + "\n") + +def nolog(*allargs): + """Dummy function, assigned to log when logging is disabled.""" + pass + +def closelog(): + """Close the log file.""" + global log, logfile, logfp + logfile = '' + if logfp: + logfp.close() + logfp = None + log = initlog + +log = initlog # The current logging function + + +# Parsing functions +# ================= + +# Maximum input we will accept when REQUEST_METHOD is POST +# 0 ==> unlimited input +maxlen = 0 + +def parse(fp=None, environ=os.environ, keep_blank_values=0, + strict_parsing=0, separator='&'): + """Parse a query in the environment or from a file (default stdin) + + Arguments, all optional: + + fp : file pointer; default: sys.stdin.buffer + + environ : environment dictionary; default: os.environ + + keep_blank_values: flag indicating whether blank values in + percent-encoded forms should be treated as blank strings. + A true value indicates that blanks should be retained as + blank strings. The default false value indicates that + blank values are to be ignored and treated as if they were + not included. + + strict_parsing: flag indicating what to do with parsing errors. + If false (the default), errors are silently ignored. + If true, errors raise a ValueError exception. + + separator: str. The symbol to use for separating the query arguments. + Defaults to &. + """ + if fp is None: + fp = sys.stdin + + # field keys and values (except for files) are returned as strings + # an encoding is required to decode the bytes read from self.fp + if hasattr(fp,'encoding'): + encoding = fp.encoding + else: + encoding = 'latin-1' + + # fp.read() must return bytes + if isinstance(fp, TextIOWrapper): + fp = fp.buffer + + if not 'REQUEST_METHOD' in environ: + environ['REQUEST_METHOD'] = 'GET' # For testing stand-alone + if environ['REQUEST_METHOD'] == 'POST': + ctype, pdict = parse_header(environ['CONTENT_TYPE']) + if ctype == 'multipart/form-data': + return parse_multipart(fp, pdict, separator=separator) + elif ctype == 'application/x-www-form-urlencoded': + clength = int(environ['CONTENT_LENGTH']) + if maxlen and clength > maxlen: + raise ValueError('Maximum content length exceeded') + qs = fp.read(clength).decode(encoding) + else: + qs = '' # Unknown content-type + if 'QUERY_STRING' in environ: + if qs: qs = qs + '&' + qs = qs + environ['QUERY_STRING'] + elif sys.argv[1:]: + if qs: qs = qs + '&' + qs = qs + sys.argv[1] + environ['QUERY_STRING'] = qs # XXX Shouldn't, really + elif 'QUERY_STRING' in environ: + qs = environ['QUERY_STRING'] + else: + if sys.argv[1:]: + qs = sys.argv[1] + else: + qs = "" + environ['QUERY_STRING'] = qs # XXX Shouldn't, really + return urllib.parse.parse_qs(qs, keep_blank_values, strict_parsing, + encoding=encoding, separator=separator) + + +def parse_multipart(fp, pdict, encoding="utf-8", errors="replace", separator='&'): + """Parse multipart input. + + Arguments: + fp : input file + pdict: dictionary containing other parameters of content-type header + encoding, errors: request encoding and error handler, passed to + FieldStorage + + Returns a dictionary just like parse_qs(): keys are the field names, each + value is a list of values for that field. For non-file fields, the value + is a list of strings. + """ + # RFC 2046, Section 5.1 : The "multipart" boundary delimiters are always + # represented as 7bit US-ASCII. + boundary = pdict['boundary'].decode('ascii') + ctype = "multipart/form-data; boundary={}".format(boundary) + headers = Message() + headers.set_type(ctype) + try: + headers['Content-Length'] = pdict['CONTENT-LENGTH'] + except KeyError: + pass + fs = FieldStorage(fp, headers=headers, encoding=encoding, errors=errors, + environ={'REQUEST_METHOD': 'POST'}, separator=separator) + return {k: fs.getlist(k) for k in fs} + +def _parseparam(s): + while s[:1] == ';': + s = s[1:] + end = s.find(';') + while end > 0 and (s.count('"', 0, end) - s.count('\\"', 0, end)) % 2: + end = s.find(';', end + 1) + if end < 0: + end = len(s) + f = s[:end] + yield f.strip() + s = s[end:] + +def parse_header(line): + """Parse a Content-type like header. + + Return the main content-type and a dictionary of options. + + """ + parts = _parseparam(';' + line) + key = parts.__next__() + pdict = {} + for p in parts: + i = p.find('=') + if i >= 0: + name = p[:i].strip().lower() + value = p[i+1:].strip() + if len(value) >= 2 and value[0] == value[-1] == '"': + value = value[1:-1] + value = value.replace('\\\\', '\\').replace('\\"', '"') + pdict[name] = value + return key, pdict + + +# Classes for field storage +# ========================= + +class MiniFieldStorage: + + """Like FieldStorage, for use when no file uploads are possible.""" + + # Dummy attributes + filename = None + list = None + type = None + file = None + type_options = {} + disposition = None + disposition_options = {} + headers = {} + + def __init__(self, name, value): + """Constructor from field name and value.""" + self.name = name + self.value = value + # self.file = StringIO(value) + + def __repr__(self): + """Return printable representation.""" + return "MiniFieldStorage(%r, %r)" % (self.name, self.value) + + +class FieldStorage: + + """Store a sequence of fields, reading multipart/form-data. + + This class provides naming, typing, files stored on disk, and + more. At the top level, it is accessible like a dictionary, whose + keys are the field names. (Note: None can occur as a field name.) + The items are either a Python list (if there's multiple values) or + another FieldStorage or MiniFieldStorage object. If it's a single + object, it has the following attributes: + + name: the field name, if specified; otherwise None + + filename: the filename, if specified; otherwise None; this is the + client side filename, *not* the file name on which it is + stored (that's a temporary file you don't deal with) + + value: the value as a *string*; for file uploads, this + transparently reads the file every time you request the value + and returns *bytes* + + file: the file(-like) object from which you can read the data *as + bytes* ; None if the data is stored a simple string + + type: the content-type, or None if not specified + + type_options: dictionary of options specified on the content-type + line + + disposition: content-disposition, or None if not specified + + disposition_options: dictionary of corresponding options + + headers: a dictionary(-like) object (sometimes email.message.Message or a + subclass thereof) containing *all* headers + + The class is subclassable, mostly for the purpose of overriding + the make_file() method, which is called internally to come up with + a file open for reading and writing. This makes it possible to + override the default choice of storing all files in a temporary + directory and unlinking them as soon as they have been opened. + + """ + def __init__(self, fp=None, headers=None, outerboundary=b'', + environ=os.environ, keep_blank_values=0, strict_parsing=0, + limit=None, encoding='utf-8', errors='replace', + max_num_fields=None, separator='&'): + """Constructor. Read multipart/* until last part. + + Arguments, all optional: + + fp : file pointer; default: sys.stdin.buffer + (not used when the request method is GET) + Can be : + 1. a TextIOWrapper object + 2. an object whose read() and readline() methods return bytes + + headers : header dictionary-like object; default: + taken from environ as per CGI spec + + outerboundary : terminating multipart boundary + (for internal use only) + + environ : environment dictionary; default: os.environ + + keep_blank_values: flag indicating whether blank values in + percent-encoded forms should be treated as blank strings. + A true value indicates that blanks should be retained as + blank strings. The default false value indicates that + blank values are to be ignored and treated as if they were + not included. + + strict_parsing: flag indicating what to do with parsing errors. + If false (the default), errors are silently ignored. + If true, errors raise a ValueError exception. + + limit : used internally to read parts of multipart/form-data forms, + to exit from the reading loop when reached. It is the difference + between the form content-length and the number of bytes already + read + + encoding, errors : the encoding and error handler used to decode the + binary stream to strings. Must be the same as the charset defined + for the page sending the form (content-type : meta http-equiv or + header) + + max_num_fields: int. If set, then __init__ throws a ValueError + if there are more than n fields read by parse_qsl(). + + """ + method = 'GET' + self.keep_blank_values = keep_blank_values + self.strict_parsing = strict_parsing + self.max_num_fields = max_num_fields + self.separator = separator + if 'REQUEST_METHOD' in environ: + method = environ['REQUEST_METHOD'].upper() + self.qs_on_post = None + if method == 'GET' or method == 'HEAD': + if 'QUERY_STRING' in environ: + qs = environ['QUERY_STRING'] + elif sys.argv[1:]: + qs = sys.argv[1] + else: + qs = "" + qs = qs.encode(locale.getpreferredencoding(), 'surrogateescape') + fp = BytesIO(qs) + if headers is None: + headers = {'content-type': + "application/x-www-form-urlencoded"} + if headers is None: + headers = {} + if method == 'POST': + # Set default content-type for POST to what's traditional + headers['content-type'] = "application/x-www-form-urlencoded" + if 'CONTENT_TYPE' in environ: + headers['content-type'] = environ['CONTENT_TYPE'] + if 'QUERY_STRING' in environ: + self.qs_on_post = environ['QUERY_STRING'] + if 'CONTENT_LENGTH' in environ: + headers['content-length'] = environ['CONTENT_LENGTH'] + else: + if not (isinstance(headers, (Mapping, Message))): + raise TypeError("headers must be mapping or an instance of " + "email.message.Message") + self.headers = headers + if fp is None: + self.fp = sys.stdin.buffer + # self.fp.read() must return bytes + elif isinstance(fp, TextIOWrapper): + self.fp = fp.buffer + else: + if not (hasattr(fp, 'read') and hasattr(fp, 'readline')): + raise TypeError("fp must be file pointer") + self.fp = fp + + self.encoding = encoding + self.errors = errors + + if not isinstance(outerboundary, bytes): + raise TypeError('outerboundary must be bytes, not %s' + % type(outerboundary).__name__) + self.outerboundary = outerboundary + + self.bytes_read = 0 + self.limit = limit + + # Process content-disposition header + cdisp, pdict = "", {} + if 'content-disposition' in self.headers: + cdisp, pdict = parse_header(self.headers['content-disposition']) + self.disposition = cdisp + self.disposition_options = pdict + self.name = None + if 'name' in pdict: + self.name = pdict['name'] + self.filename = None + if 'filename' in pdict: + self.filename = pdict['filename'] + self._binary_file = self.filename is not None + + # Process content-type header + # + # Honor any existing content-type header. But if there is no + # content-type header, use some sensible defaults. Assume + # outerboundary is "" at the outer level, but something non-false + # inside a multi-part. The default for an inner part is text/plain, + # but for an outer part it should be urlencoded. This should catch + # bogus clients which erroneously forget to include a content-type + # header. + # + # See below for what we do if there does exist a content-type header, + # but it happens to be something we don't understand. + if 'content-type' in self.headers: + ctype, pdict = parse_header(self.headers['content-type']) + elif self.outerboundary or method != 'POST': + ctype, pdict = "text/plain", {} + else: + ctype, pdict = 'application/x-www-form-urlencoded', {} + self.type = ctype + self.type_options = pdict + if 'boundary' in pdict: + self.innerboundary = pdict['boundary'].encode(self.encoding, + self.errors) + else: + self.innerboundary = b"" + + clen = -1 + if 'content-length' in self.headers: + try: + clen = int(self.headers['content-length']) + except ValueError: + pass + if maxlen and clen > maxlen: + raise ValueError('Maximum content length exceeded') + self.length = clen + if self.limit is None and clen >= 0: + self.limit = clen + + self.list = self.file = None + self.done = 0 + if ctype == 'application/x-www-form-urlencoded': + self.read_urlencoded() + elif ctype[:10] == 'multipart/': + self.read_multi(environ, keep_blank_values, strict_parsing) + else: + self.read_single() + + def __del__(self): + try: + self.file.close() + except AttributeError: + pass + + def __enter__(self): + return self + + def __exit__(self, *args): + self.file.close() + + def __repr__(self): + """Return a printable representation.""" + return "FieldStorage(%r, %r, %r)" % ( + self.name, self.filename, self.value) + + def __iter__(self): + return iter(self.keys()) + + def __getattr__(self, name): + if name != 'value': + raise AttributeError(name) + if self.file: + self.file.seek(0) + value = self.file.read() + self.file.seek(0) + elif self.list is not None: + value = self.list + else: + value = None + return value + + def __getitem__(self, key): + """Dictionary style indexing.""" + if self.list is None: + raise TypeError("not indexable") + found = [] + for item in self.list: + if item.name == key: found.append(item) + if not found: + raise KeyError(key) + if len(found) == 1: + return found[0] + else: + return found + + def getvalue(self, key, default=None): + """Dictionary style get() method, including 'value' lookup.""" + if key in self: + value = self[key] + if isinstance(value, list): + return [x.value for x in value] + else: + return value.value + else: + return default + + def getfirst(self, key, default=None): + """ Return the first value received.""" + if key in self: + value = self[key] + if isinstance(value, list): + return value[0].value + else: + return value.value + else: + return default + + def getlist(self, key): + """ Return list of received values.""" + if key in self: + value = self[key] + if isinstance(value, list): + return [x.value for x in value] + else: + return [value.value] + else: + return [] + + def keys(self): + """Dictionary style keys() method.""" + if self.list is None: + raise TypeError("not indexable") + return list(set(item.name for item in self.list)) + + def __contains__(self, key): + """Dictionary style __contains__ method.""" + if self.list is None: + raise TypeError("not indexable") + return any(item.name == key for item in self.list) + + def __len__(self): + """Dictionary style len(x) support.""" + return len(self.keys()) + + def __bool__(self): + if self.list is None: + raise TypeError("Cannot be converted to bool.") + return bool(self.list) + + def read_urlencoded(self): + """Internal: read data in query string format.""" + qs = self.fp.read(self.length) + if not isinstance(qs, bytes): + raise ValueError("%s should return bytes, got %s" \ + % (self.fp, type(qs).__name__)) + qs = qs.decode(self.encoding, self.errors) + if self.qs_on_post: + qs += '&' + self.qs_on_post + query = urllib.parse.parse_qsl( + qs, self.keep_blank_values, self.strict_parsing, + encoding=self.encoding, errors=self.errors, + max_num_fields=self.max_num_fields, separator=self.separator) + self.list = [MiniFieldStorage(key, value) for key, value in query] + self.skip_lines() + + FieldStorageClass = None + + def read_multi(self, environ, keep_blank_values, strict_parsing): + """Internal: read a part that is itself multipart.""" + ib = self.innerboundary + if not valid_boundary(ib): + raise ValueError('Invalid boundary in multipart form: %r' % (ib,)) + self.list = [] + if self.qs_on_post: + query = urllib.parse.parse_qsl( + self.qs_on_post, self.keep_blank_values, self.strict_parsing, + encoding=self.encoding, errors=self.errors, + max_num_fields=self.max_num_fields, separator=self.separator) + self.list.extend(MiniFieldStorage(key, value) for key, value in query) + + klass = self.FieldStorageClass or self.__class__ + first_line = self.fp.readline() # bytes + if not isinstance(first_line, bytes): + raise ValueError("%s should return bytes, got %s" \ + % (self.fp, type(first_line).__name__)) + self.bytes_read += len(first_line) + + # Ensure that we consume the file until we've hit our inner boundary + while (first_line.strip() != (b"--" + self.innerboundary) and + first_line): + first_line = self.fp.readline() + self.bytes_read += len(first_line) + + # Propagate max_num_fields into the sub class appropriately + max_num_fields = self.max_num_fields + if max_num_fields is not None: + max_num_fields -= len(self.list) + + while True: + parser = FeedParser() + hdr_text = b"" + while True: + data = self.fp.readline() + hdr_text += data + if not data.strip(): + break + if not hdr_text: + break + # parser takes strings, not bytes + self.bytes_read += len(hdr_text) + parser.feed(hdr_text.decode(self.encoding, self.errors)) + headers = parser.close() + + # Some clients add Content-Length for part headers, ignore them + if 'content-length' in headers: + del headers['content-length'] + + limit = None if self.limit is None \ + else self.limit - self.bytes_read + part = klass(self.fp, headers, ib, environ, keep_blank_values, + strict_parsing, limit, + self.encoding, self.errors, max_num_fields, self.separator) + + if max_num_fields is not None: + max_num_fields -= 1 + if part.list: + max_num_fields -= len(part.list) + if max_num_fields < 0: + raise ValueError('Max number of fields exceeded') + + self.bytes_read += part.bytes_read + self.list.append(part) + if part.done or self.bytes_read >= self.length > 0: + break + self.skip_lines() + + def read_single(self): + """Internal: read an atomic part.""" + if self.length >= 0: + self.read_binary() + self.skip_lines() + else: + self.read_lines() + self.file.seek(0) + + bufsize = 8*1024 # I/O buffering size for copy to file + + def read_binary(self): + """Internal: read binary data.""" + self.file = self.make_file() + todo = self.length + if todo >= 0: + while todo > 0: + data = self.fp.read(min(todo, self.bufsize)) # bytes + if not isinstance(data, bytes): + raise ValueError("%s should return bytes, got %s" + % (self.fp, type(data).__name__)) + self.bytes_read += len(data) + if not data: + self.done = -1 + break + self.file.write(data) + todo = todo - len(data) + + def read_lines(self): + """Internal: read lines until EOF or outerboundary.""" + if self._binary_file: + self.file = self.__file = BytesIO() # store data as bytes for files + else: + self.file = self.__file = StringIO() # as strings for other fields + if self.outerboundary: + self.read_lines_to_outerboundary() + else: + self.read_lines_to_eof() + + def __write(self, line): + """line is always bytes, not string""" + if self.__file is not None: + if self.__file.tell() + len(line) > 1000: + self.file = self.make_file() + data = self.__file.getvalue() + self.file.write(data) + self.__file = None + if self._binary_file: + # keep bytes + self.file.write(line) + else: + # decode to string + self.file.write(line.decode(self.encoding, self.errors)) + + def read_lines_to_eof(self): + """Internal: read lines until EOF.""" + while 1: + line = self.fp.readline(1<<16) # bytes + self.bytes_read += len(line) + if not line: + self.done = -1 + break + self.__write(line) + + def read_lines_to_outerboundary(self): + """Internal: read lines until outerboundary. + Data is read as bytes: boundaries and line ends must be converted + to bytes for comparisons. + """ + next_boundary = b"--" + self.outerboundary + last_boundary = next_boundary + b"--" + delim = b"" + last_line_lfend = True + _read = 0 + while 1: + + if self.limit is not None and 0 <= self.limit <= _read: + break + line = self.fp.readline(1<<16) # bytes + self.bytes_read += len(line) + _read += len(line) + if not line: + self.done = -1 + break + if delim == b"\r": + line = delim + line + delim = b"" + if line.startswith(b"--") and last_line_lfend: + strippedline = line.rstrip() + if strippedline == next_boundary: + break + if strippedline == last_boundary: + self.done = 1 + break + odelim = delim + if line.endswith(b"\r\n"): + delim = b"\r\n" + line = line[:-2] + last_line_lfend = True + elif line.endswith(b"\n"): + delim = b"\n" + line = line[:-1] + last_line_lfend = True + elif line.endswith(b"\r"): + # We may interrupt \r\n sequences if they span the 2**16 + # byte boundary + delim = b"\r" + line = line[:-1] + last_line_lfend = False + else: + delim = b"" + last_line_lfend = False + self.__write(odelim + line) + + def skip_lines(self): + """Internal: skip lines until outer boundary if defined.""" + if not self.outerboundary or self.done: + return + next_boundary = b"--" + self.outerboundary + last_boundary = next_boundary + b"--" + last_line_lfend = True + while True: + line = self.fp.readline(1<<16) + self.bytes_read += len(line) + if not line: + self.done = -1 + break + if line.endswith(b"--") and last_line_lfend: + strippedline = line.strip() + if strippedline == next_boundary: + break + if strippedline == last_boundary: + self.done = 1 + break + last_line_lfend = line.endswith(b'\n') + + def make_file(self): + """Overridable: return a readable & writable file. + + The file will be used as follows: + - data is written to it + - seek(0) + - data is read from it + + The file is opened in binary mode for files, in text mode + for other fields + + This version opens a temporary file for reading and writing, + and immediately deletes (unlinks) it. The trick (on Unix!) is + that the file can still be used, but it can't be opened by + another process, and it will automatically be deleted when it + is closed or when the current process terminates. + + If you want a more permanent file, you derive a class which + overrides this method. If you want a visible temporary file + that is nevertheless automatically deleted when the script + terminates, try defining a __del__ method in a derived class + which unlinks the temporary files you have created. + + """ + if self._binary_file: + return tempfile.TemporaryFile("wb+") + else: + return tempfile.TemporaryFile("w+", + encoding=self.encoding, newline = '\n') + + +# Test/debug code +# =============== + +def test(environ=os.environ): + """Robust test CGI script, usable as main program. + + Write minimal HTTP headers and dump all information provided to + the script in HTML form. + + """ + print("Content-type: text/html") + print() + sys.stderr = sys.stdout + try: + form = FieldStorage() # Replace with other classes to test those + print_directory() + print_arguments() + print_form(form) + print_environ(environ) + print_environ_usage() + def f(): + exec("testing print_exception() -- italics?") + def g(f=f): + f() + print("

What follows is a test, not an actual exception:

") + g() + except: + print_exception() + + print("

Second try with a small maxlen...

") + + global maxlen + maxlen = 50 + try: + form = FieldStorage() # Replace with other classes to test those + print_directory() + print_arguments() + print_form(form) + print_environ(environ) + except: + print_exception() + +def print_exception(type=None, value=None, tb=None, limit=None): + if type is None: + type, value, tb = sys.exc_info() + import traceback + print() + print("

Traceback (most recent call last):

") + list = traceback.format_tb(tb, limit) + \ + traceback.format_exception_only(type, value) + print("
%s%s
" % ( + html.escape("".join(list[:-1])), + html.escape(list[-1]), + )) + del tb + +def print_environ(environ=os.environ): + """Dump the shell environment as HTML.""" + keys = sorted(environ.keys()) + print() + print("

Shell Environment:

") + print("
") + for key in keys: + print("
", html.escape(key), "
", html.escape(environ[key])) + print("
") + print() + +def print_form(form): + """Dump the contents of a form as HTML.""" + keys = sorted(form.keys()) + print() + print("

Form Contents:

") + if not keys: + print("

No form fields.") + print("

") + for key in keys: + print("
" + html.escape(key) + ":", end=' ') + value = form[key] + print("" + html.escape(repr(type(value))) + "") + print("
" + html.escape(repr(value))) + print("
") + print() + +def print_directory(): + """Dump the current directory as HTML.""" + print() + print("

Current Working Directory:

") + try: + pwd = os.getcwd() + except OSError as msg: + print("OSError:", html.escape(str(msg))) + else: + print(html.escape(pwd)) + print() + +def print_arguments(): + print() + print("

Command Line Arguments:

") + print() + print(sys.argv) + print() + +def print_environ_usage(): + """Dump a list of environment variables used by CGI as HTML.""" + print(""" +

These environment variables could have been set:

+
    +
  • AUTH_TYPE +
  • CONTENT_LENGTH +
  • CONTENT_TYPE +
  • DATE_GMT +
  • DATE_LOCAL +
  • DOCUMENT_NAME +
  • DOCUMENT_ROOT +
  • DOCUMENT_URI +
  • GATEWAY_INTERFACE +
  • LAST_MODIFIED +
  • PATH +
  • PATH_INFO +
  • PATH_TRANSLATED +
  • QUERY_STRING +
  • REMOTE_ADDR +
  • REMOTE_HOST +
  • REMOTE_IDENT +
  • REMOTE_USER +
  • REQUEST_METHOD +
  • SCRIPT_NAME +
  • SERVER_NAME +
  • SERVER_PORT +
  • SERVER_PROTOCOL +
  • SERVER_ROOT +
  • SERVER_SOFTWARE +
+In addition, HTTP headers sent by the server may be passed in the +environment as well. Here are some common variable names: +
    +
  • HTTP_ACCEPT +
  • HTTP_CONNECTION +
  • HTTP_HOST +
  • HTTP_PRAGMA +
  • HTTP_REFERER +
  • HTTP_USER_AGENT +
+""") + + +# Utilities +# ========= + +def valid_boundary(s): + import re + if isinstance(s, bytes): + _vb_pattern = b"^[ -~]{0,200}[!-~]$" + else: + _vb_pattern = "^[ -~]{0,200}[!-~]$" + return re.match(_vb_pattern, s) + +# Invoke mainline +# =============== + +# Call test() when this file is run as a script (not imported as a module) +if __name__ == '__main__': + test() diff --git a/lib/python3.11/cgitb.py b/lib/python3.11/cgitb.py new file mode 100644 index 0000000000000000000000000000000000000000..8ce0e833a989aa6a9f7f886763c26bd4dfe482f2 --- /dev/null +++ b/lib/python3.11/cgitb.py @@ -0,0 +1,332 @@ +"""More comprehensive traceback formatting for Python scripts. + +To enable this module, do: + + import cgitb; cgitb.enable() + +at the top of your script. The optional arguments to enable() are: + + display - if true, tracebacks are displayed in the web browser + logdir - if set, tracebacks are written to files in this directory + context - number of lines of source code to show for each stack frame + format - 'text' or 'html' controls the output format + +By default, tracebacks are displayed but not saved, the context is 5 lines +and the output format is 'html' (for backwards compatibility with the +original use of this module) + +Alternatively, if you have caught an exception and want cgitb to display it +for you, call cgitb.handler(). The optional argument to handler() is a +3-item tuple (etype, evalue, etb) just like the value of sys.exc_info(). +The default handler displays output as HTML. + +""" +import inspect +import keyword +import linecache +import os +import pydoc +import sys +import tempfile +import time +import tokenize +import traceback +import warnings +from html import escape as html_escape + +warnings._deprecated(__name__, remove=(3, 13)) + + +def reset(): + """Return a string that resets the CGI and browser to a known state.""" + return ''' + --> --> + + ''' + +__UNDEF__ = [] # a special sentinel object +def small(text): + if text: + return '' + text + '' + else: + return '' + +def strong(text): + if text: + return '' + text + '' + else: + return '' + +def grey(text): + if text: + return '' + text + '' + else: + return '' + +def lookup(name, frame, locals): + """Find the value for a given name in the given environment.""" + if name in locals: + return 'local', locals[name] + if name in frame.f_globals: + return 'global', frame.f_globals[name] + if '__builtins__' in frame.f_globals: + builtins = frame.f_globals['__builtins__'] + if type(builtins) is type({}): + if name in builtins: + return 'builtin', builtins[name] + else: + if hasattr(builtins, name): + return 'builtin', getattr(builtins, name) + return None, __UNDEF__ + +def scanvars(reader, frame, locals): + """Scan one logical line of Python and look up values of variables used.""" + vars, lasttoken, parent, prefix, value = [], None, None, '', __UNDEF__ + for ttype, token, start, end, line in tokenize.generate_tokens(reader): + if ttype == tokenize.NEWLINE: break + if ttype == tokenize.NAME and token not in keyword.kwlist: + if lasttoken == '.': + if parent is not __UNDEF__: + value = getattr(parent, token, __UNDEF__) + vars.append((prefix + token, prefix, value)) + else: + where, value = lookup(token, frame, locals) + vars.append((token, where, value)) + elif token == '.': + prefix += lasttoken + '.' + parent = value + else: + parent, prefix = None, '' + lasttoken = token + return vars + +def html(einfo, context=5): + """Return a nice HTML document describing a given traceback.""" + etype, evalue, etb = einfo + if isinstance(etype, type): + etype = etype.__name__ + pyver = 'Python ' + sys.version.split()[0] + ': ' + sys.executable + date = time.ctime(time.time()) + head = f''' + + + + + +
 
+ 
+{html_escape(str(etype))}
+{pyver}
{date}
+

A problem occurred in a Python script. Here is the sequence of +function calls leading up to the error, in the order they occurred.

''' + + indent = '' + small(' ' * 5) + ' ' + frames = [] + records = inspect.getinnerframes(etb, context) + for frame, file, lnum, func, lines, index in records: + if file: + file = os.path.abspath(file) + link = '%s' % (file, pydoc.html.escape(file)) + else: + file = link = '?' + args, varargs, varkw, locals = inspect.getargvalues(frame) + call = '' + if func != '?': + call = 'in ' + strong(pydoc.html.escape(func)) + if func != "": + call += inspect.formatargvalues(args, varargs, varkw, locals, + formatvalue=lambda value: '=' + pydoc.html.repr(value)) + + highlight = {} + def reader(lnum=[lnum]): + highlight[lnum[0]] = 1 + try: return linecache.getline(file, lnum[0]) + finally: lnum[0] += 1 + vars = scanvars(reader, frame, locals) + + rows = ['%s%s %s' % + (' ', link, call)] + if index is not None: + i = lnum - index + for line in lines: + num = small(' ' * (5-len(str(i))) + str(i)) + ' ' + if i in highlight: + line = '=>%s%s' % (num, pydoc.html.preformat(line)) + rows.append('%s' % line) + else: + line = '  %s%s' % (num, pydoc.html.preformat(line)) + rows.append('%s' % grey(line)) + i += 1 + + done, dump = {}, [] + for name, where, value in vars: + if name in done: continue + done[name] = 1 + if value is not __UNDEF__: + if where in ('global', 'builtin'): + name = ('%s ' % where) + strong(name) + elif where == 'local': + name = strong(name) + else: + name = where + strong(name.split('.')[-1]) + dump.append('%s = %s' % (name, pydoc.html.repr(value))) + else: + dump.append(name + ' undefined') + + rows.append('%s' % small(grey(', '.join(dump)))) + frames.append(''' + +%s
''' % '\n'.join(rows)) + + exception = ['

%s: %s' % (strong(pydoc.html.escape(str(etype))), + pydoc.html.escape(str(evalue)))] + for name in dir(evalue): + if name[:1] == '_': continue + value = pydoc.html.repr(getattr(evalue, name)) + exception.append('\n
%s%s =\n%s' % (indent, name, value)) + + return head + ''.join(frames) + ''.join(exception) + ''' + + + +''' % pydoc.html.escape( + ''.join(traceback.format_exception(etype, evalue, etb))) + +def text(einfo, context=5): + """Return a plain text document describing a given traceback.""" + etype, evalue, etb = einfo + if isinstance(etype, type): + etype = etype.__name__ + pyver = 'Python ' + sys.version.split()[0] + ': ' + sys.executable + date = time.ctime(time.time()) + head = "%s\n%s\n%s\n" % (str(etype), pyver, date) + ''' +A problem occurred in a Python script. Here is the sequence of +function calls leading up to the error, in the order they occurred. +''' + + frames = [] + records = inspect.getinnerframes(etb, context) + for frame, file, lnum, func, lines, index in records: + file = file and os.path.abspath(file) or '?' + args, varargs, varkw, locals = inspect.getargvalues(frame) + call = '' + if func != '?': + call = 'in ' + func + if func != "": + call += inspect.formatargvalues(args, varargs, varkw, locals, + formatvalue=lambda value: '=' + pydoc.text.repr(value)) + + highlight = {} + def reader(lnum=[lnum]): + highlight[lnum[0]] = 1 + try: return linecache.getline(file, lnum[0]) + finally: lnum[0] += 1 + vars = scanvars(reader, frame, locals) + + rows = [' %s %s' % (file, call)] + if index is not None: + i = lnum - index + for line in lines: + num = '%5d ' % i + rows.append(num+line.rstrip()) + i += 1 + + done, dump = {}, [] + for name, where, value in vars: + if name in done: continue + done[name] = 1 + if value is not __UNDEF__: + if where == 'global': name = 'global ' + name + elif where != 'local': name = where + name.split('.')[-1] + dump.append('%s = %s' % (name, pydoc.text.repr(value))) + else: + dump.append(name + ' undefined') + + rows.append('\n'.join(dump)) + frames.append('\n%s\n' % '\n'.join(rows)) + + exception = ['%s: %s' % (str(etype), str(evalue))] + for name in dir(evalue): + value = pydoc.text.repr(getattr(evalue, name)) + exception.append('\n%s%s = %s' % (" "*4, name, value)) + + return head + ''.join(frames) + ''.join(exception) + ''' + +The above is a description of an error in a Python program. Here is +the original traceback: + +%s +''' % ''.join(traceback.format_exception(etype, evalue, etb)) + +class Hook: + """A hook to replace sys.excepthook that shows tracebacks in HTML.""" + + def __init__(self, display=1, logdir=None, context=5, file=None, + format="html"): + self.display = display # send tracebacks to browser if true + self.logdir = logdir # log tracebacks to files if not None + self.context = context # number of source code lines per frame + self.file = file or sys.stdout # place to send the output + self.format = format + + def __call__(self, etype, evalue, etb): + self.handle((etype, evalue, etb)) + + def handle(self, info=None): + info = info or sys.exc_info() + if self.format == "html": + self.file.write(reset()) + + formatter = (self.format=="html") and html or text + plain = False + try: + doc = formatter(info, self.context) + except: # just in case something goes wrong + doc = ''.join(traceback.format_exception(*info)) + plain = True + + if self.display: + if plain: + doc = pydoc.html.escape(doc) + self.file.write('

' + doc + '
\n') + else: + self.file.write(doc + '\n') + else: + self.file.write('

A problem occurred in a Python script.\n') + + if self.logdir is not None: + suffix = ['.txt', '.html'][self.format=="html"] + (fd, path) = tempfile.mkstemp(suffix=suffix, dir=self.logdir) + + try: + with os.fdopen(fd, 'w') as file: + file.write(doc) + msg = '%s contains the description of this error.' % path + except: + msg = 'Tried to save traceback to %s, but failed.' % path + + if self.format == 'html': + self.file.write('

%s

\n' % msg) + else: + self.file.write(msg + '\n') + try: + self.file.flush() + except: pass + +handler = Hook().handle +def enable(display=1, logdir=None, context=5, format="html"): + """Install an exception handler that formats tracebacks as HTML. + + The optional argument 'display' can be set to 0 to suppress sending the + traceback to the browser, and 'logdir' can be set to a directory to cause + tracebacks to be written to files there.""" + sys.excepthook = Hook(display=display, logdir=logdir, + context=context, format=format) diff --git a/lib/python3.11/chunk.py b/lib/python3.11/chunk.py new file mode 100644 index 0000000000000000000000000000000000000000..618781efd11e71593ac94032c101aa4038100029 --- /dev/null +++ b/lib/python3.11/chunk.py @@ -0,0 +1,173 @@ +"""Simple class to read IFF chunks. + +An IFF chunk (used in formats such as AIFF, TIFF, RMFF (RealMedia File +Format)) has the following structure: + ++----------------+ +| ID (4 bytes) | ++----------------+ +| size (4 bytes) | ++----------------+ +| data | +| ... | ++----------------+ + +The ID is a 4-byte string which identifies the type of chunk. + +The size field (a 32-bit value, encoded using big-endian byte order) +gives the size of the whole chunk, including the 8-byte header. + +Usually an IFF-type file consists of one or more chunks. The proposed +usage of the Chunk class defined here is to instantiate an instance at +the start of each chunk and read from the instance until it reaches +the end, after which a new instance can be instantiated. At the end +of the file, creating a new instance will fail with an EOFError +exception. + +Usage: +while True: + try: + chunk = Chunk(file) + except EOFError: + break + chunktype = chunk.getname() + while True: + data = chunk.read(nbytes) + if not data: + pass + # do something with data + +The interface is file-like. The implemented methods are: +read, close, seek, tell, isatty. +Extra methods are: skip() (called by close, skips to the end of the chunk), +getname() (returns the name (ID) of the chunk) + +The __init__ method has one required argument, a file-like object +(including a chunk instance), and one optional argument, a flag which +specifies whether or not chunks are aligned on 2-byte boundaries. The +default is 1, i.e. aligned. +""" + +import warnings + +warnings._deprecated(__name__, remove=(3, 13)) + +class Chunk: + def __init__(self, file, align=True, bigendian=True, inclheader=False): + import struct + self.closed = False + self.align = align # whether to align to word (2-byte) boundaries + if bigendian: + strflag = '>' + else: + strflag = '<' + self.file = file + self.chunkname = file.read(4) + if len(self.chunkname) < 4: + raise EOFError + try: + self.chunksize = struct.unpack_from(strflag+'L', file.read(4))[0] + except struct.error: + raise EOFError from None + if inclheader: + self.chunksize = self.chunksize - 8 # subtract header + self.size_read = 0 + try: + self.offset = self.file.tell() + except (AttributeError, OSError): + self.seekable = False + else: + self.seekable = True + + def getname(self): + """Return the name (ID) of the current chunk.""" + return self.chunkname + + def getsize(self): + """Return the size of the current chunk.""" + return self.chunksize + + def close(self): + if not self.closed: + try: + self.skip() + finally: + self.closed = True + + def isatty(self): + if self.closed: + raise ValueError("I/O operation on closed file") + return False + + def seek(self, pos, whence=0): + """Seek to specified position into the chunk. + Default position is 0 (start of chunk). + If the file is not seekable, this will result in an error. + """ + + if self.closed: + raise ValueError("I/O operation on closed file") + if not self.seekable: + raise OSError("cannot seek") + if whence == 1: + pos = pos + self.size_read + elif whence == 2: + pos = pos + self.chunksize + if pos < 0 or pos > self.chunksize: + raise RuntimeError + self.file.seek(self.offset + pos, 0) + self.size_read = pos + + def tell(self): + if self.closed: + raise ValueError("I/O operation on closed file") + return self.size_read + + def read(self, size=-1): + """Read at most size bytes from the chunk. + If size is omitted or negative, read until the end + of the chunk. + """ + + if self.closed: + raise ValueError("I/O operation on closed file") + if self.size_read >= self.chunksize: + return b'' + if size < 0: + size = self.chunksize - self.size_read + if size > self.chunksize - self.size_read: + size = self.chunksize - self.size_read + data = self.file.read(size) + self.size_read = self.size_read + len(data) + if self.size_read == self.chunksize and \ + self.align and \ + (self.chunksize & 1): + dummy = self.file.read(1) + self.size_read = self.size_read + len(dummy) + return data + + def skip(self): + """Skip the rest of the chunk. + If you are not interested in the contents of the chunk, + this method should be called so that the file points to + the start of the next chunk. + """ + + if self.closed: + raise ValueError("I/O operation on closed file") + if self.seekable: + try: + n = self.chunksize - self.size_read + # maybe fix alignment + if self.align and (self.chunksize & 1): + n = n + 1 + self.file.seek(n, 1) + self.size_read = self.size_read + n + return + except OSError: + pass + while self.size_read < self.chunksize: + n = min(8192, self.chunksize - self.size_read) + dummy = self.read(n) + if not dummy: + raise EOFError diff --git a/lib/python3.11/cmd.py b/lib/python3.11/cmd.py new file mode 100644 index 0000000000000000000000000000000000000000..88ee7d3ddc46944a7232128cfa8b4fa6223769db --- /dev/null +++ b/lib/python3.11/cmd.py @@ -0,0 +1,401 @@ +"""A generic class to build line-oriented command interpreters. + +Interpreters constructed with this class obey the following conventions: + +1. End of file on input is processed as the command 'EOF'. +2. A command is parsed out of each line by collecting the prefix composed + of characters in the identchars member. +3. A command `foo' is dispatched to a method 'do_foo()'; the do_ method + is passed a single argument consisting of the remainder of the line. +4. Typing an empty line repeats the last command. (Actually, it calls the + method `emptyline', which may be overridden in a subclass.) +5. There is a predefined `help' method. Given an argument `topic', it + calls the command `help_topic'. With no arguments, it lists all topics + with defined help_ functions, broken into up to three topics; documented + commands, miscellaneous help topics, and undocumented commands. +6. The command '?' is a synonym for `help'. The command '!' is a synonym + for `shell', if a do_shell method exists. +7. If completion is enabled, completing commands will be done automatically, + and completing of commands args is done by calling complete_foo() with + arguments text, line, begidx, endidx. text is string we are matching + against, all returned matches must begin with it. line is the current + input line (lstripped), begidx and endidx are the beginning and end + indexes of the text being matched, which could be used to provide + different completion depending upon which position the argument is in. + +The `default' method may be overridden to intercept commands for which there +is no do_ method. + +The `completedefault' method may be overridden to intercept completions for +commands that have no complete_ method. + +The data member `self.ruler' sets the character used to draw separator lines +in the help messages. If empty, no ruler line is drawn. It defaults to "=". + +If the value of `self.intro' is nonempty when the cmdloop method is called, +it is printed out on interpreter startup. This value may be overridden +via an optional argument to the cmdloop() method. + +The data members `self.doc_header', `self.misc_header', and +`self.undoc_header' set the headers used for the help function's +listings of documented functions, miscellaneous topics, and undocumented +functions respectively. +""" + +import string, sys + +__all__ = ["Cmd"] + +PROMPT = '(Cmd) ' +IDENTCHARS = string.ascii_letters + string.digits + '_' + +class Cmd: + """A simple framework for writing line-oriented command interpreters. + + These are often useful for test harnesses, administrative tools, and + prototypes that will later be wrapped in a more sophisticated interface. + + A Cmd instance or subclass instance is a line-oriented interpreter + framework. There is no good reason to instantiate Cmd itself; rather, + it's useful as a superclass of an interpreter class you define yourself + in order to inherit Cmd's methods and encapsulate action methods. + + """ + prompt = PROMPT + identchars = IDENTCHARS + ruler = '=' + lastcmd = '' + intro = None + doc_leader = "" + doc_header = "Documented commands (type help ):" + misc_header = "Miscellaneous help topics:" + undoc_header = "Undocumented commands:" + nohelp = "*** No help on %s" + use_rawinput = 1 + + def __init__(self, completekey='tab', stdin=None, stdout=None): + """Instantiate a line-oriented interpreter framework. + + The optional argument 'completekey' is the readline name of a + completion key; it defaults to the Tab key. If completekey is + not None and the readline module is available, command completion + is done automatically. The optional arguments stdin and stdout + specify alternate input and output file objects; if not specified, + sys.stdin and sys.stdout are used. + + """ + if stdin is not None: + self.stdin = stdin + else: + self.stdin = sys.stdin + if stdout is not None: + self.stdout = stdout + else: + self.stdout = sys.stdout + self.cmdqueue = [] + self.completekey = completekey + + def cmdloop(self, intro=None): + """Repeatedly issue a prompt, accept input, parse an initial prefix + off the received input, and dispatch to action methods, passing them + the remainder of the line as argument. + + """ + + self.preloop() + if self.use_rawinput and self.completekey: + try: + import readline + self.old_completer = readline.get_completer() + readline.set_completer(self.complete) + readline.parse_and_bind(self.completekey+": complete") + except ImportError: + pass + try: + if intro is not None: + self.intro = intro + if self.intro: + self.stdout.write(str(self.intro)+"\n") + stop = None + while not stop: + if self.cmdqueue: + line = self.cmdqueue.pop(0) + else: + if self.use_rawinput: + try: + line = input(self.prompt) + except EOFError: + line = 'EOF' + else: + self.stdout.write(self.prompt) + self.stdout.flush() + line = self.stdin.readline() + if not len(line): + line = 'EOF' + else: + line = line.rstrip('\r\n') + line = self.precmd(line) + stop = self.onecmd(line) + stop = self.postcmd(stop, line) + self.postloop() + finally: + if self.use_rawinput and self.completekey: + try: + import readline + readline.set_completer(self.old_completer) + except ImportError: + pass + + + def precmd(self, line): + """Hook method executed just before the command line is + interpreted, but after the input prompt is generated and issued. + + """ + return line + + def postcmd(self, stop, line): + """Hook method executed just after a command dispatch is finished.""" + return stop + + def preloop(self): + """Hook method executed once when the cmdloop() method is called.""" + pass + + def postloop(self): + """Hook method executed once when the cmdloop() method is about to + return. + + """ + pass + + def parseline(self, line): + """Parse the line into a command name and a string containing + the arguments. Returns a tuple containing (command, args, line). + 'command' and 'args' may be None if the line couldn't be parsed. + """ + line = line.strip() + if not line: + return None, None, line + elif line[0] == '?': + line = 'help ' + line[1:] + elif line[0] == '!': + if hasattr(self, 'do_shell'): + line = 'shell ' + line[1:] + else: + return None, None, line + i, n = 0, len(line) + while i < n and line[i] in self.identchars: i = i+1 + cmd, arg = line[:i], line[i:].strip() + return cmd, arg, line + + def onecmd(self, line): + """Interpret the argument as though it had been typed in response + to the prompt. + + This may be overridden, but should not normally need to be; + see the precmd() and postcmd() methods for useful execution hooks. + The return value is a flag indicating whether interpretation of + commands by the interpreter should stop. + + """ + cmd, arg, line = self.parseline(line) + if not line: + return self.emptyline() + if cmd is None: + return self.default(line) + self.lastcmd = line + if line == 'EOF' : + self.lastcmd = '' + if cmd == '': + return self.default(line) + else: + try: + func = getattr(self, 'do_' + cmd) + except AttributeError: + return self.default(line) + return func(arg) + + def emptyline(self): + """Called when an empty line is entered in response to the prompt. + + If this method is not overridden, it repeats the last nonempty + command entered. + + """ + if self.lastcmd: + return self.onecmd(self.lastcmd) + + def default(self, line): + """Called on an input line when the command prefix is not recognized. + + If this method is not overridden, it prints an error message and + returns. + + """ + self.stdout.write('*** Unknown syntax: %s\n'%line) + + def completedefault(self, *ignored): + """Method called to complete an input line when no command-specific + complete_*() method is available. + + By default, it returns an empty list. + + """ + return [] + + def completenames(self, text, *ignored): + dotext = 'do_'+text + return [a[3:] for a in self.get_names() if a.startswith(dotext)] + + def complete(self, text, state): + """Return the next possible completion for 'text'. + + If a command has not been entered, then complete against command list. + Otherwise try to call complete_ to get list of completions. + """ + if state == 0: + import readline + origline = readline.get_line_buffer() + line = origline.lstrip() + stripped = len(origline) - len(line) + begidx = readline.get_begidx() - stripped + endidx = readline.get_endidx() - stripped + if begidx>0: + cmd, args, foo = self.parseline(line) + if cmd == '': + compfunc = self.completedefault + else: + try: + compfunc = getattr(self, 'complete_' + cmd) + except AttributeError: + compfunc = self.completedefault + else: + compfunc = self.completenames + self.completion_matches = compfunc(text, line, begidx, endidx) + try: + return self.completion_matches[state] + except IndexError: + return None + + def get_names(self): + # This method used to pull in base class attributes + # at a time dir() didn't do it yet. + return dir(self.__class__) + + def complete_help(self, *args): + commands = set(self.completenames(*args)) + topics = set(a[5:] for a in self.get_names() + if a.startswith('help_' + args[0])) + return list(commands | topics) + + def do_help(self, arg): + 'List available commands with "help" or detailed help with "help cmd".' + if arg: + # XXX check arg syntax + try: + func = getattr(self, 'help_' + arg) + except AttributeError: + try: + doc=getattr(self, 'do_' + arg).__doc__ + if doc: + self.stdout.write("%s\n"%str(doc)) + return + except AttributeError: + pass + self.stdout.write("%s\n"%str(self.nohelp % (arg,))) + return + func() + else: + names = self.get_names() + cmds_doc = [] + cmds_undoc = [] + topics = set() + for name in names: + if name[:5] == 'help_': + topics.add(name[5:]) + names.sort() + # There can be duplicates if routines overridden + prevname = '' + for name in names: + if name[:3] == 'do_': + if name == prevname: + continue + prevname = name + cmd=name[3:] + if cmd in topics: + cmds_doc.append(cmd) + topics.remove(cmd) + elif getattr(self, name).__doc__: + cmds_doc.append(cmd) + else: + cmds_undoc.append(cmd) + self.stdout.write("%s\n"%str(self.doc_leader)) + self.print_topics(self.doc_header, cmds_doc, 15,80) + self.print_topics(self.misc_header, sorted(topics),15,80) + self.print_topics(self.undoc_header, cmds_undoc, 15,80) + + def print_topics(self, header, cmds, cmdlen, maxcol): + if cmds: + self.stdout.write("%s\n"%str(header)) + if self.ruler: + self.stdout.write("%s\n"%str(self.ruler * len(header))) + self.columnize(cmds, maxcol-1) + self.stdout.write("\n") + + def columnize(self, list, displaywidth=80): + """Display a list of strings as a compact set of columns. + + Each column is only as wide as necessary. + Columns are separated by two spaces (one was not legible enough). + """ + if not list: + self.stdout.write("\n") + return + + nonstrings = [i for i in range(len(list)) + if not isinstance(list[i], str)] + if nonstrings: + raise TypeError("list[i] not a string for i in %s" + % ", ".join(map(str, nonstrings))) + size = len(list) + if size == 1: + self.stdout.write('%s\n'%str(list[0])) + return + # Try every row count from 1 upwards + for nrows in range(1, len(list)): + ncols = (size+nrows-1) // nrows + colwidths = [] + totwidth = -2 + for col in range(ncols): + colwidth = 0 + for row in range(nrows): + i = row + nrows*col + if i >= size: + break + x = list[i] + colwidth = max(colwidth, len(x)) + colwidths.append(colwidth) + totwidth += colwidth + 2 + if totwidth > displaywidth: + break + if totwidth <= displaywidth: + break + else: + nrows = len(list) + ncols = 1 + colwidths = [0] + for row in range(nrows): + texts = [] + for col in range(ncols): + i = row + nrows*col + if i >= size: + x = "" + else: + x = list[i] + texts.append(x) + while texts and not texts[-1]: + del texts[-1] + for col in range(len(texts)): + texts[col] = texts[col].ljust(colwidths[col]) + self.stdout.write("%s\n"%str(" ".join(texts))) diff --git a/lib/python3.11/code.py b/lib/python3.11/code.py new file mode 100644 index 0000000000000000000000000000000000000000..76000f8c8b2c1e1c98f8fb4c831c2ea3e2de268d --- /dev/null +++ b/lib/python3.11/code.py @@ -0,0 +1,315 @@ +"""Utilities needed to emulate Python's interactive interpreter. + +""" + +# Inspired by similar code by Jeff Epler and Fredrik Lundh. + + +import sys +import traceback +from codeop import CommandCompiler, compile_command + +__all__ = ["InteractiveInterpreter", "InteractiveConsole", "interact", + "compile_command"] + +class InteractiveInterpreter: + """Base class for InteractiveConsole. + + This class deals with parsing and interpreter state (the user's + namespace); it doesn't deal with input buffering or prompting or + input file naming (the filename is always passed in explicitly). + + """ + + def __init__(self, locals=None): + """Constructor. + + The optional 'locals' argument specifies the dictionary in + which code will be executed; it defaults to a newly created + dictionary with key "__name__" set to "__console__" and key + "__doc__" set to None. + + """ + if locals is None: + locals = {"__name__": "__console__", "__doc__": None} + self.locals = locals + self.compile = CommandCompiler() + + def runsource(self, source, filename="", symbol="single"): + """Compile and run some source in the interpreter. + + Arguments are as for compile_command(). + + One of several things can happen: + + 1) The input is incorrect; compile_command() raised an + exception (SyntaxError or OverflowError). A syntax traceback + will be printed by calling the showsyntaxerror() method. + + 2) The input is incomplete, and more input is required; + compile_command() returned None. Nothing happens. + + 3) The input is complete; compile_command() returned a code + object. The code is executed by calling self.runcode() (which + also handles run-time exceptions, except for SystemExit). + + The return value is True in case 2, False in the other cases (unless + an exception is raised). The return value can be used to + decide whether to use sys.ps1 or sys.ps2 to prompt the next + line. + + """ + try: + code = self.compile(source, filename, symbol) + except (OverflowError, SyntaxError, ValueError): + # Case 1 + self.showsyntaxerror(filename) + return False + + if code is None: + # Case 2 + return True + + # Case 3 + self.runcode(code) + return False + + def runcode(self, code): + """Execute a code object. + + When an exception occurs, self.showtraceback() is called to + display a traceback. All exceptions are caught except + SystemExit, which is reraised. + + A note about KeyboardInterrupt: this exception may occur + elsewhere in this code, and may not always be caught. The + caller should be prepared to deal with it. + + """ + try: + exec(code, self.locals) + except SystemExit: + raise + except: + self.showtraceback() + + def showsyntaxerror(self, filename=None): + """Display the syntax error that just occurred. + + This doesn't display a stack trace because there isn't one. + + If a filename is given, it is stuffed in the exception instead + of what was there before (because Python's parser always uses + "" when reading from a string). + + The output is written by self.write(), below. + + """ + type, value, tb = sys.exc_info() + sys.last_type = type + sys.last_value = value + sys.last_traceback = tb + if filename and type is SyntaxError: + # Work hard to stuff the correct filename in the exception + try: + msg, (dummy_filename, lineno, offset, line) = value.args + except ValueError: + # Not the format we expect; leave it alone + pass + else: + # Stuff in the right filename + value = SyntaxError(msg, (filename, lineno, offset, line)) + sys.last_value = value + if sys.excepthook is sys.__excepthook__: + lines = traceback.format_exception_only(type, value) + self.write(''.join(lines)) + else: + # If someone has set sys.excepthook, we let that take precedence + # over self.write + sys.excepthook(type, value, tb) + + def showtraceback(self): + """Display the exception that just occurred. + + We remove the first stack item because it is our own code. + + The output is written by self.write(), below. + + """ + sys.last_type, sys.last_value, last_tb = ei = sys.exc_info() + sys.last_traceback = last_tb + try: + lines = traceback.format_exception(ei[0], ei[1], last_tb.tb_next) + if sys.excepthook is sys.__excepthook__: + self.write(''.join(lines)) + else: + # If someone has set sys.excepthook, we let that take precedence + # over self.write + sys.excepthook(ei[0], ei[1], last_tb) + finally: + last_tb = ei = None + + def write(self, data): + """Write a string. + + The base implementation writes to sys.stderr; a subclass may + replace this with a different implementation. + + """ + sys.stderr.write(data) + + +class InteractiveConsole(InteractiveInterpreter): + """Closely emulate the behavior of the interactive Python interpreter. + + This class builds on InteractiveInterpreter and adds prompting + using the familiar sys.ps1 and sys.ps2, and input buffering. + + """ + + def __init__(self, locals=None, filename=""): + """Constructor. + + The optional locals argument will be passed to the + InteractiveInterpreter base class. + + The optional filename argument should specify the (file)name + of the input stream; it will show up in tracebacks. + + """ + InteractiveInterpreter.__init__(self, locals) + self.filename = filename + self.resetbuffer() + + def resetbuffer(self): + """Reset the input buffer.""" + self.buffer = [] + + def interact(self, banner=None, exitmsg=None): + """Closely emulate the interactive Python console. + + The optional banner argument specifies the banner to print + before the first interaction; by default it prints a banner + similar to the one printed by the real Python interpreter, + followed by the current class name in parentheses (so as not + to confuse this with the real interpreter -- since it's so + close!). + + The optional exitmsg argument specifies the exit message + printed when exiting. Pass the empty string to suppress + printing an exit message. If exitmsg is not given or None, + a default message is printed. + + """ + try: + sys.ps1 + except AttributeError: + sys.ps1 = ">>> " + try: + sys.ps2 + except AttributeError: + sys.ps2 = "... " + cprt = 'Type "help", "copyright", "credits" or "license" for more information.' + if banner is None: + self.write("Python %s on %s\n%s\n(%s)\n" % + (sys.version, sys.platform, cprt, + self.__class__.__name__)) + elif banner: + self.write("%s\n" % str(banner)) + more = 0 + while 1: + try: + if more: + prompt = sys.ps2 + else: + prompt = sys.ps1 + try: + line = self.raw_input(prompt) + except EOFError: + self.write("\n") + break + else: + more = self.push(line) + except KeyboardInterrupt: + self.write("\nKeyboardInterrupt\n") + self.resetbuffer() + more = 0 + if exitmsg is None: + self.write('now exiting %s...\n' % self.__class__.__name__) + elif exitmsg != '': + self.write('%s\n' % exitmsg) + + def push(self, line): + """Push a line to the interpreter. + + The line should not have a trailing newline; it may have + internal newlines. The line is appended to a buffer and the + interpreter's runsource() method is called with the + concatenated contents of the buffer as source. If this + indicates that the command was executed or invalid, the buffer + is reset; otherwise, the command is incomplete, and the buffer + is left as it was after the line was appended. The return + value is 1 if more input is required, 0 if the line was dealt + with in some way (this is the same as runsource()). + + """ + self.buffer.append(line) + source = "\n".join(self.buffer) + more = self.runsource(source, self.filename) + if not more: + self.resetbuffer() + return more + + def raw_input(self, prompt=""): + """Write a prompt and read a line. + + The returned line does not include the trailing newline. + When the user enters the EOF key sequence, EOFError is raised. + + The base implementation uses the built-in function + input(); a subclass may replace this with a different + implementation. + + """ + return input(prompt) + + + +def interact(banner=None, readfunc=None, local=None, exitmsg=None): + """Closely emulate the interactive Python interpreter. + + This is a backwards compatible interface to the InteractiveConsole + class. When readfunc is not specified, it attempts to import the + readline module to enable GNU readline if it is available. + + Arguments (all optional, all default to None): + + banner -- passed to InteractiveConsole.interact() + readfunc -- if not None, replaces InteractiveConsole.raw_input() + local -- passed to InteractiveInterpreter.__init__() + exitmsg -- passed to InteractiveConsole.interact() + + """ + console = InteractiveConsole(local) + if readfunc is not None: + console.raw_input = readfunc + else: + try: + import readline + except ImportError: + pass + console.interact(banner, exitmsg) + + +if __name__ == "__main__": + import argparse + + parser = argparse.ArgumentParser() + parser.add_argument('-q', action='store_true', + help="don't print version and copyright messages") + args = parser.parse_args() + if args.q or sys.flags.quiet: + banner = '' + else: + banner = None + interact(banner) diff --git a/lib/python3.11/codecs.py b/lib/python3.11/codecs.py new file mode 100644 index 0000000000000000000000000000000000000000..c6165fcb142a7f01104cee86a5a5ae1f3b995e1e --- /dev/null +++ b/lib/python3.11/codecs.py @@ -0,0 +1,1139 @@ +""" codecs -- Python Codec Registry, API and helpers. + + +Written by Marc-Andre Lemburg (mal@lemburg.com). + +(c) Copyright CNRI, All Rights Reserved. NO WARRANTY. + +""" + +import builtins +import sys + +### Registry and builtin stateless codec functions + +try: + from _codecs import * +except ImportError as why: + raise SystemError('Failed to load the builtin codecs: %s' % why) + +__all__ = ["register", "lookup", "open", "EncodedFile", "BOM", "BOM_BE", + "BOM_LE", "BOM32_BE", "BOM32_LE", "BOM64_BE", "BOM64_LE", + "BOM_UTF8", "BOM_UTF16", "BOM_UTF16_LE", "BOM_UTF16_BE", + "BOM_UTF32", "BOM_UTF32_LE", "BOM_UTF32_BE", + "CodecInfo", "Codec", "IncrementalEncoder", "IncrementalDecoder", + "StreamReader", "StreamWriter", + "StreamReaderWriter", "StreamRecoder", + "getencoder", "getdecoder", "getincrementalencoder", + "getincrementaldecoder", "getreader", "getwriter", + "encode", "decode", "iterencode", "iterdecode", + "strict_errors", "ignore_errors", "replace_errors", + "xmlcharrefreplace_errors", + "backslashreplace_errors", "namereplace_errors", + "register_error", "lookup_error"] + +### Constants + +# +# Byte Order Mark (BOM = ZERO WIDTH NO-BREAK SPACE = U+FEFF) +# and its possible byte string values +# for UTF8/UTF16/UTF32 output and little/big endian machines +# + +# UTF-8 +BOM_UTF8 = b'\xef\xbb\xbf' + +# UTF-16, little endian +BOM_LE = BOM_UTF16_LE = b'\xff\xfe' + +# UTF-16, big endian +BOM_BE = BOM_UTF16_BE = b'\xfe\xff' + +# UTF-32, little endian +BOM_UTF32_LE = b'\xff\xfe\x00\x00' + +# UTF-32, big endian +BOM_UTF32_BE = b'\x00\x00\xfe\xff' + +if sys.byteorder == 'little': + + # UTF-16, native endianness + BOM = BOM_UTF16 = BOM_UTF16_LE + + # UTF-32, native endianness + BOM_UTF32 = BOM_UTF32_LE + +else: + + # UTF-16, native endianness + BOM = BOM_UTF16 = BOM_UTF16_BE + + # UTF-32, native endianness + BOM_UTF32 = BOM_UTF32_BE + +# Old broken names (don't use in new code) +BOM32_LE = BOM_UTF16_LE +BOM32_BE = BOM_UTF16_BE +BOM64_LE = BOM_UTF32_LE +BOM64_BE = BOM_UTF32_BE + + +### Codec base classes (defining the API) + +class CodecInfo(tuple): + """Codec details when looking up the codec registry""" + + # Private API to allow Python 3.4 to denylist the known non-Unicode + # codecs in the standard library. A more general mechanism to + # reliably distinguish test encodings from other codecs will hopefully + # be defined for Python 3.5 + # + # See http://bugs.python.org/issue19619 + _is_text_encoding = True # Assume codecs are text encodings by default + + def __new__(cls, encode, decode, streamreader=None, streamwriter=None, + incrementalencoder=None, incrementaldecoder=None, name=None, + *, _is_text_encoding=None): + self = tuple.__new__(cls, (encode, decode, streamreader, streamwriter)) + self.name = name + self.encode = encode + self.decode = decode + self.incrementalencoder = incrementalencoder + self.incrementaldecoder = incrementaldecoder + self.streamwriter = streamwriter + self.streamreader = streamreader + if _is_text_encoding is not None: + self._is_text_encoding = _is_text_encoding + return self + + def __repr__(self): + return "<%s.%s object for encoding %s at %#x>" % \ + (self.__class__.__module__, self.__class__.__qualname__, + self.name, id(self)) + +class Codec: + + """ Defines the interface for stateless encoders/decoders. + + The .encode()/.decode() methods may use different error + handling schemes by providing the errors argument. These + string values are predefined: + + 'strict' - raise a ValueError error (or a subclass) + 'ignore' - ignore the character and continue with the next + 'replace' - replace with a suitable replacement character; + Python will use the official U+FFFD REPLACEMENT + CHARACTER for the builtin Unicode codecs on + decoding and '?' on encoding. + 'surrogateescape' - replace with private code points U+DCnn. + 'xmlcharrefreplace' - Replace with the appropriate XML + character reference (only for encoding). + 'backslashreplace' - Replace with backslashed escape sequences. + 'namereplace' - Replace with \\N{...} escape sequences + (only for encoding). + + The set of allowed values can be extended via register_error. + + """ + def encode(self, input, errors='strict'): + + """ Encodes the object input and returns a tuple (output + object, length consumed). + + errors defines the error handling to apply. It defaults to + 'strict' handling. + + The method may not store state in the Codec instance. Use + StreamWriter for codecs which have to keep state in order to + make encoding efficient. + + The encoder must be able to handle zero length input and + return an empty object of the output object type in this + situation. + + """ + raise NotImplementedError + + def decode(self, input, errors='strict'): + + """ Decodes the object input and returns a tuple (output + object, length consumed). + + input must be an object which provides the bf_getreadbuf + buffer slot. Python strings, buffer objects and memory + mapped files are examples of objects providing this slot. + + errors defines the error handling to apply. It defaults to + 'strict' handling. + + The method may not store state in the Codec instance. Use + StreamReader for codecs which have to keep state in order to + make decoding efficient. + + The decoder must be able to handle zero length input and + return an empty object of the output object type in this + situation. + + """ + raise NotImplementedError + +class IncrementalEncoder(object): + """ + An IncrementalEncoder encodes an input in multiple steps. The input can + be passed piece by piece to the encode() method. The IncrementalEncoder + remembers the state of the encoding process between calls to encode(). + """ + def __init__(self, errors='strict'): + """ + Creates an IncrementalEncoder instance. + + The IncrementalEncoder may use different error handling schemes by + providing the errors keyword argument. See the module docstring + for a list of possible values. + """ + self.errors = errors + self.buffer = "" + + def encode(self, input, final=False): + """ + Encodes input and returns the resulting object. + """ + raise NotImplementedError + + def reset(self): + """ + Resets the encoder to the initial state. + """ + + def getstate(self): + """ + Return the current state of the encoder. + """ + return 0 + + def setstate(self, state): + """ + Set the current state of the encoder. state must have been + returned by getstate(). + """ + +class BufferedIncrementalEncoder(IncrementalEncoder): + """ + This subclass of IncrementalEncoder can be used as the baseclass for an + incremental encoder if the encoder must keep some of the output in a + buffer between calls to encode(). + """ + def __init__(self, errors='strict'): + IncrementalEncoder.__init__(self, errors) + # unencoded input that is kept between calls to encode() + self.buffer = "" + + def _buffer_encode(self, input, errors, final): + # Overwrite this method in subclasses: It must encode input + # and return an (output, length consumed) tuple + raise NotImplementedError + + def encode(self, input, final=False): + # encode input (taking the buffer into account) + data = self.buffer + input + (result, consumed) = self._buffer_encode(data, self.errors, final) + # keep unencoded input until the next call + self.buffer = data[consumed:] + return result + + def reset(self): + IncrementalEncoder.reset(self) + self.buffer = "" + + def getstate(self): + return self.buffer or 0 + + def setstate(self, state): + self.buffer = state or "" + +class IncrementalDecoder(object): + """ + An IncrementalDecoder decodes an input in multiple steps. The input can + be passed piece by piece to the decode() method. The IncrementalDecoder + remembers the state of the decoding process between calls to decode(). + """ + def __init__(self, errors='strict'): + """ + Create an IncrementalDecoder instance. + + The IncrementalDecoder may use different error handling schemes by + providing the errors keyword argument. See the module docstring + for a list of possible values. + """ + self.errors = errors + + def decode(self, input, final=False): + """ + Decode input and returns the resulting object. + """ + raise NotImplementedError + + def reset(self): + """ + Reset the decoder to the initial state. + """ + + def getstate(self): + """ + Return the current state of the decoder. + + This must be a (buffered_input, additional_state_info) tuple. + buffered_input must be a bytes object containing bytes that + were passed to decode() that have not yet been converted. + additional_state_info must be a non-negative integer + representing the state of the decoder WITHOUT yet having + processed the contents of buffered_input. In the initial state + and after reset(), getstate() must return (b"", 0). + """ + return (b"", 0) + + def setstate(self, state): + """ + Set the current state of the decoder. + + state must have been returned by getstate(). The effect of + setstate((b"", 0)) must be equivalent to reset(). + """ + +class BufferedIncrementalDecoder(IncrementalDecoder): + """ + This subclass of IncrementalDecoder can be used as the baseclass for an + incremental decoder if the decoder must be able to handle incomplete + byte sequences. + """ + def __init__(self, errors='strict'): + IncrementalDecoder.__init__(self, errors) + # undecoded input that is kept between calls to decode() + self.buffer = b"" + + def _buffer_decode(self, input, errors, final): + # Overwrite this method in subclasses: It must decode input + # and return an (output, length consumed) tuple + raise NotImplementedError + + def decode(self, input, final=False): + # decode input (taking the buffer into account) + data = self.buffer + input + (result, consumed) = self._buffer_decode(data, self.errors, final) + # keep undecoded input until the next call + self.buffer = data[consumed:] + return result + + def reset(self): + IncrementalDecoder.reset(self) + self.buffer = b"" + + def getstate(self): + # additional state info is always 0 + return (self.buffer, 0) + + def setstate(self, state): + # ignore additional state info + self.buffer = state[0] + +# +# The StreamWriter and StreamReader class provide generic working +# interfaces which can be used to implement new encoding submodules +# very easily. See encodings/utf_8.py for an example on how this is +# done. +# + +class StreamWriter(Codec): + + def __init__(self, stream, errors='strict'): + + """ Creates a StreamWriter instance. + + stream must be a file-like object open for writing. + + The StreamWriter may use different error handling + schemes by providing the errors keyword argument. These + parameters are predefined: + + 'strict' - raise a ValueError (or a subclass) + 'ignore' - ignore the character and continue with the next + 'replace'- replace with a suitable replacement character + 'xmlcharrefreplace' - Replace with the appropriate XML + character reference. + 'backslashreplace' - Replace with backslashed escape + sequences. + 'namereplace' - Replace with \\N{...} escape sequences. + + The set of allowed parameter values can be extended via + register_error. + """ + self.stream = stream + self.errors = errors + + def write(self, object): + + """ Writes the object's contents encoded to self.stream. + """ + data, consumed = self.encode(object, self.errors) + self.stream.write(data) + + def writelines(self, list): + + """ Writes the concatenated list of strings to the stream + using .write(). + """ + self.write(''.join(list)) + + def reset(self): + + """ Resets the codec buffers used for keeping internal state. + + Calling this method should ensure that the data on the + output is put into a clean state, that allows appending + of new fresh data without having to rescan the whole + stream to recover state. + + """ + pass + + def seek(self, offset, whence=0): + self.stream.seek(offset, whence) + if whence == 0 and offset == 0: + self.reset() + + def __getattr__(self, name, + getattr=getattr): + + """ Inherit all other methods from the underlying stream. + """ + return getattr(self.stream, name) + + def __enter__(self): + return self + + def __exit__(self, type, value, tb): + self.stream.close() + + def __reduce_ex__(self, proto): + raise TypeError("can't serialize %s" % self.__class__.__name__) + +### + +class StreamReader(Codec): + + charbuffertype = str + + def __init__(self, stream, errors='strict'): + + """ Creates a StreamReader instance. + + stream must be a file-like object open for reading. + + The StreamReader may use different error handling + schemes by providing the errors keyword argument. These + parameters are predefined: + + 'strict' - raise a ValueError (or a subclass) + 'ignore' - ignore the character and continue with the next + 'replace'- replace with a suitable replacement character + 'backslashreplace' - Replace with backslashed escape sequences; + + The set of allowed parameter values can be extended via + register_error. + """ + self.stream = stream + self.errors = errors + self.bytebuffer = b"" + self._empty_charbuffer = self.charbuffertype() + self.charbuffer = self._empty_charbuffer + self.linebuffer = None + + def decode(self, input, errors='strict'): + raise NotImplementedError + + def read(self, size=-1, chars=-1, firstline=False): + + """ Decodes data from the stream self.stream and returns the + resulting object. + + chars indicates the number of decoded code points or bytes to + return. read() will never return more data than requested, + but it might return less, if there is not enough available. + + size indicates the approximate maximum number of decoded + bytes or code points to read for decoding. The decoder + can modify this setting as appropriate. The default value + -1 indicates to read and decode as much as possible. size + is intended to prevent having to decode huge files in one + step. + + If firstline is true, and a UnicodeDecodeError happens + after the first line terminator in the input only the first line + will be returned, the rest of the input will be kept until the + next call to read(). + + The method should use a greedy read strategy, meaning that + it should read as much data as is allowed within the + definition of the encoding and the given size, e.g. if + optional encoding endings or state markers are available + on the stream, these should be read too. + """ + # If we have lines cached, first merge them back into characters + if self.linebuffer: + self.charbuffer = self._empty_charbuffer.join(self.linebuffer) + self.linebuffer = None + + if chars < 0: + # For compatibility with other read() methods that take a + # single argument + chars = size + + # read until we get the required number of characters (if available) + while True: + # can the request be satisfied from the character buffer? + if chars >= 0: + if len(self.charbuffer) >= chars: + break + # we need more data + if size < 0: + newdata = self.stream.read() + else: + newdata = self.stream.read(size) + # decode bytes (those remaining from the last call included) + data = self.bytebuffer + newdata + if not data: + break + try: + newchars, decodedbytes = self.decode(data, self.errors) + except UnicodeDecodeError as exc: + if firstline: + newchars, decodedbytes = \ + self.decode(data[:exc.start], self.errors) + lines = newchars.splitlines(keepends=True) + if len(lines)<=1: + raise + else: + raise + # keep undecoded bytes until the next call + self.bytebuffer = data[decodedbytes:] + # put new characters in the character buffer + self.charbuffer += newchars + # there was no data available + if not newdata: + break + if chars < 0: + # Return everything we've got + result = self.charbuffer + self.charbuffer = self._empty_charbuffer + else: + # Return the first chars characters + result = self.charbuffer[:chars] + self.charbuffer = self.charbuffer[chars:] + return result + + def readline(self, size=None, keepends=True): + + """ Read one line from the input stream and return the + decoded data. + + size, if given, is passed as size argument to the + read() method. + + """ + # If we have lines cached from an earlier read, return + # them unconditionally + if self.linebuffer: + line = self.linebuffer[0] + del self.linebuffer[0] + if len(self.linebuffer) == 1: + # revert to charbuffer mode; we might need more data + # next time + self.charbuffer = self.linebuffer[0] + self.linebuffer = None + if not keepends: + line = line.splitlines(keepends=False)[0] + return line + + readsize = size or 72 + line = self._empty_charbuffer + # If size is given, we call read() only once + while True: + data = self.read(readsize, firstline=True) + if data: + # If we're at a "\r" read one extra character (which might + # be a "\n") to get a proper line ending. If the stream is + # temporarily exhausted we return the wrong line ending. + if (isinstance(data, str) and data.endswith("\r")) or \ + (isinstance(data, bytes) and data.endswith(b"\r")): + data += self.read(size=1, chars=1) + + line += data + lines = line.splitlines(keepends=True) + if lines: + if len(lines) > 1: + # More than one line result; the first line is a full line + # to return + line = lines[0] + del lines[0] + if len(lines) > 1: + # cache the remaining lines + lines[-1] += self.charbuffer + self.linebuffer = lines + self.charbuffer = None + else: + # only one remaining line, put it back into charbuffer + self.charbuffer = lines[0] + self.charbuffer + if not keepends: + line = line.splitlines(keepends=False)[0] + break + line0withend = lines[0] + line0withoutend = lines[0].splitlines(keepends=False)[0] + if line0withend != line0withoutend: # We really have a line end + # Put the rest back together and keep it until the next call + self.charbuffer = self._empty_charbuffer.join(lines[1:]) + \ + self.charbuffer + if keepends: + line = line0withend + else: + line = line0withoutend + break + # we didn't get anything or this was our only try + if not data or size is not None: + if line and not keepends: + line = line.splitlines(keepends=False)[0] + break + if readsize < 8000: + readsize *= 2 + return line + + def readlines(self, sizehint=None, keepends=True): + + """ Read all lines available on the input stream + and return them as a list. + + Line breaks are implemented using the codec's decoder + method and are included in the list entries. + + sizehint, if given, is ignored since there is no efficient + way to finding the true end-of-line. + + """ + data = self.read() + return data.splitlines(keepends) + + def reset(self): + + """ Resets the codec buffers used for keeping internal state. + + Note that no stream repositioning should take place. + This method is primarily intended to be able to recover + from decoding errors. + + """ + self.bytebuffer = b"" + self.charbuffer = self._empty_charbuffer + self.linebuffer = None + + def seek(self, offset, whence=0): + """ Set the input stream's current position. + + Resets the codec buffers used for keeping state. + """ + self.stream.seek(offset, whence) + self.reset() + + def __next__(self): + + """ Return the next decoded line from the input stream.""" + line = self.readline() + if line: + return line + raise StopIteration + + def __iter__(self): + return self + + def __getattr__(self, name, + getattr=getattr): + + """ Inherit all other methods from the underlying stream. + """ + return getattr(self.stream, name) + + def __enter__(self): + return self + + def __exit__(self, type, value, tb): + self.stream.close() + + def __reduce_ex__(self, proto): + raise TypeError("can't serialize %s" % self.__class__.__name__) + +### + +class StreamReaderWriter: + + """ StreamReaderWriter instances allow wrapping streams which + work in both read and write modes. + + The design is such that one can use the factory functions + returned by the codec.lookup() function to construct the + instance. + + """ + # Optional attributes set by the file wrappers below + encoding = 'unknown' + + def __init__(self, stream, Reader, Writer, errors='strict'): + + """ Creates a StreamReaderWriter instance. + + stream must be a Stream-like object. + + Reader, Writer must be factory functions or classes + providing the StreamReader, StreamWriter interface resp. + + Error handling is done in the same way as defined for the + StreamWriter/Readers. + + """ + self.stream = stream + self.reader = Reader(stream, errors) + self.writer = Writer(stream, errors) + self.errors = errors + + def read(self, size=-1): + + return self.reader.read(size) + + def readline(self, size=None): + + return self.reader.readline(size) + + def readlines(self, sizehint=None): + + return self.reader.readlines(sizehint) + + def __next__(self): + + """ Return the next decoded line from the input stream.""" + return next(self.reader) + + def __iter__(self): + return self + + def write(self, data): + + return self.writer.write(data) + + def writelines(self, list): + + return self.writer.writelines(list) + + def reset(self): + + self.reader.reset() + self.writer.reset() + + def seek(self, offset, whence=0): + self.stream.seek(offset, whence) + self.reader.reset() + if whence == 0 and offset == 0: + self.writer.reset() + + def __getattr__(self, name, + getattr=getattr): + + """ Inherit all other methods from the underlying stream. + """ + return getattr(self.stream, name) + + # these are needed to make "with StreamReaderWriter(...)" work properly + + def __enter__(self): + return self + + def __exit__(self, type, value, tb): + self.stream.close() + + def __reduce_ex__(self, proto): + raise TypeError("can't serialize %s" % self.__class__.__name__) + +### + +class StreamRecoder: + + """ StreamRecoder instances translate data from one encoding to another. + + They use the complete set of APIs returned by the + codecs.lookup() function to implement their task. + + Data written to the StreamRecoder is first decoded into an + intermediate format (depending on the "decode" codec) and then + written to the underlying stream using an instance of the provided + Writer class. + + In the other direction, data is read from the underlying stream using + a Reader instance and then encoded and returned to the caller. + + """ + # Optional attributes set by the file wrappers below + data_encoding = 'unknown' + file_encoding = 'unknown' + + def __init__(self, stream, encode, decode, Reader, Writer, + errors='strict'): + + """ Creates a StreamRecoder instance which implements a two-way + conversion: encode and decode work on the frontend (the + data visible to .read() and .write()) while Reader and Writer + work on the backend (the data in stream). + + You can use these objects to do transparent + transcodings from e.g. latin-1 to utf-8 and back. + + stream must be a file-like object. + + encode and decode must adhere to the Codec interface; Reader and + Writer must be factory functions or classes providing the + StreamReader and StreamWriter interfaces resp. + + Error handling is done in the same way as defined for the + StreamWriter/Readers. + + """ + self.stream = stream + self.encode = encode + self.decode = decode + self.reader = Reader(stream, errors) + self.writer = Writer(stream, errors) + self.errors = errors + + def read(self, size=-1): + + data = self.reader.read(size) + data, bytesencoded = self.encode(data, self.errors) + return data + + def readline(self, size=None): + + if size is None: + data = self.reader.readline() + else: + data = self.reader.readline(size) + data, bytesencoded = self.encode(data, self.errors) + return data + + def readlines(self, sizehint=None): + + data = self.reader.read() + data, bytesencoded = self.encode(data, self.errors) + return data.splitlines(keepends=True) + + def __next__(self): + + """ Return the next decoded line from the input stream.""" + data = next(self.reader) + data, bytesencoded = self.encode(data, self.errors) + return data + + def __iter__(self): + return self + + def write(self, data): + + data, bytesdecoded = self.decode(data, self.errors) + return self.writer.write(data) + + def writelines(self, list): + + data = b''.join(list) + data, bytesdecoded = self.decode(data, self.errors) + return self.writer.write(data) + + def reset(self): + + self.reader.reset() + self.writer.reset() + + def seek(self, offset, whence=0): + # Seeks must be propagated to both the readers and writers + # as they might need to reset their internal buffers. + self.reader.seek(offset, whence) + self.writer.seek(offset, whence) + + def __getattr__(self, name, + getattr=getattr): + + """ Inherit all other methods from the underlying stream. + """ + return getattr(self.stream, name) + + def __enter__(self): + return self + + def __exit__(self, type, value, tb): + self.stream.close() + + def __reduce_ex__(self, proto): + raise TypeError("can't serialize %s" % self.__class__.__name__) + +### Shortcuts + +def open(filename, mode='r', encoding=None, errors='strict', buffering=-1): + + """ Open an encoded file using the given mode and return + a wrapped version providing transparent encoding/decoding. + + Note: The wrapped version will only accept the object format + defined by the codecs, i.e. Unicode objects for most builtin + codecs. Output is also codec dependent and will usually be + Unicode as well. + + If encoding is not None, then the + underlying encoded files are always opened in binary mode. + The default file mode is 'r', meaning to open the file in read mode. + + encoding specifies the encoding which is to be used for the + file. + + errors may be given to define the error handling. It defaults + to 'strict' which causes ValueErrors to be raised in case an + encoding error occurs. + + buffering has the same meaning as for the builtin open() API. + It defaults to -1 which means that the default buffer size will + be used. + + The returned wrapped file object provides an extra attribute + .encoding which allows querying the used encoding. This + attribute is only available if an encoding was specified as + parameter. + + """ + if encoding is not None and \ + 'b' not in mode: + # Force opening of the file in binary mode + mode = mode + 'b' + file = builtins.open(filename, mode, buffering) + if encoding is None: + return file + + try: + info = lookup(encoding) + srw = StreamReaderWriter(file, info.streamreader, info.streamwriter, errors) + # Add attributes to simplify introspection + srw.encoding = encoding + return srw + except: + file.close() + raise + +def EncodedFile(file, data_encoding, file_encoding=None, errors='strict'): + + """ Return a wrapped version of file which provides transparent + encoding translation. + + Data written to the wrapped file is decoded according + to the given data_encoding and then encoded to the underlying + file using file_encoding. The intermediate data type + will usually be Unicode but depends on the specified codecs. + + Bytes read from the file are decoded using file_encoding and then + passed back to the caller encoded using data_encoding. + + If file_encoding is not given, it defaults to data_encoding. + + errors may be given to define the error handling. It defaults + to 'strict' which causes ValueErrors to be raised in case an + encoding error occurs. + + The returned wrapped file object provides two extra attributes + .data_encoding and .file_encoding which reflect the given + parameters of the same name. The attributes can be used for + introspection by Python programs. + + """ + if file_encoding is None: + file_encoding = data_encoding + data_info = lookup(data_encoding) + file_info = lookup(file_encoding) + sr = StreamRecoder(file, data_info.encode, data_info.decode, + file_info.streamreader, file_info.streamwriter, errors) + # Add attributes to simplify introspection + sr.data_encoding = data_encoding + sr.file_encoding = file_encoding + return sr + +### Helpers for codec lookup + +def getencoder(encoding): + + """ Lookup up the codec for the given encoding and return + its encoder function. + + Raises a LookupError in case the encoding cannot be found. + + """ + return lookup(encoding).encode + +def getdecoder(encoding): + + """ Lookup up the codec for the given encoding and return + its decoder function. + + Raises a LookupError in case the encoding cannot be found. + + """ + return lookup(encoding).decode + +def getincrementalencoder(encoding): + + """ Lookup up the codec for the given encoding and return + its IncrementalEncoder class or factory function. + + Raises a LookupError in case the encoding cannot be found + or the codecs doesn't provide an incremental encoder. + + """ + encoder = lookup(encoding).incrementalencoder + if encoder is None: + raise LookupError(encoding) + return encoder + +def getincrementaldecoder(encoding): + + """ Lookup up the codec for the given encoding and return + its IncrementalDecoder class or factory function. + + Raises a LookupError in case the encoding cannot be found + or the codecs doesn't provide an incremental decoder. + + """ + decoder = lookup(encoding).incrementaldecoder + if decoder is None: + raise LookupError(encoding) + return decoder + +def getreader(encoding): + + """ Lookup up the codec for the given encoding and return + its StreamReader class or factory function. + + Raises a LookupError in case the encoding cannot be found. + + """ + return lookup(encoding).streamreader + +def getwriter(encoding): + + """ Lookup up the codec for the given encoding and return + its StreamWriter class or factory function. + + Raises a LookupError in case the encoding cannot be found. + + """ + return lookup(encoding).streamwriter + +def iterencode(iterator, encoding, errors='strict', **kwargs): + """ + Encoding iterator. + + Encodes the input strings from the iterator using an IncrementalEncoder. + + errors and kwargs are passed through to the IncrementalEncoder + constructor. + """ + encoder = getincrementalencoder(encoding)(errors, **kwargs) + for input in iterator: + output = encoder.encode(input) + if output: + yield output + output = encoder.encode("", True) + if output: + yield output + +def iterdecode(iterator, encoding, errors='strict', **kwargs): + """ + Decoding iterator. + + Decodes the input strings from the iterator using an IncrementalDecoder. + + errors and kwargs are passed through to the IncrementalDecoder + constructor. + """ + decoder = getincrementaldecoder(encoding)(errors, **kwargs) + for input in iterator: + output = decoder.decode(input) + if output: + yield output + output = decoder.decode(b"", True) + if output: + yield output + +### Helpers for charmap-based codecs + +def make_identity_dict(rng): + + """ make_identity_dict(rng) -> dict + + Return a dictionary where elements of the rng sequence are + mapped to themselves. + + """ + return {i:i for i in rng} + +def make_encoding_map(decoding_map): + + """ Creates an encoding map from a decoding map. + + If a target mapping in the decoding map occurs multiple + times, then that target is mapped to None (undefined mapping), + causing an exception when encountered by the charmap codec + during translation. + + One example where this happens is cp875.py which decodes + multiple character to \\u001a. + + """ + m = {} + for k,v in decoding_map.items(): + if not v in m: + m[v] = k + else: + m[v] = None + return m + +### error handlers + +try: + strict_errors = lookup_error("strict") + ignore_errors = lookup_error("ignore") + replace_errors = lookup_error("replace") + xmlcharrefreplace_errors = lookup_error("xmlcharrefreplace") + backslashreplace_errors = lookup_error("backslashreplace") + namereplace_errors = lookup_error("namereplace") +except LookupError: + # In --disable-unicode builds, these error handler are missing + strict_errors = None + ignore_errors = None + replace_errors = None + xmlcharrefreplace_errors = None + backslashreplace_errors = None + namereplace_errors = None + +# Tell modulefinder that using codecs probably needs the encodings +# package +_false = 0 +if _false: + import encodings + +### Tests + +if __name__ == '__main__': + + # Make stdout translate Latin-1 output into UTF-8 output + sys.stdout = EncodedFile(sys.stdout, 'latin-1', 'utf-8') + + # Have stdin translate Latin-1 input into UTF-8 input + sys.stdin = EncodedFile(sys.stdin, 'utf-8', 'latin-1') diff --git a/lib/python3.11/codeop.py b/lib/python3.11/codeop.py new file mode 100644 index 0000000000000000000000000000000000000000..e64911ee5ad4170e69a93b5510f0a077623744a0 --- /dev/null +++ b/lib/python3.11/codeop.py @@ -0,0 +1,160 @@ +r"""Utilities to compile possibly incomplete Python source code. + +This module provides two interfaces, broadly similar to the builtin +function compile(), which take program text, a filename and a 'mode' +and: + +- Return code object if the command is complete and valid +- Return None if the command is incomplete +- Raise SyntaxError, ValueError or OverflowError if the command is a + syntax error (OverflowError and ValueError can be produced by + malformed literals). + +The two interfaces are: + +compile_command(source, filename, symbol): + + Compiles a single command in the manner described above. + +CommandCompiler(): + + Instances of this class have __call__ methods identical in + signature to compile_command; the difference is that if the + instance compiles program text containing a __future__ statement, + the instance 'remembers' and compiles all subsequent program texts + with the statement in force. + +The module also provides another class: + +Compile(): + + Instances of this class act like the built-in function compile, + but with 'memory' in the sense described above. +""" + +import __future__ +import warnings + +_features = [getattr(__future__, fname) + for fname in __future__.all_feature_names] + +__all__ = ["compile_command", "Compile", "CommandCompiler"] + +# The following flags match the values from Include/cpython/compile.h +# Caveat emptor: These flags are undocumented on purpose and depending +# on their effect outside the standard library is **unsupported**. +PyCF_DONT_IMPLY_DEDENT = 0x200 +PyCF_ALLOW_INCOMPLETE_INPUT = 0x4000 + +def _maybe_compile(compiler, source, filename, symbol): + # Check for source consisting of only blank lines and comments. + for line in source.split("\n"): + line = line.strip() + if line and line[0] != '#': + break # Leave it alone. + else: + if symbol != "eval": + source = "pass" # Replace it with a 'pass' statement + + # Disable compiler warnings when checking for incomplete input. + with warnings.catch_warnings(): + warnings.simplefilter("ignore", (SyntaxWarning, DeprecationWarning)) + try: + compiler(source, filename, symbol) + except SyntaxError: # Let other compile() errors propagate. + try: + compiler(source + "\n", filename, symbol) + return None + except SyntaxError as e: + if "incomplete input" in str(e): + return None + # fallthrough + + return compiler(source, filename, symbol, incomplete_input=False) + +def _is_syntax_error(err1, err2): + rep1 = repr(err1) + rep2 = repr(err2) + if "was never closed" in rep1 and "was never closed" in rep2: + return False + if rep1 == rep2: + return True + return False + +def _compile(source, filename, symbol, incomplete_input=True): + flags = 0 + if incomplete_input: + flags |= PyCF_ALLOW_INCOMPLETE_INPUT + flags |= PyCF_DONT_IMPLY_DEDENT + return compile(source, filename, symbol, flags) + +def compile_command(source, filename="", symbol="single"): + r"""Compile a command and determine whether it is incomplete. + + Arguments: + + source -- the source string; may contain \n characters + filename -- optional filename from which source was read; default + "" + symbol -- optional grammar start symbol; "single" (default), "exec" + or "eval" + + Return value / exceptions raised: + + - Return a code object if the command is complete and valid + - Return None if the command is incomplete + - Raise SyntaxError, ValueError or OverflowError if the command is a + syntax error (OverflowError and ValueError can be produced by + malformed literals). + """ + return _maybe_compile(_compile, source, filename, symbol) + +class Compile: + """Instances of this class behave much like the built-in compile + function, but if one is used to compile text containing a future + statement, it "remembers" and compiles all subsequent program texts + with the statement in force.""" + def __init__(self): + self.flags = PyCF_DONT_IMPLY_DEDENT | PyCF_ALLOW_INCOMPLETE_INPUT + + def __call__(self, source, filename, symbol, **kwargs): + flags = self.flags + if kwargs.get('incomplete_input', True) is False: + flags &= ~PyCF_DONT_IMPLY_DEDENT + flags &= ~PyCF_ALLOW_INCOMPLETE_INPUT + codeob = compile(source, filename, symbol, flags, True) + for feature in _features: + if codeob.co_flags & feature.compiler_flag: + self.flags |= feature.compiler_flag + return codeob + +class CommandCompiler: + """Instances of this class have __call__ methods identical in + signature to compile_command; the difference is that if the + instance compiles program text containing a __future__ statement, + the instance 'remembers' and compiles all subsequent program texts + with the statement in force.""" + + def __init__(self,): + self.compiler = Compile() + + def __call__(self, source, filename="", symbol="single"): + r"""Compile a command and determine whether it is incomplete. + + Arguments: + + source -- the source string; may contain \n characters + filename -- optional filename from which source was read; + default "" + symbol -- optional grammar start symbol; "single" (default) or + "eval" + + Return value / exceptions raised: + + - Return a code object if the command is complete and valid + - Return None if the command is incomplete + - Raise SyntaxError, ValueError or OverflowError if the command is a + syntax error (OverflowError and ValueError can be produced by + malformed literals). + """ + return _maybe_compile(self.compiler, source, filename, symbol) diff --git a/lib/python3.11/colorsys.py b/lib/python3.11/colorsys.py new file mode 100644 index 0000000000000000000000000000000000000000..bc897bd0f9929828a4a826879b7274b18a442b81 --- /dev/null +++ b/lib/python3.11/colorsys.py @@ -0,0 +1,166 @@ +"""Conversion functions between RGB and other color systems. + +This modules provides two functions for each color system ABC: + + rgb_to_abc(r, g, b) --> a, b, c + abc_to_rgb(a, b, c) --> r, g, b + +All inputs and outputs are triples of floats in the range [0.0...1.0] +(with the exception of I and Q, which covers a slightly larger range). +Inputs outside the valid range may cause exceptions or invalid outputs. + +Supported color systems: +RGB: Red, Green, Blue components +YIQ: Luminance, Chrominance (used by composite video signals) +HLS: Hue, Luminance, Saturation +HSV: Hue, Saturation, Value +""" + +# References: +# http://en.wikipedia.org/wiki/YIQ +# http://en.wikipedia.org/wiki/HLS_color_space +# http://en.wikipedia.org/wiki/HSV_color_space + +__all__ = ["rgb_to_yiq","yiq_to_rgb","rgb_to_hls","hls_to_rgb", + "rgb_to_hsv","hsv_to_rgb"] + +# Some floating point constants + +ONE_THIRD = 1.0/3.0 +ONE_SIXTH = 1.0/6.0 +TWO_THIRD = 2.0/3.0 + +# YIQ: used by composite video signals (linear combinations of RGB) +# Y: perceived grey level (0.0 == black, 1.0 == white) +# I, Q: color components +# +# There are a great many versions of the constants used in these formulae. +# The ones in this library uses constants from the FCC version of NTSC. + +def rgb_to_yiq(r, g, b): + y = 0.30*r + 0.59*g + 0.11*b + i = 0.74*(r-y) - 0.27*(b-y) + q = 0.48*(r-y) + 0.41*(b-y) + return (y, i, q) + +def yiq_to_rgb(y, i, q): + # r = y + (0.27*q + 0.41*i) / (0.74*0.41 + 0.27*0.48) + # b = y + (0.74*q - 0.48*i) / (0.74*0.41 + 0.27*0.48) + # g = y - (0.30*(r-y) + 0.11*(b-y)) / 0.59 + + r = y + 0.9468822170900693*i + 0.6235565819861433*q + g = y - 0.27478764629897834*i - 0.6356910791873801*q + b = y - 1.1085450346420322*i + 1.7090069284064666*q + + if r < 0.0: + r = 0.0 + if g < 0.0: + g = 0.0 + if b < 0.0: + b = 0.0 + if r > 1.0: + r = 1.0 + if g > 1.0: + g = 1.0 + if b > 1.0: + b = 1.0 + return (r, g, b) + + +# HLS: Hue, Luminance, Saturation +# H: position in the spectrum +# L: color lightness +# S: color saturation + +def rgb_to_hls(r, g, b): + maxc = max(r, g, b) + minc = min(r, g, b) + sumc = (maxc+minc) + rangec = (maxc-minc) + l = sumc/2.0 + if minc == maxc: + return 0.0, l, 0.0 + if l <= 0.5: + s = rangec / sumc + else: + s = rangec / (2.0-maxc-minc) # Not always 2.0-sumc: gh-106498. + rc = (maxc-r) / rangec + gc = (maxc-g) / rangec + bc = (maxc-b) / rangec + if r == maxc: + h = bc-gc + elif g == maxc: + h = 2.0+rc-bc + else: + h = 4.0+gc-rc + h = (h/6.0) % 1.0 + return h, l, s + +def hls_to_rgb(h, l, s): + if s == 0.0: + return l, l, l + if l <= 0.5: + m2 = l * (1.0+s) + else: + m2 = l+s-(l*s) + m1 = 2.0*l - m2 + return (_v(m1, m2, h+ONE_THIRD), _v(m1, m2, h), _v(m1, m2, h-ONE_THIRD)) + +def _v(m1, m2, hue): + hue = hue % 1.0 + if hue < ONE_SIXTH: + return m1 + (m2-m1)*hue*6.0 + if hue < 0.5: + return m2 + if hue < TWO_THIRD: + return m1 + (m2-m1)*(TWO_THIRD-hue)*6.0 + return m1 + + +# HSV: Hue, Saturation, Value +# H: position in the spectrum +# S: color saturation ("purity") +# V: color brightness + +def rgb_to_hsv(r, g, b): + maxc = max(r, g, b) + minc = min(r, g, b) + rangec = (maxc-minc) + v = maxc + if minc == maxc: + return 0.0, 0.0, v + s = rangec / maxc + rc = (maxc-r) / rangec + gc = (maxc-g) / rangec + bc = (maxc-b) / rangec + if r == maxc: + h = bc-gc + elif g == maxc: + h = 2.0+rc-bc + else: + h = 4.0+gc-rc + h = (h/6.0) % 1.0 + return h, s, v + +def hsv_to_rgb(h, s, v): + if s == 0.0: + return v, v, v + i = int(h*6.0) # XXX assume int() truncates! + f = (h*6.0) - i + p = v*(1.0 - s) + q = v*(1.0 - s*f) + t = v*(1.0 - s*(1.0-f)) + i = i%6 + if i == 0: + return v, t, p + if i == 1: + return q, v, p + if i == 2: + return p, v, t + if i == 3: + return p, q, v + if i == 4: + return t, p, v + if i == 5: + return v, p, q + # Cannot get here diff --git a/lib/python3.11/compileall.py b/lib/python3.11/compileall.py new file mode 100644 index 0000000000000000000000000000000000000000..a388931fb5a99da63f517a09b61683fd33d7d0de --- /dev/null +++ b/lib/python3.11/compileall.py @@ -0,0 +1,463 @@ +"""Module/script to byte-compile all .py files to .pyc files. + +When called as a script with arguments, this compiles the directories +given as arguments recursively; the -l option prevents it from +recursing into directories. + +Without arguments, it compiles all modules on sys.path, without +recursing into subdirectories. (Even though it should do so for +packages -- for now, you'll have to deal with packages separately.) + +See module py_compile for details of the actual byte-compilation. +""" +import os +import sys +import importlib.util +import py_compile +import struct +import filecmp + +from functools import partial +from pathlib import Path + +__all__ = ["compile_dir","compile_file","compile_path"] + +def _walk_dir(dir, maxlevels, quiet=0): + if quiet < 2 and isinstance(dir, os.PathLike): + dir = os.fspath(dir) + if not quiet: + print('Listing {!r}...'.format(dir)) + try: + names = os.listdir(dir) + except OSError: + if quiet < 2: + print("Can't list {!r}".format(dir)) + names = [] + names.sort() + for name in names: + if name == '__pycache__': + continue + fullname = os.path.join(dir, name) + if not os.path.isdir(fullname): + yield fullname + elif (maxlevels > 0 and name != os.curdir and name != os.pardir and + os.path.isdir(fullname) and not os.path.islink(fullname)): + yield from _walk_dir(fullname, maxlevels=maxlevels - 1, + quiet=quiet) + +def compile_dir(dir, maxlevels=None, ddir=None, force=False, + rx=None, quiet=0, legacy=False, optimize=-1, workers=1, + invalidation_mode=None, *, stripdir=None, + prependdir=None, limit_sl_dest=None, hardlink_dupes=False): + """Byte-compile all modules in the given directory tree. + + Arguments (only dir is required): + + dir: the directory to byte-compile + maxlevels: maximum recursion level (default `sys.getrecursionlimit()`) + ddir: the directory that will be prepended to the path to the + file as it is compiled into each byte-code file. + force: if True, force compilation, even if timestamps are up-to-date + quiet: full output with False or 0, errors only with 1, + no output with 2 + legacy: if True, produce legacy pyc paths instead of PEP 3147 paths + optimize: int or list of optimization levels or -1 for level of + the interpreter. Multiple levels leads to multiple compiled + files each with one optimization level. + workers: maximum number of parallel workers + invalidation_mode: how the up-to-dateness of the pyc will be checked + stripdir: part of path to left-strip from source file path + prependdir: path to prepend to beginning of original file path, applied + after stripdir + limit_sl_dest: ignore symlinks if they are pointing outside of + the defined path + hardlink_dupes: hardlink duplicated pyc files + """ + ProcessPoolExecutor = None + if ddir is not None and (stripdir is not None or prependdir is not None): + raise ValueError(("Destination dir (ddir) cannot be used " + "in combination with stripdir or prependdir")) + if ddir is not None: + stripdir = dir + prependdir = ddir + ddir = None + if workers < 0: + raise ValueError('workers must be greater or equal to 0') + if workers != 1: + # Check if this is a system where ProcessPoolExecutor can function. + from concurrent.futures.process import _check_system_limits + try: + _check_system_limits() + except NotImplementedError: + workers = 1 + else: + from concurrent.futures import ProcessPoolExecutor + if maxlevels is None: + maxlevels = sys.getrecursionlimit() + files = _walk_dir(dir, quiet=quiet, maxlevels=maxlevels) + success = True + if workers != 1 and ProcessPoolExecutor is not None: + # If workers == 0, let ProcessPoolExecutor choose + workers = workers or None + with ProcessPoolExecutor(max_workers=workers) as executor: + results = executor.map(partial(compile_file, + ddir=ddir, force=force, + rx=rx, quiet=quiet, + legacy=legacy, + optimize=optimize, + invalidation_mode=invalidation_mode, + stripdir=stripdir, + prependdir=prependdir, + limit_sl_dest=limit_sl_dest, + hardlink_dupes=hardlink_dupes), + files) + success = min(results, default=True) + else: + for file in files: + if not compile_file(file, ddir, force, rx, quiet, + legacy, optimize, invalidation_mode, + stripdir=stripdir, prependdir=prependdir, + limit_sl_dest=limit_sl_dest, + hardlink_dupes=hardlink_dupes): + success = False + return success + +def compile_file(fullname, ddir=None, force=False, rx=None, quiet=0, + legacy=False, optimize=-1, + invalidation_mode=None, *, stripdir=None, prependdir=None, + limit_sl_dest=None, hardlink_dupes=False): + """Byte-compile one file. + + Arguments (only fullname is required): + + fullname: the file to byte-compile + ddir: if given, the directory name compiled in to the + byte-code file. + force: if True, force compilation, even if timestamps are up-to-date + quiet: full output with False or 0, errors only with 1, + no output with 2 + legacy: if True, produce legacy pyc paths instead of PEP 3147 paths + optimize: int or list of optimization levels or -1 for level of + the interpreter. Multiple levels leads to multiple compiled + files each with one optimization level. + invalidation_mode: how the up-to-dateness of the pyc will be checked + stripdir: part of path to left-strip from source file path + prependdir: path to prepend to beginning of original file path, applied + after stripdir + limit_sl_dest: ignore symlinks if they are pointing outside of + the defined path. + hardlink_dupes: hardlink duplicated pyc files + """ + + if ddir is not None and (stripdir is not None or prependdir is not None): + raise ValueError(("Destination dir (ddir) cannot be used " + "in combination with stripdir or prependdir")) + + success = True + fullname = os.fspath(fullname) + stripdir = os.fspath(stripdir) if stripdir is not None else None + name = os.path.basename(fullname) + + dfile = None + + if ddir is not None: + dfile = os.path.join(ddir, name) + + if stripdir is not None: + fullname_parts = fullname.split(os.path.sep) + stripdir_parts = stripdir.split(os.path.sep) + ddir_parts = list(fullname_parts) + + for spart, opart in zip(stripdir_parts, fullname_parts): + if spart == opart: + ddir_parts.remove(spart) + + dfile = os.path.join(*ddir_parts) + + if prependdir is not None: + if dfile is None: + dfile = os.path.join(prependdir, fullname) + else: + dfile = os.path.join(prependdir, dfile) + + if isinstance(optimize, int): + optimize = [optimize] + + # Use set() to remove duplicates. + # Use sorted() to create pyc files in a deterministic order. + optimize = sorted(set(optimize)) + + if hardlink_dupes and len(optimize) < 2: + raise ValueError("Hardlinking of duplicated bytecode makes sense " + "only for more than one optimization level") + + if rx is not None: + mo = rx.search(fullname) + if mo: + return success + + if limit_sl_dest is not None and os.path.islink(fullname): + if Path(limit_sl_dest).resolve() not in Path(fullname).resolve().parents: + return success + + opt_cfiles = {} + + if os.path.isfile(fullname): + for opt_level in optimize: + if legacy: + opt_cfiles[opt_level] = fullname + 'c' + else: + if opt_level >= 0: + opt = opt_level if opt_level >= 1 else '' + cfile = (importlib.util.cache_from_source( + fullname, optimization=opt)) + opt_cfiles[opt_level] = cfile + else: + cfile = importlib.util.cache_from_source(fullname) + opt_cfiles[opt_level] = cfile + + head, tail = name[:-3], name[-3:] + if tail == '.py': + if not force: + try: + mtime = int(os.stat(fullname).st_mtime) + expect = struct.pack('<4sLL', importlib.util.MAGIC_NUMBER, + 0, mtime & 0xFFFF_FFFF) + for cfile in opt_cfiles.values(): + with open(cfile, 'rb') as chandle: + actual = chandle.read(12) + if expect != actual: + break + else: + return success + except OSError: + pass + if not quiet: + print('Compiling {!r}...'.format(fullname)) + try: + for index, opt_level in enumerate(optimize): + cfile = opt_cfiles[opt_level] + ok = py_compile.compile(fullname, cfile, dfile, True, + optimize=opt_level, + invalidation_mode=invalidation_mode) + if index > 0 and hardlink_dupes: + previous_cfile = opt_cfiles[optimize[index - 1]] + if filecmp.cmp(cfile, previous_cfile, shallow=False): + os.unlink(cfile) + os.link(previous_cfile, cfile) + except py_compile.PyCompileError as err: + success = False + if quiet >= 2: + return success + elif quiet: + print('*** Error compiling {!r}...'.format(fullname)) + else: + print('*** ', end='') + # escape non-printable characters in msg + encoding = sys.stdout.encoding or sys.getdefaultencoding() + msg = err.msg.encode(encoding, errors='backslashreplace').decode(encoding) + print(msg) + except (SyntaxError, UnicodeError, OSError) as e: + success = False + if quiet >= 2: + return success + elif quiet: + print('*** Error compiling {!r}...'.format(fullname)) + else: + print('*** ', end='') + print(e.__class__.__name__ + ':', e) + else: + if ok == 0: + success = False + return success + +def compile_path(skip_curdir=1, maxlevels=0, force=False, quiet=0, + legacy=False, optimize=-1, + invalidation_mode=None): + """Byte-compile all module on sys.path. + + Arguments (all optional): + + skip_curdir: if true, skip current directory (default True) + maxlevels: max recursion level (default 0) + force: as for compile_dir() (default False) + quiet: as for compile_dir() (default 0) + legacy: as for compile_dir() (default False) + optimize: as for compile_dir() (default -1) + invalidation_mode: as for compiler_dir() + """ + success = True + for dir in sys.path: + if (not dir or dir == os.curdir) and skip_curdir: + if quiet < 2: + print('Skipping current directory') + else: + success = success and compile_dir( + dir, + maxlevels, + None, + force, + quiet=quiet, + legacy=legacy, + optimize=optimize, + invalidation_mode=invalidation_mode, + ) + return success + + +def main(): + """Script main program.""" + import argparse + + parser = argparse.ArgumentParser( + description='Utilities to support installing Python libraries.') + parser.add_argument('-l', action='store_const', const=0, + default=None, dest='maxlevels', + help="don't recurse into subdirectories") + parser.add_argument('-r', type=int, dest='recursion', + help=('control the maximum recursion level. ' + 'if `-l` and `-r` options are specified, ' + 'then `-r` takes precedence.')) + parser.add_argument('-f', action='store_true', dest='force', + help='force rebuild even if timestamps are up to date') + parser.add_argument('-q', action='count', dest='quiet', default=0, + help='output only error messages; -qq will suppress ' + 'the error messages as well.') + parser.add_argument('-b', action='store_true', dest='legacy', + help='use legacy (pre-PEP3147) compiled file locations') + parser.add_argument('-d', metavar='DESTDIR', dest='ddir', default=None, + help=('directory to prepend to file paths for use in ' + 'compile-time tracebacks and in runtime ' + 'tracebacks in cases where the source file is ' + 'unavailable')) + parser.add_argument('-s', metavar='STRIPDIR', dest='stripdir', + default=None, + help=('part of path to left-strip from path ' + 'to source file - for example buildroot. ' + '`-d` and `-s` options cannot be ' + 'specified together.')) + parser.add_argument('-p', metavar='PREPENDDIR', dest='prependdir', + default=None, + help=('path to add as prefix to path ' + 'to source file - for example / to make ' + 'it absolute when some part is removed ' + 'by `-s` option. ' + '`-d` and `-p` options cannot be ' + 'specified together.')) + parser.add_argument('-x', metavar='REGEXP', dest='rx', default=None, + help=('skip files matching the regular expression; ' + 'the regexp is searched for in the full path ' + 'of each file considered for compilation')) + parser.add_argument('-i', metavar='FILE', dest='flist', + help=('add all the files and directories listed in ' + 'FILE to the list considered for compilation; ' + 'if "-", names are read from stdin')) + parser.add_argument('compile_dest', metavar='FILE|DIR', nargs='*', + help=('zero or more file and directory names ' + 'to compile; if no arguments given, defaults ' + 'to the equivalent of -l sys.path')) + parser.add_argument('-j', '--workers', default=1, + type=int, help='Run compileall concurrently') + invalidation_modes = [mode.name.lower().replace('_', '-') + for mode in py_compile.PycInvalidationMode] + parser.add_argument('--invalidation-mode', + choices=sorted(invalidation_modes), + help=('set .pyc invalidation mode; defaults to ' + '"checked-hash" if the SOURCE_DATE_EPOCH ' + 'environment variable is set, and ' + '"timestamp" otherwise.')) + parser.add_argument('-o', action='append', type=int, dest='opt_levels', + help=('Optimization levels to run compilation with. ' + 'Default is -1 which uses the optimization level ' + 'of the Python interpreter itself (see -O).')) + parser.add_argument('-e', metavar='DIR', dest='limit_sl_dest', + help='Ignore symlinks pointing outsite of the DIR') + parser.add_argument('--hardlink-dupes', action='store_true', + dest='hardlink_dupes', + help='Hardlink duplicated pyc files') + + args = parser.parse_args() + compile_dests = args.compile_dest + + if args.rx: + import re + args.rx = re.compile(args.rx) + + if args.limit_sl_dest == "": + args.limit_sl_dest = None + + if args.recursion is not None: + maxlevels = args.recursion + else: + maxlevels = args.maxlevels + + if args.opt_levels is None: + args.opt_levels = [-1] + + if len(args.opt_levels) == 1 and args.hardlink_dupes: + parser.error(("Hardlinking of duplicated bytecode makes sense " + "only for more than one optimization level.")) + + if args.ddir is not None and ( + args.stripdir is not None or args.prependdir is not None + ): + parser.error("-d cannot be used in combination with -s or -p") + + # if flist is provided then load it + if args.flist: + try: + with (sys.stdin if args.flist=='-' else + open(args.flist, encoding="utf-8")) as f: + for line in f: + compile_dests.append(line.strip()) + except OSError: + if args.quiet < 2: + print("Error reading file list {}".format(args.flist)) + return False + + if args.invalidation_mode: + ivl_mode = args.invalidation_mode.replace('-', '_').upper() + invalidation_mode = py_compile.PycInvalidationMode[ivl_mode] + else: + invalidation_mode = None + + success = True + try: + if compile_dests: + for dest in compile_dests: + if os.path.isfile(dest): + if not compile_file(dest, args.ddir, args.force, args.rx, + args.quiet, args.legacy, + invalidation_mode=invalidation_mode, + stripdir=args.stripdir, + prependdir=args.prependdir, + optimize=args.opt_levels, + limit_sl_dest=args.limit_sl_dest, + hardlink_dupes=args.hardlink_dupes): + success = False + else: + if not compile_dir(dest, maxlevels, args.ddir, + args.force, args.rx, args.quiet, + args.legacy, workers=args.workers, + invalidation_mode=invalidation_mode, + stripdir=args.stripdir, + prependdir=args.prependdir, + optimize=args.opt_levels, + limit_sl_dest=args.limit_sl_dest, + hardlink_dupes=args.hardlink_dupes): + success = False + return success + else: + return compile_path(legacy=args.legacy, force=args.force, + quiet=args.quiet, + invalidation_mode=invalidation_mode) + except KeyboardInterrupt: + if args.quiet < 2: + print("\n[interrupted]") + return False + return True + + +if __name__ == '__main__': + exit_status = int(not main()) + sys.exit(exit_status) diff --git a/lib/python3.11/configparser.py b/lib/python3.11/configparser.py new file mode 100644 index 0000000000000000000000000000000000000000..17707b745f716e48b469a00995a70a758a631be5 --- /dev/null +++ b/lib/python3.11/configparser.py @@ -0,0 +1,1384 @@ +"""Configuration file parser. + +A configuration file consists of sections, lead by a "[section]" header, +and followed by "name: value" entries, with continuations and such in +the style of RFC 822. + +Intrinsic defaults can be specified by passing them into the +ConfigParser constructor as a dictionary. + +class: + +ConfigParser -- responsible for parsing a list of + configuration files, and managing the parsed database. + + methods: + + __init__(defaults=None, dict_type=_default_dict, allow_no_value=False, + delimiters=('=', ':'), comment_prefixes=('#', ';'), + inline_comment_prefixes=None, strict=True, + empty_lines_in_values=True, default_section='DEFAULT', + interpolation=, converters=): + + Create the parser. When `defaults` is given, it is initialized into the + dictionary or intrinsic defaults. The keys must be strings, the values + must be appropriate for %()s string interpolation. + + When `dict_type` is given, it will be used to create the dictionary + objects for the list of sections, for the options within a section, and + for the default values. + + When `delimiters` is given, it will be used as the set of substrings + that divide keys from values. + + When `comment_prefixes` is given, it will be used as the set of + substrings that prefix comments in empty lines. Comments can be + indented. + + When `inline_comment_prefixes` is given, it will be used as the set of + substrings that prefix comments in non-empty lines. + + When `strict` is True, the parser won't allow for any section or option + duplicates while reading from a single source (file, string or + dictionary). Default is True. + + When `empty_lines_in_values` is False (default: True), each empty line + marks the end of an option. Otherwise, internal empty lines of + a multiline option are kept as part of the value. + + When `allow_no_value` is True (default: False), options without + values are accepted; the value presented for these is None. + + When `default_section` is given, the name of the special section is + named accordingly. By default it is called ``"DEFAULT"`` but this can + be customized to point to any other valid section name. Its current + value can be retrieved using the ``parser_instance.default_section`` + attribute and may be modified at runtime. + + When `interpolation` is given, it should be an Interpolation subclass + instance. It will be used as the handler for option value + pre-processing when using getters. RawConfigParser objects don't do + any sort of interpolation, whereas ConfigParser uses an instance of + BasicInterpolation. The library also provides a ``zc.buildout`` + inspired ExtendedInterpolation implementation. + + When `converters` is given, it should be a dictionary where each key + represents the name of a type converter and each value is a callable + implementing the conversion from string to the desired datatype. Every + converter gets its corresponding get*() method on the parser object and + section proxies. + + sections() + Return all the configuration section names, sans DEFAULT. + + has_section(section) + Return whether the given section exists. + + has_option(section, option) + Return whether the given option exists in the given section. + + options(section) + Return list of configuration options for the named section. + + read(filenames, encoding=None) + Read and parse the iterable of named configuration files, given by + name. A single filename is also allowed. Non-existing files + are ignored. Return list of successfully read files. + + read_file(f, filename=None) + Read and parse one configuration file, given as a file object. + The filename defaults to f.name; it is only used in error + messages (if f has no `name` attribute, the string `` is used). + + read_string(string) + Read configuration from a given string. + + read_dict(dictionary) + Read configuration from a dictionary. Keys are section names, + values are dictionaries with keys and values that should be present + in the section. If the used dictionary type preserves order, sections + and their keys will be added in order. Values are automatically + converted to strings. + + get(section, option, raw=False, vars=None, fallback=_UNSET) + Return a string value for the named option. All % interpolations are + expanded in the return values, based on the defaults passed into the + constructor and the DEFAULT section. Additional substitutions may be + provided using the `vars` argument, which must be a dictionary whose + contents override any pre-existing defaults. If `option` is a key in + `vars`, the value from `vars` is used. + + getint(section, options, raw=False, vars=None, fallback=_UNSET) + Like get(), but convert value to an integer. + + getfloat(section, options, raw=False, vars=None, fallback=_UNSET) + Like get(), but convert value to a float. + + getboolean(section, options, raw=False, vars=None, fallback=_UNSET) + Like get(), but convert value to a boolean (currently case + insensitively defined as 0, false, no, off for False, and 1, true, + yes, on for True). Returns False or True. + + items(section=_UNSET, raw=False, vars=None) + If section is given, return a list of tuples with (name, value) for + each option in the section. Otherwise, return a list of tuples with + (section_name, section_proxy) for each section, including DEFAULTSECT. + + remove_section(section) + Remove the given file section and all its options. + + remove_option(section, option) + Remove the given option from the given section. + + set(section, option, value) + Set the given option. + + write(fp, space_around_delimiters=True) + Write the configuration state in .ini format. If + `space_around_delimiters` is True (the default), delimiters + between keys and values are surrounded by spaces. +""" + +from collections.abc import MutableMapping +from collections import ChainMap as _ChainMap +import functools +import io +import itertools +import os +import re +import sys +import warnings + +__all__ = ["NoSectionError", "DuplicateOptionError", "DuplicateSectionError", + "NoOptionError", "InterpolationError", "InterpolationDepthError", + "InterpolationMissingOptionError", "InterpolationSyntaxError", + "ParsingError", "MissingSectionHeaderError", + "ConfigParser", "SafeConfigParser", "RawConfigParser", + "Interpolation", "BasicInterpolation", "ExtendedInterpolation", + "LegacyInterpolation", "SectionProxy", "ConverterMapping", + "DEFAULTSECT", "MAX_INTERPOLATION_DEPTH"] + +_default_dict = dict +DEFAULTSECT = "DEFAULT" + +MAX_INTERPOLATION_DEPTH = 10 + + + +# exception classes +class Error(Exception): + """Base class for ConfigParser exceptions.""" + + def __init__(self, msg=''): + self.message = msg + Exception.__init__(self, msg) + + def __repr__(self): + return self.message + + __str__ = __repr__ + + +class NoSectionError(Error): + """Raised when no section matches a requested option.""" + + def __init__(self, section): + Error.__init__(self, 'No section: %r' % (section,)) + self.section = section + self.args = (section, ) + + +class DuplicateSectionError(Error): + """Raised when a section is repeated in an input source. + + Possible repetitions that raise this exception are: multiple creation + using the API or in strict parsers when a section is found more than once + in a single input file, string or dictionary. + """ + + def __init__(self, section, source=None, lineno=None): + msg = [repr(section), " already exists"] + if source is not None: + message = ["While reading from ", repr(source)] + if lineno is not None: + message.append(" [line {0:2d}]".format(lineno)) + message.append(": section ") + message.extend(msg) + msg = message + else: + msg.insert(0, "Section ") + Error.__init__(self, "".join(msg)) + self.section = section + self.source = source + self.lineno = lineno + self.args = (section, source, lineno) + + +class DuplicateOptionError(Error): + """Raised by strict parsers when an option is repeated in an input source. + + Current implementation raises this exception only when an option is found + more than once in a single file, string or dictionary. + """ + + def __init__(self, section, option, source=None, lineno=None): + msg = [repr(option), " in section ", repr(section), + " already exists"] + if source is not None: + message = ["While reading from ", repr(source)] + if lineno is not None: + message.append(" [line {0:2d}]".format(lineno)) + message.append(": option ") + message.extend(msg) + msg = message + else: + msg.insert(0, "Option ") + Error.__init__(self, "".join(msg)) + self.section = section + self.option = option + self.source = source + self.lineno = lineno + self.args = (section, option, source, lineno) + + +class NoOptionError(Error): + """A requested option was not found.""" + + def __init__(self, option, section): + Error.__init__(self, "No option %r in section: %r" % + (option, section)) + self.option = option + self.section = section + self.args = (option, section) + + +class InterpolationError(Error): + """Base class for interpolation-related exceptions.""" + + def __init__(self, option, section, msg): + Error.__init__(self, msg) + self.option = option + self.section = section + self.args = (option, section, msg) + + +class InterpolationMissingOptionError(InterpolationError): + """A string substitution required a setting which was not available.""" + + def __init__(self, option, section, rawval, reference): + msg = ("Bad value substitution: option {!r} in section {!r} contains " + "an interpolation key {!r} which is not a valid option name. " + "Raw value: {!r}".format(option, section, reference, rawval)) + InterpolationError.__init__(self, option, section, msg) + self.reference = reference + self.args = (option, section, rawval, reference) + + +class InterpolationSyntaxError(InterpolationError): + """Raised when the source text contains invalid syntax. + + Current implementation raises this exception when the source text into + which substitutions are made does not conform to the required syntax. + """ + + +class InterpolationDepthError(InterpolationError): + """Raised when substitutions are nested too deeply.""" + + def __init__(self, option, section, rawval): + msg = ("Recursion limit exceeded in value substitution: option {!r} " + "in section {!r} contains an interpolation key which " + "cannot be substituted in {} steps. Raw value: {!r}" + "".format(option, section, MAX_INTERPOLATION_DEPTH, + rawval)) + InterpolationError.__init__(self, option, section, msg) + self.args = (option, section, rawval) + + +class ParsingError(Error): + """Raised when a configuration file does not follow legal syntax.""" + + def __init__(self, source=None, filename=None): + # Exactly one of `source'/`filename' arguments has to be given. + # `filename' kept for compatibility. + if filename and source: + raise ValueError("Cannot specify both `filename' and `source'. " + "Use `source'.") + elif not filename and not source: + raise ValueError("Required argument `source' not given.") + elif filename: + source = filename + Error.__init__(self, 'Source contains parsing errors: %r' % source) + self.source = source + self.errors = [] + self.args = (source, ) + + @property + def filename(self): + """Deprecated, use `source'.""" + warnings.warn( + "The 'filename' attribute will be removed in Python 3.12. " + "Use 'source' instead.", + DeprecationWarning, stacklevel=2 + ) + return self.source + + @filename.setter + def filename(self, value): + """Deprecated, user `source'.""" + warnings.warn( + "The 'filename' attribute will be removed in Python 3.12. " + "Use 'source' instead.", + DeprecationWarning, stacklevel=2 + ) + self.source = value + + def append(self, lineno, line): + self.errors.append((lineno, line)) + self.message += '\n\t[line %2d]: %s' % (lineno, line) + + +class MissingSectionHeaderError(ParsingError): + """Raised when a key-value pair is found before any section header.""" + + def __init__(self, filename, lineno, line): + Error.__init__( + self, + 'File contains no section headers.\nfile: %r, line: %d\n%r' % + (filename, lineno, line)) + self.source = filename + self.lineno = lineno + self.line = line + self.args = (filename, lineno, line) + + +# Used in parser getters to indicate the default behaviour when a specific +# option is not found it to raise an exception. Created to enable `None` as +# a valid fallback value. +_UNSET = object() + + +class Interpolation: + """Dummy interpolation that passes the value through with no changes.""" + + def before_get(self, parser, section, option, value, defaults): + return value + + def before_set(self, parser, section, option, value): + return value + + def before_read(self, parser, section, option, value): + return value + + def before_write(self, parser, section, option, value): + return value + + +class BasicInterpolation(Interpolation): + """Interpolation as implemented in the classic ConfigParser. + + The option values can contain format strings which refer to other values in + the same section, or values in the special default section. + + For example: + + something: %(dir)s/whatever + + would resolve the "%(dir)s" to the value of dir. All reference + expansions are done late, on demand. If a user needs to use a bare % in + a configuration file, she can escape it by writing %%. Other % usage + is considered a user error and raises `InterpolationSyntaxError`.""" + + _KEYCRE = re.compile(r"%\(([^)]+)\)s") + + def before_get(self, parser, section, option, value, defaults): + L = [] + self._interpolate_some(parser, option, L, value, section, defaults, 1) + return ''.join(L) + + def before_set(self, parser, section, option, value): + tmp_value = value.replace('%%', '') # escaped percent signs + tmp_value = self._KEYCRE.sub('', tmp_value) # valid syntax + if '%' in tmp_value: + raise ValueError("invalid interpolation syntax in %r at " + "position %d" % (value, tmp_value.find('%'))) + return value + + def _interpolate_some(self, parser, option, accum, rest, section, map, + depth): + rawval = parser.get(section, option, raw=True, fallback=rest) + if depth > MAX_INTERPOLATION_DEPTH: + raise InterpolationDepthError(option, section, rawval) + while rest: + p = rest.find("%") + if p < 0: + accum.append(rest) + return + if p > 0: + accum.append(rest[:p]) + rest = rest[p:] + # p is no longer used + c = rest[1:2] + if c == "%": + accum.append("%") + rest = rest[2:] + elif c == "(": + m = self._KEYCRE.match(rest) + if m is None: + raise InterpolationSyntaxError(option, section, + "bad interpolation variable reference %r" % rest) + var = parser.optionxform(m.group(1)) + rest = rest[m.end():] + try: + v = map[var] + except KeyError: + raise InterpolationMissingOptionError( + option, section, rawval, var) from None + if "%" in v: + self._interpolate_some(parser, option, accum, v, + section, map, depth + 1) + else: + accum.append(v) + else: + raise InterpolationSyntaxError( + option, section, + "'%%' must be followed by '%%' or '(', " + "found: %r" % (rest,)) + + +class ExtendedInterpolation(Interpolation): + """Advanced variant of interpolation, supports the syntax used by + `zc.buildout`. Enables interpolation between sections.""" + + _KEYCRE = re.compile(r"\$\{([^}]+)\}") + + def before_get(self, parser, section, option, value, defaults): + L = [] + self._interpolate_some(parser, option, L, value, section, defaults, 1) + return ''.join(L) + + def before_set(self, parser, section, option, value): + tmp_value = value.replace('$$', '') # escaped dollar signs + tmp_value = self._KEYCRE.sub('', tmp_value) # valid syntax + if '$' in tmp_value: + raise ValueError("invalid interpolation syntax in %r at " + "position %d" % (value, tmp_value.find('$'))) + return value + + def _interpolate_some(self, parser, option, accum, rest, section, map, + depth): + rawval = parser.get(section, option, raw=True, fallback=rest) + if depth > MAX_INTERPOLATION_DEPTH: + raise InterpolationDepthError(option, section, rawval) + while rest: + p = rest.find("$") + if p < 0: + accum.append(rest) + return + if p > 0: + accum.append(rest[:p]) + rest = rest[p:] + # p is no longer used + c = rest[1:2] + if c == "$": + accum.append("$") + rest = rest[2:] + elif c == "{": + m = self._KEYCRE.match(rest) + if m is None: + raise InterpolationSyntaxError(option, section, + "bad interpolation variable reference %r" % rest) + path = m.group(1).split(':') + rest = rest[m.end():] + sect = section + opt = option + try: + if len(path) == 1: + opt = parser.optionxform(path[0]) + v = map[opt] + elif len(path) == 2: + sect = path[0] + opt = parser.optionxform(path[1]) + v = parser.get(sect, opt, raw=True) + else: + raise InterpolationSyntaxError( + option, section, + "More than one ':' found: %r" % (rest,)) + except (KeyError, NoSectionError, NoOptionError): + raise InterpolationMissingOptionError( + option, section, rawval, ":".join(path)) from None + if "$" in v: + self._interpolate_some(parser, opt, accum, v, sect, + dict(parser.items(sect, raw=True)), + depth + 1) + else: + accum.append(v) + else: + raise InterpolationSyntaxError( + option, section, + "'$' must be followed by '$' or '{', " + "found: %r" % (rest,)) + + +class LegacyInterpolation(Interpolation): + """Deprecated interpolation used in old versions of ConfigParser. + Use BasicInterpolation or ExtendedInterpolation instead.""" + + _KEYCRE = re.compile(r"%\(([^)]*)\)s|.") + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + warnings.warn( + "LegacyInterpolation has been deprecated since Python 3.2 " + "and will be removed from the configparser module in Python 3.13. " + "Use BasicInterpolation or ExtendedInterpolation instead.", + DeprecationWarning, stacklevel=2 + ) + + def before_get(self, parser, section, option, value, vars): + rawval = value + depth = MAX_INTERPOLATION_DEPTH + while depth: # Loop through this until it's done + depth -= 1 + if value and "%(" in value: + replace = functools.partial(self._interpolation_replace, + parser=parser) + value = self._KEYCRE.sub(replace, value) + try: + value = value % vars + except KeyError as e: + raise InterpolationMissingOptionError( + option, section, rawval, e.args[0]) from None + else: + break + if value and "%(" in value: + raise InterpolationDepthError(option, section, rawval) + return value + + def before_set(self, parser, section, option, value): + return value + + @staticmethod + def _interpolation_replace(match, parser): + s = match.group(1) + if s is None: + return match.group() + else: + return "%%(%s)s" % parser.optionxform(s) + + +class RawConfigParser(MutableMapping): + """ConfigParser that does not do interpolation.""" + + # Regular expressions for parsing section headers and options + _SECT_TMPL = r""" + \[ # [ + (?P
.+) # very permissive! + \] # ] + """ + _OPT_TMPL = r""" + (?P