diff --git a/lib/clang/14.0.6/include/omp.h b/lib/clang/14.0.6/include/omp.h new file mode 100644 index 0000000000000000000000000000000000000000..64bfae3f9fdc7994a56d3c5a0841c861e4a595d6 --- /dev/null +++ b/lib/clang/14.0.6/include/omp.h @@ -0,0 +1,513 @@ +/* + * include/omp.h.var + */ + + +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + + +#ifndef __OMP_H +# define __OMP_H + +# include +# include + +# define KMP_VERSION_MAJOR 5 +# define KMP_VERSION_MINOR 0 +# define KMP_VERSION_BUILD 20140926 +# define KMP_BUILD_DATE "No_Timestamp" + +# ifdef __cplusplus + extern "C" { +# endif + +# define omp_set_affinity_format ompc_set_affinity_format +# define omp_get_affinity_format ompc_get_affinity_format +# define omp_display_affinity ompc_display_affinity +# define omp_capture_affinity ompc_capture_affinity + +# if defined(_WIN32) +# define __KAI_KMPC_CONVENTION __cdecl +# ifndef __KMP_IMP +# define __KMP_IMP __declspec(dllimport) +# endif +# else +# define __KAI_KMPC_CONVENTION +# ifndef __KMP_IMP +# define __KMP_IMP +# endif +# endif + + /* schedule kind constants */ + typedef enum omp_sched_t { + omp_sched_static = 1, + omp_sched_dynamic = 2, + omp_sched_guided = 3, + omp_sched_auto = 4, + omp_sched_monotonic = 0x80000000 + } omp_sched_t; + + /* set API functions */ + extern void __KAI_KMPC_CONVENTION omp_set_num_threads (int); + extern void __KAI_KMPC_CONVENTION omp_set_dynamic (int); + extern void __KAI_KMPC_CONVENTION omp_set_nested (int); + extern void __KAI_KMPC_CONVENTION omp_set_max_active_levels (int); + extern void __KAI_KMPC_CONVENTION omp_set_schedule (omp_sched_t, int); + + /* query API functions */ + extern int __KAI_KMPC_CONVENTION omp_get_num_threads (void); + extern int __KAI_KMPC_CONVENTION omp_get_dynamic (void); + extern int __KAI_KMPC_CONVENTION omp_get_nested (void); + extern int __KAI_KMPC_CONVENTION omp_get_max_threads (void); + extern int __KAI_KMPC_CONVENTION omp_get_thread_num (void); + extern int __KAI_KMPC_CONVENTION omp_get_num_procs (void); + extern int __KAI_KMPC_CONVENTION omp_in_parallel (void); + extern int __KAI_KMPC_CONVENTION omp_in_final (void); + extern int __KAI_KMPC_CONVENTION omp_get_active_level (void); + extern int __KAI_KMPC_CONVENTION omp_get_level (void); + extern int __KAI_KMPC_CONVENTION omp_get_ancestor_thread_num (int); + extern int __KAI_KMPC_CONVENTION omp_get_team_size (int); + extern int __KAI_KMPC_CONVENTION omp_get_thread_limit (void); + extern int __KAI_KMPC_CONVENTION omp_get_max_active_levels (void); + extern void __KAI_KMPC_CONVENTION omp_get_schedule (omp_sched_t *, int *); + extern int __KAI_KMPC_CONVENTION omp_get_max_task_priority (void); + + /* lock API functions */ + typedef struct omp_lock_t { + void * _lk; + } omp_lock_t; + + extern void __KAI_KMPC_CONVENTION omp_init_lock (omp_lock_t *); + extern void __KAI_KMPC_CONVENTION omp_set_lock (omp_lock_t *); + extern void __KAI_KMPC_CONVENTION omp_unset_lock (omp_lock_t *); + extern void __KAI_KMPC_CONVENTION omp_destroy_lock (omp_lock_t *); + extern int __KAI_KMPC_CONVENTION omp_test_lock (omp_lock_t *); + + /* nested lock API functions */ + typedef struct omp_nest_lock_t { + void * _lk; + } omp_nest_lock_t; + + extern void __KAI_KMPC_CONVENTION omp_init_nest_lock (omp_nest_lock_t *); + extern void __KAI_KMPC_CONVENTION omp_set_nest_lock (omp_nest_lock_t *); + extern void __KAI_KMPC_CONVENTION omp_unset_nest_lock (omp_nest_lock_t *); + extern void __KAI_KMPC_CONVENTION omp_destroy_nest_lock (omp_nest_lock_t *); + extern int __KAI_KMPC_CONVENTION omp_test_nest_lock (omp_nest_lock_t *); + + /* OpenMP 5.0 Synchronization hints*/ + typedef enum omp_sync_hint_t { + omp_sync_hint_none = 0, + omp_lock_hint_none = omp_sync_hint_none, + omp_sync_hint_uncontended = 1, + omp_lock_hint_uncontended = omp_sync_hint_uncontended, + omp_sync_hint_contended = (1<<1), + omp_lock_hint_contended = omp_sync_hint_contended, + omp_sync_hint_nonspeculative = (1<<2), + omp_lock_hint_nonspeculative = omp_sync_hint_nonspeculative, + omp_sync_hint_speculative = (1<<3), + omp_lock_hint_speculative = omp_sync_hint_speculative, + kmp_lock_hint_hle = (1<<16), + kmp_lock_hint_rtm = (1<<17), + kmp_lock_hint_adaptive = (1<<18) + } omp_sync_hint_t; + + /* lock hint type for dynamic user lock */ + typedef omp_sync_hint_t omp_lock_hint_t; + + /* hinted lock initializers */ + extern void __KAI_KMPC_CONVENTION omp_init_lock_with_hint(omp_lock_t *, omp_lock_hint_t); + extern void __KAI_KMPC_CONVENTION omp_init_nest_lock_with_hint(omp_nest_lock_t *, omp_lock_hint_t); + + /* time API functions */ + extern double __KAI_KMPC_CONVENTION omp_get_wtime (void); + extern double __KAI_KMPC_CONVENTION omp_get_wtick (void); + + /* OpenMP 4.0 */ + extern int __KAI_KMPC_CONVENTION omp_get_default_device (void); + extern void __KAI_KMPC_CONVENTION omp_set_default_device (int); + extern int __KAI_KMPC_CONVENTION omp_is_initial_device (void); + extern int __KAI_KMPC_CONVENTION omp_get_num_devices (void); + extern int __KAI_KMPC_CONVENTION omp_get_num_teams (void); + extern int __KAI_KMPC_CONVENTION omp_get_team_num (void); + extern int __KAI_KMPC_CONVENTION omp_get_cancellation (void); + + /* OpenMP 4.5 */ + extern int __KAI_KMPC_CONVENTION omp_get_initial_device (void); + extern void* __KAI_KMPC_CONVENTION omp_target_alloc(size_t, int); + extern void __KAI_KMPC_CONVENTION omp_target_free(void *, int); + extern int __KAI_KMPC_CONVENTION omp_target_is_present(const void *, int); + extern int __KAI_KMPC_CONVENTION omp_target_memcpy(void *, const void *, size_t, size_t, size_t, int, int); + extern int __KAI_KMPC_CONVENTION omp_target_memcpy_rect(void *, const void *, size_t, int, const size_t *, + const size_t *, const size_t *, const size_t *, const size_t *, int, int); + extern int __KAI_KMPC_CONVENTION omp_target_associate_ptr(const void *, const void *, size_t, size_t, int); + extern int __KAI_KMPC_CONVENTION omp_target_disassociate_ptr(const void *, int); + + /* OpenMP 5.0 */ + extern int __KAI_KMPC_CONVENTION omp_get_device_num (void); + typedef void * omp_depend_t; + + /* OpenMP 5.1 interop */ + typedef intptr_t omp_intptr_t; + + /* 0..omp_get_num_interop_properties()-1 are reserved for implementation-defined properties */ + typedef enum omp_interop_property { + omp_ipr_fr_id = -1, + omp_ipr_fr_name = -2, + omp_ipr_vendor = -3, + omp_ipr_vendor_name = -4, + omp_ipr_device_num = -5, + omp_ipr_platform = -6, + omp_ipr_device = -7, + omp_ipr_device_context = -8, + omp_ipr_targetsync = -9, + omp_ipr_first = -9 + } omp_interop_property_t; + + #define omp_interop_none 0 + + typedef enum omp_interop_rc { + omp_irc_no_value = 1, + omp_irc_success = 0, + omp_irc_empty = -1, + omp_irc_out_of_range = -2, + omp_irc_type_int = -3, + omp_irc_type_ptr = -4, + omp_irc_type_str = -5, + omp_irc_other = -6 + } omp_interop_rc_t; + + typedef enum omp_interop_fr { + omp_ifr_cuda = 1, + omp_ifr_cuda_driver = 2, + omp_ifr_opencl = 3, + omp_ifr_sycl = 4, + omp_ifr_hip = 5, + omp_ifr_level_zero = 6, + omp_ifr_last = 7 + } omp_interop_fr_t; + + typedef void * omp_interop_t; + + /*! + * The `omp_get_num_interop_properties` routine retrieves the number of implementation-defined properties available for an `omp_interop_t` object. + */ + extern int __KAI_KMPC_CONVENTION omp_get_num_interop_properties(const omp_interop_t); + /*! + * The `omp_get_interop_int` routine retrieves an integer property from an `omp_interop_t` object. + */ + extern omp_intptr_t __KAI_KMPC_CONVENTION omp_get_interop_int(const omp_interop_t, omp_interop_property_t, int *); + /*! + * The `omp_get_interop_ptr` routine retrieves a pointer property from an `omp_interop_t` object. + */ + extern void * __KAI_KMPC_CONVENTION omp_get_interop_ptr(const omp_interop_t, omp_interop_property_t, int *); + /*! + * The `omp_get_interop_str` routine retrieves a string property from an `omp_interop_t` object. + */ + extern const char * __KAI_KMPC_CONVENTION omp_get_interop_str(const omp_interop_t, omp_interop_property_t, int *); + /*! + * The `omp_get_interop_name` routine retrieves a property name from an `omp_interop_t` object. + */ + extern const char * __KAI_KMPC_CONVENTION omp_get_interop_name(const omp_interop_t, omp_interop_property_t); + /*! + * The `omp_get_interop_type_desc` routine retrieves a description of the type of a property associated with an `omp_interop_t` object. + */ + extern const char * __KAI_KMPC_CONVENTION omp_get_interop_type_desc(const omp_interop_t, omp_interop_property_t); + /*! + * The `omp_get_interop_rc_desc` routine retrieves a description of the return code associated with an `omp_interop_t` object. + */ + extern const char * __KAI_KMPC_CONVENTION omp_get_interop_rc_desc(const omp_interop_t, omp_interop_rc_t); + + /* OpenMP 5.1 device memory routines */ + + /*! + * The `omp_target_memcpy_async` routine asynchronously performs a copy between any combination of host and device pointers. + */ + extern int __KAI_KMPC_CONVENTION omp_target_memcpy_async(void *, const void *, size_t, size_t, size_t, int, + int, int, omp_depend_t *); + /*! + * The `omp_target_memcpy_rect_async` routine asynchronously performs a copy between any combination of host and device pointers. + */ + extern int __KAI_KMPC_CONVENTION omp_target_memcpy_rect_async(void *, const void *, size_t, int, const size_t *, + const size_t *, const size_t *, const size_t *, const size_t *, int, int, + int, omp_depend_t *); + /*! + * The `omp_get_mapped_ptr` routine returns the device pointer that is associated with a host pointer for a given device. + */ + extern void * __KAI_KMPC_CONVENTION omp_get_mapped_ptr(const void *, int); + extern int __KAI_KMPC_CONVENTION omp_target_is_accessible(const void *, size_t, int); + + /* kmp API functions */ + extern int __KAI_KMPC_CONVENTION kmp_get_stacksize (void); + extern void __KAI_KMPC_CONVENTION kmp_set_stacksize (int); + extern size_t __KAI_KMPC_CONVENTION kmp_get_stacksize_s (void); + extern void __KAI_KMPC_CONVENTION kmp_set_stacksize_s (size_t); + extern int __KAI_KMPC_CONVENTION kmp_get_blocktime (void); + extern int __KAI_KMPC_CONVENTION kmp_get_library (void); + extern void __KAI_KMPC_CONVENTION kmp_set_blocktime (int); + extern void __KAI_KMPC_CONVENTION kmp_set_library (int); + extern void __KAI_KMPC_CONVENTION kmp_set_library_serial (void); + extern void __KAI_KMPC_CONVENTION kmp_set_library_turnaround (void); + extern void __KAI_KMPC_CONVENTION kmp_set_library_throughput (void); + extern void __KAI_KMPC_CONVENTION kmp_set_defaults (char const *); + extern void __KAI_KMPC_CONVENTION kmp_set_disp_num_buffers (int); + + /* Intel affinity API */ + typedef void * kmp_affinity_mask_t; + + extern int __KAI_KMPC_CONVENTION kmp_set_affinity (kmp_affinity_mask_t *); + extern int __KAI_KMPC_CONVENTION kmp_get_affinity (kmp_affinity_mask_t *); + extern int __KAI_KMPC_CONVENTION kmp_get_affinity_max_proc (void); + extern void __KAI_KMPC_CONVENTION kmp_create_affinity_mask (kmp_affinity_mask_t *); + extern void __KAI_KMPC_CONVENTION kmp_destroy_affinity_mask (kmp_affinity_mask_t *); + extern int __KAI_KMPC_CONVENTION kmp_set_affinity_mask_proc (int, kmp_affinity_mask_t *); + extern int __KAI_KMPC_CONVENTION kmp_unset_affinity_mask_proc (int, kmp_affinity_mask_t *); + extern int __KAI_KMPC_CONVENTION kmp_get_affinity_mask_proc (int, kmp_affinity_mask_t *); + + /* OpenMP 4.0 affinity API */ + typedef enum omp_proc_bind_t { + omp_proc_bind_false = 0, + omp_proc_bind_true = 1, + omp_proc_bind_master = 2, + omp_proc_bind_close = 3, + omp_proc_bind_spread = 4 + } omp_proc_bind_t; + + extern omp_proc_bind_t __KAI_KMPC_CONVENTION omp_get_proc_bind (void); + + /* OpenMP 4.5 affinity API */ + extern int __KAI_KMPC_CONVENTION omp_get_num_places (void); + extern int __KAI_KMPC_CONVENTION omp_get_place_num_procs (int); + extern void __KAI_KMPC_CONVENTION omp_get_place_proc_ids (int, int *); + extern int __KAI_KMPC_CONVENTION omp_get_place_num (void); + extern int __KAI_KMPC_CONVENTION omp_get_partition_num_places (void); + extern void __KAI_KMPC_CONVENTION omp_get_partition_place_nums (int *); + + extern void * __KAI_KMPC_CONVENTION kmp_malloc (size_t); + extern void * __KAI_KMPC_CONVENTION kmp_aligned_malloc (size_t, size_t); + extern void * __KAI_KMPC_CONVENTION kmp_calloc (size_t, size_t); + extern void * __KAI_KMPC_CONVENTION kmp_realloc (void *, size_t); + extern void __KAI_KMPC_CONVENTION kmp_free (void *); + + extern void __KAI_KMPC_CONVENTION kmp_set_warnings_on(void); + extern void __KAI_KMPC_CONVENTION kmp_set_warnings_off(void); + + /* OpenMP 5.0 Tool Control */ + typedef enum omp_control_tool_result_t { + omp_control_tool_notool = -2, + omp_control_tool_nocallback = -1, + omp_control_tool_success = 0, + omp_control_tool_ignored = 1 + } omp_control_tool_result_t; + + typedef enum omp_control_tool_t { + omp_control_tool_start = 1, + omp_control_tool_pause = 2, + omp_control_tool_flush = 3, + omp_control_tool_end = 4 + } omp_control_tool_t; + + extern int __KAI_KMPC_CONVENTION omp_control_tool(int, int, void*); + + /* OpenMP 5.0 Memory Management */ + typedef uintptr_t omp_uintptr_t; + + typedef enum { + omp_atk_sync_hint = 1, + omp_atk_alignment = 2, + omp_atk_access = 3, + omp_atk_pool_size = 4, + omp_atk_fallback = 5, + omp_atk_fb_data = 6, + omp_atk_pinned = 7, + omp_atk_partition = 8 + } omp_alloctrait_key_t; + + typedef enum { + omp_atv_false = 0, + omp_atv_true = 1, + omp_atv_contended = 3, + omp_atv_uncontended = 4, + omp_atv_serialized = 5, + omp_atv_sequential = omp_atv_serialized, // (deprecated) + omp_atv_private = 6, + omp_atv_all = 7, + omp_atv_thread = 8, + omp_atv_pteam = 9, + omp_atv_cgroup = 10, + omp_atv_default_mem_fb = 11, + omp_atv_null_fb = 12, + omp_atv_abort_fb = 13, + omp_atv_allocator_fb = 14, + omp_atv_environment = 15, + omp_atv_nearest = 16, + omp_atv_blocked = 17, + omp_atv_interleaved = 18 + } omp_alloctrait_value_t; + #define omp_atv_default ((omp_uintptr_t)-1) + + typedef struct { + omp_alloctrait_key_t key; + omp_uintptr_t value; + } omp_alloctrait_t; + +# if defined(_WIN32) + // On Windows cl and icl do not support 64-bit enum, let's use integer then. + typedef omp_uintptr_t omp_allocator_handle_t; + extern __KMP_IMP omp_allocator_handle_t const omp_null_allocator; + extern __KMP_IMP omp_allocator_handle_t const omp_default_mem_alloc; + extern __KMP_IMP omp_allocator_handle_t const omp_large_cap_mem_alloc; + extern __KMP_IMP omp_allocator_handle_t const omp_const_mem_alloc; + extern __KMP_IMP omp_allocator_handle_t const omp_high_bw_mem_alloc; + extern __KMP_IMP omp_allocator_handle_t const omp_low_lat_mem_alloc; + extern __KMP_IMP omp_allocator_handle_t const omp_cgroup_mem_alloc; + extern __KMP_IMP omp_allocator_handle_t const omp_pteam_mem_alloc; + extern __KMP_IMP omp_allocator_handle_t const omp_thread_mem_alloc; + /* Preview of target memory support */ + extern __KMP_IMP omp_allocator_handle_t const llvm_omp_target_host_mem_alloc; + extern __KMP_IMP omp_allocator_handle_t const llvm_omp_target_shared_mem_alloc; + extern __KMP_IMP omp_allocator_handle_t const llvm_omp_target_device_mem_alloc; + + typedef omp_uintptr_t omp_memspace_handle_t; + extern __KMP_IMP omp_memspace_handle_t const omp_default_mem_space; + extern __KMP_IMP omp_memspace_handle_t const omp_large_cap_mem_space; + extern __KMP_IMP omp_memspace_handle_t const omp_const_mem_space; + extern __KMP_IMP omp_memspace_handle_t const omp_high_bw_mem_space; + extern __KMP_IMP omp_memspace_handle_t const omp_low_lat_mem_space; + /* Preview of target memory support */ + extern __KMP_IMP omp_memspace_handle_t const llvm_omp_target_host_mem_space; + extern __KMP_IMP omp_memspace_handle_t const llvm_omp_target_shared_mem_space; + extern __KMP_IMP omp_memspace_handle_t const llvm_omp_target_device_mem_space; +# else +# if __cplusplus >= 201103 + typedef enum omp_allocator_handle_t : omp_uintptr_t +# else + typedef enum omp_allocator_handle_t +# endif + { + omp_null_allocator = 0, + omp_default_mem_alloc = 1, + omp_large_cap_mem_alloc = 2, + omp_const_mem_alloc = 3, + omp_high_bw_mem_alloc = 4, + omp_low_lat_mem_alloc = 5, + omp_cgroup_mem_alloc = 6, + omp_pteam_mem_alloc = 7, + omp_thread_mem_alloc = 8, + /* Preview of target memory support */ + llvm_omp_target_host_mem_alloc = 100, + llvm_omp_target_shared_mem_alloc = 101, + llvm_omp_target_device_mem_alloc = 102, + KMP_ALLOCATOR_MAX_HANDLE = UINTPTR_MAX + } omp_allocator_handle_t; +# if __cplusplus >= 201103 + typedef enum omp_memspace_handle_t : omp_uintptr_t +# else + typedef enum omp_memspace_handle_t +# endif + { + omp_default_mem_space = 0, + omp_large_cap_mem_space = 1, + omp_const_mem_space = 2, + omp_high_bw_mem_space = 3, + omp_low_lat_mem_space = 4, + /* Preview of target memory support */ + llvm_omp_target_host_mem_space = 100, + llvm_omp_target_shared_mem_space = 101, + llvm_omp_target_device_mem_space = 102, + KMP_MEMSPACE_MAX_HANDLE = UINTPTR_MAX + } omp_memspace_handle_t; +# endif + extern omp_allocator_handle_t __KAI_KMPC_CONVENTION omp_init_allocator(omp_memspace_handle_t m, + int ntraits, omp_alloctrait_t traits[]); + extern void __KAI_KMPC_CONVENTION omp_destroy_allocator(omp_allocator_handle_t allocator); + + extern void __KAI_KMPC_CONVENTION omp_set_default_allocator(omp_allocator_handle_t a); + extern omp_allocator_handle_t __KAI_KMPC_CONVENTION omp_get_default_allocator(void); +# ifdef __cplusplus + extern void *__KAI_KMPC_CONVENTION omp_alloc(size_t size, omp_allocator_handle_t a = omp_null_allocator); + extern void *__KAI_KMPC_CONVENTION omp_aligned_alloc(size_t align, size_t size, + omp_allocator_handle_t a = omp_null_allocator); + extern void *__KAI_KMPC_CONVENTION omp_calloc(size_t nmemb, size_t size, + omp_allocator_handle_t a = omp_null_allocator); + extern void *__KAI_KMPC_CONVENTION omp_aligned_calloc(size_t align, size_t nmemb, size_t size, + omp_allocator_handle_t a = omp_null_allocator); + extern void *__KAI_KMPC_CONVENTION omp_realloc(void *ptr, size_t size, + omp_allocator_handle_t allocator = omp_null_allocator, + omp_allocator_handle_t free_allocator = omp_null_allocator); + extern void __KAI_KMPC_CONVENTION omp_free(void * ptr, omp_allocator_handle_t a = omp_null_allocator); +# else + extern void *__KAI_KMPC_CONVENTION omp_alloc(size_t size, omp_allocator_handle_t a); + extern void *__KAI_KMPC_CONVENTION omp_aligned_alloc(size_t align, size_t size, + omp_allocator_handle_t a); + extern void *__KAI_KMPC_CONVENTION omp_calloc(size_t nmemb, size_t size, omp_allocator_handle_t a); + extern void *__KAI_KMPC_CONVENTION omp_aligned_calloc(size_t align, size_t nmemb, size_t size, + omp_allocator_handle_t a); + extern void *__KAI_KMPC_CONVENTION omp_realloc(void *ptr, size_t size, omp_allocator_handle_t allocator, + omp_allocator_handle_t free_allocator); + extern void __KAI_KMPC_CONVENTION omp_free(void *ptr, omp_allocator_handle_t a); +# endif + + /* OpenMP 5.0 Affinity Format */ + extern void __KAI_KMPC_CONVENTION omp_set_affinity_format(char const *); + extern size_t __KAI_KMPC_CONVENTION omp_get_affinity_format(char *, size_t); + extern void __KAI_KMPC_CONVENTION omp_display_affinity(char const *); + extern size_t __KAI_KMPC_CONVENTION omp_capture_affinity(char *, size_t, char const *); + + /* OpenMP 5.0 events */ +# if defined(_WIN32) + // On Windows cl and icl do not support 64-bit enum, let's use integer then. + typedef omp_uintptr_t omp_event_handle_t; +# else + typedef enum omp_event_handle_t { KMP_EVENT_MAX_HANDLE = UINTPTR_MAX } omp_event_handle_t; +# endif + extern void __KAI_KMPC_CONVENTION omp_fulfill_event ( omp_event_handle_t event ); + + /* OpenMP 5.0 Pause Resources */ + typedef enum omp_pause_resource_t { + omp_pause_resume = 0, + omp_pause_soft = 1, + omp_pause_hard = 2 + } omp_pause_resource_t; + extern int __KAI_KMPC_CONVENTION omp_pause_resource(omp_pause_resource_t, int); + extern int __KAI_KMPC_CONVENTION omp_pause_resource_all(omp_pause_resource_t); + + extern int __KAI_KMPC_CONVENTION omp_get_supported_active_levels(void); + + /* OpenMP 5.1 */ + extern void __KAI_KMPC_CONVENTION omp_set_num_teams(int num_teams); + extern int __KAI_KMPC_CONVENTION omp_get_max_teams(void); + extern void __KAI_KMPC_CONVENTION omp_set_teams_thread_limit(int limit); + extern int __KAI_KMPC_CONVENTION omp_get_teams_thread_limit(void); + + /* OpenMP 5.1 Display Environment */ + extern void omp_display_env(int verbose); + +# if defined(_OPENMP) && _OPENMP >= 201811 + #pragma omp begin declare variant match(device={kind(host)}) + static inline int omp_is_initial_device(void) { return 1; } + #pragma omp end declare variant + #pragma omp begin declare variant match(device={kind(nohost)}) + static inline int omp_is_initial_device(void) { return 0; } + #pragma omp end declare variant +# endif + +# undef __KAI_KMPC_CONVENTION +# undef __KMP_IMP + + /* Warning: + The following typedefs are not standard, deprecated and will be removed in a future release. + */ + typedef int omp_int_t; + typedef double omp_wtime_t; + +# ifdef __cplusplus + } +# endif + +#endif /* __OMP_H */ diff --git a/lib/cmake/OpenSSL/OpenSSLConfig.cmake b/lib/cmake/OpenSSL/OpenSSLConfig.cmake new file mode 100644 index 0000000000000000000000000000000000000000..d6927a7090ae73193e25f114af4e1d00a25beb81 --- /dev/null +++ b/lib/cmake/OpenSSL/OpenSSLConfig.cmake @@ -0,0 +1,146 @@ +# 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..a04c82267f449e4e8c8627afdc3fe957c7ddbebf --- /dev/null +++ b/lib/cmake/OpenSSL/OpenSSLConfigVersion.cmake @@ -0,0 +1,17 @@ +# Generated by OpenSSL + +set(PACKAGE_VERSION 3.5.2) + +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.2) + set(PACKAGE_VERSION_UNSUITABLE 1) +else() + set(PACKAGE_VERSION_COMPATIBLE 1) + if(PACKAGE_FIND_VERSION VERSION_EQUAL 3.5.2) + set(PACKAGE_VERSION_EXACT 1) + endif() +endif() diff --git a/lib/cmake/ZeroMQ/ZeroMQConfig.cmake b/lib/cmake/ZeroMQ/ZeroMQConfig.cmake new file mode 100644 index 0000000000000000000000000000000000000000..d5e810042b6045623c9308e882dc8cf7b460f2c7 --- /dev/null +++ b/lib/cmake/ZeroMQ/ZeroMQConfig.cmake @@ -0,0 +1,19 @@ +set(PN ZeroMQ) +set(_CONDA_PREFIX "/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe") +set(${PN}_INCLUDE_DIR "${_CONDA_PREFIX}/include") +set(${PN}_LIBRARY "${_CONDA_PREFIX}/lib/libzmq.so") +set(${PN}_STATIC_LIBRARY "${_CONDA_PREFIX}/lib/libzmq.a") +unset(_CONDA_PREFIX) +set(${PN}_FOUND TRUE) +# add libzmq-4.3.3 cmake targets +# only define targets once +# this file can be loaded multiple times +if (TARGET libzmq) + return() +endif() +add_library(libzmq SHARED IMPORTED) +set_property(TARGET libzmq PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${${PN}_INCLUDE_DIR}") +set_property(TARGET libzmq PROPERTY IMPORTED_LOCATION "${${PN}_LIBRARY}") +add_library(libzmq-static STATIC IMPORTED "${${PN}_INCLUDE_DIR}") +set_property(TARGET libzmq-static PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${${PN}_INCLUDE_DIR}") +set_property(TARGET libzmq-static PROPERTY IMPORTED_LOCATION "${${PN}_STATIC_LIBRARY}") diff --git a/lib/cmake/ZeroMQ/ZeroMQConfigVersion.cmake b/lib/cmake/ZeroMQ/ZeroMQConfigVersion.cmake new file mode 100644 index 0000000000000000000000000000000000000000..e509858a28f1cc7a789bd7a12cb575d918fba9a0 --- /dev/null +++ b/lib/cmake/ZeroMQ/ZeroMQConfigVersion.cmake @@ -0,0 +1,10 @@ +set(PACKAGE_VERSION "4.3.5") +# Check whether the requested PACKAGE_FIND_VERSION is compatible +if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + set(PACKAGE_VERSION_COMPATIBLE TRUE) + if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") + set(PACKAGE_VERSION_EXACT TRUE) + endif() +endif() diff --git a/lib/cmake/libdeflate/libdeflate-targets.cmake b/lib/cmake/libdeflate/libdeflate-targets.cmake new file mode 100644 index 0000000000000000000000000000000000000000..0e99b033da401f6cdcb5958bae4e0010e0633acc --- /dev/null +++ b/lib/cmake/libdeflate/libdeflate-targets.cmake @@ -0,0 +1,103 @@ +# 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.24) +#---------------------------------------------------------------- +# 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 libdeflate::libdeflate_shared) + 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 libdeflate::libdeflate_shared +add_library(libdeflate::libdeflate_shared SHARED IMPORTED) + +set_target_properties(libdeflate::libdeflate_shared PROPERTIES + INTERFACE_COMPILE_DEFINITIONS "LIBDEFLATE_DLL" + INTERFACE_INCLUDE_DIRECTORIES "/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/include" +) + +# Load information for each installed configuration. +file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/libdeflate-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/cmake/liblzma/liblzma-config-version.cmake b/lib/cmake/liblzma/liblzma-config-version.cmake new file mode 100644 index 0000000000000000000000000000000000000000..80c14be890a54d6c50032ed19ceaa61b00cd4cf1 --- /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.6.4") + +if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + + if("5.6.4" 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.6.4") + 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..506385d49eaff2257bed8e6b52cdfbda6a3ee5a8 --- /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.6.4" + 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.6.4" ) + +# 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/cmake/openjpeg-2.5/OpenJPEGConfig.cmake b/lib/cmake/openjpeg-2.5/OpenJPEGConfig.cmake new file mode 100644 index 0000000000000000000000000000000000000000..cae7b3477be3e167c3b0f91e6d40c9177a18c663 --- /dev/null +++ b/lib/cmake/openjpeg-2.5/OpenJPEGConfig.cmake @@ -0,0 +1,74 @@ +#----------------------------------------------------------------------------- +# +# OPENJPEGConfig.cmake - CMake configuration file for external projects. +# +# This file is configured by OPENJPEG and used by the UseOPENJPEG.cmake +# module to load OPENJPEG's settings for an external project. + + +####### 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 OpenJPEGConfig.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() + +#################################################################################### +# The OPENJPEG version number. +set(OPENJPEG_MAJOR_VERSION "2") +set(OPENJPEG_MINOR_VERSION "5") +set(OPENJPEG_BUILD_VERSION "2") + +# The libraries. +set(OPENJPEG_LIBRARIES "openjp2") + +# The CMake macros dir. +set(OPENJPEG_CMAKE_DIR "lib/cmake/openjpeg-2.5") + +# The configuration options. +set(OPENJPEG_BUILD_SHARED_LIBS "ON") + +# The "use" file. +set(OPENJPEG_USE_FILE "") + +get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +if(EXISTS ${SELF_DIR}/OpenJPEGTargets.cmake) + # This is an install tree + include(${SELF_DIR}/OpenJPEGTargets.cmake) + + set(INC_DIR "${PACKAGE_PREFIX_DIR}/include/openjpeg-2.5") + get_filename_component(OPENJPEG_INCLUDE_DIRS "${INC_DIR}" ABSOLUTE) + +else() + if(EXISTS ${SELF_DIR}/OpenJPEGExports.cmake) + # This is a build tree + set( OPENJPEG_INCLUDE_DIRS ) + + include(${SELF_DIR}/OpenJPEGExports.cmake) + + else() + message(FATAL_ERROR "ooops") + endif() +endif() + +set(OPENJPEG_USE_FILE ${SELF_DIR}/UseOPENJPEG.cmake) + +# Backward compatible part: +set(OPENJPEG_FOUND TRUE) + diff --git a/lib/cmake/openjpeg-2.5/OpenJPEGConfigVersion.cmake b/lib/cmake/openjpeg-2.5/OpenJPEGConfigVersion.cmake new file mode 100644 index 0000000000000000000000000000000000000000..aed4c4dee5b8385ae2761c2acc42b3daf3f5c75a --- /dev/null +++ b/lib/cmake/openjpeg-2.5/OpenJPEGConfigVersion.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.5.2") + +if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + + if("2.5.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 "2.5.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 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/openjpeg-2.5/OpenJPEGTargets-release.cmake b/lib/cmake/openjpeg-2.5/OpenJPEGTargets-release.cmake new file mode 100644 index 0000000000000000000000000000000000000000..c0b47cc181b839153de0a150987acb925e9ea083 --- /dev/null +++ b/lib/cmake/openjpeg-2.5/OpenJPEGTargets-release.cmake @@ -0,0 +1,56 @@ +#---------------------------------------------------------------- +# Generated CMake target import file for configuration "Release". +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "openjp2" for configuration "Release" +set_property(TARGET openjp2 APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) +set_target_properties(openjp2 PROPERTIES + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libopenjp2.so.2.5.2" + IMPORTED_SONAME_RELEASE "libopenjp2.so.7" + ) + +list(APPEND _cmake_import_check_targets openjp2 ) +list(APPEND _cmake_import_check_files_for_openjp2 "${_IMPORT_PREFIX}/lib/libopenjp2.so.2.5.2" ) + +# Import target "openjp2_static" for configuration "Release" +set_property(TARGET openjp2_static APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) +set_target_properties(openjp2_static PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C" + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libopenjp2.a" + ) + +list(APPEND _cmake_import_check_targets openjp2_static ) +list(APPEND _cmake_import_check_files_for_openjp2_static "${_IMPORT_PREFIX}/lib/libopenjp2.a" ) + +# Import target "opj_decompress" for configuration "Release" +set_property(TARGET opj_decompress APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) +set_target_properties(opj_decompress PROPERTIES + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/opj_decompress" + ) + +list(APPEND _cmake_import_check_targets opj_decompress ) +list(APPEND _cmake_import_check_files_for_opj_decompress "${_IMPORT_PREFIX}/bin/opj_decompress" ) + +# Import target "opj_compress" for configuration "Release" +set_property(TARGET opj_compress APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) +set_target_properties(opj_compress PROPERTIES + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/opj_compress" + ) + +list(APPEND _cmake_import_check_targets opj_compress ) +list(APPEND _cmake_import_check_files_for_opj_compress "${_IMPORT_PREFIX}/bin/opj_compress" ) + +# Import target "opj_dump" for configuration "Release" +set_property(TARGET opj_dump APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) +set_target_properties(opj_dump PROPERTIES + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/opj_dump" + ) + +list(APPEND _cmake_import_check_targets opj_dump ) +list(APPEND _cmake_import_check_files_for_opj_dump "${_IMPORT_PREFIX}/bin/opj_dump" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/lib/cmake/openjpeg-2.5/OpenJPEGTargets.cmake b/lib/cmake/openjpeg-2.5/OpenJPEGTargets.cmake new file mode 100644 index 0000000000000000000000000000000000000000..50e0a5ef6f77fb9049b5c3ae11d91fe014d83a76 --- /dev/null +++ b/lib/cmake/openjpeg-2.5/OpenJPEGTargets.cmake @@ -0,0 +1,123 @@ +# 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...3.29) +#---------------------------------------------------------------- +# 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 openjp2 openjp2_static opj_decompress opj_compress opj_dump) + 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 openjp2 +add_library(openjp2 SHARED IMPORTED) + +set_target_properties(openjp2 PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/openjpeg-2.5" + INTERFACE_LINK_LIBRARIES "m;-lpthread" +) + +# Create imported target openjp2_static +add_library(openjp2_static STATIC IMPORTED) + +set_target_properties(openjp2_static PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/openjpeg-2.5" +) + +# Create imported target opj_decompress +add_executable(opj_decompress IMPORTED) + +# Create imported target opj_compress +add_executable(opj_compress IMPORTED) + +# Create imported target opj_dump +add_executable(opj_dump IMPORTED) + +# Load information for each installed configuration. +file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/OpenJPEGTargets-*.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/openmp/FindOpenMPTarget.cmake b/lib/cmake/openmp/FindOpenMPTarget.cmake new file mode 100644 index 0000000000000000000000000000000000000000..3591a49f685b15e65cb000928bff700eef846ca3 --- /dev/null +++ b/lib/cmake/openmp/FindOpenMPTarget.cmake @@ -0,0 +1,338 @@ +##===----------------------------------------------------------------------===## +# +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +##===----------------------------------------------------------------------===## +# +# Find OpenMP Target offloading Support for various compilers. +# +##===----------------------------------------------------------------------===## + +#[========================================================================[.rst: +FindOpenMPTarget +---------------- + +Finds OpenMP Target Offloading Support. + +This module can be used to detect OpenMP target offloading support in a +compiler. If the compiler support OpenMP Offloading to a specified target, the +flags required to compile offloading code to that target are output for each +target. + +This module will automatically include OpenMP support if it was not loaded +already. It does not need to be included separately to get full OpenMP support. + +Variables +^^^^^^^^^ + +The module exposes the components ``NVPTX`` and ``AMDGPU``. Each of these +controls the various offloading targets to search OpenMP target offloasing +support for. + +Depending on the enabled components the following variables will be set: + +``OpenMPTarget_FOUND`` + Variable indicating that OpenMP target offloading flags for all requested + targets have been found. + +This module will set the following variables per language in your +project, where ```` is one of NVPTX or AMDGPU + +``OpenMPTarget__FOUND`` + Variable indicating if OpenMP support for the ```` was detected. +``OpenMPTarget__FLAGS`` + OpenMP compiler flags for offloading to ````, separated by spaces. + +For linking with OpenMP code written in ````, the following +variables are provided: + +``OpenMPTarget__LIBRARIES`` + A list of libraries needed to link with OpenMP code written in ````. + +Additionally, the module provides :prop_tgt:`IMPORTED` targets: + +``OpenMPTarget::OpenMPTarget_`` + Target for using OpenMP offloading to ````. + +If the specific architecture of the target is needed, it can be manually +specified by setting a variable to the desired architecture. Variables can also +be used to override the standard flag searching for a given compiler. + +``OpenMPTarget__ARCH`` + Sets the architecture of ```` to compile for. Such as `sm_70` for NVPTX + or `gfx908` for AMDGPU. + +``OpenMPTarget__DEVICE`` + Sets the name of the device to offload to. + +``OpenMPTarget__FLAGS`` + Sets the compiler flags for offloading to ````. + +#]========================================================================] + +# TODO: Support Fortran +# TODO: Support multiple offloading targets by setting the "OpenMPTarget" target +# to include flags for all components loaded +# TODO: Configure target architecture without a variable (component NVPTX_SM_70) +# TODO: Test more compilers + +cmake_policy(PUSH) +cmake_policy(VERSION 3.13.4) + +find_package(OpenMP ${OpenMPTarget_FIND_VERSION} REQUIRED) + +# Find the offloading flags for each compiler. +function(_OPENMP_TARGET_DEVICE_FLAG_CANDIDATES LANG DEVICE) + if(NOT OpenMPTarget_${LANG}_FLAGS) + unset(OpenMPTarget_FLAG_CANDIDATES) + + set(OMPTarget_FLAGS_Clang "-fopenmp-targets=${DEVICE}") + set(OMPTarget_FLAGS_GNU "-foffload=${DEVICE}=\"-lm -latomic\"") + set(OMPTarget_FLAGS_XL "-qoffload") + set(OMPTarget_FLAGS_PGI "-mp=${DEVICE}") + set(OMPTarget_FLAGS_NVHPC "-mp=${DEVICE}") + + if(DEFINED OMPTarget_FLAGS_${CMAKE_${LANG}_COMPILER_ID}) + set(OpenMPTarget_FLAG_CANDIDATES "${OMPTarget_FLAGS_${CMAKE_${LANG}_COMPILER_ID}}") + endif() + + set(OpenMPTarget_${LANG}_FLAG_CANDIDATES "${OpenMPTarget_FLAG_CANDIDATES}" PARENT_SCOPE) + else() + set(OpenMPTarget_${LANG}_FLAG_CANDIDATES "${OpenMPTarget_${LANG}_FLAGS}" PARENT_SCOPE) + endif() +endfunction() + +# Get the coded name of the device for each compiler. +function(_OPENMP_TARGET_DEVICE_CANDIDATES LANG DEVICE) + if (NOT OpenMPTarget_${DEVICE}_DEVICE) + unset(OpenMPTarget_DEVICE_CANDIDATES) + + # Check each supported device. + if("${DEVICE}" STREQUAL "NVPTX") + if ("${CMAKE_SIZEOF_VOID_P}" STREQUAL "4") + set(OMPTarget_DEVICE_Clang "nvptx32-nvidia-cuda") + else() + set(OMPTarget_DEVICE_Clang "nvptx64-nvidia-cuda") + endif() + set(OMPTarget_DEVICE_GNU "nvptx-none") + set(OMPTarget_DEVICE_XL "") + set(OMPTarget_DEVICE_PGI "gpu") + set(OMPTarget_DEVICE_NVHPC "gpu") + + if(DEFINED OMPTarget_DEVICE_${CMAKE_${LANG}_COMPILER_ID}) + set(OpenMPTarget_DEVICE_CANDIDATES "${OMPTarget_DEVICE_${CMAKE_${LANG}_COMPILER_ID}}") + endif() + elseif("${DEVICE}" STREQUAL "AMDGPU") + set(OMPTarget_DEVICE_Clang "amdgcn-amd-amdhsa") + set(OMPTarget_DEVICE_GNU "hsa") + + if(DEFINED OMPTarget_DEVICE_${CMAKE_${LANG}_COMPILER_ID}) + set(OpenMPTarget_DEVICE_CANDIDATES "${OMPTarget_DEVICE_${CMAKE_${LANG}_COMPILER_ID}}") + endif() + endif() + set(OpenMPTarget_${LANG}_DEVICE_CANDIDATES "${OpenMPTarget_DEVICE_CANDIDATES}" PARENT_SCOPE) + else() + set(OpenMPTarget_${LANG}_DEVICE_CANDIDATES "${OpenMPTarget_${LANG}_DEVICE}" PARENT_SCOPE) + endif() +endfunction() + +# Get flags for setting the device's architecture for each compiler. +function(_OPENMP_TARGET_DEVICE_ARCH_CANDIDATES LANG DEVICE DEVICE_FLAG) + if(OpenMPTarget_${DEVICE}_ARCH) + # Only Clang supports selecting the architecture for now. + set(OMPTarget_ARCH_Clang "-Xopenmp-target=${DEVICE_FLAG} -march=${OpenMPTarget_${DEVICE}_ARCH}") + + if(DEFINED OMPTarget_ARCH_${CMAKE_${LANG}_COMPILER_ID}) + set(OpenMPTarget_DEVICE_ARCH_CANDIDATES "${OMPTarget_ARCH_${CMAKE_${LANG}_COMPILER_ID}}") + endif() + set(OpenMPTarget_${LANG}_DEVICE_ARCH_CANDIDATES "${OpenMPTarget_DEVICE_ARCH_CANDIDATES}" PARENT_SCOPE) + else() + set(OpenMPTarget_${LANG}_DEVICE_ARCH_CANDIDATES "" PARENT_SCOPE) + endif() +endfunction() + +set(OpenMPTarget_C_CXX_TEST_SOURCE +"#include +int main(void) { + int isHost; +#pragma omp target map(from: isHost) + { isHost = omp_is_initial_device(); } + return isHost; +}") + +function(_OPENMP_TARGET_WRITE_SOURCE_FILE LANG SRC_FILE_CONTENT_VAR SRC_FILE_NAME SRC_FILE_FULLPATH) + set(WORK_DIR ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/FindOpenMPTarget) + if("${LANG}" STREQUAL "C") + set(SRC_FILE "${WORK_DIR}/${SRC_FILE_NAME}.c") + file(WRITE "${SRC_FILE}" "${OpenMPTarget_C_CXX_${SRC_FILE_CONTENT_VAR}}") + elseif("${LANG}" STREQUAL "CXX") + set(SRC_FILE "${WORK_DIR}/${SRC_FILE_NAME}.cpp") + file(WRITE "${SRC_FILE}" "${OpenMPTarget_C_CXX_${SRC_FILE_CONTENT_VAR}}") + endif() + set(${SRC_FILE_FULLPATH} "${SRC_FILE}" PARENT_SCOPE) +endfunction() + +# Get the candidate flags and try to compile a test application. If it compiles +# and all the flags are found, we assume the compiler supports offloading. +function(_OPENMP_TARGET_DEVICE_GET_FLAGS LANG DEVICE OPENMP_FLAG_VAR OPENMP_LIB_VAR OPENMP_DEVICE_VAR OPENMP_ARCH_VAR) + _OPENMP_TARGET_DEVICE_CANDIDATES(${LANG} ${DEVICE}) + _OPENMP_TARGET_DEVICE_FLAG_CANDIDATES(${LANG} "${OpenMPTarget_${LANG}_DEVICE_CANDIDATES}") + _OPENMP_TARGET_DEVICE_ARCH_CANDIDATES(${LANG} ${DEVICE} "${OpenMPTarget_${LANG}_DEVICE_CANDIDATES}") + _OPENMP_TARGET_WRITE_SOURCE_FILE("${LANG}" "TEST_SOURCE" OpenMPTargetTryFlag _OPENMP_TEST_SRC) + + # Try to compile a test application with the found flags. + try_compile(OpenMPTarget_COMPILE_RESULT ${CMAKE_BINARY_DIR} ${_OPENMP_TEST_SRC} + CMAKE_FLAGS "-DCOMPILE_DEFINITIONS:STRING=${OpenMP_${LANG}_FLAGS} ${OpenMPTarget_${LANG}_FLAG_CANDIDATES} ${OpenMPTarget_${LANG}_DEVICE_ARCH_CANDIDATES}" + "-DINCLUDE_DIRECTORIES:STRING=${OpenMP_${LANG}_INCLUDE_DIR}" + LINK_LIBRARIES ${CMAKE_${LANG}_VERBOSE_FLAG} + OUTPUT_VARIABLE OpenMP_TRY_COMPILE_OUTPUT + ) + + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Detecting OpenMP ${CMAKE_${LANG}_COMPILER_ID} ${DEVICE} target support with the following Flags: + ${OpenMP_${LANG}_FLAGS} ${OpenMPTarget_${LANG}_FLAG_CANDIDATES} ${OpenMPTarget_${LANG}_DEVICE_ARCH_CANDIDATES} + With the following output:\n ${OpenMP_TRY_COMPILE_OUTPUT}\n") + + # If compilation was successful and the device was found set the return variables. + if (OpenMPTarget_COMPILE_RESULT AND DEFINED OpenMPTarget_${LANG}_DEVICE_CANDIDATES) + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Compilation successful, adding flags for ${DEVICE}.\n\n") + + # Clang has a seperate library for target offloading. + if(CMAKE_${LANG}_COMPILER_ID STREQUAL "Clang") + find_library(OpenMPTarget_libomptarget_LIBRARY + NAMES omptarget + HINTS ${CMAKE_${LANG}_IMPLICIT_LINK_DIRECTORIES} + ) + mark_as_advanced(OpenMPTarget_libomptarget_LIBRARY) + set("${OPENMP_LIB_VAR}" "${OpenMPTarget_libomptarget_LIBRARY}" PARENT_SCOPE) + else() + unset("${OPENMP_LIB_VAR}" PARENT_SCOPE) + endif() + set("${OPENMP_DEVICE_VAR}" "${OpenMPTarget_${LANG}_DEVICE_CANDIDATES}" PARENT_SCOPE) + set("${OPENMP_FLAG_VAR}" "${OpenMPTarget_${LANG}_FLAG_CANDIDATES}" PARENT_SCOPE) + set("${OPENMP_ARCH_VAR}" "${OpenMPTarget_${LANG}_DEVICE_ARCH_CANDIDATES}" PARENT_SCOPE) + else() + unset("${OPENMP_DEVICE_VAR}" PARENT_SCOPE) + unset("${OPENMP_FLAG_VAR}" PARENT_SCOPE) + unset("${OPENMP_ARCH_VAR}" PARENT_SCOPE) + endif() +endfunction() + +# Load the compiler support for each device. +foreach(LANG IN ITEMS C CXX) + # Cache the version in case CMake doesn't load the OpenMP package this time + set(OpenMP_${LANG}_VERSION ${OpenMP_${LANG}_VERSION} + CACHE STRING "OpenMP Version" FORCE) + mark_as_advanced(OpenMP_${LANG}_VERSION) + foreach(DEVICE IN ITEMS NVPTX AMDGPU) + if(CMAKE_${LANG}_COMPILER_LOADED) + if(NOT DEFINED OpenMPTarget_${LANG}_FLAGS OR NOT DEFINED OpenMPTarget_${LANG}_DEVICE) + _OPENMP_TARGET_DEVICE_GET_FLAGS(${LANG} ${DEVICE} + OpenMPTarget_${DEVICE}_FLAGS_WORK + OpenMPTarget_${DEVICE}_LIBS_WORK + OpenMPTarget_${DEVICE}_DEVICE_WORK + OpenMPTarget_${DEVICE}_ARCHS_WORK) + + separate_arguments(_OpenMPTarget_${DEVICE}_FLAGS NATIVE_COMMAND "${OpenMPTarget_${DEVICE}_FLAGS_WORK}") + separate_arguments(_OpenMPTarget_${DEVICE}_ARCHS NATIVE_COMMAND "${OpenMPTarget_${DEVICE}_ARCHS_WORK}") + set(OpenMPTarget_${DEVICE}_FLAGS ${_OpenMPTarget_${DEVICE}_FLAGS} + CACHE STRING "${DEVICE} target compile flags for OpenMP target offloading" FORCE) + set(OpenMPTarget_${DEVICE}_ARCH ${_OpenMPTarget_${DEVICE}_ARCHS} + CACHE STRING "${DEVICE} target architecture flags for OpenMP target offloading" FORCE) + set(OpenMPTarget_${DEVICE}_LIBRARIES ${OpenMPTarget_${DEVICE}_LIBS_WORK} + CACHE STRING "${DEVICE} target libraries for OpenMP target offloading" FORCE) + mark_as_advanced(OpenMPTarget_${DEVICE}_FLAGS OpenMPTarget_${DEVICE}_ARCH OpenMPTarget_${DEVICE}_LIBRARIES) + endif() + endif() + endforeach() +endforeach() + +if(OpenMPTarget_FIND_COMPONENTS) + set(OpenMPTarget_FINDLIST ${OpenMPTarget_FIND_COMPONENTS}) +else() + set(OpenMPTarget_FINDLIST NVPTX) +endif() + +unset(_OpenMPTarget_MIN_VERSION) + +# Attempt to find each requested device. +foreach(LANG IN ITEMS C CXX) + foreach(DEVICE IN LISTS OpenMPTarget_FINDLIST) + if(CMAKE_${LANG}_COMPILER_LOADED) + set(OpenMPTarget_${DEVICE}_VERSION "${OpenMP_${LANG}_VERSION}") + set(OpenMPTarget_${DEVICE}_VERSION_MAJOR "${OpenMP_${LANG}_VERSION}_MAJOR") + set(OpenMPTarget_${DEVICE}_VERSION_MINOR "${OpenMP_${LANG}_VERSION}_MINOR") + set(OpenMPTarget_${DEVICE}_FIND_QUIETLY ${OpenMPTarget_FIND_QUIETLY}) + set(OpenMPTarget_${DEVICE}_FIND_REQUIRED ${OpenMPTarget_FIND_REQUIRED}) + set(OpenMPTarget_${DEVICE}_FIND_VERSION ${OpenMPTarget_FIND_VERSION}) + set(OpenMPTarget_${DEVICE}_FIND_VERSION_EXACT ${OpenMPTarget_FIND_VERSION_EXACT}) + + # OpenMP target offloading is only supported in OpenMP 4.0 an newer. + if(OpenMPTarget_${DEVICE}_VERSION AND ("${OpenMPTarget_${DEVICE}_VERSION}" VERSION_LESS "4.0")) + message(SEND_ERROR "FindOpenMPTarget requires at least OpenMP 4.0") + endif() + + set(FPHSA_NAME_MISMATCHED TRUE) + find_package_handle_standard_args(OpenMPTarget_${DEVICE} + REQUIRED_VARS OpenMPTarget_${DEVICE}_FLAGS + VERSION_VAR OpenMPTarget_${DEVICE}_VERSION) + + if(OpenMPTarget_${DEVICE}_FOUND) + if(DEFINED OpenMPTarget_${DEVICE}_VERSION) + if(NOT _OpenMPTarget_MIN_VERSION OR _OpenMPTarget_MIN_VERSION VERSION_GREATER OpenMPTarget_${LANG}_VERSION) + set(_OpenMPTarget_MIN_VERSION OpenMPTarget_${DEVICE}_VERSION) + endif() + endif() + # Create a new target. + if(NOT TARGET OpenMPTarget::OpenMPTarget_${DEVICE}) + add_library(OpenMPTarget::OpenMPTarget_${DEVICE} INTERFACE IMPORTED) + endif() + # Get compiler flags for offloading to the device and architecture and + # set the target features. Include the normal OpenMP flags as well. + set_property(TARGET OpenMPTarget::OpenMPTarget_${DEVICE} PROPERTY + INTERFACE_COMPILE_OPTIONS + "$<$:${OpenMPTarget_${DEVICE}_FLAGS}>" + "$<$:${OpenMPTarget_${DEVICE}_ARCH}>" + "$<$:${OpenMP_${LANG}_FLAGS}>") + set_property(TARGET OpenMPTarget::OpenMPTarget_${DEVICE} PROPERTY + INTERFACE_INCLUDE_DIRECTORIES "$") + set_property(TARGET OpenMPTarget::OpenMPTarget_${DEVICE} PROPERTY + INTERFACE_LINK_LIBRARIES + "${OpenMPTarget_${DEVICE}_LIBRARIES}" + "${OpenMP_${LANG}_LIBRARIES}") + # The offloading flags must also be passed during the linking phase so + # the compiler can pass the binary to the correct toolchain. + set_property(TARGET OpenMPTarget::OpenMPTarget_${DEVICE} PROPERTY + INTERFACE_LINK_OPTIONS + "$<$:${OpenMPTarget_${DEVICE}_FLAGS}>" + "$<$:${OpenMPTarget_${DEVICE}_ARCH}>" + "$<$:${OpenMP_${LANG}_FLAGS}>") + # Combine all the flags if not using the target for convenience. + set(OpenMPTarget_${DEVICE}_FLAGS ${OpenMP_${LANG}_FLAGS} + ${OpenMPTarget_${DEVICE}_FLAGS} + ${OpenMPTarget_${DEVICE}_ARCH} + CACHE STRING "${DEVICE} target compile flags for OpenMP target offloading" FORCE) + endif() + endif() + endforeach() +endforeach() + +unset(_OpenMPTarget_REQ_VARS) +foreach(DEVICE IN LISTS OpenMPTarget_FINDLIST) + list(APPEND _OpenMPTarget_REQ_VARS "OpenMPTarget_${DEVICE}_FOUND") +endforeach() + +find_package_handle_standard_args(OpenMPTarget + REQUIRED_VARS ${_OpenMPTarget_REQ_VARS} + VERSION_VAR ${_OpenMPTarget_MIN_VERSION} + HANDLE_COMPONENTS) + +if(NOT (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED) OR CMAKE_Fortran_COMPILER_LOADED) + message(SEND_ERROR "FindOpenMPTarget requires the C or CXX languages to be enabled") +endif() + +unset(OpenMPTarget_C_CXX_TEST_SOURCE) +cmake_policy(POP) diff --git a/lib/cmake/zstd/zstdConfig.cmake b/lib/cmake/zstd/zstdConfig.cmake new file mode 100644 index 0000000000000000000000000000000000000000..7cc9666dbaed157c5ff1e300be2745f7b2d4c8eb --- /dev/null +++ b/lib/cmake/zstd/zstdConfig.cmake @@ -0,0 +1,34 @@ + +####### 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 zstdConfig.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() + +#################################################################################### + +include(CMakeFindDependencyMacro) +if(ON AND "1") + find_dependency(Threads) +endif() + +include("${CMAKE_CURRENT_LIST_DIR}/zstdTargets.cmake") + +check_required_components("zstd") diff --git a/lib/cmake/zstd/zstdConfigVersion.cmake b/lib/cmake/zstd/zstdConfigVersion.cmake new file mode 100644 index 0000000000000000000000000000000000000000..0ad9866aa44e63c6d40be097d13b59f540865dd0 --- /dev/null +++ b/lib/cmake/zstd/zstdConfigVersion.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 "1.5.6") + +if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + + if("1.5.6" 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 "1.5.6") + 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/zstd/zstdTargets-release.cmake b/lib/cmake/zstd/zstdTargets-release.cmake new file mode 100644 index 0000000000000000000000000000000000000000..f684ba9aa6cd3b40c4816237253b966de4623cfe --- /dev/null +++ b/lib/cmake/zstd/zstdTargets-release.cmake @@ -0,0 +1,29 @@ +#---------------------------------------------------------------- +# Generated CMake target import file for configuration "Release". +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "zstd::libzstd_shared" for configuration "Release" +set_property(TARGET zstd::libzstd_shared APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) +set_target_properties(zstd::libzstd_shared PROPERTIES + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libzstd.so.1.5.6" + IMPORTED_SONAME_RELEASE "libzstd.so.1" + ) + +list(APPEND _cmake_import_check_targets zstd::libzstd_shared ) +list(APPEND _cmake_import_check_files_for_zstd::libzstd_shared "${_IMPORT_PREFIX}/lib/libzstd.so.1.5.6" ) + +# Import target "zstd::libzstd_static" for configuration "Release" +set_property(TARGET zstd::libzstd_static APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) +set_target_properties(zstd::libzstd_static PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "ASM;C" + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libzstd.a" + ) + +list(APPEND _cmake_import_check_targets zstd::libzstd_static ) +list(APPEND _cmake_import_check_files_for_zstd::libzstd_static "${_IMPORT_PREFIX}/lib/libzstd.a" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/lib/cmake/zstd/zstdTargets.cmake b/lib/cmake/zstd/zstdTargets.cmake new file mode 100644 index 0000000000000000000000000000000000000000..075725ea5cd7de18c1766b710cd957ee4b48d761 --- /dev/null +++ b/lib/cmake/zstd/zstdTargets.cmake @@ -0,0 +1,123 @@ +# 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 zstd::libzstd_shared zstd::libzstd_static zstd::libzstd) + 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 zstd::libzstd_shared +add_library(zstd::libzstd_shared SHARED IMPORTED) + +set_target_properties(zstd::libzstd_shared PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" + INTERFACE_LINK_LIBRARIES "-pthread" +) + +# Create imported target zstd::libzstd_static +add_library(zstd::libzstd_static STATIC IMPORTED) + +set_target_properties(zstd::libzstd_static PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" + INTERFACE_LINK_LIBRARIES "-pthread" +) + +# Create imported target zstd::libzstd +add_library(zstd::libzstd INTERFACE IMPORTED) + +set_target_properties(zstd::libzstd PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" + INTERFACE_LINK_LIBRARIES "zstd::libzstd_static" +) + +if(CMAKE_VERSION VERSION_LESS 3.0.0) + message(FATAL_ERROR "This file relies on consumers using CMake 3.0.0 or greater.") +endif() + +# Load information for each installed configuration. +file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/zstdTargets-*.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/pkgconfig/Lerc.pc b/lib/pkgconfig/Lerc.pc new file mode 100644 index 0000000000000000000000000000000000000000..e1ff8e67e0d353df934e3ae9d6a56a3b7d20bfba --- /dev/null +++ b/lib/pkgconfig/Lerc.pc @@ -0,0 +1,12 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +includedir=${prefix}/include +libdir=${exec_prefix}/lib + +Name: Lerc +Description: Limited Error Raster Compression +URL: https://github.com/Esri/lerc +Version: 4.0.0 +Cflags: -I${includedir} +Cflags.private: -DLERC_STATIC +Libs: -L${libdir} -lLerc diff --git a/lib/pkgconfig/expat.pc b/lib/pkgconfig/expat.pc new file mode 100644 index 0000000000000000000000000000000000000000..91d3f0e1fbea2017d96d28a42a9804ad8375462b --- /dev/null +++ b/lib/pkgconfig/expat.pc @@ -0,0 +1,13 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: expat +Version: 2.7.1 +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..2f86f971b74b201286f3bb6a41d83039e22c8eab --- /dev/null +++ b/lib/pkgconfig/formw.pc @@ -0,0 +1,19 @@ +# pkg-config file generated by gen-pkgconfig +# vile:makemode + +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -Wl,-O2 -Wl,--sort-common -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -Wl,-rpath-link,/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -lformw +Libs.private: +Cflags: -D_GNU_SOURCE -DNCURSES_WIDECHAR -I${includedir} -I/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/include diff --git a/lib/pkgconfig/freetype2.pc b/lib/pkgconfig/freetype2.pc new file mode 100644 index 0000000000000000000000000000000000000000..a9bf9788268fda08a9152ca10b730605c3638ac3 --- /dev/null +++ b/lib/pkgconfig/freetype2.pc @@ -0,0 +1,14 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +libdir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib +includedir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/include + +Name: FreeType 2 +URL: https://freetype.org +Description: A free, high-quality, and portable font engine. +Version: 26.2.20 +Requires: +Requires.private: zlib, libpng +Libs: -L/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -lfreetype +Libs.private: +Cflags: -I${includedir}/freetype2 diff --git a/lib/pkgconfig/gmp.pc b/lib/pkgconfig/gmp.pc new file mode 100644 index 0000000000000000000000000000000000000000..dc7cfecfcc918912a85ad3aadc148c2ccdfed177 --- /dev/null +++ b/lib/pkgconfig/gmp.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +includedir=${prefix}/include +libdir=${exec_prefix}/lib + +Name: GNU MP +Description: GNU Multiple Precision Arithmetic Library +URL: https://gmplib.org +Version: 6.3.0 +Cflags: -I${includedir} +Libs: -L${libdir} -lgmp diff --git a/lib/pkgconfig/gmpxx.pc b/lib/pkgconfig/gmpxx.pc new file mode 100644 index 0000000000000000000000000000000000000000..d070f25b660d4a48509fc384009fa3222f663711 --- /dev/null +++ b/lib/pkgconfig/gmpxx.pc @@ -0,0 +1,12 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +includedir=${prefix}/include +libdir=${exec_prefix}/lib + +Name: GNU MP C++ +Description: GNU Multiple Precision Arithmetic Library (C++ bindings) +URL: https://gmplib.org +Version: 6.3.0 +Requires: gmp +Cflags: -I${includedir} +Libs: -L${libdir} -lgmpxx diff --git a/lib/pkgconfig/gnutls.pc b/lib/pkgconfig/gnutls.pc new file mode 100644 index 0000000000000000000000000000000000000000..bf6f14cdf6d84081a29fcad674c747c0ed934321 --- /dev/null +++ b/lib/pkgconfig/gnutls.pc @@ -0,0 +1,24 @@ +# Process this file with autoconf to produce a pkg-config metadata file. + +# Copyright (C) 2004-2012 Free Software Foundation, Inc. + +# Copying and distribution of this file, with or without modification, +# are permitted in any medium without royalty provided the copyright +# notice and this notice are preserved. This file is offered as-is, +# without any warranty. + +# Author: Simon Josefsson + +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: GnuTLS +Description: Transport Security Layer implementation for the GNU system +URL: https://www.gnutls.org/ +Version: 3.6.15 +Libs: -L${libdir} -lgnutls +Libs.private: -pthread -lgmp -lunistring -latomic +Requires.private: nettle, hogweed, libtasn1, libidn2 +Cflags: -I${includedir} diff --git a/lib/pkgconfig/history.pc b/lib/pkgconfig/history.pc new file mode 100644 index 0000000000000000000000000000000000000000..ade33474af7c3559493998320748620812841b86 --- /dev/null +++ b/lib/pkgconfig/history.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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/hogweed.pc b/lib/pkgconfig/hogweed.pc new file mode 100644 index 0000000000000000000000000000000000000000..1d2c1bef3b1a06dc968b52dfb4d8c1d2596cecb1 --- /dev/null +++ b/lib/pkgconfig/hogweed.pc @@ -0,0 +1,19 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib +includedir=${prefix}/include + +# Uses Requires.private and Libs.private, under the assumption that +# when using shared libraries, the ELF dependencies from libhogweed.so +# to nettle and gmp work. + +Name: Hogweed +Description: Nettle low-level cryptographic library (public-key algorithms) +URL: http://www.lysator.liu.se/~nisse/nettle +Version: 3.7.3 +Requires: # nettle +Requires.private: nettle +Libs: -L${libdir} -lhogweed # -lgmp +Libs.private: -lgmp +Cflags: -I${includedir} + diff --git a/lib/pkgconfig/lcms2.pc b/lib/pkgconfig/lcms2.pc new file mode 100644 index 0000000000000000000000000000000000000000..129decfe1a7073a730bacad1e62f671820fd1915 --- /dev/null +++ b/lib/pkgconfig/lcms2.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: lcms2 +Description: LCMS Color Management Library +Version: 2.16 +Libs: -L${libdir} -llcms2 +Libs.private: -lm -lpthread +Cflags: -I${includedir} diff --git a/lib/pkgconfig/libavcodec.pc b/lib/pkgconfig/libavcodec.pc new file mode 100644 index 0000000000000000000000000000000000000000..5974d00d13361694c0b1209d2c262e1d16a48e78 --- /dev/null +++ b/lib/pkgconfig/libavcodec.pc @@ -0,0 +1,14 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib +includedir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/include + +Name: libavcodec +Description: FFmpeg codec library +Version: 58.91.100 +Requires: +Requires.private: libswresample >= 3.7.100, libavutil >= 56.51.100 +Conflicts: +Libs: -L${libdir} -lavcodec +Libs.private: -pthread -liconv -lm -L/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -lz -lmp3lame -lm -L/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -lopenh264 +Cflags: -I${includedir} diff --git a/lib/pkgconfig/libavdevice.pc b/lib/pkgconfig/libavdevice.pc new file mode 100644 index 0000000000000000000000000000000000000000..6b8521cf5fb4a56729cf49967d9f0abcca150f77 --- /dev/null +++ b/lib/pkgconfig/libavdevice.pc @@ -0,0 +1,14 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib +includedir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/include + +Name: libavdevice +Description: FFmpeg device handling library +Version: 58.10.100 +Requires: +Requires.private: libavfilter >= 7.85.100, libswscale >= 5.7.100, libavformat >= 58.45.100, libavcodec >= 58.91.100, libswresample >= 3.7.100, libavresample >= 4.0.0, libavutil >= 56.51.100 +Conflicts: +Libs: -L${libdir} -lavdevice +Libs.private: -lm +Cflags: -I${includedir} diff --git a/lib/pkgconfig/libavfilter.pc b/lib/pkgconfig/libavfilter.pc new file mode 100644 index 0000000000000000000000000000000000000000..da6bd2c3d9110142763122cd3d953d12f851ba4a --- /dev/null +++ b/lib/pkgconfig/libavfilter.pc @@ -0,0 +1,14 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib +includedir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/include + +Name: libavfilter +Description: FFmpeg audio/video filtering library +Version: 7.85.100 +Requires: +Requires.private: libswscale >= 5.7.100, libavformat >= 58.45.100, libavcodec >= 58.91.100, libswresample >= 3.7.100, libavresample >= 4.0.0, libavutil >= 56.51.100 +Conflicts: +Libs: -L${libdir} -lavfilter +Libs.private: -pthread -lm -L/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -lfreetype +Cflags: -I${includedir} diff --git a/lib/pkgconfig/libavformat.pc b/lib/pkgconfig/libavformat.pc new file mode 100644 index 0000000000000000000000000000000000000000..05b049296b46d2c7af9e235da6209d53dca8b5e6 --- /dev/null +++ b/lib/pkgconfig/libavformat.pc @@ -0,0 +1,14 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib +includedir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/include + +Name: libavformat +Description: FFmpeg container format library +Version: 58.45.100 +Requires: +Requires.private: libavcodec >= 58.91.100, libswresample >= 3.7.100, libavutil >= 56.51.100 +Conflicts: +Libs: -L${libdir} -lavformat +Libs.private: -lm -lbz2 -L/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -lz -L/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -lgnutls +Cflags: -I${includedir} diff --git a/lib/pkgconfig/libavresample.pc b/lib/pkgconfig/libavresample.pc new file mode 100644 index 0000000000000000000000000000000000000000..5ea5ddaa0e4e1f3bce36272917038884442c2710 --- /dev/null +++ b/lib/pkgconfig/libavresample.pc @@ -0,0 +1,14 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib +includedir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/include + +Name: libavresample +Description: Libav audio resampling library +Version: 4.0.0 +Requires: +Requires.private: libavutil >= 56.51.100 +Conflicts: +Libs: -L${libdir} -lavresample +Libs.private: -lm +Cflags: -I${includedir} diff --git a/lib/pkgconfig/libavutil.pc b/lib/pkgconfig/libavutil.pc new file mode 100644 index 0000000000000000000000000000000000000000..408afb936e13ae0defaa5ec7fc4047855f4d2db2 --- /dev/null +++ b/lib/pkgconfig/libavutil.pc @@ -0,0 +1,14 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib +includedir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/include + +Name: libavutil +Description: FFmpeg utility library +Version: 56.51.100 +Requires: +Requires.private: +Conflicts: +Libs: -L${libdir} -lavutil +Libs.private: -pthread -lrt -lm +Cflags: -I${includedir} diff --git a/lib/pkgconfig/libcrypto.pc b/lib/pkgconfig/libcrypto.pc new file mode 100644 index 0000000000000000000000000000000000000000..5f551d769ec45cdca8a48f323added475fed6c00 --- /dev/null +++ b/lib/pkgconfig/libcrypto.pc @@ -0,0 +1,13 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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.2 +Libs: -L${libdir} -lcrypto +Libs.private: -ldl -pthread +Cflags: -I${includedir} diff --git a/lib/pkgconfig/libdeflate.pc b/lib/pkgconfig/libdeflate.pc new file mode 100644 index 0000000000000000000000000000000000000000..e528387bb1a37b3e08f276d11e63c981904b354d --- /dev/null +++ b/lib/pkgconfig/libdeflate.pc @@ -0,0 +1,18 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +includedir=${prefix}/include +libdir=${exec_prefix}/lib + +Name: libdeflate +Description: Fast implementation of DEFLATE, zlib, and gzip +Version: 1.22 +Libs: -L${libdir} -ldeflate +Cflags: -I${includedir} + +# Note: this library's public header allows LIBDEFLATE_DLL to be defined when +# linking to the DLL on Windows, to make __declspec(dllimport) be used. +# However, the only way to define a shared-library-only flag in a pkgconfig file +# is to use the weird workaround of unconditionally defining it in Cflags, then +# undefining it in Cflags.private. Just don't bother with this, since +# __declspec(dllimport) is optional anyway. It is a very minor performance +# optimization that is irrelevant for most use cases of libdeflate. diff --git a/lib/pkgconfig/libffi.pc b/lib/pkgconfig/libffi.pc new file mode 100644 index 0000000000000000000000000000000000000000..b5de39080e31b9c6c1bbef7f856a5f8b24cbadd8 --- /dev/null +++ b/lib/pkgconfig/libffi.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +toolexeclibdir=${libdir} +includedir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/include + +Name: libffi +Description: Library supporting Foreign Function Interfaces +Version: 3.4.6 +Libs: -L${toolexeclibdir} -lffi +Cflags: -I${includedir} diff --git a/lib/pkgconfig/libidn2.pc b/lib/pkgconfig/libidn2.pc new file mode 100644 index 0000000000000000000000000000000000000000..bd376e2913622f0186196dcf930609252d7b575f --- /dev/null +++ b/lib/pkgconfig/libidn2.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +includedir=${prefix}/include +libdir=${exec_prefix}/lib + +Name: libidn2 +Description: Library implementing IDNA2008 and TR46 +Version: 2.3.4 +Cflags: -I${includedir} +Libs: -L${libdir} -lidn2 +Libs.private: -L/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -lunistring -R/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib diff --git a/lib/pkgconfig/libjpeg.pc b/lib/pkgconfig/libjpeg.pc new file mode 100644 index 0000000000000000000000000000000000000000..643a78c8604dd30011f82c760c4bd1ae6328a696 --- /dev/null +++ b/lib/pkgconfig/libjpeg.pc @@ -0,0 +1,10 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +libdir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib +includedir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/include + +Name: libjpeg +Description: A SIMD-accelerated JPEG codec that provides the libjpeg API +Version: 2.0.0 +Libs: -L${libdir} -ljpeg +Cflags: -I${includedir} diff --git a/lib/pkgconfig/liblz4.pc b/lib/pkgconfig/liblz4.pc new file mode 100644 index 0000000000000000000000000000000000000000..252856415d5baeefbcce07b7045bde47dadb2653 --- /dev/null +++ b/lib/pkgconfig/liblz4.pc @@ -0,0 +1,14 @@ +# LZ4 - Fast LZ compression algorithm +# Copyright (C) 2011-2020, Yann Collet. +# BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) + +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: lz4 +Description: extremely fast lossless compression algorithm library +URL: http://www.lz4.org/ +Version: 1.9.4 +Libs: -L${libdir} -llz4 +Cflags: -I${includedir} diff --git a/lib/pkgconfig/liblzma.pc b/lib/pkgconfig/liblzma.pc new file mode 100644 index 0000000000000000000000000000000000000000..83ac433de418805effa6b73f77893cde4fee336c --- /dev/null +++ b/lib/pkgconfig/liblzma.pc @@ -0,0 +1,16 @@ +# SPDX-License-Identifier: 0BSD +# Author: Lasse Collin + +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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.6.4 +Cflags: -I${includedir} +Cflags.private: -DLZMA_API_STATIC +Libs: -L${libdir} -llzma +Libs.private: -pthread diff --git a/lib/pkgconfig/libopenjp2.pc b/lib/pkgconfig/libopenjp2.pc new file mode 100644 index 0000000000000000000000000000000000000000..6ff10c25ea15ba0da171cfb7ac2a8a7f63176046 --- /dev/null +++ b/lib/pkgconfig/libopenjp2.pc @@ -0,0 +1,15 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +bindir=${prefix}/bin +mandir=${prefix}/share/man +docdir=${prefix}/share/doc/openjpeg +libdir=${prefix}/lib +includedir=${prefix}/include/openjpeg-2.5 + +Name: openjp2 +Description: JPEG2000 library (Part 1 and 2) +URL: http://www.openjpeg.org/ +Version: 2.5.2 +Libs: -L${libdir} -lopenjp2 +Libs.private: -lm +Cflags: -I${includedir} +Cflags.private: -DOPJ_STATIC diff --git a/lib/pkgconfig/libpng.pc b/lib/pkgconfig/libpng.pc new file mode 100644 index 0000000000000000000000000000000000000000..3198a6490cee85e23172aefdf667d648076fa6ec --- /dev/null +++ b/lib/pkgconfig/libpng.pc @@ -0,0 +1,12 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include/libpng16 + +Name: libpng +Description: Loads and saves PNG files +Version: 1.6.39 +Requires.private: zlib +Libs: -L${libdir} -lpng16 +Libs.private: -lm -lz -lm +Cflags: -I${includedir} diff --git a/lib/pkgconfig/libpng16.pc b/lib/pkgconfig/libpng16.pc new file mode 100644 index 0000000000000000000000000000000000000000..3198a6490cee85e23172aefdf667d648076fa6ec --- /dev/null +++ b/lib/pkgconfig/libpng16.pc @@ -0,0 +1,12 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include/libpng16 + +Name: libpng +Description: Loads and saves PNG files +Version: 1.6.39 +Requires.private: zlib +Libs: -L${libdir} -lpng16 +Libs.private: -lm -lz -lm +Cflags: -I${includedir} diff --git a/lib/pkgconfig/libsharpyuv.pc b/lib/pkgconfig/libsharpyuv.pc new file mode 100644 index 0000000000000000000000000000000000000000..ebfd1b49b95872c6e6492379271570ba46af5f32 --- /dev/null +++ b/lib/pkgconfig/libsharpyuv.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include/webp + +Name: libsharpyuv +Description: Library for sharp RGB to YUV conversion +Version: 1.3.2 +Cflags: -I${includedir} +Libs: -L${libdir} -lsharpyuv +Libs.private: -lm -lpthread diff --git a/lib/pkgconfig/libsodium.pc b/lib/pkgconfig/libsodium.pc new file mode 100644 index 0000000000000000000000000000000000000000..a67135193a6b6dc7aefe8ae08e21e46ef1393c0c --- /dev/null +++ b/lib/pkgconfig/libsodium.pc @@ -0,0 +1,12 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: libsodium +Version: 1.0.18 +Description: A modern and easy-to-use crypto library + +Libs: -L${libdir} -lsodium +Libs.private: -pthread +Cflags: -I${includedir} diff --git a/lib/pkgconfig/libssl.pc b/lib/pkgconfig/libssl.pc new file mode 100644 index 0000000000000000000000000000000000000000..b761fd0f9f05b4bf0022078f188276f4df324d8f --- /dev/null +++ b/lib/pkgconfig/libssl.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: OpenSSL-libssl +Description: Secure Sockets Layer and cryptography libraries +Version: 3.5.2 +Requires.private: libcrypto +Libs: -L${libdir} -lssl +Cflags: -I${includedir} diff --git a/lib/pkgconfig/libswresample.pc b/lib/pkgconfig/libswresample.pc new file mode 100644 index 0000000000000000000000000000000000000000..afb04e6b58490599080302c92a3048a64124ca30 --- /dev/null +++ b/lib/pkgconfig/libswresample.pc @@ -0,0 +1,14 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib +includedir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/include + +Name: libswresample +Description: FFmpeg audio resampling library +Version: 3.7.100 +Requires: +Requires.private: libavutil >= 56.51.100 +Conflicts: +Libs: -L${libdir} -lswresample +Libs.private: -lm +Cflags: -I${includedir} diff --git a/lib/pkgconfig/libswscale.pc b/lib/pkgconfig/libswscale.pc new file mode 100644 index 0000000000000000000000000000000000000000..f99b49185722d024fc83a196d18b6ed792d1a9c7 --- /dev/null +++ b/lib/pkgconfig/libswscale.pc @@ -0,0 +1,14 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib +includedir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/include + +Name: libswscale +Description: FFmpeg image rescaling library +Version: 5.7.100 +Requires: +Requires.private: libavutil >= 56.51.100 +Conflicts: +Libs: -L${libdir} -lswscale +Libs.private: -lm +Cflags: -I${includedir} diff --git a/lib/pkgconfig/libtasn1.pc b/lib/pkgconfig/libtasn1.pc new file mode 100644 index 0000000000000000000000000000000000000000..c6231907a081f2c6d67ac336da0c145ecf563b9e --- /dev/null +++ b/lib/pkgconfig/libtasn1.pc @@ -0,0 +1,30 @@ +# Copyright (C) 2005-2022 Free Software Foundation, Inc. +# +# This file is part of LIBTASN1. +# +# The LIBTASN1 library is free software; you can redistribute it +# and/or modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA + +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: libtasn1 +Description: Library for ASN.1 and DER manipulation +URL: https://www.gnu.org/software/libtasn1/ +Version: 4.19.0 +Libs: -L${libdir} -ltasn1 +Cflags: -I${includedir} diff --git a/lib/pkgconfig/libtiff-4.pc b/lib/pkgconfig/libtiff-4.pc new file mode 100644 index 0000000000000000000000000000000000000000..ca4b9520f237ebbad3a4476bffc485737ab220a7 --- /dev/null +++ b/lib/pkgconfig/libtiff-4.pc @@ -0,0 +1,12 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: libtiff +Description: Tag Image File Format (TIFF) library. +Version: 4.7.0 +Libs: -L${libdir} -ltiff +Libs.private: -lwebp -lzstd -llzma -lLerc -ljpeg -ldeflate -lz -lm +Cflags: -I${includedir} +Requires.private: libwebp libzstd liblzma Lerc libjpeg libdeflate zlib diff --git a/lib/pkgconfig/libturbojpeg.pc b/lib/pkgconfig/libturbojpeg.pc new file mode 100644 index 0000000000000000000000000000000000000000..2654e82970d34433547d4b9b73b058bf2cf76a4a --- /dev/null +++ b/lib/pkgconfig/libturbojpeg.pc @@ -0,0 +1,10 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +libdir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib +includedir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/include + +Name: libturbojpeg +Description: A SIMD-accelerated JPEG codec that provides the TurboJPEG API +Version: 2.0.0 +Libs: -L${libdir} -lturbojpeg +Cflags: -I${includedir} diff --git a/lib/pkgconfig/libwebp.pc b/lib/pkgconfig/libwebp.pc new file mode 100644 index 0000000000000000000000000000000000000000..5e47c3aac7ff8aaee7115a63459148253b2257c6 --- /dev/null +++ b/lib/pkgconfig/libwebp.pc @@ -0,0 +1,12 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: libwebp +Description: Library for the WebP graphics format +Version: 1.3.2 +Requires.private: libsharpyuv +Cflags: -I${includedir} +Libs: -L${libdir} -lwebp +Libs.private: -lm -lpthread diff --git a/lib/pkgconfig/libwebpdecoder.pc b/lib/pkgconfig/libwebpdecoder.pc new file mode 100644 index 0000000000000000000000000000000000000000..c74fb665bd88a3f5c99cd561aa83df964c833dbc --- /dev/null +++ b/lib/pkgconfig/libwebpdecoder.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: libwebpdecoder +Description: Library for the WebP graphics format (decode only) +Version: 1.3.2 +Cflags: -I${includedir} +Libs: -L${libdir} -lwebpdecoder +Libs.private: -lm -lpthread diff --git a/lib/pkgconfig/libwebpdemux.pc b/lib/pkgconfig/libwebpdemux.pc new file mode 100644 index 0000000000000000000000000000000000000000..546e5e1bb3baf751d22b316fe0f0c5718f297667 --- /dev/null +++ b/lib/pkgconfig/libwebpdemux.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: libwebpdemux +Description: Library for parsing the WebP graphics format container +Version: 1.3.2 +Requires.private: libwebp >= 0.2.0 +Cflags: -I${includedir} +Libs: -L${libdir} -lwebpdemux diff --git a/lib/pkgconfig/libwebpmux.pc b/lib/pkgconfig/libwebpmux.pc new file mode 100644 index 0000000000000000000000000000000000000000..ecba0bbf86c7a502cc3075dd646c4b7cae6d661b --- /dev/null +++ b/lib/pkgconfig/libwebpmux.pc @@ -0,0 +1,12 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: libwebpmux +Description: Library for manipulating the WebP graphics format container +Version: 1.3.2 +Requires.private: libwebp >= 0.2.0 +Cflags: -I${includedir} +Libs: -L${libdir} -lwebpmux +Libs.private: -lm diff --git a/lib/pkgconfig/libzmq.pc b/lib/pkgconfig/libzmq.pc new file mode 100644 index 0000000000000000000000000000000000000000..f2f8d16f53ca527d71b463ac7957fe8d22dedd2c --- /dev/null +++ b/lib/pkgconfig/libzmq.pc @@ -0,0 +1,12 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: libzmq +Description: 0MQ c++ library +Version: 4.3.5 +Libs: -L${libdir} -lzmq +Libs.private: -lstdc++ -lpthread -lrt +Requires.private: libsodium +Cflags: -I${includedir} diff --git a/lib/pkgconfig/libzstd.pc b/lib/pkgconfig/libzstd.pc new file mode 100644 index 0000000000000000000000000000000000000000..04b42b931be890c1d66e9d8335b1eda54bbdd36a --- /dev/null +++ b/lib/pkgconfig/libzstd.pc @@ -0,0 +1,16 @@ +# ZSTD - standard compression algorithm +# Copyright (c) Meta Platforms, Inc. and affiliates. +# BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php) + +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +includedir=${prefix}/include +libdir=${exec_prefix}/lib + +Name: zstd +Description: fast lossless compression algorithm library +URL: https://facebook.github.io/zstd/ +Version: 1.5.6 +Libs: -L${libdir} -lzstd +Libs.private: -pthread +Cflags: -I${includedir} diff --git a/lib/pkgconfig/menuw.pc b/lib/pkgconfig/menuw.pc new file mode 100644 index 0000000000000000000000000000000000000000..00cfec340c3f14a544f673c32f7a8b01d2d2eb54 --- /dev/null +++ b/lib/pkgconfig/menuw.pc @@ -0,0 +1,19 @@ +# pkg-config file generated by gen-pkgconfig +# vile:makemode + +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -Wl,-O2 -Wl,--sort-common -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -Wl,-rpath-link,/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -lmenuw +Libs.private: +Cflags: -D_GNU_SOURCE -DNCURSES_WIDECHAR -I${includedir} -I/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/include diff --git a/lib/pkgconfig/mpfr.pc b/lib/pkgconfig/mpfr.pc new file mode 100644 index 0000000000000000000000000000000000000000..62aa67f4a9e47bc1a0debd927feb66febc0c47b7 --- /dev/null +++ b/lib/pkgconfig/mpfr.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: mpfr +URL: https://www.mpfr.org/ +Description: C library for multiple-precision floating-point computations +Version: 4.2.1 +Libs: -L${libdir} -lmpfr -lgmp +Cflags: -I${includedir} diff --git a/lib/pkgconfig/ncurses++w.pc b/lib/pkgconfig/ncurses++w.pc new file mode 100644 index 0000000000000000000000000000000000000000..9d7bf989de0089d4306054e7fc9184fae50e07f1 --- /dev/null +++ b/lib/pkgconfig/ncurses++w.pc @@ -0,0 +1,19 @@ +# pkg-config file generated by gen-pkgconfig +# vile:makemode + +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -Wl,-O2 -Wl,--sort-common -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -Wl,-rpath-link,/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -lncurses++w +Libs.private: +Cflags: -D_GNU_SOURCE -DNCURSES_WIDECHAR -I${includedir} -I/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/include diff --git a/lib/pkgconfig/ncursesw.pc b/lib/pkgconfig/ncursesw.pc new file mode 100644 index 0000000000000000000000000000000000000000..b95a58b0f699d291be807e222c8ed68e1ded7377 --- /dev/null +++ b/lib/pkgconfig/ncursesw.pc @@ -0,0 +1,19 @@ +# pkg-config file generated by gen-pkgconfig +# vile:makemode + +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -Wl,-O2 -Wl,--sort-common -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -Wl,-rpath-link,/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -lncursesw -ltinfow +Libs.private: +Cflags: -D_GNU_SOURCE -DNCURSES_WIDECHAR -I${includedir} -I/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/include diff --git a/lib/pkgconfig/nettle.pc b/lib/pkgconfig/nettle.pc new file mode 100644 index 0000000000000000000000000000000000000000..9c6248937ff9f6ceaeeac13f6959a131ed8c51d9 --- /dev/null +++ b/lib/pkgconfig/nettle.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib +includedir=${prefix}/include + +Name: Nettle +Description: Nettle low-level cryptographic library (symmetric algorithms) +URL: http://www.lysator.liu.se/~nisse/nettle +Version: 3.7.3 +Libs: -L${libdir} -lnettle +Cflags: -I${includedir} diff --git a/lib/pkgconfig/openh264.pc b/lib/pkgconfig/openh264.pc new file mode 100644 index 0000000000000000000000000000000000000000..62b664d04d386bd58dee0180bd9901b17f828a0e --- /dev/null +++ b/lib/pkgconfig/openh264.pc @@ -0,0 +1,10 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +libdir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib +includedir=${prefix}/include + +Name: OpenH264 +Description: OpenH264 is a codec library which supports H.264 encoding and decoding. It is suitable for use in real time applications such as WebRTC. +Version: 2.1.1 +Libs: -L${libdir} -lopenh264 +Libs.private: -lstdc++ -lpthread -lm +Cflags: -I${includedir} diff --git a/lib/pkgconfig/openssl.pc b/lib/pkgconfig/openssl.pc new file mode 100644 index 0000000000000000000000000000000000000000..920a0218cf8b85146c645ffc35b4ca43a00e4621 --- /dev/null +++ b/lib/pkgconfig/openssl.pc @@ -0,0 +1,9 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: OpenSSL +Description: Secure Sockets Layer and cryptography libraries and tools +Version: 3.5.2 +Requires: libssl libcrypto diff --git a/lib/pkgconfig/panelw.pc b/lib/pkgconfig/panelw.pc new file mode 100644 index 0000000000000000000000000000000000000000..ed8f581b7a4daa97edb2215fa97c93f1689312ca --- /dev/null +++ b/lib/pkgconfig/panelw.pc @@ -0,0 +1,19 @@ +# pkg-config file generated by gen-pkgconfig +# vile:makemode + +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -Wl,-O2 -Wl,--sort-common -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -Wl,-rpath-link,/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -lpanelw +Libs.private: +Cflags: -D_GNU_SOURCE -DNCURSES_WIDECHAR -I${includedir} -I/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/include diff --git a/lib/pkgconfig/pthread-stubs.pc b/lib/pkgconfig/pthread-stubs.pc new file mode 100644 index 0000000000000000000000000000000000000000..91764ec3eb670da61e192df73c0b84244ce26d6f --- /dev/null +++ b/lib/pkgconfig/pthread-stubs.pc @@ -0,0 +1,8 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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.10-embed.pc b/lib/pkgconfig/python-3.10-embed.pc new file mode 100644 index 0000000000000000000000000000000000000000..cfe03ad4653cec1bfb470fe0713285f8a6a0782e --- /dev/null +++ b/lib/pkgconfig/python-3.10-embed.pc @@ -0,0 +1,13 @@ +# See: man pkg-config +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: Python +Description: Embed Python into an application +Requires: +Version: 3.10 +Libs.private: -lcrypt -lpthread -ldl -lutil -lm +Libs: -L${libdir} -lpython3.10 +Cflags: -I${includedir}/python3.10 diff --git a/lib/pkgconfig/python-3.10.pc b/lib/pkgconfig/python-3.10.pc new file mode 100644 index 0000000000000000000000000000000000000000..53a8b3f835ba12ba5faec8bdd9447bbf3c0cc65f --- /dev/null +++ b/lib/pkgconfig/python-3.10.pc @@ -0,0 +1,13 @@ +# See: man pkg-config +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: Python +Description: Build a C extension for Python +Requires: +Version: 3.10 +Libs.private: -lcrypt -lpthread -ldl -lutil -lm +Libs: +Cflags: -I${includedir}/python3.10 diff --git a/lib/pkgconfig/python3-embed.pc b/lib/pkgconfig/python3-embed.pc new file mode 100644 index 0000000000000000000000000000000000000000..cfe03ad4653cec1bfb470fe0713285f8a6a0782e --- /dev/null +++ b/lib/pkgconfig/python3-embed.pc @@ -0,0 +1,13 @@ +# See: man pkg-config +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: Python +Description: Embed Python into an application +Requires: +Version: 3.10 +Libs.private: -lcrypt -lpthread -ldl -lutil -lm +Libs: -L${libdir} -lpython3.10 +Cflags: -I${includedir}/python3.10 diff --git a/lib/pkgconfig/python3.pc b/lib/pkgconfig/python3.pc new file mode 100644 index 0000000000000000000000000000000000000000..53a8b3f835ba12ba5faec8bdd9447bbf3c0cc65f --- /dev/null +++ b/lib/pkgconfig/python3.pc @@ -0,0 +1,13 @@ +# See: man pkg-config +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: Python +Description: Build a C extension for Python +Requires: +Version: 3.10 +Libs.private: -lcrypt -lpthread -ldl -lutil -lm +Libs: +Cflags: -I${includedir}/python3.10 diff --git a/lib/pkgconfig/readline.pc b/lib/pkgconfig/readline.pc new file mode 100644 index 0000000000000000000000000000000000000000..e5b1fc23128b82f5d1d9ca1825d3f6917d952f92 --- /dev/null +++ b/lib/pkgconfig/readline.pc @@ -0,0 +1,12 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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..654fc169e6ed6baf24192b06d5fd1c7b27eb4491 --- /dev/null +++ b/lib/pkgconfig/sqlite3.pc @@ -0,0 +1,13 @@ +# Package Information for pkg-config + +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: SQLite +Description: SQL database engine +Version: 3.50.2 +Libs: -L${libdir} -lsqlite3 +Libs.private: -lm -lz +Cflags: -I${includedir} diff --git a/lib/pkgconfig/tcl.pc b/lib/pkgconfig/tcl.pc new file mode 100644 index 0000000000000000000000000000000000000000..6ee02ad03ee3606bad71f34c9ff7064cc1ea22eb --- /dev/null +++ b/lib/pkgconfig/tcl.pc @@ -0,0 +1,16 @@ +# tcl pkg-config source file + +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +libdir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/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.14 +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..d98c29b270ad9eade5655047c0324d4cf8863b3b --- /dev/null +++ b/lib/pkgconfig/tinfow.pc @@ -0,0 +1,19 @@ +# pkg-config file generated by gen-pkgconfig +# vile:makemode + +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -Wl,-O2 -Wl,--sort-common -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -Wl,-rpath-link,/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -ltinfow +Libs.private: +Cflags: -D_GNU_SOURCE -DNCURSES_WIDECHAR -I${includedir} -I/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/include diff --git a/lib/pkgconfig/tk.pc b/lib/pkgconfig/tk.pc new file mode 100644 index 0000000000000000000000000000000000000000..ebe46a4d6bcccfc7e734997158b854d22cd1c7fe --- /dev/null +++ b/lib/pkgconfig/tk.pc @@ -0,0 +1,15 @@ +# tk pkg-config source file + +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +libdir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/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.14 +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..885c8ed367dc0419aceef05aaaba27c660fae2ec --- /dev/null +++ b/lib/pkgconfig/uuid.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +libdir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib +includedir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/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..7c2d5acafc532525a00a2be4fb6e7a2f78ed42a5 --- /dev/null +++ b/lib/pkgconfig/x11-xcb.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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..e8278e557286df16bceb91083805573eb30297f8 --- /dev/null +++ b/lib/pkgconfig/x11.pc @@ -0,0 +1,16 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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..6e23ec87dd096afcdea34896c2d4bd1f3c6c3c81 --- /dev/null +++ b/lib/pkgconfig/xau.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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..d5337ce72ea04e798b8ec79ae08b05dde39cf66b --- /dev/null +++ b/lib/pkgconfig/xcb-composite.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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..e0dc2f1c33d6e066680ed2b123c3f8c61401007d --- /dev/null +++ b/lib/pkgconfig/xcb-damage.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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..da45232afc9641a0627b38e3d9300e34818c02df --- /dev/null +++ b/lib/pkgconfig/xcb-dbe.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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..cb6da1f39cc6a74e2730b5b0b81acd2fcfb2ed73 --- /dev/null +++ b/lib/pkgconfig/xcb-dpms.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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..4b9d9ab34f1458176dee6924bb57445b6924c89e --- /dev/null +++ b/lib/pkgconfig/xcb-dri2.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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..38261820534eda4814de69b09b547b1e5f2150da --- /dev/null +++ b/lib/pkgconfig/xcb-dri3.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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..a43d570ef1b1b9f46acf217dece3919aeab2c8c2 --- /dev/null +++ b/lib/pkgconfig/xcb-glx.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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..75a086b57a85c3934ef94cf8d9cfa8a094c25724 --- /dev/null +++ b/lib/pkgconfig/xcb-present.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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..3ce68ce6b19450b40a580124157e2ba79c7f0b44 --- /dev/null +++ b/lib/pkgconfig/xcb-randr.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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..77d21d0230647ee6003588b3a3845c8510b95eb0 --- /dev/null +++ b/lib/pkgconfig/xcb-record.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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..e1ae518741106106ac451e998b4d43faaef964d7 --- /dev/null +++ b/lib/pkgconfig/xcb-render.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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..6b74bbe34f61bbafc1a4250bb97f2810506e3094 --- /dev/null +++ b/lib/pkgconfig/xcb-res.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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..c2cd21d27d90e35e9179dcbccf0dab250f34a656 --- /dev/null +++ b/lib/pkgconfig/xcb-screensaver.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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..abae4340e1f52f9bd19c02e4c4d6ab8d31217bb1 --- /dev/null +++ b/lib/pkgconfig/xcb-shape.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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..39725f327893ef789d6b1f5d72ffcb531d01a342 --- /dev/null +++ b/lib/pkgconfig/xcb-shm.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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..57bb1695d5396191ea0d593d0a4c327f217f1950 --- /dev/null +++ b/lib/pkgconfig/xcb-sync.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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..b587568492ccaa07e31a0c37dd8befaf8d78f325 --- /dev/null +++ b/lib/pkgconfig/xcb-xf86dri.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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..6301624cc97fb2a2ca15a3dc724b72e24fa2958d --- /dev/null +++ b/lib/pkgconfig/xcb-xfixes.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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..5644ac8ed03c5e36360e91b3753b40e03d6d156f --- /dev/null +++ b/lib/pkgconfig/xcb-xinerama.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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..5e0e606c1476e0f26f901d86ea6a5d25b45500d5 --- /dev/null +++ b/lib/pkgconfig/xcb-xinput.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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..75a5b44c0b0985c4494427a757aa8731c96cbd89 --- /dev/null +++ b/lib/pkgconfig/xcb-xkb.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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..a7f5ead1b6faf9d52941881bd9049641ee67c36f --- /dev/null +++ b/lib/pkgconfig/xcb-xtest.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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..7e8f357f1a1ecb33d76937312b9cc1d3289c75f0 --- /dev/null +++ b/lib/pkgconfig/xcb-xv.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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..a8b8b9baeea715a0291ea10fc1fb2055054455b5 --- /dev/null +++ b/lib/pkgconfig/xcb-xvmc.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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..40cf01cda4ecab5ce95459e4f5fc9135a989cb09 --- /dev/null +++ b/lib/pkgconfig/xcb.pc @@ -0,0 +1,13 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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..590da01e6948ef0daab813611138abd4130f6e9f --- /dev/null +++ b/lib/pkgconfig/xdmcp.pc @@ -0,0 +1,11 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +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/yaml-0.1.pc b/lib/pkgconfig/yaml-0.1.pc new file mode 100644 index 0000000000000000000000000000000000000000..0e52df7dd0ef3dbeab7f334d70d38f959e6a3cdf --- /dev/null +++ b/lib/pkgconfig/yaml-0.1.pc @@ -0,0 +1,10 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=${prefix} +includedir=${prefix}/include +libdir=${exec_prefix}/lib + +Name: LibYAML +Description: Library to parse and emit YAML +Version: 0.2.5 +Cflags: -I${includedir} +Libs: -L${libdir} -lyaml diff --git a/lib/pkgconfig/zlib.pc b/lib/pkgconfig/zlib.pc new file mode 100644 index 0000000000000000000000000000000000000000..f25d213900ae58a629850559044bec97d2d6ddce --- /dev/null +++ b/lib/pkgconfig/zlib.pc @@ -0,0 +1,13 @@ +prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +exec_prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe +libdir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib +sharedlibdir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib +includedir=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/include + +Name: zlib +Description: zlib compression library +Version: 1.2.13 + +Requires: +Libs: -L${libdir} -L${sharedlibdir} -lz +Cflags: -I${includedir} diff --git a/lib/python3.10/LICENSE.txt b/lib/python3.10/LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..f26bcf4d2de6eb136e31006ca3ab447d5e488adf --- /dev/null +++ b/lib/python3.10/LICENSE.txt @@ -0,0 +1,279 @@ +A. HISTORY OF THE SOFTWARE +========================== + +Python was created in the early 1990s by Guido van Rossum at Stichting +Mathematisch Centrum (CWI, see https://www.cwi.nl) in the Netherlands +as a successor of a language called ABC. Guido remains Python's +principal author, although it includes many contributions from others. + +In 1995, Guido continued his work on Python at the Corporation for +National Research Initiatives (CNRI, see https://www.cnri.reston.va.us) +in Reston, Virginia where he released several versions of the +software. + +In May 2000, Guido and the Python core development team moved to +BeOpen.com to form the BeOpen PythonLabs team. In October of the same +year, the PythonLabs team moved to Digital Creations, which became +Zope Corporation. In 2001, the Python Software Foundation (PSF, see +https://www.python.org/psf/) was formed, a non-profit organization +created specifically to own Python-related Intellectual Property. +Zope Corporation was a sponsoring member of the PSF. + +All Python releases are Open Source (see https://opensource.org for +the Open Source Definition). Historically, most, but not all, Python +releases have also been GPL-compatible; the table below summarizes +the various releases. + + Release Derived Year Owner GPL- + from compatible? (1) + + 0.9.0 thru 1.2 1991-1995 CWI yes + 1.3 thru 1.5.2 1.2 1995-1999 CNRI yes + 1.6 1.5.2 2000 CNRI no + 2.0 1.6 2000 BeOpen.com no + 1.6.1 1.6 2001 CNRI yes (2) + 2.1 2.0+1.6.1 2001 PSF no + 2.0.1 2.0+1.6.1 2001 PSF yes + 2.1.1 2.1+2.0.1 2001 PSF yes + 2.1.2 2.1.1 2002 PSF yes + 2.1.3 2.1.2 2002 PSF yes + 2.2 and above 2.1.1 2001-now PSF yes + +Footnotes: + +(1) GPL-compatible doesn't mean that we're distributing Python under + the GPL. All Python licenses, unlike the GPL, let you distribute + a modified version without making your changes open source. The + GPL-compatible licenses make it possible to combine Python with + other software that is released under the GPL; the others don't. + +(2) According to Richard Stallman, 1.6.1 is not GPL-compatible, + because its license has a choice of law clause. According to + CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1 + is "not incompatible" with the GPL. + +Thanks to the many outside volunteers who have worked under Guido's +direction to make these releases possible. + + +B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON +=============================================================== + +Python software and documentation are licensed under the +Python Software Foundation License Version 2. + +Starting with Python 3.8.6, examples, recipes, and other code in +the documentation are dual licensed under the PSF License Version 2 +and the Zero-Clause BSD license. + +Some software incorporated into Python is under different licenses. +The licenses are listed with code falling under that license. + + +PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 +-------------------------------------------- + +1. This LICENSE AGREEMENT is between the Python Software Foundation +("PSF"), and the Individual or Organization ("Licensee") accessing and +otherwise using this software ("Python") in source or binary form and +its associated documentation. + +2. Subject to the terms and conditions of this License Agreement, PSF hereby +grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, +analyze, test, perform and/or display publicly, prepare derivative works, +distribute, and otherwise use Python alone or in any derivative version, +provided, however, that PSF's License Agreement and PSF's notice of copyright, +i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Python Software Foundation; +All Rights Reserved" are retained in Python alone or in any derivative version +prepared by Licensee. + +3. In the event Licensee prepares a derivative work that is based on +or incorporates Python or any part thereof, and wants to make +the derivative work available to others as provided herein, then +Licensee hereby agrees to include in any such work a brief summary of +the changes made to Python. + +4. PSF is making Python available to Licensee on an "AS IS" +basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON +FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +6. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +7. Nothing in this License Agreement shall be deemed to create any +relationship of agency, partnership, or joint venture between PSF and +Licensee. This License Agreement does not grant permission to use PSF +trademarks or trade name in a trademark sense to endorse or promote +products or services of Licensee, or any third party. + +8. By copying, installing or otherwise using Python, Licensee +agrees to be bound by the terms and conditions of this License +Agreement. + + +BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0 +------------------------------------------- + +BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1 + +1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an +office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the +Individual or Organization ("Licensee") accessing and otherwise using +this software in source or binary form and its associated +documentation ("the Software"). + +2. Subject to the terms and conditions of this BeOpen Python License +Agreement, BeOpen hereby grants Licensee a non-exclusive, +royalty-free, world-wide license to reproduce, analyze, test, perform +and/or display publicly, prepare derivative works, distribute, and +otherwise use the Software alone or in any derivative version, +provided, however, that the BeOpen Python License is retained in the +Software, alone or in any derivative version prepared by Licensee. + +3. BeOpen is making the Software available to Licensee on an "AS IS" +basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE +SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS +AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY +DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +5. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +6. This License Agreement shall be governed by and interpreted in all +respects by the law of the State of California, excluding conflict of +law provisions. Nothing in this License Agreement shall be deemed to +create any relationship of agency, partnership, or joint venture +between BeOpen and Licensee. This License Agreement does not grant +permission to use BeOpen trademarks or trade names in a trademark +sense to endorse or promote products or services of Licensee, or any +third party. As an exception, the "BeOpen Python" logos available at +http://www.pythonlabs.com/logos.html may be used according to the +permissions granted on that web page. + +7. By copying, installing or otherwise using the software, Licensee +agrees to be bound by the terms and conditions of this License +Agreement. + + +CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1 +--------------------------------------- + +1. This LICENSE AGREEMENT is between the Corporation for National +Research Initiatives, having an office at 1895 Preston White Drive, +Reston, VA 20191 ("CNRI"), and the Individual or Organization +("Licensee") accessing and otherwise using Python 1.6.1 software in +source or binary form and its associated documentation. + +2. Subject to the terms and conditions of this License Agreement, CNRI +hereby grants Licensee a nonexclusive, royalty-free, world-wide +license to reproduce, analyze, test, perform and/or display publicly, +prepare derivative works, distribute, and otherwise use Python 1.6.1 +alone or in any derivative version, provided, however, that CNRI's +License Agreement and CNRI's notice of copyright, i.e., "Copyright (c) +1995-2001 Corporation for National Research Initiatives; All Rights +Reserved" are retained in Python 1.6.1 alone or in any derivative +version prepared by Licensee. Alternately, in lieu of CNRI's License +Agreement, Licensee may substitute the following text (omitting the +quotes): "Python 1.6.1 is made available subject to the terms and +conditions in CNRI's License Agreement. This Agreement together with +Python 1.6.1 may be located on the internet using the following +unique, persistent identifier (known as a handle): 1895.22/1013. This +Agreement may also be obtained from a proxy server on the internet +using the following URL: http://hdl.handle.net/1895.22/1013". + +3. In the event Licensee prepares a derivative work that is based on +or incorporates Python 1.6.1 or any part thereof, and wants to make +the derivative work available to others as provided herein, then +Licensee hereby agrees to include in any such work a brief summary of +the changes made to Python 1.6.1. + +4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" +basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON +1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +6. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +7. This License Agreement shall be governed by the federal +intellectual property law of the United States, including without +limitation the federal copyright law, and, to the extent such +U.S. federal law does not apply, by the law of the Commonwealth of +Virginia, excluding Virginia's conflict of law provisions. +Notwithstanding the foregoing, with regard to derivative works based +on Python 1.6.1 that incorporate non-separable material that was +previously distributed under the GNU General Public License (GPL), the +law of the Commonwealth of Virginia shall govern this License +Agreement only as to issues arising under or with respect to +Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this +License Agreement shall be deemed to create any relationship of +agency, partnership, or joint venture between CNRI and Licensee. This +License Agreement does not grant permission to use CNRI trademarks or +trade name in a trademark sense to endorse or promote products or +services of Licensee, or any third party. + +8. By clicking on the "ACCEPT" button where indicated, or by copying, +installing or otherwise using Python 1.6.1, Licensee agrees to be +bound by the terms and conditions of this License Agreement. + + ACCEPT + + +CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2 +-------------------------------------------------- + +Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, +The Netherlands. 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 Stichting Mathematisch +Centrum or CWI not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO +THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM 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. + +ZERO-CLAUSE BSD LICENSE FOR CODE IN THE PYTHON DOCUMENTATION +---------------------------------------------------------------------- + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +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. diff --git a/lib/python3.10/__future__.py b/lib/python3.10/__future__.py new file mode 100644 index 0000000000000000000000000000000000000000..97dc90c6e4644a71cd19683e31c8624ea3184824 --- /dev/null +++ b/lib/python3.10/__future__.py @@ -0,0 +1,147 @@ +"""Record of phased-in incompatible language changes. + +Each line is of the form: + + FeatureName = "_Feature(" OptionalRelease "," MandatoryRelease "," + CompilerFlag ")" + +where, normally, OptionalRelease < MandatoryRelease, and both are 5-tuples +of the same form as sys.version_info: + + (PY_MAJOR_VERSION, # the 2 in 2.1.0a3; an int + PY_MINOR_VERSION, # the 1; an int + PY_MICRO_VERSION, # the 0; an int + PY_RELEASE_LEVEL, # "alpha", "beta", "candidate" or "final"; string + PY_RELEASE_SERIAL # the 3; an int + ) + +OptionalRelease records the first release in which + + from __future__ import FeatureName + +was accepted. + +In the case of MandatoryReleases that have not yet occurred, +MandatoryRelease predicts the release in which the feature will become part +of the language. + +Else MandatoryRelease records when the feature became part of the language; +in releases at or after that, modules no longer need + + from __future__ import FeatureName + +to use the feature in question, but may continue to use such imports. + +MandatoryRelease may also be None, meaning that a planned feature got +dropped. + +Instances of class _Feature have two corresponding methods, +.getOptionalRelease() and .getMandatoryRelease(). + +CompilerFlag is the (bitfield) flag that should be passed in the fourth +argument to the builtin function compile() to enable the feature in +dynamically compiled code. This flag is stored in the .compiler_flag +attribute on _Future instances. These values must match the appropriate +#defines of CO_xxx flags in Include/cpython/compile.h. + +No feature line is ever to be deleted from this file. +""" + +all_feature_names = [ + "nested_scopes", + "generators", + "division", + "absolute_import", + "with_statement", + "print_function", + "unicode_literals", + "barry_as_FLUFL", + "generator_stop", + "annotations", +] + +__all__ = ["all_feature_names"] + all_feature_names + +# The CO_xxx symbols are defined here under the same names defined in +# code.h and used by compile.h, so that an editor search will find them here. +# However, they're not exported in __all__, because they don't really belong to +# this module. +CO_NESTED = 0x0010 # nested_scopes +CO_GENERATOR_ALLOWED = 0 # generators (obsolete, was 0x1000) +CO_FUTURE_DIVISION = 0x20000 # division +CO_FUTURE_ABSOLUTE_IMPORT = 0x40000 # perform absolute imports by default +CO_FUTURE_WITH_STATEMENT = 0x80000 # with statement +CO_FUTURE_PRINT_FUNCTION = 0x100000 # print function +CO_FUTURE_UNICODE_LITERALS = 0x200000 # unicode string literals +CO_FUTURE_BARRY_AS_BDFL = 0x400000 +CO_FUTURE_GENERATOR_STOP = 0x800000 # StopIteration becomes RuntimeError in generators +CO_FUTURE_ANNOTATIONS = 0x1000000 # annotations become strings at runtime + + +class _Feature: + + def __init__(self, optionalRelease, mandatoryRelease, compiler_flag): + self.optional = optionalRelease + self.mandatory = mandatoryRelease + self.compiler_flag = compiler_flag + + def getOptionalRelease(self): + """Return first release in which this feature was recognized. + + This is a 5-tuple, of the same form as sys.version_info. + """ + return self.optional + + def getMandatoryRelease(self): + """Return release in which this feature will become mandatory. + + This is a 5-tuple, of the same form as sys.version_info, or, if + the feature was dropped, is None. + """ + return self.mandatory + + def __repr__(self): + return "_Feature" + repr((self.optional, + self.mandatory, + self.compiler_flag)) + + +nested_scopes = _Feature((2, 1, 0, "beta", 1), + (2, 2, 0, "alpha", 0), + CO_NESTED) + +generators = _Feature((2, 2, 0, "alpha", 1), + (2, 3, 0, "final", 0), + CO_GENERATOR_ALLOWED) + +division = _Feature((2, 2, 0, "alpha", 2), + (3, 0, 0, "alpha", 0), + CO_FUTURE_DIVISION) + +absolute_import = _Feature((2, 5, 0, "alpha", 1), + (3, 0, 0, "alpha", 0), + CO_FUTURE_ABSOLUTE_IMPORT) + +with_statement = _Feature((2, 5, 0, "alpha", 1), + (2, 6, 0, "alpha", 0), + CO_FUTURE_WITH_STATEMENT) + +print_function = _Feature((2, 6, 0, "alpha", 2), + (3, 0, 0, "alpha", 0), + CO_FUTURE_PRINT_FUNCTION) + +unicode_literals = _Feature((2, 6, 0, "alpha", 2), + (3, 0, 0, "alpha", 0), + CO_FUTURE_UNICODE_LITERALS) + +barry_as_FLUFL = _Feature((3, 1, 0, "alpha", 2), + (4, 0, 0, "alpha", 0), + CO_FUTURE_BARRY_AS_BDFL) + +generator_stop = _Feature((3, 5, 0, "beta", 1), + (3, 7, 0, "alpha", 0), + CO_FUTURE_GENERATOR_STOP) + +annotations = _Feature((3, 7, 0, "beta", 1), + (3, 11, 0, "alpha", 0), + CO_FUTURE_ANNOTATIONS) diff --git a/lib/python3.10/__phello__.foo.py b/lib/python3.10/__phello__.foo.py new file mode 100644 index 0000000000000000000000000000000000000000..8e8623ee1daacbd61475bb84a840813dd99da18d --- /dev/null +++ b/lib/python3.10/__phello__.foo.py @@ -0,0 +1 @@ +# This file exists as a helper for the test.test_frozen module. diff --git a/lib/python3.10/__pycache__/__future__.cpython-310.pyc b/lib/python3.10/__pycache__/__future__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4005eb4f1f309d50e444acdbebdb01df6b779008 Binary files /dev/null and b/lib/python3.10/__pycache__/__future__.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/__phello__.foo.cpython-310.pyc b/lib/python3.10/__pycache__/__phello__.foo.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5a6b165249c899eea6e761c12252d70bec38f030 Binary files /dev/null and b/lib/python3.10/__pycache__/__phello__.foo.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/_aix_support.cpython-310.pyc b/lib/python3.10/__pycache__/_aix_support.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..173cbe76cf4f2fc707838c1b4d28612f29e6035a Binary files /dev/null and b/lib/python3.10/__pycache__/_aix_support.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/_bootsubprocess.cpython-310.pyc b/lib/python3.10/__pycache__/_bootsubprocess.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4efba235046e12c0cfa112031a0dafce8d8012af Binary files /dev/null and b/lib/python3.10/__pycache__/_bootsubprocess.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/_collections_abc.cpython-310.pyc b/lib/python3.10/__pycache__/_collections_abc.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c9ce70ee5a4cbf6bf0ccb70d7a296acbcfd9b378 Binary files /dev/null and b/lib/python3.10/__pycache__/_collections_abc.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/_compat_pickle.cpython-310.pyc b/lib/python3.10/__pycache__/_compat_pickle.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f842cbc4db43d968245a201d9093a0c1f0f06866 Binary files /dev/null and b/lib/python3.10/__pycache__/_compat_pickle.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/_compression.cpython-310.pyc b/lib/python3.10/__pycache__/_compression.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b2a45826c30cbe1396615252f73680e6ddd09af1 Binary files /dev/null and b/lib/python3.10/__pycache__/_compression.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/_markupbase.cpython-310.pyc b/lib/python3.10/__pycache__/_markupbase.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..84de8039267ec33eb5701ab0a653ec001ac2e624 Binary files /dev/null and b/lib/python3.10/__pycache__/_markupbase.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/_osx_support.cpython-310.pyc b/lib/python3.10/__pycache__/_osx_support.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..add3b8c3318763c30a66bfff043858d633fa4f80 Binary files /dev/null and b/lib/python3.10/__pycache__/_osx_support.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/_py_abc.cpython-310.pyc b/lib/python3.10/__pycache__/_py_abc.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cb4d3eb8bb57036e609c04736c6fd1cc1b88a162 Binary files /dev/null and b/lib/python3.10/__pycache__/_py_abc.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/_pyio.cpython-310.pyc b/lib/python3.10/__pycache__/_pyio.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b9bac1a01f4474e926e904b115b02b4d49d02c28 Binary files /dev/null and b/lib/python3.10/__pycache__/_pyio.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/_sitebuiltins.cpython-310.pyc b/lib/python3.10/__pycache__/_sitebuiltins.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e6f54bf47ce0362c0793c73be81d0feedd828978 Binary files /dev/null and b/lib/python3.10/__pycache__/_sitebuiltins.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/_strptime.cpython-310.pyc b/lib/python3.10/__pycache__/_strptime.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7421f036affd28cb7f5a550bd0e9cc1ad51dc107 Binary files /dev/null and b/lib/python3.10/__pycache__/_strptime.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/_sysconfigdata__linux_x86_64-linux-gnu.cpython-310.pyc b/lib/python3.10/__pycache__/_sysconfigdata__linux_x86_64-linux-gnu.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..abefd48026e1499b2ee4bf9d71051ce4d239a29f Binary files /dev/null and b/lib/python3.10/__pycache__/_sysconfigdata__linux_x86_64-linux-gnu.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/_sysconfigdata_x86_64_conda_cos6_linux_gnu.cpython-310.pyc b/lib/python3.10/__pycache__/_sysconfigdata_x86_64_conda_cos6_linux_gnu.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d2d1cd75bfe5c229703aba65ef28f728891413f5 Binary files /dev/null and b/lib/python3.10/__pycache__/_sysconfigdata_x86_64_conda_cos6_linux_gnu.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/_sysconfigdata_x86_64_conda_linux_gnu.cpython-310.pyc b/lib/python3.10/__pycache__/_sysconfigdata_x86_64_conda_linux_gnu.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9e57b6a9b5dd896c852107125deea216cf4cb5b3 Binary files /dev/null and b/lib/python3.10/__pycache__/_sysconfigdata_x86_64_conda_linux_gnu.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/_threading_local.cpython-310.pyc b/lib/python3.10/__pycache__/_threading_local.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ec56442bc49ea82585dc7a1288208728719f5c2c Binary files /dev/null and b/lib/python3.10/__pycache__/_threading_local.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/_weakrefset.cpython-310.pyc b/lib/python3.10/__pycache__/_weakrefset.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ecae844c96e07f301fe56ca275915051141791b9 Binary files /dev/null and b/lib/python3.10/__pycache__/_weakrefset.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/abc.cpython-310.pyc b/lib/python3.10/__pycache__/abc.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0951655ce5fb12dd77657645a40a6c260ebdf7d6 Binary files /dev/null and b/lib/python3.10/__pycache__/abc.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/aifc.cpython-310.pyc b/lib/python3.10/__pycache__/aifc.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c20b6b8ea81bcd111d73b04d7bbaa65f5f5ce6a7 Binary files /dev/null and b/lib/python3.10/__pycache__/aifc.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/antigravity.cpython-310.pyc b/lib/python3.10/__pycache__/antigravity.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2e38556639b41b53f42ac28bb912400f0f222eb8 Binary files /dev/null and b/lib/python3.10/__pycache__/antigravity.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/argparse.cpython-310.pyc b/lib/python3.10/__pycache__/argparse.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..132dfd52c8dc3260d68c529d9cf2006be4b3a2e1 Binary files /dev/null and b/lib/python3.10/__pycache__/argparse.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/ast.cpython-310.pyc b/lib/python3.10/__pycache__/ast.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0c4caa68e46048a174c446477ae9945325cec4bd Binary files /dev/null and b/lib/python3.10/__pycache__/ast.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/asynchat.cpython-310.pyc b/lib/python3.10/__pycache__/asynchat.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6b3fb2ccf62f2870acf84adaf23facfcff85d88c Binary files /dev/null and b/lib/python3.10/__pycache__/asynchat.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/asyncore.cpython-310.pyc b/lib/python3.10/__pycache__/asyncore.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f16293a8f60c6266df539da245549addc61fb5c5 Binary files /dev/null and b/lib/python3.10/__pycache__/asyncore.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/base64.cpython-310.pyc b/lib/python3.10/__pycache__/base64.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..edcb39611d1f089cae220b917849a8109ae49362 Binary files /dev/null and b/lib/python3.10/__pycache__/base64.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/bdb.cpython-310.pyc b/lib/python3.10/__pycache__/bdb.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9f511918602437d4fb46b585f6969c331fc75f69 Binary files /dev/null and b/lib/python3.10/__pycache__/bdb.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/binhex.cpython-310.pyc b/lib/python3.10/__pycache__/binhex.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f3aa1c82b86e09ef874d0d0d12174a6c007cfda7 Binary files /dev/null and b/lib/python3.10/__pycache__/binhex.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/bisect.cpython-310.pyc b/lib/python3.10/__pycache__/bisect.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..03d664d570d1f775c72f243762f8c93516f36fb3 Binary files /dev/null and b/lib/python3.10/__pycache__/bisect.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/bz2.cpython-310.pyc b/lib/python3.10/__pycache__/bz2.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ad284006892ff55ccc3bf0957e1c6308439d2bc0 Binary files /dev/null and b/lib/python3.10/__pycache__/bz2.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/cProfile.cpython-310.pyc b/lib/python3.10/__pycache__/cProfile.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..94a0d1b5c8187b5435e4fdf4b16638e762dfffa4 Binary files /dev/null and b/lib/python3.10/__pycache__/cProfile.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/calendar.cpython-310.pyc b/lib/python3.10/__pycache__/calendar.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8889e125cb0c0a919185a95a8650dd0c65500177 Binary files /dev/null and b/lib/python3.10/__pycache__/calendar.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/cgi.cpython-310.pyc b/lib/python3.10/__pycache__/cgi.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9f1456cfb4bbd70a414ebc65d35f6896625568bc Binary files /dev/null and b/lib/python3.10/__pycache__/cgi.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/cgitb.cpython-310.pyc b/lib/python3.10/__pycache__/cgitb.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a7a3dab41f1e5b784cccb01142cab7ebb91b9acd Binary files /dev/null and b/lib/python3.10/__pycache__/cgitb.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/chunk.cpython-310.pyc b/lib/python3.10/__pycache__/chunk.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a674e60604db0ed5744a3b755b8906d1ab74afe5 Binary files /dev/null and b/lib/python3.10/__pycache__/chunk.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/cmd.cpython-310.pyc b/lib/python3.10/__pycache__/cmd.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..58104feaacb6d96875e95f0d50db660897235d54 Binary files /dev/null and b/lib/python3.10/__pycache__/cmd.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/code.cpython-310.pyc b/lib/python3.10/__pycache__/code.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b1b4938ab7e480661636baa38d9f99724a0407cd Binary files /dev/null and b/lib/python3.10/__pycache__/code.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/codecs.cpython-310.pyc b/lib/python3.10/__pycache__/codecs.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..59a25a5374a66f6a8a363b34847d485444d0c4ff Binary files /dev/null and b/lib/python3.10/__pycache__/codecs.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/codeop.cpython-310.pyc b/lib/python3.10/__pycache__/codeop.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ba18eeec1052703b287ee35c2b364051dc1e4624 Binary files /dev/null and b/lib/python3.10/__pycache__/codeop.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/colorsys.cpython-310.pyc b/lib/python3.10/__pycache__/colorsys.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..63341b98099ad69e536554868a167ea47c27fbdd Binary files /dev/null and b/lib/python3.10/__pycache__/colorsys.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/compileall.cpython-310.pyc b/lib/python3.10/__pycache__/compileall.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2d92f5bb89654c089393ffc33eebf8bf1cfe9448 Binary files /dev/null and b/lib/python3.10/__pycache__/compileall.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/configparser.cpython-310.pyc b/lib/python3.10/__pycache__/configparser.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cb681de1469ec89a1bf3c4ca89ae90a5c33e30cb Binary files /dev/null and b/lib/python3.10/__pycache__/configparser.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/contextlib.cpython-310.pyc b/lib/python3.10/__pycache__/contextlib.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7349dc8376817d6b8377decbcb7c628030ac847f Binary files /dev/null and b/lib/python3.10/__pycache__/contextlib.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/contextvars.cpython-310.pyc b/lib/python3.10/__pycache__/contextvars.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f7409423675f1227a5a85f94ad289c8bc56e2e94 Binary files /dev/null and b/lib/python3.10/__pycache__/contextvars.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/copy.cpython-310.pyc b/lib/python3.10/__pycache__/copy.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a7f23b383425e9c339f0d510fd658648857406bc Binary files /dev/null and b/lib/python3.10/__pycache__/copy.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/copyreg.cpython-310.pyc b/lib/python3.10/__pycache__/copyreg.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7e06c726d180b926c6ca6049c20f8a21649181cd Binary files /dev/null and b/lib/python3.10/__pycache__/copyreg.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/crypt.cpython-310.pyc b/lib/python3.10/__pycache__/crypt.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1b5c999919a9c66b3524eb1bae8a34d749576640 Binary files /dev/null and b/lib/python3.10/__pycache__/crypt.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/csv.cpython-310.pyc b/lib/python3.10/__pycache__/csv.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2853c3ea86b22ce74748a04db60c6b1fa50b86f2 Binary files /dev/null and b/lib/python3.10/__pycache__/csv.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/dataclasses.cpython-310.pyc b/lib/python3.10/__pycache__/dataclasses.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bb73233859b312252e12f25eb87a661448422876 Binary files /dev/null and b/lib/python3.10/__pycache__/dataclasses.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/datetime.cpython-310.pyc b/lib/python3.10/__pycache__/datetime.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..95ae40c529994abbd635d52b27448d8191618f1b Binary files /dev/null and b/lib/python3.10/__pycache__/datetime.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/decimal.cpython-310.pyc b/lib/python3.10/__pycache__/decimal.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..253f7b2b58a28475bdefd2dd3f89827b6ee96b1d Binary files /dev/null and b/lib/python3.10/__pycache__/decimal.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/difflib.cpython-310.pyc b/lib/python3.10/__pycache__/difflib.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..13a82a9697dbea2ca22782508bb626194eb2dab5 Binary files /dev/null and b/lib/python3.10/__pycache__/difflib.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/dis.cpython-310.pyc b/lib/python3.10/__pycache__/dis.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f39953ebc9a5a2f65e138dfbf7030138a851ef59 Binary files /dev/null and b/lib/python3.10/__pycache__/dis.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/doctest.cpython-310.pyc b/lib/python3.10/__pycache__/doctest.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..86140ae56fa3e40018f57d8fc6a58cd8293d700c Binary files /dev/null and b/lib/python3.10/__pycache__/doctest.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/enum.cpython-310.pyc b/lib/python3.10/__pycache__/enum.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fbca46c537622e7b689de315052560cf9031dd71 Binary files /dev/null and b/lib/python3.10/__pycache__/enum.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/filecmp.cpython-310.pyc b/lib/python3.10/__pycache__/filecmp.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c5502587a053c412ed61fca93747ac17d233393c Binary files /dev/null and b/lib/python3.10/__pycache__/filecmp.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/fileinput.cpython-310.pyc b/lib/python3.10/__pycache__/fileinput.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a19a60b843199c57af24b41129f63a686f40b74c Binary files /dev/null and b/lib/python3.10/__pycache__/fileinput.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/fnmatch.cpython-310.pyc b/lib/python3.10/__pycache__/fnmatch.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f38cc7d59695eac8ff275fc4321ef432e7c6b54e Binary files /dev/null and b/lib/python3.10/__pycache__/fnmatch.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/fractions.cpython-310.pyc b/lib/python3.10/__pycache__/fractions.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..25ab3ece142de1d570ed56abca633f7e8a9665e7 Binary files /dev/null and b/lib/python3.10/__pycache__/fractions.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/ftplib.cpython-310.pyc b/lib/python3.10/__pycache__/ftplib.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..871d609d48628afc715754b1b74eba4bd5ee7c6a Binary files /dev/null and b/lib/python3.10/__pycache__/ftplib.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/functools.cpython-310.pyc b/lib/python3.10/__pycache__/functools.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0881f37dfdaa509d51e81291a0b3dfe6b70aaab0 Binary files /dev/null and b/lib/python3.10/__pycache__/functools.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/genericpath.cpython-310.pyc b/lib/python3.10/__pycache__/genericpath.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c0081686e4bbd5c765f1eb6e51c02689fbb9b5c8 Binary files /dev/null and b/lib/python3.10/__pycache__/genericpath.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/getopt.cpython-310.pyc b/lib/python3.10/__pycache__/getopt.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..46cce0f49ddea03da4e820b37785bbe2baeb2544 Binary files /dev/null and b/lib/python3.10/__pycache__/getopt.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/getpass.cpython-310.pyc b/lib/python3.10/__pycache__/getpass.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2b84be071b67418209205c08e26146866fc7dd4f Binary files /dev/null and b/lib/python3.10/__pycache__/getpass.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/gettext.cpython-310.pyc b/lib/python3.10/__pycache__/gettext.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8fff3abfcae4ac13e0cd03c4c09a70b5b4aefef4 Binary files /dev/null and b/lib/python3.10/__pycache__/gettext.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/glob.cpython-310.pyc b/lib/python3.10/__pycache__/glob.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..025825388448acd69ca9e52e41ba27f8ac36185b Binary files /dev/null and b/lib/python3.10/__pycache__/glob.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/graphlib.cpython-310.pyc b/lib/python3.10/__pycache__/graphlib.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0426ad83b7fd621b5330fe3a6d815e82042d8ae8 Binary files /dev/null and b/lib/python3.10/__pycache__/graphlib.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/gzip.cpython-310.pyc b/lib/python3.10/__pycache__/gzip.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1a65a8a68fe9d493f0a9fe5f421da7c9b007b957 Binary files /dev/null and b/lib/python3.10/__pycache__/gzip.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/hashlib.cpython-310.pyc b/lib/python3.10/__pycache__/hashlib.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..22f9fd3e8d90c05ff34c84bd424eda4822ab453b Binary files /dev/null and b/lib/python3.10/__pycache__/hashlib.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/heapq.cpython-310.pyc b/lib/python3.10/__pycache__/heapq.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..482d7033d8428364f281e23d4162ab7fdbaf3e51 Binary files /dev/null and b/lib/python3.10/__pycache__/heapq.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/hmac.cpython-310.pyc b/lib/python3.10/__pycache__/hmac.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f3b1ebcecd87e5b6f4fecb7b95079849be6b6a44 Binary files /dev/null and b/lib/python3.10/__pycache__/hmac.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/imaplib.cpython-310.pyc b/lib/python3.10/__pycache__/imaplib.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a68e1319c3f5d77e8336f3dde16ae338a4290d69 Binary files /dev/null and b/lib/python3.10/__pycache__/imaplib.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/imghdr.cpython-310.pyc b/lib/python3.10/__pycache__/imghdr.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d7521ea4fa675ec5dfc998dab0a13098edc85b54 Binary files /dev/null and b/lib/python3.10/__pycache__/imghdr.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/imp.cpython-310.pyc b/lib/python3.10/__pycache__/imp.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1f33ea90e7a386d337046ecd9e232bf48707bc0b Binary files /dev/null and b/lib/python3.10/__pycache__/imp.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/inspect.cpython-310.pyc b/lib/python3.10/__pycache__/inspect.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d03e78f03366f9012631c25e914f92045aa4fcb3 Binary files /dev/null and b/lib/python3.10/__pycache__/inspect.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/io.cpython-310.pyc b/lib/python3.10/__pycache__/io.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..235b728e77b0b6a8bb466397f531a12a55c19783 Binary files /dev/null and b/lib/python3.10/__pycache__/io.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/ipaddress.cpython-310.pyc b/lib/python3.10/__pycache__/ipaddress.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ecdac8da999a49e66e5e2a2c61bdcae028c9c60d Binary files /dev/null and b/lib/python3.10/__pycache__/ipaddress.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/keyword.cpython-310.pyc b/lib/python3.10/__pycache__/keyword.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..12331f2189a8c4f735abe96b56179f636a585ac9 Binary files /dev/null and b/lib/python3.10/__pycache__/keyword.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/linecache.cpython-310.pyc b/lib/python3.10/__pycache__/linecache.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e3d6398f2ffc1599d086fa29923908286db9ff08 Binary files /dev/null and b/lib/python3.10/__pycache__/linecache.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/locale.cpython-310.pyc b/lib/python3.10/__pycache__/locale.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..493f9087abb657ea94069e1909d264b5150d1842 Binary files /dev/null and b/lib/python3.10/__pycache__/locale.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/lzma.cpython-310.pyc b/lib/python3.10/__pycache__/lzma.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9740983d3e0fbe1a09c9e37b3fc06520eb38ff80 Binary files /dev/null and b/lib/python3.10/__pycache__/lzma.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/mailbox.cpython-310.pyc b/lib/python3.10/__pycache__/mailbox.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a43998b3c067872d6cae19afe0a0dce956f63560 Binary files /dev/null and b/lib/python3.10/__pycache__/mailbox.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/mailcap.cpython-310.pyc b/lib/python3.10/__pycache__/mailcap.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e24081169b3e1df846a7e6566e3b160c53e7abe4 Binary files /dev/null and b/lib/python3.10/__pycache__/mailcap.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/mimetypes.cpython-310.pyc b/lib/python3.10/__pycache__/mimetypes.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8d64da1e57910d0a2af7278747e3ea60b37c4841 Binary files /dev/null and b/lib/python3.10/__pycache__/mimetypes.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/modulefinder.cpython-310.pyc b/lib/python3.10/__pycache__/modulefinder.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c8763d0a4ee66d350ef62f9797c236d175d1b120 Binary files /dev/null and b/lib/python3.10/__pycache__/modulefinder.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/netrc.cpython-310.pyc b/lib/python3.10/__pycache__/netrc.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ea548c6dc45f702b042f5eea682f2b580714ae31 Binary files /dev/null and b/lib/python3.10/__pycache__/netrc.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/nntplib.cpython-310.pyc b/lib/python3.10/__pycache__/nntplib.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f5012e8502e16abd952e374c63118d50fbb0cb8e Binary files /dev/null and b/lib/python3.10/__pycache__/nntplib.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/ntpath.cpython-310.pyc b/lib/python3.10/__pycache__/ntpath.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bf0a3ea61a0d41de1e8a93c22a4362f72e254048 Binary files /dev/null and b/lib/python3.10/__pycache__/ntpath.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/nturl2path.cpython-310.pyc b/lib/python3.10/__pycache__/nturl2path.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bcb363a121c1ab9a46fb6a748e5ed7bc054d4163 Binary files /dev/null and b/lib/python3.10/__pycache__/nturl2path.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/numbers.cpython-310.pyc b/lib/python3.10/__pycache__/numbers.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b7746459b8911ff6f01f56c7594b1dc79249f6f6 Binary files /dev/null and b/lib/python3.10/__pycache__/numbers.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/opcode.cpython-310.pyc b/lib/python3.10/__pycache__/opcode.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f7de57fc32f6a4e0b518903aafc5dd96ff40ea9d Binary files /dev/null and b/lib/python3.10/__pycache__/opcode.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/operator.cpython-310.pyc b/lib/python3.10/__pycache__/operator.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8c875f559f4c93a08aac1a301a4b5a307046ce44 Binary files /dev/null and b/lib/python3.10/__pycache__/operator.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/optparse.cpython-310.pyc b/lib/python3.10/__pycache__/optparse.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a336e8340694dc435d2ed4f991b9b1de3bed2822 Binary files /dev/null and b/lib/python3.10/__pycache__/optparse.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/os.cpython-310.pyc b/lib/python3.10/__pycache__/os.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8e205d007ba8c168243106f8a335d5580d26f0b0 Binary files /dev/null and b/lib/python3.10/__pycache__/os.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/pathlib.cpython-310.pyc b/lib/python3.10/__pycache__/pathlib.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f0b1e6d124755ce2dc68cdbee12d07a71a868383 Binary files /dev/null and b/lib/python3.10/__pycache__/pathlib.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/pdb.cpython-310.pyc b/lib/python3.10/__pycache__/pdb.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9adcd0da70e5eedc7630f3aa6d10c06040574f7e Binary files /dev/null and b/lib/python3.10/__pycache__/pdb.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/pickle.cpython-310.pyc b/lib/python3.10/__pycache__/pickle.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5f39818b03aa1ae42f74621714a2e5f909470d90 Binary files /dev/null and b/lib/python3.10/__pycache__/pickle.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/pickletools.cpython-310.pyc b/lib/python3.10/__pycache__/pickletools.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b27e260087c5d962f20d6ff6edbfd737ec216e49 Binary files /dev/null and b/lib/python3.10/__pycache__/pickletools.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/pipes.cpython-310.pyc b/lib/python3.10/__pycache__/pipes.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6053717b5fc29a29796904b8b06fa325a03f8184 Binary files /dev/null and b/lib/python3.10/__pycache__/pipes.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/pkgutil.cpython-310.pyc b/lib/python3.10/__pycache__/pkgutil.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..86c30bacd18b452543f403f6ed497d0122114a82 Binary files /dev/null and b/lib/python3.10/__pycache__/pkgutil.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/platform.cpython-310.pyc b/lib/python3.10/__pycache__/platform.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..19c70af66721cfa8370c789bb3c2f6bd877b49cb Binary files /dev/null and b/lib/python3.10/__pycache__/platform.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/plistlib.cpython-310.pyc b/lib/python3.10/__pycache__/plistlib.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..91c9428e2400c44e009f957239a7ba923f0bfd50 Binary files /dev/null and b/lib/python3.10/__pycache__/plistlib.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/poplib.cpython-310.pyc b/lib/python3.10/__pycache__/poplib.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bd1bb95dbd732c7a817142bbcc635baeb52bf67a Binary files /dev/null and b/lib/python3.10/__pycache__/poplib.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/posixpath.cpython-310.pyc b/lib/python3.10/__pycache__/posixpath.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c9d3e05cfa07f210448cdd156427fc7c2fe5cb92 Binary files /dev/null and b/lib/python3.10/__pycache__/posixpath.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/pprint.cpython-310.pyc b/lib/python3.10/__pycache__/pprint.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f557b84fa8a95fb35004b355ef1468ad4a27a6a8 Binary files /dev/null and b/lib/python3.10/__pycache__/pprint.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/profile.cpython-310.pyc b/lib/python3.10/__pycache__/profile.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..551ab888f231fa04aca5ec2818179b2de1745f07 Binary files /dev/null and b/lib/python3.10/__pycache__/profile.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/pstats.cpython-310.pyc b/lib/python3.10/__pycache__/pstats.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..416edb7ab791f408c4be48f9f444f712db5113bd Binary files /dev/null and b/lib/python3.10/__pycache__/pstats.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/pty.cpython-310.pyc b/lib/python3.10/__pycache__/pty.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dae36564bc2c03303b9da1f186962db50c477e39 Binary files /dev/null and b/lib/python3.10/__pycache__/pty.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/py_compile.cpython-310.pyc b/lib/python3.10/__pycache__/py_compile.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b8d046af23b09b92a898223acb22d930bde021da Binary files /dev/null and b/lib/python3.10/__pycache__/py_compile.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/pyclbr.cpython-310.pyc b/lib/python3.10/__pycache__/pyclbr.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9a70fe4f68a3a50322908cb5fcacd1350f619424 Binary files /dev/null and b/lib/python3.10/__pycache__/pyclbr.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/pydoc.cpython-310.pyc b/lib/python3.10/__pycache__/pydoc.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d348a66c62607b3638602107daa0be225e99a81d Binary files /dev/null and b/lib/python3.10/__pycache__/pydoc.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/queue.cpython-310.pyc b/lib/python3.10/__pycache__/queue.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..77b6529e411e2277e12914178771a9a71e0806cb Binary files /dev/null and b/lib/python3.10/__pycache__/queue.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/quopri.cpython-310.pyc b/lib/python3.10/__pycache__/quopri.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..02b4ccc1fa983d0a659da0c553a04dd2609d46d2 Binary files /dev/null and b/lib/python3.10/__pycache__/quopri.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/random.cpython-310.pyc b/lib/python3.10/__pycache__/random.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f81dea9f6a00617290b1f5e2c77a99753ce169a8 Binary files /dev/null and b/lib/python3.10/__pycache__/random.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/re.cpython-310.pyc b/lib/python3.10/__pycache__/re.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..649e00e6c83cb95064f6869ab507378e8d7c2ea2 Binary files /dev/null and b/lib/python3.10/__pycache__/re.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/reprlib.cpython-310.pyc b/lib/python3.10/__pycache__/reprlib.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4d1048c62659dedd004d8553a08a578a5039457f Binary files /dev/null and b/lib/python3.10/__pycache__/reprlib.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/rlcompleter.cpython-310.pyc b/lib/python3.10/__pycache__/rlcompleter.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..041a1c2a582067f295bb6af4a6c0cc0e7901fbd0 Binary files /dev/null and b/lib/python3.10/__pycache__/rlcompleter.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/runpy.cpython-310.pyc b/lib/python3.10/__pycache__/runpy.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5cdfb982a1f7f6d6182d9551b88d4b008ecc2eb5 Binary files /dev/null and b/lib/python3.10/__pycache__/runpy.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/sched.cpython-310.pyc b/lib/python3.10/__pycache__/sched.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2d38bfa9b8318166fb0e2cf718b849374682a98e Binary files /dev/null and b/lib/python3.10/__pycache__/sched.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/secrets.cpython-310.pyc b/lib/python3.10/__pycache__/secrets.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..587465c0e0338c46e2348f385b770edb58733679 Binary files /dev/null and b/lib/python3.10/__pycache__/secrets.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/selectors.cpython-310.pyc b/lib/python3.10/__pycache__/selectors.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2b336c6edd0ee892e9e7f684dcf8dc79468dfb05 Binary files /dev/null and b/lib/python3.10/__pycache__/selectors.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/shelve.cpython-310.pyc b/lib/python3.10/__pycache__/shelve.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..df88cef5087e8e11af8692e77bb59c856848aacc Binary files /dev/null and b/lib/python3.10/__pycache__/shelve.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/shlex.cpython-310.pyc b/lib/python3.10/__pycache__/shlex.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..63fe7db7d5dd6452a01e8d6a43d7ba081e45d3f1 Binary files /dev/null and b/lib/python3.10/__pycache__/shlex.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/shutil.cpython-310.pyc b/lib/python3.10/__pycache__/shutil.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d9bfb1a6fd0cad36f2940143c761035d816c9c1f Binary files /dev/null and b/lib/python3.10/__pycache__/shutil.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/signal.cpython-310.pyc b/lib/python3.10/__pycache__/signal.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7db89e130f008d4265cc451347647d7cb4e78f3b Binary files /dev/null and b/lib/python3.10/__pycache__/signal.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/site.cpython-310.pyc b/lib/python3.10/__pycache__/site.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..97075b7d248e3cce02d3f8c210415dc74c09b8bb Binary files /dev/null and b/lib/python3.10/__pycache__/site.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/smtpd.cpython-310.pyc b/lib/python3.10/__pycache__/smtpd.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9e624243735d8f33580a457303ba724177bf7733 Binary files /dev/null and b/lib/python3.10/__pycache__/smtpd.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/smtplib.cpython-310.pyc b/lib/python3.10/__pycache__/smtplib.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..75b53baaae899f823e9bc06c00be5c459eba13b6 Binary files /dev/null and b/lib/python3.10/__pycache__/smtplib.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/sndhdr.cpython-310.pyc b/lib/python3.10/__pycache__/sndhdr.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..78a547737385cff722282db58456e47148d34fb8 Binary files /dev/null and b/lib/python3.10/__pycache__/sndhdr.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/socket.cpython-310.pyc b/lib/python3.10/__pycache__/socket.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2683f357f20e9cf396ea957a2228bbf27548a34e Binary files /dev/null and b/lib/python3.10/__pycache__/socket.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/socketserver.cpython-310.pyc b/lib/python3.10/__pycache__/socketserver.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9c193fc9ce4372ba66d9f7f18064c8d2f762754e Binary files /dev/null and b/lib/python3.10/__pycache__/socketserver.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/sre_compile.cpython-310.pyc b/lib/python3.10/__pycache__/sre_compile.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cae4ef24d7d64e45d03f15951b8239306c4488c7 Binary files /dev/null and b/lib/python3.10/__pycache__/sre_compile.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/sre_constants.cpython-310.pyc b/lib/python3.10/__pycache__/sre_constants.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..28191719af75f89b56fc363a6b6d76bc8814c972 Binary files /dev/null and b/lib/python3.10/__pycache__/sre_constants.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/sre_parse.cpython-310.pyc b/lib/python3.10/__pycache__/sre_parse.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cad137e01ae1ba6a2efd5eea047735e48e09124d Binary files /dev/null and b/lib/python3.10/__pycache__/sre_parse.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/ssl.cpython-310.pyc b/lib/python3.10/__pycache__/ssl.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a7eb3cbfcaef3b01aa81194b8942cab2a05a988f Binary files /dev/null and b/lib/python3.10/__pycache__/ssl.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/stat.cpython-310.pyc b/lib/python3.10/__pycache__/stat.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..93a858830ebdd94a38d773d6bcdecf6612879c5c Binary files /dev/null and b/lib/python3.10/__pycache__/stat.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/statistics.cpython-310.pyc b/lib/python3.10/__pycache__/statistics.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f1c8157ad6dd06489951c337f6f2fa237cca14f4 Binary files /dev/null and b/lib/python3.10/__pycache__/statistics.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/string.cpython-310.pyc b/lib/python3.10/__pycache__/string.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1c5ced9166fb8685355a43f3cabffe7242c5b866 Binary files /dev/null and b/lib/python3.10/__pycache__/string.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/stringprep.cpython-310.pyc b/lib/python3.10/__pycache__/stringprep.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..81b7d44aa00ae9ef0906c13f1cf51a811c255511 Binary files /dev/null and b/lib/python3.10/__pycache__/stringprep.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/struct.cpython-310.pyc b/lib/python3.10/__pycache__/struct.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..da46e30efdfa4f4a2a0aca6d5932c5278bd088b7 Binary files /dev/null and b/lib/python3.10/__pycache__/struct.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/subprocess.cpython-310.pyc b/lib/python3.10/__pycache__/subprocess.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..73e619557f389fe89e71bc06a624546fb46a207b Binary files /dev/null and b/lib/python3.10/__pycache__/subprocess.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/sunau.cpython-310.pyc b/lib/python3.10/__pycache__/sunau.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..23938fb489748038bb9f24dd221e30a9323c4122 Binary files /dev/null and b/lib/python3.10/__pycache__/sunau.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/symtable.cpython-310.pyc b/lib/python3.10/__pycache__/symtable.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6643a78939ddf21a615dfa75d2cd0a3ce40e1fd8 Binary files /dev/null and b/lib/python3.10/__pycache__/symtable.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/sysconfig.cpython-310.pyc b/lib/python3.10/__pycache__/sysconfig.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7ac65d22faf8aeabefb74e0259472496f0db0a87 Binary files /dev/null and b/lib/python3.10/__pycache__/sysconfig.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/tabnanny.cpython-310.pyc b/lib/python3.10/__pycache__/tabnanny.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d7436236efbda404a4dd09c586e27aefe9eeff4d Binary files /dev/null and b/lib/python3.10/__pycache__/tabnanny.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/tarfile.cpython-310.pyc b/lib/python3.10/__pycache__/tarfile.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4869defd4e20200f68e1b7d1c221eca8a4378f81 Binary files /dev/null and b/lib/python3.10/__pycache__/tarfile.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/telnetlib.cpython-310.pyc b/lib/python3.10/__pycache__/telnetlib.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..013a9b6c0d154a962b2d2c3a6c0f1d1aa0fec9f6 Binary files /dev/null and b/lib/python3.10/__pycache__/telnetlib.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/tempfile.cpython-310.pyc b/lib/python3.10/__pycache__/tempfile.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ede18d82b17b3c5ff96e7d1d095c31ae6f87c446 Binary files /dev/null and b/lib/python3.10/__pycache__/tempfile.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/textwrap.cpython-310.pyc b/lib/python3.10/__pycache__/textwrap.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..61cbc3b1779ada705ed0781785c75327d019598d Binary files /dev/null and b/lib/python3.10/__pycache__/textwrap.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/this.cpython-310.pyc b/lib/python3.10/__pycache__/this.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5bbf00732cd4d42630ecdfc180b1d3d3249a3488 Binary files /dev/null and b/lib/python3.10/__pycache__/this.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/threading.cpython-310.pyc b/lib/python3.10/__pycache__/threading.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..30308a5c518f1eec9465dd339a1b9d2c783f2453 Binary files /dev/null and b/lib/python3.10/__pycache__/threading.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/timeit.cpython-310.pyc b/lib/python3.10/__pycache__/timeit.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..41e5985a0013233de1f0ab35335cded5ef077d31 Binary files /dev/null and b/lib/python3.10/__pycache__/timeit.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/token.cpython-310.pyc b/lib/python3.10/__pycache__/token.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bd9c21ddae72b1e3df8698b32379015395acf3ea Binary files /dev/null and b/lib/python3.10/__pycache__/token.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/tokenize.cpython-310.pyc b/lib/python3.10/__pycache__/tokenize.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..52c93e9988f775d509d60396984e32ad694a3c3b Binary files /dev/null and b/lib/python3.10/__pycache__/tokenize.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/trace.cpython-310.pyc b/lib/python3.10/__pycache__/trace.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4859ffc00be9dbdba52626fe88696569ceb8fd9f Binary files /dev/null and b/lib/python3.10/__pycache__/trace.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/traceback.cpython-310.pyc b/lib/python3.10/__pycache__/traceback.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5d5d4ec86b72f4b69057677973d8b2cfc178d2d9 Binary files /dev/null and b/lib/python3.10/__pycache__/traceback.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/tracemalloc.cpython-310.pyc b/lib/python3.10/__pycache__/tracemalloc.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c7ef6e3c7b1b34b0153dcaabfbcd62186c917720 Binary files /dev/null and b/lib/python3.10/__pycache__/tracemalloc.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/tty.cpython-310.pyc b/lib/python3.10/__pycache__/tty.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7b573977d8e287e57c85224387a11869b8b70ab8 Binary files /dev/null and b/lib/python3.10/__pycache__/tty.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/types.cpython-310.pyc b/lib/python3.10/__pycache__/types.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2bf7ab75664f3e75ffb63491b259135d802e58b1 Binary files /dev/null and b/lib/python3.10/__pycache__/types.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/typing.cpython-310.pyc b/lib/python3.10/__pycache__/typing.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..79b1aaf9b20d33831bdf7635ff32e13e48f614c3 Binary files /dev/null and b/lib/python3.10/__pycache__/typing.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/uu.cpython-310.pyc b/lib/python3.10/__pycache__/uu.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c5cbe0d54f3411b1fb9b5b3c34ff3663787341aa Binary files /dev/null and b/lib/python3.10/__pycache__/uu.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/uuid.cpython-310.pyc b/lib/python3.10/__pycache__/uuid.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1b4fdb173b5c5b682277f358e3dfb071d8604855 Binary files /dev/null and b/lib/python3.10/__pycache__/uuid.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/warnings.cpython-310.pyc b/lib/python3.10/__pycache__/warnings.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ef1541ca91b322f094003ca7876c501bcf2c99d0 Binary files /dev/null and b/lib/python3.10/__pycache__/warnings.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/wave.cpython-310.pyc b/lib/python3.10/__pycache__/wave.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..356d338b7f483d63b8cc154b84c925371b6f46e3 Binary files /dev/null and b/lib/python3.10/__pycache__/wave.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/weakref.cpython-310.pyc b/lib/python3.10/__pycache__/weakref.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c3cd00feddab92e10cba3bfa0d66f6a2bc2fc60d Binary files /dev/null and b/lib/python3.10/__pycache__/weakref.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/webbrowser.cpython-310.pyc b/lib/python3.10/__pycache__/webbrowser.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a5070df4259e4f2abde607a3f727ee138bb7bab1 Binary files /dev/null and b/lib/python3.10/__pycache__/webbrowser.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/xdrlib.cpython-310.pyc b/lib/python3.10/__pycache__/xdrlib.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..347effaa06656a9ca2e2fe0a5f84f79ebc4c1779 Binary files /dev/null and b/lib/python3.10/__pycache__/xdrlib.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/zipapp.cpython-310.pyc b/lib/python3.10/__pycache__/zipapp.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0b85dc1bca23919293615aff062ea637db6d5e0b Binary files /dev/null and b/lib/python3.10/__pycache__/zipapp.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/zipfile.cpython-310.pyc b/lib/python3.10/__pycache__/zipfile.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9ad86ca3d618632f90514ecd4f75cdf6cdafef41 Binary files /dev/null and b/lib/python3.10/__pycache__/zipfile.cpython-310.pyc differ diff --git a/lib/python3.10/__pycache__/zipimport.cpython-310.pyc b/lib/python3.10/__pycache__/zipimport.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2f5cee3714e2b168e44526bdc9f4c785d650c9d4 Binary files /dev/null and b/lib/python3.10/__pycache__/zipimport.cpython-310.pyc differ diff --git a/lib/python3.10/_aix_support.py b/lib/python3.10/_aix_support.py new file mode 100644 index 0000000000000000000000000000000000000000..45504934063df87f8e77e790bdd8ae40c4d4c2aa --- /dev/null +++ b/lib/python3.10/_aix_support.py @@ -0,0 +1,89 @@ +"""Shared AIX support functions.""" + +import sys +import sysconfig + +try: + import subprocess +except ImportError: # pragma: no cover + # _aix_support is used in distutils by setup.py to build C extensions, + # before subprocess dependencies like _posixsubprocess are available. + import _bootsubprocess as subprocess + + +def _aix_tag(vrtl, bd): + # type: (List[int], int) -> str + # Infer the ABI bitwidth from maxsize (assuming 64 bit as the default) + _sz = 32 if sys.maxsize == (2**31-1) else 64 + # vrtl[version, release, technology_level] + return "aix-{:1x}{:1d}{:02d}-{:04d}-{}".format(vrtl[0], vrtl[1], vrtl[2], bd, _sz) + + +# extract version, release and technology level from a VRMF string +def _aix_vrtl(vrmf): + # type: (str) -> List[int] + v, r, tl = vrmf.split(".")[:3] + return [int(v[-1]), int(r), int(tl)] + + +def _aix_bosmp64(): + # type: () -> Tuple[str, int] + """ + Return a Tuple[str, int] e.g., ['7.1.4.34', 1806] + The fileset bos.mp64 is the AIX kernel. It's VRMF and builddate + reflect the current ABI levels of the runtime environment. + """ + # We expect all AIX systems to have lslpp installed in this location + out = subprocess.check_output(["/usr/bin/lslpp", "-Lqc", "bos.mp64"]) + out = out.decode("utf-8") + out = out.strip().split(":") # type: ignore + # Use str() and int() to help mypy see types + return (str(out[2]), int(out[-1])) + + +def aix_platform(): + # type: () -> str + """ + AIX filesets are identified by four decimal values: V.R.M.F. + V (version) and R (release) can be retreived using ``uname`` + Since 2007, starting with AIX 5.3 TL7, the M value has been + included with the fileset bos.mp64 and represents the Technology + Level (TL) of AIX. The F (Fix) value also increases, but is not + relevant for comparing releases and binary compatibility. + For binary compatibility the so-called builddate is needed. + Again, the builddate of an AIX release is associated with bos.mp64. + AIX ABI compatibility is described as guaranteed at: https://www.ibm.com/\ + support/knowledgecenter/en/ssw_aix_72/install/binary_compatability.html + + For pep425 purposes the AIX platform tag becomes: + "aix-{:1x}{:1d}{:02d}-{:04d}-{}".format(v, r, tl, builddate, bitsize) + e.g., "aix-6107-1415-32" for AIX 6.1 TL7 bd 1415, 32-bit + and, "aix-6107-1415-64" for AIX 6.1 TL7 bd 1415, 64-bit + """ + vrmf, bd = _aix_bosmp64() + return _aix_tag(_aix_vrtl(vrmf), bd) + + +# extract vrtl from the BUILD_GNU_TYPE as an int +def _aix_bgt(): + # type: () -> List[int] + gnu_type = sysconfig.get_config_var("BUILD_GNU_TYPE") + if not gnu_type: + raise ValueError("BUILD_GNU_TYPE is not defined") + return _aix_vrtl(vrmf=gnu_type) + + +def aix_buildtag(): + # type: () -> str + """ + Return the platform_tag of the system Python was built on. + """ + # AIX_BUILDDATE is defined by configure with: + # lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }' + build_date = sysconfig.get_config_var("AIX_BUILDDATE") + try: + build_date = int(build_date) + except (ValueError, TypeError): + raise ValueError(f"AIX_BUILDDATE is not defined or invalid: " + f"{build_date!r}") + return _aix_tag(_aix_bgt(), build_date) diff --git a/lib/python3.10/_bootsubprocess.py b/lib/python3.10/_bootsubprocess.py new file mode 100644 index 0000000000000000000000000000000000000000..014782f616c823bae543909e3b17dad3dccc8cd0 --- /dev/null +++ b/lib/python3.10/_bootsubprocess.py @@ -0,0 +1,97 @@ +""" +Basic subprocess implementation for POSIX which only uses os functions. Only +implement features required by setup.py to build C extension modules when +subprocess is unavailable. setup.py is not used on Windows. +""" +import os + + +# distutils.spawn used by distutils.command.build_ext +# calls subprocess.Popen().wait() +class Popen: + def __init__(self, cmd, env=None): + self._cmd = cmd + self._env = env + self.returncode = None + + def wait(self): + pid = os.fork() + if pid == 0: + # Child process + try: + if self._env is not None: + os.execve(self._cmd[0], self._cmd, self._env) + else: + os.execv(self._cmd[0], self._cmd) + finally: + os._exit(1) + else: + # Parent process + _, status = os.waitpid(pid, 0) + self.returncode = os.waitstatus_to_exitcode(status) + + return self.returncode + + +def _check_cmd(cmd): + # Use regex [a-zA-Z0-9./-]+: reject empty string, space, etc. + safe_chars = [] + for first, last in (("a", "z"), ("A", "Z"), ("0", "9")): + for ch in range(ord(first), ord(last) + 1): + safe_chars.append(chr(ch)) + safe_chars.append("./-") + safe_chars = ''.join(safe_chars) + + if isinstance(cmd, (tuple, list)): + check_strs = cmd + elif isinstance(cmd, str): + check_strs = [cmd] + else: + return False + + for arg in check_strs: + if not isinstance(arg, str): + return False + if not arg: + # reject empty string + return False + for ch in arg: + if ch not in safe_chars: + return False + + return True + + +# _aix_support used by distutil.util calls subprocess.check_output() +def check_output(cmd, **kwargs): + if kwargs: + raise NotImplementedError(repr(kwargs)) + + if not _check_cmd(cmd): + raise ValueError(f"unsupported command: {cmd!r}") + + tmp_filename = "check_output.tmp" + if not isinstance(cmd, str): + cmd = " ".join(cmd) + cmd = f"{cmd} >{tmp_filename}" + + try: + # system() spawns a shell + status = os.system(cmd) + exitcode = os.waitstatus_to_exitcode(status) + if exitcode: + raise ValueError(f"Command {cmd!r} returned non-zero " + f"exit status {exitcode!r}") + + try: + with open(tmp_filename, "rb") as fp: + stdout = fp.read() + except FileNotFoundError: + stdout = b'' + finally: + try: + os.unlink(tmp_filename) + except OSError: + pass + + return stdout diff --git a/lib/python3.10/_collections_abc.py b/lib/python3.10/_collections_abc.py new file mode 100644 index 0000000000000000000000000000000000000000..72fd633cf9ac2f94327b5c48c45b6344e8dad5aa --- /dev/null +++ b/lib/python3.10/_collections_abc.py @@ -0,0 +1,1171 @@ +# Copyright 2007 Google, Inc. All Rights Reserved. +# Licensed to PSF under a Contributor Agreement. + +"""Abstract Base Classes (ABCs) for collections, according to PEP 3119. + +Unit tests are in test_collections. +""" + +from abc import ABCMeta, abstractmethod +import sys + +GenericAlias = type(list[int]) +EllipsisType = type(...) +def _f(): pass +FunctionType = type(_f) +del _f + +__all__ = ["Awaitable", "Coroutine", + "AsyncIterable", "AsyncIterator", "AsyncGenerator", + "Hashable", "Iterable", "Iterator", "Generator", "Reversible", + "Sized", "Container", "Callable", "Collection", + "Set", "MutableSet", + "Mapping", "MutableMapping", + "MappingView", "KeysView", "ItemsView", "ValuesView", + "Sequence", "MutableSequence", + "ByteString", + ] + +# This module has been renamed from collections.abc to _collections_abc to +# speed up interpreter startup. Some of the types such as MutableMapping are +# required early but collections module imports a lot of other modules. +# See issue #19218 +__name__ = "collections.abc" + +# Private list of types that we want to register with the various ABCs +# so that they will pass tests like: +# it = iter(somebytearray) +# assert isinstance(it, Iterable) +# Note: in other implementations, these types might not be distinct +# and they may have their own implementation specific types that +# are not included on this list. +bytes_iterator = type(iter(b'')) +bytearray_iterator = type(iter(bytearray())) +#callable_iterator = ??? +dict_keyiterator = type(iter({}.keys())) +dict_valueiterator = type(iter({}.values())) +dict_itemiterator = type(iter({}.items())) +list_iterator = type(iter([])) +list_reverseiterator = type(iter(reversed([]))) +range_iterator = type(iter(range(0))) +longrange_iterator = type(iter(range(1 << 1000))) +set_iterator = type(iter(set())) +str_iterator = type(iter("")) +tuple_iterator = type(iter(())) +zip_iterator = type(iter(zip())) +## views ## +dict_keys = type({}.keys()) +dict_values = type({}.values()) +dict_items = type({}.items()) +## misc ## +mappingproxy = type(type.__dict__) +generator = type((lambda: (yield))()) +## coroutine ## +async def _coro(): pass +_coro = _coro() +coroutine = type(_coro) +_coro.close() # Prevent ResourceWarning +del _coro +## asynchronous generator ## +async def _ag(): yield +_ag = _ag() +async_generator = type(_ag) +del _ag + + +### ONE-TRICK PONIES ### + +def _check_methods(C, *methods): + mro = C.__mro__ + for method in methods: + for B in mro: + if method in B.__dict__: + if B.__dict__[method] is None: + return NotImplemented + break + else: + return NotImplemented + return True + +class Hashable(metaclass=ABCMeta): + + __slots__ = () + + @abstractmethod + def __hash__(self): + return 0 + + @classmethod + def __subclasshook__(cls, C): + if cls is Hashable: + return _check_methods(C, "__hash__") + return NotImplemented + + +class Awaitable(metaclass=ABCMeta): + + __slots__ = () + + @abstractmethod + def __await__(self): + yield + + @classmethod + def __subclasshook__(cls, C): + if cls is Awaitable: + return _check_methods(C, "__await__") + return NotImplemented + + __class_getitem__ = classmethod(GenericAlias) + + +class Coroutine(Awaitable): + + __slots__ = () + + @abstractmethod + def send(self, value): + """Send a value into the coroutine. + Return next yielded value or raise StopIteration. + """ + raise StopIteration + + @abstractmethod + def throw(self, typ, val=None, tb=None): + """Raise an exception in the coroutine. + Return next yielded value or raise StopIteration. + """ + if val is None: + if tb is None: + raise typ + val = typ() + if tb is not None: + val = val.with_traceback(tb) + raise val + + def close(self): + """Raise GeneratorExit inside coroutine. + """ + try: + self.throw(GeneratorExit) + except (GeneratorExit, StopIteration): + pass + else: + raise RuntimeError("coroutine ignored GeneratorExit") + + @classmethod + def __subclasshook__(cls, C): + if cls is Coroutine: + return _check_methods(C, '__await__', 'send', 'throw', 'close') + return NotImplemented + + +Coroutine.register(coroutine) + + +class AsyncIterable(metaclass=ABCMeta): + + __slots__ = () + + @abstractmethod + def __aiter__(self): + return AsyncIterator() + + @classmethod + def __subclasshook__(cls, C): + if cls is AsyncIterable: + return _check_methods(C, "__aiter__") + return NotImplemented + + __class_getitem__ = classmethod(GenericAlias) + + +class AsyncIterator(AsyncIterable): + + __slots__ = () + + @abstractmethod + async def __anext__(self): + """Return the next item or raise StopAsyncIteration when exhausted.""" + raise StopAsyncIteration + + def __aiter__(self): + return self + + @classmethod + def __subclasshook__(cls, C): + if cls is AsyncIterator: + return _check_methods(C, "__anext__", "__aiter__") + return NotImplemented + + +class AsyncGenerator(AsyncIterator): + + __slots__ = () + + async def __anext__(self): + """Return the next item from the asynchronous generator. + When exhausted, raise StopAsyncIteration. + """ + return await self.asend(None) + + @abstractmethod + async def asend(self, value): + """Send a value into the asynchronous generator. + Return next yielded value or raise StopAsyncIteration. + """ + raise StopAsyncIteration + + @abstractmethod + async def athrow(self, typ, val=None, tb=None): + """Raise an exception in the asynchronous generator. + Return next yielded value or raise StopAsyncIteration. + """ + if val is None: + if tb is None: + raise typ + val = typ() + if tb is not None: + val = val.with_traceback(tb) + raise val + + async def aclose(self): + """Raise GeneratorExit inside coroutine. + """ + try: + await self.athrow(GeneratorExit) + except (GeneratorExit, StopAsyncIteration): + pass + else: + raise RuntimeError("asynchronous generator ignored GeneratorExit") + + @classmethod + def __subclasshook__(cls, C): + if cls is AsyncGenerator: + return _check_methods(C, '__aiter__', '__anext__', + 'asend', 'athrow', 'aclose') + return NotImplemented + + +AsyncGenerator.register(async_generator) + + +class Iterable(metaclass=ABCMeta): + + __slots__ = () + + @abstractmethod + def __iter__(self): + while False: + yield None + + @classmethod + def __subclasshook__(cls, C): + if cls is Iterable: + return _check_methods(C, "__iter__") + return NotImplemented + + __class_getitem__ = classmethod(GenericAlias) + + +class Iterator(Iterable): + + __slots__ = () + + @abstractmethod + def __next__(self): + 'Return the next item from the iterator. When exhausted, raise StopIteration' + raise StopIteration + + def __iter__(self): + return self + + @classmethod + def __subclasshook__(cls, C): + if cls is Iterator: + return _check_methods(C, '__iter__', '__next__') + return NotImplemented + + +Iterator.register(bytes_iterator) +Iterator.register(bytearray_iterator) +#Iterator.register(callable_iterator) +Iterator.register(dict_keyiterator) +Iterator.register(dict_valueiterator) +Iterator.register(dict_itemiterator) +Iterator.register(list_iterator) +Iterator.register(list_reverseiterator) +Iterator.register(range_iterator) +Iterator.register(longrange_iterator) +Iterator.register(set_iterator) +Iterator.register(str_iterator) +Iterator.register(tuple_iterator) +Iterator.register(zip_iterator) + + +class Reversible(Iterable): + + __slots__ = () + + @abstractmethod + def __reversed__(self): + while False: + yield None + + @classmethod + def __subclasshook__(cls, C): + if cls is Reversible: + return _check_methods(C, "__reversed__", "__iter__") + return NotImplemented + + +class Generator(Iterator): + + __slots__ = () + + def __next__(self): + """Return the next item from the generator. + When exhausted, raise StopIteration. + """ + return self.send(None) + + @abstractmethod + def send(self, value): + """Send a value into the generator. + Return next yielded value or raise StopIteration. + """ + raise StopIteration + + @abstractmethod + def throw(self, typ, val=None, tb=None): + """Raise an exception in the generator. + Return next yielded value or raise StopIteration. + """ + if val is None: + if tb is None: + raise typ + val = typ() + if tb is not None: + val = val.with_traceback(tb) + raise val + + def close(self): + """Raise GeneratorExit inside generator. + """ + try: + self.throw(GeneratorExit) + except (GeneratorExit, StopIteration): + pass + else: + raise RuntimeError("generator ignored GeneratorExit") + + @classmethod + def __subclasshook__(cls, C): + if cls is Generator: + return _check_methods(C, '__iter__', '__next__', + 'send', 'throw', 'close') + return NotImplemented + + +Generator.register(generator) + + +class Sized(metaclass=ABCMeta): + + __slots__ = () + + @abstractmethod + def __len__(self): + return 0 + + @classmethod + def __subclasshook__(cls, C): + if cls is Sized: + return _check_methods(C, "__len__") + return NotImplemented + + +class Container(metaclass=ABCMeta): + + __slots__ = () + + @abstractmethod + def __contains__(self, x): + return False + + @classmethod + def __subclasshook__(cls, C): + if cls is Container: + return _check_methods(C, "__contains__") + return NotImplemented + + __class_getitem__ = classmethod(GenericAlias) + + +class Collection(Sized, Iterable, Container): + + __slots__ = () + + @classmethod + def __subclasshook__(cls, C): + if cls is Collection: + return _check_methods(C, "__len__", "__iter__", "__contains__") + return NotImplemented + + +class _CallableGenericAlias(GenericAlias): + """ Represent `Callable[argtypes, resulttype]`. + + This sets ``__args__`` to a tuple containing the flattened ``argtypes`` + followed by ``resulttype``. + + Example: ``Callable[[int, str], float]`` sets ``__args__`` to + ``(int, str, float)``. + """ + + __slots__ = () + + def __new__(cls, origin, args): + if not (isinstance(args, tuple) and len(args) == 2): + raise TypeError( + "Callable must be used as Callable[[arg, ...], result].") + t_args, t_result = args + if isinstance(t_args, list): + args = (*t_args, t_result) + elif not _is_param_expr(t_args): + raise TypeError(f"Expected a list of types, an ellipsis, " + f"ParamSpec, or Concatenate. Got {t_args}") + return super().__new__(cls, origin, args) + + @property + def __parameters__(self): + params = [] + for arg in self.__args__: + if isinstance(arg, type) and not isinstance(arg, GenericAlias): + continue + # Looks like a genericalias + if hasattr(arg, "__parameters__") and isinstance(arg.__parameters__, tuple): + params.extend(arg.__parameters__) + else: + if _is_typevarlike(arg): + params.append(arg) + return tuple(dict.fromkeys(params)) + + def __repr__(self): + if len(self.__args__) == 2 and _is_param_expr(self.__args__[0]): + return super().__repr__() + return (f'collections.abc.Callable' + f'[[{", ".join([_type_repr(a) for a in self.__args__[:-1]])}], ' + f'{_type_repr(self.__args__[-1])}]') + + def __reduce__(self): + args = self.__args__ + if not (len(args) == 2 and _is_param_expr(args[0])): + args = list(args[:-1]), args[-1] + return _CallableGenericAlias, (Callable, args) + + def __getitem__(self, item): + # Called during TypeVar substitution, returns the custom subclass + # rather than the default types.GenericAlias object. Most of the + # code is copied from typing's _GenericAlias and the builtin + # types.GenericAlias. + + # A special case in PEP 612 where if X = Callable[P, int], + # then X[int, str] == X[[int, str]]. + param_len = len(self.__parameters__) + if param_len == 0: + raise TypeError(f'{self} is not a generic class') + if not isinstance(item, tuple): + item = (item,) + if (param_len == 1 and _is_param_expr(self.__parameters__[0]) + and item and not _is_param_expr(item[0])): + item = (list(item),) + item_len = len(item) + if item_len != param_len: + raise TypeError(f'Too {"many" if item_len > param_len else "few"}' + f' arguments for {self};' + f' actual {item_len}, expected {param_len}') + subst = dict(zip(self.__parameters__, item)) + new_args = [] + for arg in self.__args__: + if isinstance(arg, type) and not isinstance(arg, GenericAlias): + new_args.append(arg) + continue + if _is_typevarlike(arg): + if _is_param_expr(arg): + arg = subst[arg] + if not _is_param_expr(arg): + raise TypeError(f"Expected a list of types, an ellipsis, " + f"ParamSpec, or Concatenate. Got {arg}") + else: + arg = subst[arg] + # Looks like a GenericAlias + elif hasattr(arg, '__parameters__') and isinstance(arg.__parameters__, tuple): + subparams = arg.__parameters__ + if subparams: + subargs = tuple(subst[x] for x in subparams) + arg = arg[subargs] + if isinstance(arg, tuple): + new_args.extend(arg) + else: + new_args.append(arg) + + # args[0] occurs due to things like Z[[int, str, bool]] from PEP 612 + if not isinstance(new_args[0], list): + t_result = new_args[-1] + t_args = new_args[:-1] + new_args = (t_args, t_result) + return _CallableGenericAlias(Callable, tuple(new_args)) + + +def _is_typevarlike(arg): + obj = type(arg) + # looks like a TypeVar/ParamSpec + return (obj.__module__ == 'typing' + and obj.__name__ in {'ParamSpec', 'TypeVar'}) + +def _is_param_expr(obj): + """Checks if obj matches either a list of types, ``...``, ``ParamSpec`` or + ``_ConcatenateGenericAlias`` from typing.py + """ + if obj is Ellipsis: + return True + if isinstance(obj, list): + return True + obj = type(obj) + names = ('ParamSpec', '_ConcatenateGenericAlias') + return obj.__module__ == 'typing' and any(obj.__name__ == name for name in names) + +def _type_repr(obj): + """Return the repr() of an object, special-casing types (internal helper). + + Copied from :mod:`typing` since collections.abc + shouldn't depend on that module. + """ + if isinstance(obj, GenericAlias): + return repr(obj) + if isinstance(obj, type): + if obj.__module__ == 'builtins': + return obj.__qualname__ + return f'{obj.__module__}.{obj.__qualname__}' + if obj is Ellipsis: + return '...' + if isinstance(obj, FunctionType): + return obj.__name__ + return repr(obj) + + +class Callable(metaclass=ABCMeta): + + __slots__ = () + + @abstractmethod + def __call__(self, *args, **kwds): + return False + + @classmethod + def __subclasshook__(cls, C): + if cls is Callable: + return _check_methods(C, "__call__") + return NotImplemented + + __class_getitem__ = classmethod(_CallableGenericAlias) + + +### SETS ### + + +class Set(Collection): + """A set is a finite, iterable container. + + This class provides concrete generic implementations of all + methods except for __contains__, __iter__ and __len__. + + To override the comparisons (presumably for speed, as the + semantics are fixed), redefine __le__ and __ge__, + then the other operations will automatically follow suit. + """ + + __slots__ = () + + def __le__(self, other): + if not isinstance(other, Set): + return NotImplemented + if len(self) > len(other): + return False + for elem in self: + if elem not in other: + return False + return True + + def __lt__(self, other): + if not isinstance(other, Set): + return NotImplemented + return len(self) < len(other) and self.__le__(other) + + def __gt__(self, other): + if not isinstance(other, Set): + return NotImplemented + return len(self) > len(other) and self.__ge__(other) + + def __ge__(self, other): + if not isinstance(other, Set): + return NotImplemented + if len(self) < len(other): + return False + for elem in other: + if elem not in self: + return False + return True + + def __eq__(self, other): + if not isinstance(other, Set): + return NotImplemented + return len(self) == len(other) and self.__le__(other) + + @classmethod + def _from_iterable(cls, it): + '''Construct an instance of the class from any iterable input. + + Must override this method if the class constructor signature + does not accept an iterable for an input. + ''' + return cls(it) + + def __and__(self, other): + if not isinstance(other, Iterable): + return NotImplemented + return self._from_iterable(value for value in other if value in self) + + __rand__ = __and__ + + def isdisjoint(self, other): + 'Return True if two sets have a null intersection.' + for value in other: + if value in self: + return False + return True + + def __or__(self, other): + if not isinstance(other, Iterable): + return NotImplemented + chain = (e for s in (self, other) for e in s) + return self._from_iterable(chain) + + __ror__ = __or__ + + def __sub__(self, other): + if not isinstance(other, Set): + if not isinstance(other, Iterable): + return NotImplemented + other = self._from_iterable(other) + return self._from_iterable(value for value in self + if value not in other) + + def __rsub__(self, other): + if not isinstance(other, Set): + if not isinstance(other, Iterable): + return NotImplemented + other = self._from_iterable(other) + return self._from_iterable(value for value in other + if value not in self) + + def __xor__(self, other): + if not isinstance(other, Set): + if not isinstance(other, Iterable): + return NotImplemented + other = self._from_iterable(other) + return (self - other) | (other - self) + + __rxor__ = __xor__ + + def _hash(self): + """Compute the hash value of a set. + + Note that we don't define __hash__: not all sets are hashable. + But if you define a hashable set type, its __hash__ should + call this function. + + This must be compatible __eq__. + + All sets ought to compare equal if they contain the same + elements, regardless of how they are implemented, and + regardless of the order of the elements; so there's not much + freedom for __eq__ or __hash__. We match the algorithm used + by the built-in frozenset type. + """ + MAX = sys.maxsize + MASK = 2 * MAX + 1 + n = len(self) + h = 1927868237 * (n + 1) + h &= MASK + for x in self: + hx = hash(x) + h ^= (hx ^ (hx << 16) ^ 89869747) * 3644798167 + h &= MASK + h ^= (h >> 11) ^ (h >> 25) + h = h * 69069 + 907133923 + h &= MASK + if h > MAX: + h -= MASK + 1 + if h == -1: + h = 590923713 + return h + + +Set.register(frozenset) + + +class MutableSet(Set): + """A mutable set is a finite, iterable container. + + This class provides concrete generic implementations of all + methods except for __contains__, __iter__, __len__, + add(), and discard(). + + To override the comparisons (presumably for speed, as the + semantics are fixed), all you have to do is redefine __le__ and + then the other operations will automatically follow suit. + """ + + __slots__ = () + + @abstractmethod + def add(self, value): + """Add an element.""" + raise NotImplementedError + + @abstractmethod + def discard(self, value): + """Remove an element. Do not raise an exception if absent.""" + raise NotImplementedError + + def remove(self, value): + """Remove an element. If not a member, raise a KeyError.""" + if value not in self: + raise KeyError(value) + self.discard(value) + + def pop(self): + """Return the popped value. Raise KeyError if empty.""" + it = iter(self) + try: + value = next(it) + except StopIteration: + raise KeyError from None + self.discard(value) + return value + + def clear(self): + """This is slow (creates N new iterators!) but effective.""" + try: + while True: + self.pop() + except KeyError: + pass + + def __ior__(self, it): + for value in it: + self.add(value) + return self + + def __iand__(self, it): + for value in (self - it): + self.discard(value) + return self + + def __ixor__(self, it): + if it is self: + self.clear() + else: + if not isinstance(it, Set): + it = self._from_iterable(it) + for value in it: + if value in self: + self.discard(value) + else: + self.add(value) + return self + + def __isub__(self, it): + if it is self: + self.clear() + else: + for value in it: + self.discard(value) + return self + + +MutableSet.register(set) + + +### MAPPINGS ### + +class Mapping(Collection): + """A Mapping is a generic container for associating key/value + pairs. + + This class provides concrete generic implementations of all + methods except for __getitem__, __iter__, and __len__. + """ + + __slots__ = () + + # Tell ABCMeta.__new__ that this class should have TPFLAGS_MAPPING set. + __abc_tpflags__ = 1 << 6 # Py_TPFLAGS_MAPPING + + @abstractmethod + def __getitem__(self, key): + raise KeyError + + def get(self, key, default=None): + 'D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.' + try: + return self[key] + except KeyError: + return default + + def __contains__(self, key): + try: + self[key] + except KeyError: + return False + else: + return True + + def keys(self): + "D.keys() -> a set-like object providing a view on D's keys" + return KeysView(self) + + def items(self): + "D.items() -> a set-like object providing a view on D's items" + return ItemsView(self) + + def values(self): + "D.values() -> an object providing a view on D's values" + return ValuesView(self) + + def __eq__(self, other): + if not isinstance(other, Mapping): + return NotImplemented + return dict(self.items()) == dict(other.items()) + + __reversed__ = None + +Mapping.register(mappingproxy) + + +class MappingView(Sized): + + __slots__ = '_mapping', + + def __init__(self, mapping): + self._mapping = mapping + + def __len__(self): + return len(self._mapping) + + def __repr__(self): + return '{0.__class__.__name__}({0._mapping!r})'.format(self) + + __class_getitem__ = classmethod(GenericAlias) + + +class KeysView(MappingView, Set): + + __slots__ = () + + @classmethod + def _from_iterable(cls, it): + return set(it) + + def __contains__(self, key): + return key in self._mapping + + def __iter__(self): + yield from self._mapping + + +KeysView.register(dict_keys) + + +class ItemsView(MappingView, Set): + + __slots__ = () + + @classmethod + def _from_iterable(cls, it): + return set(it) + + def __contains__(self, item): + key, value = item + try: + v = self._mapping[key] + except KeyError: + return False + else: + return v is value or v == value + + def __iter__(self): + for key in self._mapping: + yield (key, self._mapping[key]) + + +ItemsView.register(dict_items) + + +class ValuesView(MappingView, Collection): + + __slots__ = () + + def __contains__(self, value): + for key in self._mapping: + v = self._mapping[key] + if v is value or v == value: + return True + return False + + def __iter__(self): + for key in self._mapping: + yield self._mapping[key] + + +ValuesView.register(dict_values) + + +class MutableMapping(Mapping): + """A MutableMapping is a generic container for associating + key/value pairs. + + This class provides concrete generic implementations of all + methods except for __getitem__, __setitem__, __delitem__, + __iter__, and __len__. + """ + + __slots__ = () + + @abstractmethod + def __setitem__(self, key, value): + raise KeyError + + @abstractmethod + def __delitem__(self, key): + raise KeyError + + __marker = object() + + def pop(self, key, default=__marker): + '''D.pop(k[,d]) -> v, remove specified key and return the corresponding value. + If key is not found, d is returned if given, otherwise KeyError is raised. + ''' + try: + value = self[key] + except KeyError: + if default is self.__marker: + raise + return default + else: + del self[key] + return value + + def popitem(self): + '''D.popitem() -> (k, v), remove and return some (key, value) pair + as a 2-tuple; but raise KeyError if D is empty. + ''' + try: + key = next(iter(self)) + except StopIteration: + raise KeyError from None + value = self[key] + del self[key] + return key, value + + def clear(self): + 'D.clear() -> None. Remove all items from D.' + try: + while True: + self.popitem() + except KeyError: + pass + + def update(self, other=(), /, **kwds): + ''' D.update([E, ]**F) -> None. Update D from mapping/iterable E and F. + If E present and has a .keys() method, does: for k in E: D[k] = E[k] + If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v + In either case, this is followed by: for k, v in F.items(): D[k] = v + ''' + if isinstance(other, Mapping): + for key in other: + self[key] = other[key] + elif hasattr(other, "keys"): + for key in other.keys(): + self[key] = other[key] + else: + for key, value in other: + self[key] = value + for key, value in kwds.items(): + self[key] = value + + def setdefault(self, key, default=None): + 'D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D' + try: + return self[key] + except KeyError: + self[key] = default + return default + + +MutableMapping.register(dict) + + +### SEQUENCES ### + +class Sequence(Reversible, Collection): + """All the operations on a read-only sequence. + + Concrete subclasses must override __new__ or __init__, + __getitem__, and __len__. + """ + + __slots__ = () + + # Tell ABCMeta.__new__ that this class should have TPFLAGS_SEQUENCE set. + __abc_tpflags__ = 1 << 5 # Py_TPFLAGS_SEQUENCE + + @abstractmethod + def __getitem__(self, index): + raise IndexError + + def __iter__(self): + i = 0 + try: + while True: + v = self[i] + yield v + i += 1 + except IndexError: + return + + def __contains__(self, value): + for v in self: + if v is value or v == value: + return True + return False + + def __reversed__(self): + for i in reversed(range(len(self))): + yield self[i] + + def index(self, value, start=0, stop=None): + '''S.index(value, [start, [stop]]) -> integer -- return first index of value. + Raises ValueError if the value is not present. + + Supporting start and stop arguments is optional, but + recommended. + ''' + if start is not None and start < 0: + start = max(len(self) + start, 0) + if stop is not None and stop < 0: + stop += len(self) + + i = start + while stop is None or i < stop: + try: + v = self[i] + if v is value or v == value: + return i + except IndexError: + break + i += 1 + raise ValueError + + def count(self, value): + 'S.count(value) -> integer -- return number of occurrences of value' + return sum(1 for v in self if v is value or v == value) + +Sequence.register(tuple) +Sequence.register(str) +Sequence.register(range) +Sequence.register(memoryview) + + +class ByteString(Sequence): + """This unifies bytes and bytearray. + + XXX Should add all their methods. + """ + + __slots__ = () + +ByteString.register(bytes) +ByteString.register(bytearray) + + +class MutableSequence(Sequence): + """All the operations on a read-write sequence. + + Concrete subclasses must provide __new__ or __init__, + __getitem__, __setitem__, __delitem__, __len__, and insert(). + """ + + __slots__ = () + + @abstractmethod + def __setitem__(self, index, value): + raise IndexError + + @abstractmethod + def __delitem__(self, index): + raise IndexError + + @abstractmethod + def insert(self, index, value): + 'S.insert(index, value) -- insert value before index' + raise IndexError + + def append(self, value): + 'S.append(value) -- append value to the end of the sequence' + self.insert(len(self), value) + + def clear(self): + 'S.clear() -> None -- remove all items from S' + try: + while True: + self.pop() + except IndexError: + pass + + def reverse(self): + 'S.reverse() -- reverse *IN PLACE*' + n = len(self) + for i in range(n//2): + self[i], self[n-i-1] = self[n-i-1], self[i] + + def extend(self, values): + 'S.extend(iterable) -- extend sequence by appending elements from the iterable' + if values is self: + values = list(values) + for v in values: + self.append(v) + + def pop(self, index=-1): + '''S.pop([index]) -> item -- remove and return item at index (default last). + Raise IndexError if list is empty or index is out of range. + ''' + v = self[index] + del self[index] + return v + + def remove(self, value): + '''S.remove(value) -- remove first occurrence of value. + Raise ValueError if the value is not present. + ''' + del self[self.index(value)] + + def __iadd__(self, values): + self.extend(values) + return self + + +MutableSequence.register(list) +MutableSequence.register(bytearray) # Multiply inheriting, see ByteString diff --git a/lib/python3.10/_compat_pickle.py b/lib/python3.10/_compat_pickle.py new file mode 100644 index 0000000000000000000000000000000000000000..f68496ae639f5f880ae5f4ca0a220a29d2e354be --- /dev/null +++ b/lib/python3.10/_compat_pickle.py @@ -0,0 +1,251 @@ +# This module is used to map the old Python 2 names to the new names used in +# Python 3 for the pickle module. This needed to make pickle streams +# generated with Python 2 loadable by Python 3. + +# This is a copy of lib2to3.fixes.fix_imports.MAPPING. We cannot import +# lib2to3 and use the mapping defined there, because lib2to3 uses pickle. +# Thus, this could cause the module to be imported recursively. +IMPORT_MAPPING = { + '__builtin__' : 'builtins', + 'copy_reg': 'copyreg', + 'Queue': 'queue', + 'SocketServer': 'socketserver', + 'ConfigParser': 'configparser', + 'repr': 'reprlib', + 'tkFileDialog': 'tkinter.filedialog', + 'tkSimpleDialog': 'tkinter.simpledialog', + 'tkColorChooser': 'tkinter.colorchooser', + 'tkCommonDialog': 'tkinter.commondialog', + 'Dialog': 'tkinter.dialog', + 'Tkdnd': 'tkinter.dnd', + 'tkFont': 'tkinter.font', + 'tkMessageBox': 'tkinter.messagebox', + 'ScrolledText': 'tkinter.scrolledtext', + 'Tkconstants': 'tkinter.constants', + 'Tix': 'tkinter.tix', + 'ttk': 'tkinter.ttk', + 'Tkinter': 'tkinter', + 'markupbase': '_markupbase', + '_winreg': 'winreg', + 'thread': '_thread', + 'dummy_thread': '_dummy_thread', + 'dbhash': 'dbm.bsd', + 'dumbdbm': 'dbm.dumb', + 'dbm': 'dbm.ndbm', + 'gdbm': 'dbm.gnu', + 'xmlrpclib': 'xmlrpc.client', + 'SimpleXMLRPCServer': 'xmlrpc.server', + 'httplib': 'http.client', + 'htmlentitydefs' : 'html.entities', + 'HTMLParser' : 'html.parser', + 'Cookie': 'http.cookies', + 'cookielib': 'http.cookiejar', + 'BaseHTTPServer': 'http.server', + 'test.test_support': 'test.support', + 'commands': 'subprocess', + 'urlparse' : 'urllib.parse', + 'robotparser' : 'urllib.robotparser', + 'urllib2': 'urllib.request', + 'anydbm': 'dbm', + '_abcoll' : 'collections.abc', +} + + +# This contains rename rules that are easy to handle. We ignore the more +# complex stuff (e.g. mapping the names in the urllib and types modules). +# These rules should be run before import names are fixed. +NAME_MAPPING = { + ('__builtin__', 'xrange'): ('builtins', 'range'), + ('__builtin__', 'reduce'): ('functools', 'reduce'), + ('__builtin__', 'intern'): ('sys', 'intern'), + ('__builtin__', 'unichr'): ('builtins', 'chr'), + ('__builtin__', 'unicode'): ('builtins', 'str'), + ('__builtin__', 'long'): ('builtins', 'int'), + ('itertools', 'izip'): ('builtins', 'zip'), + ('itertools', 'imap'): ('builtins', 'map'), + ('itertools', 'ifilter'): ('builtins', 'filter'), + ('itertools', 'ifilterfalse'): ('itertools', 'filterfalse'), + ('itertools', 'izip_longest'): ('itertools', 'zip_longest'), + ('UserDict', 'IterableUserDict'): ('collections', 'UserDict'), + ('UserList', 'UserList'): ('collections', 'UserList'), + ('UserString', 'UserString'): ('collections', 'UserString'), + ('whichdb', 'whichdb'): ('dbm', 'whichdb'), + ('_socket', 'fromfd'): ('socket', 'fromfd'), + ('_multiprocessing', 'Connection'): ('multiprocessing.connection', 'Connection'), + ('multiprocessing.process', 'Process'): ('multiprocessing.context', 'Process'), + ('multiprocessing.forking', 'Popen'): ('multiprocessing.popen_fork', 'Popen'), + ('urllib', 'ContentTooShortError'): ('urllib.error', 'ContentTooShortError'), + ('urllib', 'getproxies'): ('urllib.request', 'getproxies'), + ('urllib', 'pathname2url'): ('urllib.request', 'pathname2url'), + ('urllib', 'quote_plus'): ('urllib.parse', 'quote_plus'), + ('urllib', 'quote'): ('urllib.parse', 'quote'), + ('urllib', 'unquote_plus'): ('urllib.parse', 'unquote_plus'), + ('urllib', 'unquote'): ('urllib.parse', 'unquote'), + ('urllib', 'url2pathname'): ('urllib.request', 'url2pathname'), + ('urllib', 'urlcleanup'): ('urllib.request', 'urlcleanup'), + ('urllib', 'urlencode'): ('urllib.parse', 'urlencode'), + ('urllib', 'urlopen'): ('urllib.request', 'urlopen'), + ('urllib', 'urlretrieve'): ('urllib.request', 'urlretrieve'), + ('urllib2', 'HTTPError'): ('urllib.error', 'HTTPError'), + ('urllib2', 'URLError'): ('urllib.error', 'URLError'), +} + +PYTHON2_EXCEPTIONS = ( + "ArithmeticError", + "AssertionError", + "AttributeError", + "BaseException", + "BufferError", + "BytesWarning", + "DeprecationWarning", + "EOFError", + "EnvironmentError", + "Exception", + "FloatingPointError", + "FutureWarning", + "GeneratorExit", + "IOError", + "ImportError", + "ImportWarning", + "IndentationError", + "IndexError", + "KeyError", + "KeyboardInterrupt", + "LookupError", + "MemoryError", + "NameError", + "NotImplementedError", + "OSError", + "OverflowError", + "PendingDeprecationWarning", + "ReferenceError", + "RuntimeError", + "RuntimeWarning", + # StandardError is gone in Python 3, so we map it to Exception + "StopIteration", + "SyntaxError", + "SyntaxWarning", + "SystemError", + "SystemExit", + "TabError", + "TypeError", + "UnboundLocalError", + "UnicodeDecodeError", + "UnicodeEncodeError", + "UnicodeError", + "UnicodeTranslateError", + "UnicodeWarning", + "UserWarning", + "ValueError", + "Warning", + "ZeroDivisionError", +) + +try: + WindowsError +except NameError: + pass +else: + PYTHON2_EXCEPTIONS += ("WindowsError",) + +for excname in PYTHON2_EXCEPTIONS: + NAME_MAPPING[("exceptions", excname)] = ("builtins", excname) + +MULTIPROCESSING_EXCEPTIONS = ( + 'AuthenticationError', + 'BufferTooShort', + 'ProcessError', + 'TimeoutError', +) + +for excname in MULTIPROCESSING_EXCEPTIONS: + NAME_MAPPING[("multiprocessing", excname)] = ("multiprocessing.context", excname) + +# Same, but for 3.x to 2.x +REVERSE_IMPORT_MAPPING = dict((v, k) for (k, v) in IMPORT_MAPPING.items()) +assert len(REVERSE_IMPORT_MAPPING) == len(IMPORT_MAPPING) +REVERSE_NAME_MAPPING = dict((v, k) for (k, v) in NAME_MAPPING.items()) +assert len(REVERSE_NAME_MAPPING) == len(NAME_MAPPING) + +# Non-mutual mappings. + +IMPORT_MAPPING.update({ + 'cPickle': 'pickle', + '_elementtree': 'xml.etree.ElementTree', + 'FileDialog': 'tkinter.filedialog', + 'SimpleDialog': 'tkinter.simpledialog', + 'DocXMLRPCServer': 'xmlrpc.server', + 'SimpleHTTPServer': 'http.server', + 'CGIHTTPServer': 'http.server', + # For compatibility with broken pickles saved in old Python 3 versions + 'UserDict': 'collections', + 'UserList': 'collections', + 'UserString': 'collections', + 'whichdb': 'dbm', + 'StringIO': 'io', + 'cStringIO': 'io', +}) + +REVERSE_IMPORT_MAPPING.update({ + '_bz2': 'bz2', + '_dbm': 'dbm', + '_functools': 'functools', + '_gdbm': 'gdbm', + '_pickle': 'pickle', +}) + +NAME_MAPPING.update({ + ('__builtin__', 'basestring'): ('builtins', 'str'), + ('exceptions', 'StandardError'): ('builtins', 'Exception'), + ('UserDict', 'UserDict'): ('collections', 'UserDict'), + ('socket', '_socketobject'): ('socket', 'SocketType'), +}) + +REVERSE_NAME_MAPPING.update({ + ('_functools', 'reduce'): ('__builtin__', 'reduce'), + ('tkinter.filedialog', 'FileDialog'): ('FileDialog', 'FileDialog'), + ('tkinter.filedialog', 'LoadFileDialog'): ('FileDialog', 'LoadFileDialog'), + ('tkinter.filedialog', 'SaveFileDialog'): ('FileDialog', 'SaveFileDialog'), + ('tkinter.simpledialog', 'SimpleDialog'): ('SimpleDialog', 'SimpleDialog'), + ('xmlrpc.server', 'ServerHTMLDoc'): ('DocXMLRPCServer', 'ServerHTMLDoc'), + ('xmlrpc.server', 'XMLRPCDocGenerator'): + ('DocXMLRPCServer', 'XMLRPCDocGenerator'), + ('xmlrpc.server', 'DocXMLRPCRequestHandler'): + ('DocXMLRPCServer', 'DocXMLRPCRequestHandler'), + ('xmlrpc.server', 'DocXMLRPCServer'): + ('DocXMLRPCServer', 'DocXMLRPCServer'), + ('xmlrpc.server', 'DocCGIXMLRPCRequestHandler'): + ('DocXMLRPCServer', 'DocCGIXMLRPCRequestHandler'), + ('http.server', 'SimpleHTTPRequestHandler'): + ('SimpleHTTPServer', 'SimpleHTTPRequestHandler'), + ('http.server', 'CGIHTTPRequestHandler'): + ('CGIHTTPServer', 'CGIHTTPRequestHandler'), + ('_socket', 'socket'): ('socket', '_socketobject'), +}) + +PYTHON3_OSERROR_EXCEPTIONS = ( + 'BrokenPipeError', + 'ChildProcessError', + 'ConnectionAbortedError', + 'ConnectionError', + 'ConnectionRefusedError', + 'ConnectionResetError', + 'FileExistsError', + 'FileNotFoundError', + 'InterruptedError', + 'IsADirectoryError', + 'NotADirectoryError', + 'PermissionError', + 'ProcessLookupError', + 'TimeoutError', +) + +for excname in PYTHON3_OSERROR_EXCEPTIONS: + REVERSE_NAME_MAPPING[('builtins', excname)] = ('exceptions', 'OSError') + +PYTHON3_IMPORTERROR_EXCEPTIONS = ( + 'ModuleNotFoundError', +) + +for excname in PYTHON3_IMPORTERROR_EXCEPTIONS: + REVERSE_NAME_MAPPING[('builtins', excname)] = ('exceptions', 'ImportError') diff --git a/lib/python3.10/_compression.py b/lib/python3.10/_compression.py new file mode 100644 index 0000000000000000000000000000000000000000..e8b70aa0a3e6806c0f2b60ffaf9944291abcf4c4 --- /dev/null +++ b/lib/python3.10/_compression.py @@ -0,0 +1,162 @@ +"""Internal classes used by the gzip, lzma and bz2 modules""" + +import io +import sys + +BUFFER_SIZE = io.DEFAULT_BUFFER_SIZE # Compressed data read chunk size + + +class BaseStream(io.BufferedIOBase): + """Mode-checking helper functions.""" + + def _check_not_closed(self): + if self.closed: + raise ValueError("I/O operation on closed file") + + def _check_can_read(self): + if not self.readable(): + raise io.UnsupportedOperation("File not open for reading") + + def _check_can_write(self): + if not self.writable(): + raise io.UnsupportedOperation("File not open for writing") + + def _check_can_seek(self): + if not self.readable(): + raise io.UnsupportedOperation("Seeking is only supported " + "on files open for reading") + if not self.seekable(): + raise io.UnsupportedOperation("The underlying file object " + "does not support seeking") + + +class DecompressReader(io.RawIOBase): + """Adapts the decompressor API to a RawIOBase reader API""" + + def readable(self): + return True + + def __init__(self, fp, decomp_factory, trailing_error=(), **decomp_args): + self._fp = fp + self._eof = False + self._pos = 0 # Current offset in decompressed stream + + # Set to size of decompressed stream once it is known, for SEEK_END + self._size = -1 + + # Save the decompressor factory and arguments. + # If the file contains multiple compressed streams, each + # stream will need a separate decompressor object. A new decompressor + # object is also needed when implementing a backwards seek(). + self._decomp_factory = decomp_factory + self._decomp_args = decomp_args + self._decompressor = self._decomp_factory(**self._decomp_args) + + # Exception class to catch from decompressor signifying invalid + # trailing data to ignore + self._trailing_error = trailing_error + + def close(self): + self._decompressor = None + return super().close() + + def seekable(self): + return self._fp.seekable() + + def readinto(self, b): + with memoryview(b) as view, view.cast("B") as byte_view: + data = self.read(len(byte_view)) + byte_view[:len(data)] = data + return len(data) + + def read(self, size=-1): + if size < 0: + return self.readall() + + if not size or self._eof: + return b"" + data = None # Default if EOF is encountered + # Depending on the input data, our call to the decompressor may not + # return any data. In this case, try again after reading another block. + while True: + if self._decompressor.eof: + rawblock = (self._decompressor.unused_data or + self._fp.read(BUFFER_SIZE)) + if not rawblock: + break + # Continue to next stream. + self._decompressor = self._decomp_factory( + **self._decomp_args) + try: + data = self._decompressor.decompress(rawblock, size) + except self._trailing_error: + # Trailing data isn't a valid compressed stream; ignore it. + break + else: + if self._decompressor.needs_input: + rawblock = self._fp.read(BUFFER_SIZE) + if not rawblock: + raise EOFError("Compressed file ended before the " + "end-of-stream marker was reached") + else: + rawblock = b"" + data = self._decompressor.decompress(rawblock, size) + if data: + break + if not data: + self._eof = True + self._size = self._pos + return b"" + self._pos += len(data) + return data + + def readall(self): + chunks = [] + # sys.maxsize means the max length of output buffer is unlimited, + # so that the whole input buffer can be decompressed within one + # .decompress() call. + while data := self.read(sys.maxsize): + chunks.append(data) + + return b"".join(chunks) + + # Rewind the file to the beginning of the data stream. + def _rewind(self): + self._fp.seek(0) + self._eof = False + self._pos = 0 + self._decompressor = self._decomp_factory(**self._decomp_args) + + def seek(self, offset, whence=io.SEEK_SET): + # Recalculate offset as an absolute file position. + if whence == io.SEEK_SET: + pass + elif whence == io.SEEK_CUR: + offset = self._pos + offset + elif whence == io.SEEK_END: + # Seeking relative to EOF - we need to know the file's size. + if self._size < 0: + while self.read(io.DEFAULT_BUFFER_SIZE): + pass + offset = self._size + offset + else: + raise ValueError("Invalid value for whence: {}".format(whence)) + + # Make it so that offset is the number of bytes to skip forward. + if offset < self._pos: + self._rewind() + else: + offset -= self._pos + + # Read and discard data until we reach the desired position. + while offset > 0: + data = self.read(min(io.DEFAULT_BUFFER_SIZE, offset)) + if not data: + break + offset -= len(data) + + return self._pos + + def tell(self): + """Return the current file position.""" + return self._pos diff --git a/lib/python3.10/_markupbase.py b/lib/python3.10/_markupbase.py new file mode 100644 index 0000000000000000000000000000000000000000..3ad7e279960f7e1f2bf79d89fe9b905e53f6a12b --- /dev/null +++ b/lib/python3.10/_markupbase.py @@ -0,0 +1,396 @@ +"""Shared support for scanning document type declarations in HTML and XHTML. + +This module is used as a foundation for the html.parser module. It has no +documented public API and should not be used directly. + +""" + +import re + +_declname_match = re.compile(r'[a-zA-Z][-_.a-zA-Z0-9]*\s*').match +_declstringlit_match = re.compile(r'(\'[^\']*\'|"[^"]*")\s*').match +_commentclose = re.compile(r'--\s*>') +_markedsectionclose = re.compile(r']\s*]\s*>') + +# An analysis of the MS-Word extensions is available at +# http://www.planetpublish.com/xmlarena/xap/Thursday/WordtoXML.pdf + +_msmarkedsectionclose = re.compile(r']\s*>') + +del re + + +class ParserBase: + """Parser base class which provides some common support methods used + by the SGML/HTML and XHTML parsers.""" + + def __init__(self): + if self.__class__ is ParserBase: + raise RuntimeError( + "_markupbase.ParserBase must be subclassed") + + def reset(self): + self.lineno = 1 + self.offset = 0 + + def getpos(self): + """Return current line number and offset.""" + return self.lineno, self.offset + + # Internal -- update line number and offset. This should be + # called for each piece of data exactly once, in order -- in other + # words the concatenation of all the input strings to this + # function should be exactly the entire input. + def updatepos(self, i, j): + if i >= j: + return j + rawdata = self.rawdata + nlines = rawdata.count("\n", i, j) + if nlines: + self.lineno = self.lineno + nlines + pos = rawdata.rindex("\n", i, j) # Should not fail + self.offset = j-(pos+1) + else: + self.offset = self.offset + j-i + return j + + _decl_otherchars = '' + + # Internal -- parse declaration (for use by subclasses). + def parse_declaration(self, i): + # This is some sort of declaration; in "HTML as + # deployed," this should only be the document type + # declaration (""). + # ISO 8879:1986, however, has more complex + # declaration syntax for elements in , including: + # --comment-- + # [marked section] + # name in the following list: ENTITY, DOCTYPE, ELEMENT, + # ATTLIST, NOTATION, SHORTREF, USEMAP, + # LINKTYPE, LINK, IDLINK, USELINK, SYSTEM + rawdata = self.rawdata + j = i + 2 + assert rawdata[i:j] == "": + # the empty comment + return j + 1 + if rawdata[j:j+1] in ("-", ""): + # Start of comment followed by buffer boundary, + # or just a buffer boundary. + return -1 + # A simple, practical version could look like: ((name|stringlit) S*) + '>' + n = len(rawdata) + if rawdata[j:j+2] == '--': #comment + # Locate --.*-- as the body of the comment + return self.parse_comment(i) + elif rawdata[j] == '[': #marked section + # Locate [statusWord [...arbitrary SGML...]] as the body of the marked section + # Where statusWord is one of TEMP, CDATA, IGNORE, INCLUDE, RCDATA + # Note that this is extended by Microsoft Office "Save as Web" function + # to include [if...] and [endif]. + return self.parse_marked_section(i) + else: #all other declaration elements + decltype, j = self._scan_name(j, i) + if j < 0: + return j + if decltype == "doctype": + self._decl_otherchars = '' + while j < n: + c = rawdata[j] + if c == ">": + # end of declaration syntax + data = rawdata[i+2:j] + if decltype == "doctype": + self.handle_decl(data) + else: + # According to the HTML5 specs sections "8.2.4.44 Bogus + # comment state" and "8.2.4.45 Markup declaration open + # state", a comment token should be emitted. + # Calling unknown_decl provides more flexibility though. + self.unknown_decl(data) + return j + 1 + if c in "\"'": + m = _declstringlit_match(rawdata, j) + if not m: + return -1 # incomplete + j = m.end() + elif c in "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ": + name, j = self._scan_name(j, i) + elif c in self._decl_otherchars: + j = j + 1 + elif c == "[": + # this could be handled in a separate doctype parser + if decltype == "doctype": + j = self._parse_doctype_subset(j + 1, i) + elif decltype in {"attlist", "linktype", "link", "element"}: + # must tolerate []'d groups in a content model in an element declaration + # also in data attribute specifications of attlist declaration + # also link type declaration subsets in linktype declarations + # also link attribute specification lists in link declarations + raise AssertionError("unsupported '[' char in %s declaration" % decltype) + else: + raise AssertionError("unexpected '[' char in declaration") + else: + raise AssertionError("unexpected %r char in declaration" % rawdata[j]) + if j < 0: + return j + return -1 # incomplete + + # Internal -- parse a marked section + # Override this to handle MS-word extension syntax content + def parse_marked_section(self, i, report=1): + rawdata= self.rawdata + assert rawdata[i:i+3] == ' ending + match= _markedsectionclose.search(rawdata, i+3) + elif sectName in {"if", "else", "endif"}: + # look for MS Office ]> ending + match= _msmarkedsectionclose.search(rawdata, i+3) + else: + raise AssertionError( + 'unknown status keyword %r in marked section' % rawdata[i+3:j] + ) + if not match: + return -1 + if report: + j = match.start(0) + self.unknown_decl(rawdata[i+3: j]) + return match.end(0) + + # Internal -- parse comment, return length or -1 if not terminated + def parse_comment(self, i, report=1): + rawdata = self.rawdata + if rawdata[i:i+4] != ' + --> --> + + ''' + +__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 = '' + pydoc.html.heading( + '%s' % + strong(pydoc.html.escape(str(etype))), + '#ffffff', '#6622aa', 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.10/chunk.py b/lib/python3.10/chunk.py new file mode 100644 index 0000000000000000000000000000000000000000..870c39fe7f5037152dd5b430e6b6f3f7e5d7a8de --- /dev/null +++ b/lib/python3.10/chunk.py @@ -0,0 +1,169 @@ +"""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. +""" + +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.10/cmd.py b/lib/python3.10/cmd.py new file mode 100644 index 0000000000000000000000000000000000000000..859e91096d8f57d906c00023ef1a1c0e663178d6 --- /dev/null +++ b/lib/python3.10/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 = [] + help = {} + for name in names: + if name[:5] == 'help_': + help[name[5:]]=1 + 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 help: + cmds_doc.append(cmd) + del help[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, list(help.keys()),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.10/code.py b/lib/python3.10/code.py new file mode 100644 index 0000000000000000000000000000000000000000..76000f8c8b2c1e1c98f8fb4c831c2ea3e2de268d --- /dev/null +++ b/lib/python3.10/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.10/codecs.py b/lib/python3.10/codecs.py new file mode 100644 index 0000000000000000000000000000000000000000..3b173b612101e7c635303a2129e3fe363791e2eb --- /dev/null +++ b/lib/python3.10/codecs.py @@ -0,0 +1,1127 @@ +""" 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() + +### + +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() + +### + +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() + +### + +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() + +### 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.10/codeop.py b/lib/python3.10/codeop.py new file mode 100644 index 0000000000000000000000000000000000000000..fe8713ecf46bfa4a60bed8e110e4c0ab3b8c8d73 --- /dev/null +++ b/lib/python3.10/codeop.py @@ -0,0 +1,153 @@ +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) + + +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): + return compile(source, filename, symbol, PyCF_DONT_IMPLY_DEDENT | PyCF_ALLOW_INCOMPLETE_INPUT) + +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): + codeob = compile(source, filename, symbol, self.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.10/colorsys.py b/lib/python3.10/colorsys.py new file mode 100644 index 0000000000000000000000000000000000000000..0f52512a67d87c571835467b411ec8ec4e691230 --- /dev/null +++ b/lib/python3.10/colorsys.py @@ -0,0 +1,165 @@ +"""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-sumc) + 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) + v = maxc + if minc == maxc: + return 0.0, 0.0, v + s = (maxc-minc) / maxc + rc = (maxc-r) / (maxc-minc) + gc = (maxc-g) / (maxc-minc) + bc = (maxc-b) / (maxc-minc) + 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.10/compileall.py b/lib/python3.10/compileall.py new file mode 100644 index 0000000000000000000000000000000000000000..50183ea85468aa74c367576a6666c490e4d4de2f --- /dev/null +++ b/lib/python3.10/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, if 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.10/concurrent/__init__.py b/lib/python3.10/concurrent/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..196d3788575993eb403588b01ac6b0a3fbba13da --- /dev/null +++ b/lib/python3.10/concurrent/__init__.py @@ -0,0 +1 @@ +# This directory is a Python package. diff --git a/lib/python3.10/config-3.10-x86_64-linux-gnu/Makefile b/lib/python3.10/config-3.10-x86_64-linux-gnu/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..aaf5e612b4880a2eb0cd09e73d0dbad9a57a2121 --- /dev/null +++ b/lib/python3.10/config-3.10-x86_64-linux-gnu/Makefile @@ -0,0 +1,2108 @@ +# Generated automatically from Makefile.pre by makesetup. +# Top-level Makefile for Python +# +# As distributed, this file is called Makefile.pre.in; it is processed +# into the real Makefile by running the script ./configure, which +# replaces things like @spam@ with values appropriate for your system. +# This means that if you edit Makefile, your changes get lost the next +# time you run the configure script. Ideally, you can do: +# +# ./configure +# make +# make test +# make install +# +# If you have a previous version of Python installed that you don't +# want to overwrite, you can use "make altinstall" instead of "make +# install". Refer to the "Installing" section in the README file for +# additional details. +# +# See also the section "Build instructions" in the README file. + +# === Variables set by makesetup === + +MODBUILT_NAMES= posix errno pwd _sre _codecs _weakref _functools _operator _collections _abc itertools atexit _signal _stat time _thread _locale _io faulthandler _tracemalloc _symtable xxsubtype +MODDISABLED_NAMES= +MODOBJS= Modules/posixmodule.o Modules/errnomodule.o Modules/pwdmodule.o Modules/_sre.o Modules/_codecsmodule.o Modules/_weakref.o Modules/_functoolsmodule.o Modules/_operator.o Modules/_collectionsmodule.o Modules/_abc.o Modules/itertoolsmodule.o Modules/atexitmodule.o Modules/signalmodule.o Modules/_stat.o Modules/timemodule.o Modules/_threadmodule.o Modules/_localemodule.o Modules/_iomodule.o Modules/iobase.o Modules/fileio.o Modules/bytesio.o Modules/bufferedio.o Modules/textio.o Modules/stringio.o Modules/faulthandler.o Modules/_tracemalloc.o Modules/symtablemodule.o Modules/xxsubtype.o +MODLIBS= $(LOCALMODLIBS) $(BASEMODLIBS) + +# === Variables set by configure +VERSION= 3.10 +srcdir= /croot/python-split_1749128751284/work +VPATH= /croot/python-split_1749128751284/work +abs_srcdir= /croot/python-split_1749128751284/work +abs_builddir= /croot/python-split_1749128751284/work/build-static + + +CC= x86_64-conda-linux-gnu-gcc -pthread +CXX= x86_64-conda-linux-gnu-c++ -pthread +MAINCC= $(CC) +LINKCC= $(PURIFY) $(MAINCC) +AR= x86_64-conda-linux-gnu-ar +READELF= x86_64-conda-linux-gnu-readelf +SOABI= cpython-310-x86_64-linux-gnu +LDVERSION= $(VERSION)$(ABIFLAGS) +LIBPYTHON= +GITVERSION= +GITTAG= +GITBRANCH= +PGO_PROF_GEN_FLAG=-fprofile-generate +PGO_PROF_USE_FLAG= +LLVM_PROF_MERGER=true +LLVM_PROF_FILE= +LLVM_PROF_ERR=no +DTRACE= +DFLAGS= +DTRACE_HEADERS= +DTRACE_OBJS= + +GNULD= yes + +# Shell used by make (some versions default to the login shell, which is bad) +SHELL= /bin/sh + +# Use this to make a link between python$(VERSION) and python in $(BINDIR) +LN= ln + +# Portable install script (configure doesn't always guess right) +INSTALL= /usr/bin/install -c +INSTALL_PROGRAM=${INSTALL} +INSTALL_SCRIPT= ${INSTALL} +INSTALL_DATA= ${INSTALL} -m 644 +# Shared libraries must be installed with executable mode on some systems; +# rather than figuring out exactly which, we always give them executable mode. +INSTALL_SHARED= ${INSTALL} -m 755 + +MKDIR_P= /usr/bin/mkdir -p + +MAKESETUP= $(srcdir)/Modules/makesetup + +# Compiler options +OPT= -DNDEBUG -fwrapv -O2 -Wall +BASECFLAGS= -Wno-unused-result -Wsign-compare +BASECPPFLAGS= -IObjects -IInclude -IPython +CONFIGURE_CFLAGS= -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/include -fdebug-prefix-map=/croot/python-split_1749128751284/work=/usr/local/src/conda/python-3.10.18 -fdebug-prefix-map=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe=/usr/local/src/conda-prefix +# CFLAGS_NODIST is used for building the interpreter and stdlib C extensions. +# Use it when a compiler flag should _not_ be part of the distutils CFLAGS +# once Python is installed (Issue #21121). +CONFIGURE_CFLAGS_NODIST= -fno-semantic-interposition -g -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden +# LDFLAGS_NODIST is used in the same manner as CFLAGS_NODIST. +# Use it when a linker flag should _not_ be part of the distutils LDFLAGS +# once Python is installed (bpo-35257) +CONFIGURE_LDFLAGS_NODIST= -fno-semantic-interposition -g +CONFIGURE_CPPFLAGS= -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/include -I/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/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,/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -Wl,-rpath-link,/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -L/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib +# Avoid assigning CFLAGS, LDFLAGS, etc. so users can use them on the +# command line to append to these values without stomping the pre-set +# values. +PY_CFLAGS= $(BASECFLAGS) $(OPT) $(CONFIGURE_CFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) +PY_CFLAGS_NODIST=$(CONFIGURE_CFLAGS_NODIST) $(CFLAGS_NODIST) -I$(srcdir)/Include/internal +# Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to +# be able to build extension modules using the directories specified in the +# environment variables +PY_CPPFLAGS= $(BASECPPFLAGS) -I. -I$(srcdir)/Include $(CONFIGURE_CPPFLAGS) $(CPPFLAGS) +PY_LDFLAGS= $(CONFIGURE_LDFLAGS) $(LDFLAGS) +PY_LDFLAGS_NODIST=$(CONFIGURE_LDFLAGS_NODIST) $(LDFLAGS_NODIST) +NO_AS_NEEDED= -Wl,--no-as-needed +CCSHARED= -fPIC +# LINKFORSHARED are the flags passed to the $(CC) command that links +# the python executable -- this is only needed for a few systems +LINKFORSHARED= -Xlinker -export-dynamic +ARFLAGS= rcs +# Extra C flags added for building the interpreter object files. +CFLAGSFORSHARED= +# C flags used for building the interpreter object files +PY_STDMODULE_CFLAGS= $(PY_CFLAGS) $(PY_CFLAGS_NODIST) $(PY_CPPFLAGS) $(CFLAGSFORSHARED) +PY_BUILTIN_MODULE_CFLAGS= $(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN +PY_CORE_CFLAGS= $(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE +# Linker flags used for building the interpreter object files +PY_CORE_LDFLAGS=$(PY_LDFLAGS) $(PY_LDFLAGS_NODIST) +# Strict or non-strict aliasing flags used to compile dtoa.c, see above +CFLAGS_ALIASING= + + +# Machine-dependent subdirectories +MACHDEP= linux + +# Multiarch directory (may be empty) +MULTIARCH= x86_64-linux-gnu +MULTIARCH_CPPFLAGS = -DMULTIARCH=\"x86_64-linux-gnu\" + +# Install prefix for architecture-independent files +prefix= /home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe + +# Install prefix for architecture-dependent files +exec_prefix= ${prefix} + +# Install prefix for data files +datarootdir= ${prefix}/share + +# Expanded directories +BINDIR= ${exec_prefix}/bin +LIBDIR= ${exec_prefix}/lib +MANDIR= ${datarootdir}/man +INCLUDEDIR= ${prefix}/include +CONFINCLUDEDIR= $(exec_prefix)/include +PLATLIBDIR= lib +SCRIPTDIR= $(prefix)/$(PLATLIBDIR) +ABIFLAGS= +# Variable used by ensurepip +WHEEL_PKG_DIR= + +# Detailed destination directories +BINLIBDEST= ${exec_prefix}/${PLATLIBDIR}/python$(VERSION) +LIBDEST= $(SCRIPTDIR)/python$(VERSION) +INCLUDEPY= $(INCLUDEDIR)/python$(LDVERSION) +CONFINCLUDEPY= $(CONFINCLUDEDIR)/python$(LDVERSION) + +# Symbols used for using shared libraries +SHLIB_SUFFIX= .so +EXT_SUFFIX= .cpython-310-x86_64-linux-gnu.so +LDSHARED= $(CC) -shared $(PY_LDFLAGS) +BLDSHARED= $(CC) -shared $(PY_CORE_LDFLAGS) +LDCXXSHARED= $(CXX) -shared +DESTSHARED= $(BINLIBDEST)/lib-dynload + +# List of exported symbols for AIX +EXPORTSYMS= +EXPORTSFROM= + +# Executable suffix (.exe on Windows and Mac OS X) +EXE= +BUILDEXE= + +# Short name and location for Mac OS X Python framework +UNIVERSALSDK= +PYTHONFRAMEWORK= +PYTHONFRAMEWORKDIR= no-framework +PYTHONFRAMEWORKPREFIX= +PYTHONFRAMEWORKINSTALLDIR= +# Deployment target selected during configure, to be checked +# by distutils. The export statement is needed to ensure that the +# deployment target is active during build. +MACOSX_DEPLOYMENT_TARGET= +#export MACOSX_DEPLOYMENT_TARGET + +# Option to install to strip binaries +STRIPFLAG=-s + +# Flags to lipo to produce a 32-bit-only universal executable +LIPO_32BIT_FLAGS= + +# Flags to lipo to produce an intel-64-only universal executable +LIPO_INTEL64_FLAGS= + +# Options to enable prebinding (for fast startup prior to Mac OS X 10.3) +OTHER_LIBTOOL_OPT= + +# Environment to run shared python without installed libraries +RUNSHARED= + +# ensurepip options +ENSUREPIP= no + +# OpenSSL options for setup.py so sysconfig can pick up AC_SUBST() vars. +OPENSSL_INCLUDES=-I/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/include +OPENSSL_LIBS=-lssl -lcrypto +OPENSSL_LDFLAGS=-L/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib +OPENSSL_RPATH= + +# Default zoneinfo.TZPATH. Added here to expose it in sysconfig.get_config_var +TZPATH=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/share/zoneinfo + +# Modes for directories, executables and data files created by the +# install process. Default to user-only-writable for all file types. +DIRMODE= 755 +EXEMODE= 755 +FILEMODE= 644 + +# configure script arguments +CONFIG_ARGS= '--prefix=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe' '--build=x86_64-conda-linux-gnu' '--host=x86_64-conda-linux-gnu' '--enable-ipv6' '--with-ensurepip=no' '--with-tzpath=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/share/zoneinfo' '--with-computed-gotos' '--with-system-ffi' '--with-system-expat' '--enable-loadable-sqlite-extensions' '--with-tcltk-includes=-I/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/include' '--with-tcltk-libs=-L/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -ltcl8.6 -ltk8.6' '--with-platlibdir=lib' '--with-lto' '--enable-optimizations' '-oldincludedir=/croot/python-split_1749128751284/_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' '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 /home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/include -fdebug-prefix-map=/croot/python-split_1749128751284/work=/usr/local/src/conda/python-3.10.18 -fdebug-prefix-map=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe=/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,/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -Wl,-rpath-link,/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -L/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib' 'CPPFLAGS=-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/include -I/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/include' 'CPP=/croot/python-split_1749128751284/_build_env/bin/x86_64-conda-linux-gnu-cpp' 'PKG_CONFIG_PATH=/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib/pkgconfig' + + +# Subdirectories with code +SRCDIRS= Parser Objects Python Modules Modules/_io Programs + +# Other subdirectories +SUBDIRSTOO= Include Lib Misc + +# Files and directories to be distributed +CONFIGFILES= configure configure.ac acconfig.h pyconfig.h.in Makefile.pre.in +DISTFILES= README.rst ChangeLog $(CONFIGFILES) +DISTDIRS= $(SUBDIRS) $(SUBDIRSTOO) Ext-dummy +DIST= $(DISTFILES) $(DISTDIRS) + + +LIBRARY= libpython$(VERSION)$(ABIFLAGS).a +LDLIBRARY= libpython$(VERSION)$(ABIFLAGS).a +BLDLIBRARY= $(LDLIBRARY) +PY3LIBRARY= +DLLLIBRARY= +LDLIBRARYDIR= +INSTSONAME= $(LDLIBRARY) +LIBRARY_DEPS= $(LIBRARY) $(PY3LIBRARY) $(EXPORTSYMS) +PY_ENABLE_SHARED= 0 +STATIC_LIBPYTHON= 1 + + +LIBS= -lcrypt -lpthread -ldl -lutil -lm +LIBM= -lm +LIBC= +SYSLIBS= $(LIBM) $(LIBC) +SHLIBS= $(LIBS) + +DLINCLDIR= . +DYNLOADFILE= dynload_shlib.o +MACHDEP_OBJS= +LIBOBJDIR= Python/ +LIBOBJS= + +PYTHON= python$(EXE) +BUILDPYTHON= python$(BUILDEXE) + +PYTHON_FOR_REGEN?=python3 +UPDATE_FILE=$(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/update_file.py +PY_BUILD_ENVIRON= +PYTHON_FOR_BUILD=./$(BUILDPYTHON) -E +_PYTHON_HOST_PLATFORM=linux-x86_64 +BUILD_GNU_TYPE= x86_64-conda-linux-gnu +HOST_GNU_TYPE= x86_64-conda-linux-gnu + +# Tcl and Tk config info from --with-tcltk-includes and -libs options +TCLTK_INCLUDES= -I/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/include +TCLTK_LIBS= -L/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/lib -ltcl8.6 -ltk8.6 + +# The task to run while instrumented when building the profile-opt target. +# To speed up profile generation, we don't run the full unit test suite +# by default. The default is "-m test --pgo". To run more tests, use +# PROFILE_TASK="-m test --pgo-extended" +PROFILE_TASK= -m test --pgo + +# report files for gcov / lcov coverage report +COVERAGE_INFO= $(abs_builddir)/coverage.info +COVERAGE_REPORT=$(abs_builddir)/lcov-report +COVERAGE_REPORT_OPTIONS=--no-branch-coverage --title "CPython lcov report" + + +# === Definitions added by makesetup === + +LOCALMODLIBS= +BASEMODLIBS= +PYTHONPATH=$(COREPYTHONPATH) +COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH) +TESTPATH= +SITEPATH= +DESTPATH= +MACHDESTLIB=$(BINLIBDEST) +DESTLIB=$(LIBDEST) + + + +########################################################################## +# Modules +MODULE_OBJS= \ + Modules/config.o \ + Modules/getpath.o \ + Modules/main.o \ + Modules/gcmodule.o + +IO_H= Modules/_io/_iomodule.h + +IO_OBJS= \ + Modules/_io/_iomodule.o \ + Modules/_io/iobase.o \ + Modules/_io/fileio.o \ + Modules/_io/bufferedio.o \ + Modules/_io/textio.o \ + Modules/_io/bytesio.o \ + Modules/_io/stringio.o + +########################################################################## + +LIBFFI_INCLUDEDIR= /home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/include + +########################################################################## +# Parser + +PEGEN_OBJS= \ + Parser/pegen.o \ + Parser/parser.o \ + Parser/string_parser.o \ + Parser/peg_api.o + + +PEGEN_HEADERS= \ + $(srcdir)/Include/internal/pycore_parser.h \ + $(srcdir)/Parser/pegen.h \ + $(srcdir)/Parser/string_parser.h + +POBJS= \ + Parser/token.o \ + +PARSER_OBJS= $(POBJS) $(PEGEN_OBJS) Parser/myreadline.o Parser/tokenizer.o + +PARSER_HEADERS= \ + $(PEGEN_HEADERS) \ + $(srcdir)/Parser/tokenizer.h + +########################################################################## +# Python + +PYTHON_OBJS= \ + Python/_warnings.o \ + Python/Python-ast.o \ + Python/asdl.o \ + Python/ast.o \ + Python/ast_opt.o \ + Python/ast_unparse.o \ + Python/bltinmodule.o \ + Python/ceval.o \ + Python/codecs.o \ + Python/compile.o \ + Python/context.o \ + Python/dynamic_annotations.o \ + Python/errors.o \ + Python/frozenmain.o \ + Python/future.o \ + Python/getargs.o \ + Python/getcompiler.o \ + Python/getcopyright.o \ + Python/getplatform.o \ + Python/getversion.o \ + Python/hamt.o \ + Python/hashtable.o \ + Python/import.o \ + Python/importdl.o \ + Python/initconfig.o \ + Python/marshal.o \ + Python/modsupport.o \ + Python/mysnprintf.o \ + Python/mystrtoul.o \ + Python/pathconfig.o \ + Python/preconfig.o \ + Python/pyarena.o \ + Python/pyctype.o \ + Python/pyfpe.o \ + Python/pyhash.o \ + Python/pylifecycle.o \ + Python/pymath.o \ + Python/pystate.o \ + Python/pythonrun.o \ + Python/pytime.o \ + Python/bootstrap_hash.o \ + Python/structmember.o \ + Python/symtable.o \ + Python/sysmodule.o \ + Python/thread.o \ + Python/traceback.o \ + Python/getopt.o \ + Python/pystrcmp.o \ + Python/pystrtod.o \ + Python/pystrhex.o \ + Python/dtoa.o \ + Python/formatter_unicode.o \ + Python/fileutils.o \ + Python/suggestions.o \ + Python/$(DYNLOADFILE) \ + $(LIBOBJS) \ + $(MACHDEP_OBJS) \ + $(DTRACE_OBJS) + + +########################################################################## +# Objects +OBJECT_OBJS= \ + Objects/abstract.o \ + Objects/accu.o \ + Objects/boolobject.o \ + Objects/bytes_methods.o \ + Objects/bytearrayobject.o \ + Objects/bytesobject.o \ + Objects/call.o \ + Objects/capsule.o \ + Objects/cellobject.o \ + Objects/classobject.o \ + Objects/codeobject.o \ + Objects/complexobject.o \ + Objects/descrobject.o \ + Objects/enumobject.o \ + Objects/exceptions.o \ + Objects/genericaliasobject.o \ + Objects/genobject.o \ + Objects/fileobject.o \ + Objects/floatobject.o \ + Objects/frameobject.o \ + Objects/funcobject.o \ + Objects/interpreteridobject.o \ + Objects/iterobject.o \ + Objects/listobject.o \ + Objects/longobject.o \ + Objects/dictobject.o \ + Objects/odictobject.o \ + Objects/memoryobject.o \ + Objects/methodobject.o \ + Objects/moduleobject.o \ + Objects/namespaceobject.o \ + Objects/object.o \ + Objects/obmalloc.o \ + Objects/picklebufobject.o \ + Objects/rangeobject.o \ + Objects/setobject.o \ + Objects/sliceobject.o \ + Objects/structseq.o \ + Objects/tupleobject.o \ + Objects/typeobject.o \ + Objects/unicodeobject.o \ + Objects/unicodectype.o \ + Objects/unionobject.o \ + Objects/weakrefobject.o + +########################################################################## +# objects that get linked into the Python library +LIBRARY_OBJS_OMIT_FROZEN= \ + Modules/getbuildinfo.o \ + $(PARSER_OBJS) \ + $(OBJECT_OBJS) \ + $(PYTHON_OBJS) \ + $(MODULE_OBJS) \ + $(MODOBJS) + +LIBRARY_OBJS= \ + $(LIBRARY_OBJS_OMIT_FROZEN) \ + Python/frozen.o + +########################################################################## +# DTrace + +# On some systems, object files that reference DTrace probes need to be modified +# in-place by dtrace(1). +DTRACE_DEPS = \ + Python/ceval.o Python/import.o Python/sysmodule.o Modules/gcmodule.o + +######################################################################### +# Rules + +# Default target +all: profile-opt +build_all: check-clean-src $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks \ + Programs/_testembed python-config + +# Check that the source is clean when building out of source. +check-clean-src: + @if test -n "$(VPATH)" -a -f "$(srcdir)/Programs/python.o"; then \ + echo "Error: The source directory ($(srcdir)) is not clean" ; \ + echo "Building Python out of the source tree (in $(abs_builddir)) requires a clean source tree ($(abs_srcdir))" ; \ + echo "Try to run: make -C \"$(srcdir)\" clean" ; \ + exit 1; \ + fi + +# Profile generation build must start from a clean tree. +profile-clean-stamp: + $(MAKE) clean + touch $@ + +# Compile with profile generation enabled. +profile-gen-stamp: profile-clean-stamp + @if [ $(LLVM_PROF_ERR) = yes ]; then \ + echo "Error: Cannot perform PGO build because llvm-profdata was not found in PATH" ;\ + echo "Please add it to PATH and run ./configure again" ;\ + exit 1;\ + fi + @echo "Building with support for profile generation:" + $(MAKE) build_all_generate_profile + touch $@ + +# Run task with profile generation build to create profile information. +profile-run-stamp: + @echo "Running code to generate profile data (this can take a while):" + # First, we need to create a clean build with profile generation + # enabled. + $(MAKE) profile-gen-stamp + # Next, run the profile task to generate the profile information. + $(MAKE) run_profile_task + $(MAKE) build_all_merge_profile + # Remove profile generation binary since we are done with it. + $(MAKE) clean-retain-profile + # This is an expensive target to build and it does not have proper + # makefile dependency information. So, we create a "stamp" file + # to record its completion and avoid re-running it. + touch $@ + +build_all_generate_profile: + $(MAKE) build_all CFLAGS_NODIST="$(CFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LDFLAGS_NODIST="$(LDFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LIBS="$(LIBS)" + +run_profile_task: + @ # FIXME: can't run for a cross build + $(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) || true + +build_all_merge_profile: + $(LLVM_PROF_MERGER) + +# Compile Python binary with profile guided optimization. +# To force re-running of the profile task, remove the profile-run-stamp file. +profile-opt: profile-run-stamp + @echo "Rebuilding with profile guided optimizations:" + -rm -f profile-clean-stamp + $(MAKE) build_all CFLAGS_NODIST="$(CFLAGS_NODIST) $(PGO_PROF_USE_FLAG)" LDFLAGS_NODIST="$(LDFLAGS_NODIST)" + +# Compile and run with gcov +.PHONY=coverage coverage-lcov coverage-report +coverage: + @echo "Building with support for coverage checking:" + $(MAKE) clean + $(MAKE) build_all CFLAGS="$(CFLAGS) -O0 -pg --coverage" LIBS="$(LIBS) --coverage" + +coverage-lcov: + @echo "Creating Coverage HTML report with LCOV:" + @rm -f $(COVERAGE_INFO) + @rm -rf $(COVERAGE_REPORT) + @lcov --capture --directory $(abs_builddir) \ + --base-directory $(realpath $(abs_builddir)) \ + --path $(realpath $(abs_srcdir)) \ + --output-file $(COVERAGE_INFO) + @ # remove 3rd party modules, system headers and internal files with + @ # debug, test or dummy functions. + @lcov --remove $(COVERAGE_INFO) \ + '*/Modules/_blake2/impl/*' \ + '*/Modules/_ctypes/libffi*/*' \ + '*/Modules/_decimal/libmpdec/*' \ + '*/Modules/_sha3/kcp/*' \ + '*/Modules/expat/*' \ + '*/Modules/zlib/*' \ + '*/Include/*' \ + '*/Modules/xx*.c' \ + '*/Python/pyfpe.c' \ + '*/Python/pystrcmp.c' \ + '/usr/include/*' \ + '/usr/local/include/*' \ + '/usr/lib/gcc/*' \ + --output-file $(COVERAGE_INFO) + @genhtml $(COVERAGE_INFO) --output-directory $(COVERAGE_REPORT) \ + $(COVERAGE_REPORT_OPTIONS) + @echo + @echo "lcov report at $(COVERAGE_REPORT)/index.html" + @echo + +# Force regeneration of parser and importlib +coverage-report: regen-token regen-importlib + @ # build with coverage info + $(MAKE) coverage + @ # run tests, ignore failures + $(TESTRUNNER) $(TESTOPTS) || true + @ # build lcov report + $(MAKE) coverage-lcov + +# Run "Argument Clinic" over all source files +.PHONY=clinic +clinic: check-clean-src $(srcdir)/Modules/_blake2/blake2s_impl.c + $(PYTHON_FOR_REGEN) $(srcdir)/Tools/clinic/clinic.py --make --srcdir $(srcdir) + +# Build the interpreter +$(BUILDPYTHON): Programs/python.o $(LIBRARY_DEPS) + $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) + +platform: $(BUILDPYTHON) pybuilddir.txt + $(RUNSHARED) $(PY_BUILD_ENVIRON) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform + +# Create build directory and generate the sysconfig build-time data there. +# pybuilddir.txt contains the name of the build dir and is used for +# sys.path fixup -- see Modules/getpath.c. +# Since this step runs before shared modules are built, try to avoid bootstrap +# problems by creating a dummy pybuilddir.txt just to allow interpreter +# initialization to succeed. It will be overwritten by generate-posix-vars +# or removed in case of failure. +pybuilddir.txt: $(BUILDPYTHON) + @echo "none" > ./pybuilddir.txt + $(RUNSHARED) $(PY_BUILD_ENVIRON) $(PYTHON_FOR_BUILD) -S -m sysconfig --generate-posix-vars ;\ + if test $$? -ne 0 ; then \ + echo "generate-posix-vars failed" ; \ + rm -f ./pybuilddir.txt ; \ + exit 1 ; \ + fi + +# This is shared by the math and cmath modules +Modules/_math.o: Modules/_math.c Modules/_math.h + $(CC) -c $(CCSHARED) $(PY_CORE_CFLAGS) -o $@ $< + +# blake2s is auto-generated from blake2b +$(srcdir)/Modules/_blake2/blake2s_impl.c: $(srcdir)/Modules/_blake2/blake2b_impl.c $(srcdir)/Modules/_blake2/blake2b2s.py + $(PYTHON_FOR_REGEN) $(srcdir)/Modules/_blake2/blake2b2s.py + $(PYTHON_FOR_REGEN) $(srcdir)/Tools/clinic/clinic.py -f $@ + +# Build the shared modules +# Under GNU make, MAKEFLAGS are sorted and normalized; the 's' for +# -s, --silent or --quiet is always the first char. +# Under BSD make, MAKEFLAGS might be " -s -v x=y". +# Ignore macros passed by GNU make, passed after -- +sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o + @case "`echo X $$MAKEFLAGS | sed 's/^X //;s/ -- .*//'`" in \ + *\ -s*|s*) quiet="-q";; \ + *) quiet="";; \ + esac; \ + echo "$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ + _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ + $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build"; \ + $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ + _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ + $(PY_BUILD_ENVIRON) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build + + +# Build static library +$(LIBRARY): $(LIBRARY_OBJS) + -rm -f $@ + $(AR) $(ARFLAGS) $@ $(LIBRARY_OBJS) + +libpython$(LDVERSION).so: $(LIBRARY_OBJS) $(DTRACE_OBJS) + if test $(INSTSONAME) != $(LDLIBRARY); then \ + $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM); \ + $(LN) -f $(INSTSONAME) $@; \ + else \ + $(BLDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM); \ + fi + +libpython3.so: libpython$(LDVERSION).so + $(BLDSHARED) $(NO_AS_NEEDED) -o $@ -Wl,-h$@ $^ + +libpython$(LDVERSION).dylib: $(LIBRARY_OBJS) + $(CC) -dynamiclib -Wl,-single_module $(PY_CORE_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(DTRACE_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \ + + +libpython$(VERSION).sl: $(LIBRARY_OBJS) + $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) + +# List of exported symbols for AIX +Modules/python.exp: $(LIBRARY) + $(srcdir)/Modules/makexp_aix $@ "$(EXPORTSFROM)" $? + +# Copy up the gdb python hooks into a position where they can be automatically +# loaded by gdb during Lib/test/test_gdb.py +# +# Distributors are likely to want to install this somewhere else e.g. relative +# to the stripped DWARF data for the shared library. +gdbhooks: $(BUILDPYTHON)-gdb.py + +SRC_GDB_HOOKS=$(srcdir)/Tools/gdb/libpython.py +$(BUILDPYTHON)-gdb.py: $(SRC_GDB_HOOKS) + $(INSTALL_DATA) $(SRC_GDB_HOOKS) $(BUILDPYTHON)-gdb.py + +# This rule is here for OPENSTEP/Rhapsody/MacOSX. It builds a temporary +# minimal framework (not including the Lib directory and such) in the current +# directory. +RESSRCDIR=Mac/Resources/framework +$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK): \ + $(LIBRARY) \ + $(RESSRCDIR)/Info.plist + $(INSTALL) -d -m $(DIRMODE) $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION) + $(CC) -o $(LDLIBRARY) $(PY_CORE_LDFLAGS) -dynamiclib \ + -all_load $(LIBRARY) -Wl,-single_module \ + -install_name $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK) \ + -compatibility_version $(VERSION) \ + -current_version $(VERSION) \ + -framework CoreFoundation $(LIBS); + $(INSTALL) -d -m $(DIRMODE) \ + $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/English.lproj + $(INSTALL_DATA) $(RESSRCDIR)/Info.plist \ + $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/Info.plist + $(LN) -fsn $(VERSION) $(PYTHONFRAMEWORKDIR)/Versions/Current + $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK) + $(LN) -fsn Versions/Current/Resources $(PYTHONFRAMEWORKDIR)/Resources + +# This rule builds the Cygwin Python DLL and import library if configured +# for a shared core library; otherwise, this rule is a noop. +$(DLLLIBRARY) libpython$(LDVERSION).dll.a: $(LIBRARY_OBJS) + if test -n "$(DLLLIBRARY)"; then \ + $(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \ + $(LIBS) $(MODLIBS) $(SYSLIBS); \ + else true; \ + fi + + +oldsharedmods: $(SHAREDMODS) + + +Makefile Modules/config.c: Makefile.pre \ + $(srcdir)/Modules/config.c.in \ + $(MAKESETUP) \ + $(srcdir)/Modules/Setup \ + Modules/Setup.local + $(SHELL) $(MAKESETUP) -c $(srcdir)/Modules/config.c.in \ + -s Modules \ + Modules/Setup.local \ + $(srcdir)/Modules/Setup + @mv config.c Modules + @echo "The Makefile was updated, you may need to re-run make." + + +Programs/_testembed: Programs/_testembed.o $(LIBRARY_DEPS) + $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) + +############################################################################ +# Importlib + +Programs/_freeze_importlib.o: Programs/_freeze_importlib.c Makefile + +Programs/_freeze_importlib: Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) + $(LINKCC) $(PY_CORE_LDFLAGS) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) + +.PHONY: regen-importlib +regen-importlib: Programs/_freeze_importlib + # Regenerate Python/importlib_external.h + # from Lib/importlib/_bootstrap_external.py using _freeze_importlib + ./Programs/_freeze_importlib importlib._bootstrap_external \ + $(srcdir)/Lib/importlib/_bootstrap_external.py \ + $(srcdir)/Python/importlib_external.h.new + $(UPDATE_FILE) $(srcdir)/Python/importlib_external.h $(srcdir)/Python/importlib_external.h.new + # Regenerate Python/importlib.h from Lib/importlib/_bootstrap.py + # using _freeze_importlib + ./Programs/_freeze_importlib importlib._bootstrap \ + $(srcdir)/Lib/importlib/_bootstrap.py \ + $(srcdir)/Python/importlib.h.new + $(UPDATE_FILE) $(srcdir)/Python/importlib.h $(srcdir)/Python/importlib.h.new + # Regenerate Python/importlib_zipimport.h from Lib/zipimport.py + # using _freeze_importlib + ./Programs/_freeze_importlib zipimport \ + $(srcdir)/Lib/zipimport.py \ + $(srcdir)/Python/importlib_zipimport.h.new + $(UPDATE_FILE) $(srcdir)/Python/importlib_zipimport.h $(srcdir)/Python/importlib_zipimport.h.new + +regen-abidump: all + @$(MKDIR_P) $(srcdir)/Doc/data/ + abidw "libpython$(LDVERSION).so" --no-architecture --out-file $(srcdir)/Doc/data/python$(LDVERSION).abi.new + @$(UPDATE_FILE) $(srcdir)/Doc/data/python$(LDVERSION).abi $(srcdir)/Doc/data/python$(LDVERSION).abi.new + +check-abidump: all + abidiff $(srcdir)/Doc/data/python$(LDVERSION).abi "libpython$(LDVERSION).so" --drop-private-types --no-architecture --no-added-syms + +regen-limited-abi: all + $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/stable_abi.py --generate-all $(srcdir)/Misc/stable_abi.txt + + +############################################################################ +# Regenerate all generated files + +regen-all: regen-opcode regen-opcode-targets regen-typeslots \ + regen-token regen-ast regen-keyword regen-importlib clinic \ + regen-pegen-metaparser regen-pegen regen-frozen + @echo + @echo "Note: make regen-stdlib-module-names and autoconf should be run manually" + +############################################################################ +# Special rules for object files + +Modules/getbuildinfo.o: $(PARSER_OBJS) \ + $(OBJECT_OBJS) \ + $(PYTHON_OBJS) \ + $(MODULE_OBJS) \ + $(MODOBJS) \ + $(DTRACE_OBJS) \ + $(srcdir)/Modules/getbuildinfo.c + $(CC) -c $(PY_CORE_CFLAGS) \ + -DGITVERSION="\"`LC_ALL=C $(GITVERSION)`\"" \ + -DGITTAG="\"`LC_ALL=C $(GITTAG)`\"" \ + -DGITBRANCH="\"`LC_ALL=C $(GITBRANCH)`\"" \ + -o $@ $(srcdir)/Modules/getbuildinfo.c + +Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile + $(CC) -c $(PY_CORE_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \ + -DPREFIX='"$(prefix)"' \ + -DEXEC_PREFIX='"$(exec_prefix)"' \ + -DVERSION='"$(VERSION)"' \ + -DVPATH='"$(VPATH)"' \ + -o $@ $(srcdir)/Modules/getpath.c + +Programs/python.o: $(srcdir)/Programs/python.c + $(MAINCC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/python.c + +Programs/_testembed.o: $(srcdir)/Programs/_testembed.c + $(MAINCC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/_testembed.c + +Modules/_sre.o: $(srcdir)/Modules/_sre.c $(srcdir)/Modules/sre.h $(srcdir)/Modules/sre_constants.h $(srcdir)/Modules/sre_lib.h + +Modules/posixmodule.o: $(srcdir)/Modules/posixmodule.c $(srcdir)/Modules/posixmodule.h + +Modules/grpmodule.o: $(srcdir)/Modules/grpmodule.c $(srcdir)/Modules/posixmodule.h + +Modules/pwdmodule.o: $(srcdir)/Modules/pwdmodule.c $(srcdir)/Modules/posixmodule.h + +Modules/signalmodule.o: $(srcdir)/Modules/signalmodule.c $(srcdir)/Modules/posixmodule.h + +Python/dynload_shlib.o: $(srcdir)/Python/dynload_shlib.c Makefile + $(CC) -c $(PY_CORE_CFLAGS) \ + -DSOABI='"$(SOABI)"' \ + -o $@ $(srcdir)/Python/dynload_shlib.c + +Python/dynload_hpux.o: $(srcdir)/Python/dynload_hpux.c Makefile + $(CC) -c $(PY_CORE_CFLAGS) \ + -DSHLIB_EXT='"$(EXT_SUFFIX)"' \ + -o $@ $(srcdir)/Python/dynload_hpux.c + +Python/sysmodule.o: $(srcdir)/Python/sysmodule.c Makefile $(srcdir)/Include/pydtrace.h + $(CC) -c $(PY_CORE_CFLAGS) \ + -DABIFLAGS='"$(ABIFLAGS)"' \ + $(MULTIARCH_CPPFLAGS) \ + -o $@ $(srcdir)/Python/sysmodule.c + +Python/initconfig.o: $(srcdir)/Python/initconfig.c + $(CC) -c $(PY_CORE_CFLAGS) \ + -DPLATLIBDIR='"$(PLATLIBDIR)"' \ + -o $@ $(srcdir)/Python/initconfig.c + +$(IO_OBJS): $(IO_H) + +.PHONY: regen-pegen-metaparser +regen-pegen-metaparser: + @$(MKDIR_P) $(srcdir)/Tools/peg_generator/pegen + PYTHONPATH=$(srcdir)/Tools/peg_generator $(PYTHON_FOR_REGEN) -m pegen -q python \ + $(srcdir)/Tools/peg_generator/pegen/metagrammar.gram \ + -o $(srcdir)/Tools/peg_generator/pegen/grammar_parser.py.new + $(UPDATE_FILE) $(srcdir)/Tools/peg_generator/pegen/grammar_parser.py \ + $(srcdir)/Tools/peg_generator/pegen/grammar_parser.py.new + +.PHONY: regen-pegen +regen-pegen: + @$(MKDIR_P) $(srcdir)/Parser + PYTHONPATH=$(srcdir)/Tools/peg_generator $(PYTHON_FOR_REGEN) -m pegen -q c \ + $(srcdir)/Grammar/python.gram \ + $(srcdir)/Grammar/Tokens \ + -o $(srcdir)/Parser/parser.new.c + $(UPDATE_FILE) $(srcdir)/Parser/parser.c $(srcdir)/Parser/parser.new.c + +.PHONY=regen-ast +regen-ast: + # Regenerate 3 files using using Parser/asdl_c.py: + # - Include/internal/pycore_ast.h + # - Include/internal/pycore_ast_state.h + # - Python/Python-ast.c + $(MKDIR_P) $(srcdir)/Include + $(MKDIR_P) $(srcdir)/Python + $(PYTHON_FOR_REGEN) $(srcdir)/Parser/asdl_c.py \ + $(srcdir)/Parser/Python.asdl \ + -H $(srcdir)/Include/internal/pycore_ast.h.new \ + -I $(srcdir)/Include/internal/pycore_ast_state.h.new \ + -C $(srcdir)/Python/Python-ast.c.new + + $(UPDATE_FILE) $(srcdir)/Include/internal/pycore_ast.h $(srcdir)/Include/internal/pycore_ast.h.new + $(UPDATE_FILE) $(srcdir)/Include/internal/pycore_ast_state.h $(srcdir)/Include/internal/pycore_ast_state.h.new + $(UPDATE_FILE) $(srcdir)/Python/Python-ast.c $(srcdir)/Python/Python-ast.c.new + +.PHONY: regen-opcode +regen-opcode: + # Regenerate Include/opcode.h from Lib/opcode.py + # using Tools/scripts/generate_opcode_h.py + $(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_opcode_h.py \ + $(srcdir)/Lib/opcode.py \ + $(srcdir)/Include/opcode.h.new + $(UPDATE_FILE) $(srcdir)/Include/opcode.h $(srcdir)/Include/opcode.h.new + +.PHONY: regen-frozen +regen-frozen: Programs/_freeze_importlib + # Regenerate code for frozen module "__hello__". + ./Programs/_freeze_importlib hello \ + $(srcdir)/Tools/freeze/flag.py \ + $(srcdir)/Python/frozen_hello.h.new + $(UPDATE_FILE) $(srcdir)/Python/frozen_hello.h \ + $(srcdir)/Python/frozen_hello.h.new + +.PHONY: regen-token +regen-token: + # Regenerate Doc/library/token-list.inc from Grammar/Tokens + # using Tools/scripts/generate_token.py + $(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_token.py rst \ + $(srcdir)/Grammar/Tokens \ + $(srcdir)/Doc/library/token-list.inc + # Regenerate Include/token.h from Grammar/Tokens + # using Tools/scripts/generate_token.py + $(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_token.py h \ + $(srcdir)/Grammar/Tokens \ + $(srcdir)/Include/token.h + # Regenerate Parser/token.c from Grammar/Tokens + # using Tools/scripts/generate_token.py + $(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_token.py c \ + $(srcdir)/Grammar/Tokens \ + $(srcdir)/Parser/token.c + # Regenerate Lib/token.py from Grammar/Tokens + # using Tools/scripts/generate_token.py + $(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_token.py py \ + $(srcdir)/Grammar/Tokens \ + $(srcdir)/Lib/token.py + +.PHONY: regen-keyword +regen-keyword: + # Regenerate Lib/keyword.py from Grammar/python.gram and Grammar/Tokens + # using Tools/peg_generator/pegen + PYTHONPATH=$(srcdir)/Tools/peg_generator $(PYTHON_FOR_REGEN) -m pegen.keywordgen \ + $(srcdir)/Grammar/python.gram \ + $(srcdir)/Grammar/Tokens \ + $(srcdir)/Lib/keyword.py.new + $(UPDATE_FILE) $(srcdir)/Lib/keyword.py $(srcdir)/Lib/keyword.py.new + +.PHONY: regen-stdlib-module-names +regen-stdlib-module-names: build_all Programs/_testembed + # Regenerate Python/stdlib_module_names.h + # using Tools/scripts/generate_stdlib_module_names.py + $(RUNSHARED) ./$(BUILDPYTHON) \ + $(srcdir)/Tools/scripts/generate_stdlib_module_names.py \ + > $(srcdir)/Python/stdlib_module_names.h.new + $(UPDATE_FILE) $(srcdir)/Python/stdlib_module_names.h $(srcdir)/Python/stdlib_module_names.h.new + +Python/compile.o Python/symtable.o Python/ast_unparse.o Python/ast.o Python/future.o: $(srcdir)/Include/internal/pycore_ast.h + +Python/getplatform.o: $(srcdir)/Python/getplatform.c + $(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c + +Python/importdl.o: $(srcdir)/Python/importdl.c + $(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c + +Objects/unicodectype.o: $(srcdir)/Objects/unicodectype.c \ + $(srcdir)/Objects/unicodetype_db.h + +BYTESTR_DEPS = \ + $(srcdir)/Objects/stringlib/count.h \ + $(srcdir)/Objects/stringlib/ctype.h \ + $(srcdir)/Objects/stringlib/fastsearch.h \ + $(srcdir)/Objects/stringlib/find.h \ + $(srcdir)/Objects/stringlib/join.h \ + $(srcdir)/Objects/stringlib/partition.h \ + $(srcdir)/Objects/stringlib/split.h \ + $(srcdir)/Objects/stringlib/stringdefs.h \ + $(srcdir)/Objects/stringlib/transmogrify.h + +UNICODE_DEPS = \ + $(srcdir)/Objects/stringlib/asciilib.h \ + $(srcdir)/Objects/stringlib/codecs.h \ + $(srcdir)/Objects/stringlib/count.h \ + $(srcdir)/Objects/stringlib/fastsearch.h \ + $(srcdir)/Objects/stringlib/find.h \ + $(srcdir)/Objects/stringlib/find_max_char.h \ + $(srcdir)/Objects/stringlib/localeutil.h \ + $(srcdir)/Objects/stringlib/partition.h \ + $(srcdir)/Objects/stringlib/replace.h \ + $(srcdir)/Objects/stringlib/split.h \ + $(srcdir)/Objects/stringlib/ucs1lib.h \ + $(srcdir)/Objects/stringlib/ucs2lib.h \ + $(srcdir)/Objects/stringlib/ucs4lib.h \ + $(srcdir)/Objects/stringlib/undef.h \ + $(srcdir)/Objects/stringlib/unicode_format.h \ + $(srcdir)/Objects/stringlib/unicodedefs.h + +Objects/bytes_methods.o: $(srcdir)/Objects/bytes_methods.c $(BYTESTR_DEPS) +Objects/bytesobject.o: $(srcdir)/Objects/bytesobject.c $(BYTESTR_DEPS) +Objects/bytearrayobject.o: $(srcdir)/Objects/bytearrayobject.c $(BYTESTR_DEPS) + +Objects/unicodeobject.o: $(srcdir)/Objects/unicodeobject.c $(UNICODE_DEPS) + +Objects/odictobject.o: $(srcdir)/Objects/dict-common.h +Objects/dictobject.o: $(srcdir)/Objects/stringlib/eq.h $(srcdir)/Objects/dict-common.h +Objects/setobject.o: $(srcdir)/Objects/stringlib/eq.h + +.PHONY: regen-opcode-targets +regen-opcode-targets: + # Regenerate Python/opcode_targets.h from Lib/opcode.py + # using Python/makeopcodetargets.py + $(PYTHON_FOR_REGEN) $(srcdir)/Python/makeopcodetargets.py \ + $(srcdir)/Python/opcode_targets.h.new + $(UPDATE_FILE) $(srcdir)/Python/opcode_targets.h $(srcdir)/Python/opcode_targets.h.new + +Python/ceval.o: $(srcdir)/Python/opcode_targets.h $(srcdir)/Python/ceval_gil.h \ + $(srcdir)/Python/condvar.h + +Python/frozen.o: $(srcdir)/Python/importlib.h $(srcdir)/Python/importlib_external.h \ + $(srcdir)/Python/importlib_zipimport.h $(srcdir)/Python/frozen_hello.h + +# Generate DTrace probe macros, then rename them (PYTHON_ -> PyDTrace_) to +# follow our naming conventions. dtrace(1) uses the output filename to generate +# an include guard, so we can't use a pipeline to transform its output. +Include/pydtrace_probes.h: $(srcdir)/Include/pydtrace.d + $(MKDIR_P) Include + $(DTRACE) $(DFLAGS) -o $@ -h -s $< + : sed in-place edit with POSIX-only tools + sed 's/PYTHON_/PyDTrace_/' $@ > $@.tmp + mv $@.tmp $@ + +Python/ceval.o: $(srcdir)/Include/pydtrace.h +Python/import.o: $(srcdir)/Include/pydtrace.h +Modules/gcmodule.o: $(srcdir)/Include/pydtrace.h + +Python/pydtrace.o: $(srcdir)/Include/pydtrace.d $(DTRACE_DEPS) + $(DTRACE) $(DFLAGS) -o $@ -G -s $< $(DTRACE_DEPS) + +Objects/typeobject.o: Objects/typeslots.inc + +.PHONY: regen-typeslots +regen-typeslots: + # Regenerate Objects/typeslots.inc from Include/typeslotsh + # using Objects/typeslots.py + $(PYTHON_FOR_REGEN) $(srcdir)/Objects/typeslots.py \ + < $(srcdir)/Include/typeslots.h \ + $(srcdir)/Objects/typeslots.inc.new + $(UPDATE_FILE) $(srcdir)/Objects/typeslots.inc $(srcdir)/Objects/typeslots.inc.new + +############################################################################ +# Header files + +PYTHON_HEADERS= \ + $(srcdir)/Include/Python.h \ + $(srcdir)/Include/abstract.h \ + $(srcdir)/Include/bltinmodule.h \ + $(srcdir)/Include/boolobject.h \ + $(srcdir)/Include/bytearrayobject.h \ + $(srcdir)/Include/bytesobject.h \ + $(srcdir)/Include/cellobject.h \ + $(srcdir)/Include/ceval.h \ + $(srcdir)/Include/classobject.h \ + $(srcdir)/Include/code.h \ + $(srcdir)/Include/codecs.h \ + $(srcdir)/Include/compile.h \ + $(srcdir)/Include/complexobject.h \ + $(srcdir)/Include/context.h \ + $(srcdir)/Include/descrobject.h \ + $(srcdir)/Include/dictobject.h \ + $(srcdir)/Include/dynamic_annotations.h \ + $(srcdir)/Include/enumobject.h \ + $(srcdir)/Include/errcode.h \ + $(srcdir)/Include/eval.h \ + $(srcdir)/Include/fileobject.h \ + $(srcdir)/Include/fileutils.h \ + $(srcdir)/Include/floatobject.h \ + $(srcdir)/Include/frameobject.h \ + $(srcdir)/Include/funcobject.h \ + $(srcdir)/Include/genobject.h \ + $(srcdir)/Include/import.h \ + $(srcdir)/Include/interpreteridobject.h \ + $(srcdir)/Include/intrcheck.h \ + $(srcdir)/Include/iterobject.h \ + $(srcdir)/Include/listobject.h \ + $(srcdir)/Include/longintrepr.h \ + $(srcdir)/Include/longobject.h \ + $(srcdir)/Include/marshal.h \ + $(srcdir)/Include/memoryobject.h \ + $(srcdir)/Include/methodobject.h \ + $(srcdir)/Include/modsupport.h \ + $(srcdir)/Include/moduleobject.h \ + $(srcdir)/Include/namespaceobject.h \ + $(srcdir)/Include/object.h \ + $(srcdir)/Include/objimpl.h \ + $(srcdir)/Include/opcode.h \ + $(srcdir)/Include/osdefs.h \ + $(srcdir)/Include/osmodule.h \ + $(srcdir)/Include/patchlevel.h \ + $(srcdir)/Include/pycapsule.h \ + $(srcdir)/Include/pydtrace.h \ + $(srcdir)/Include/pyerrors.h \ + $(srcdir)/Include/pyframe.h \ + $(srcdir)/Include/pyhash.h \ + $(srcdir)/Include/pylifecycle.h \ + $(srcdir)/Include/pymacconfig.h \ + $(srcdir)/Include/pymacro.h \ + $(srcdir)/Include/pymath.h \ + $(srcdir)/Include/pymem.h \ + $(srcdir)/Include/pyport.h \ + $(srcdir)/Include/pystate.h \ + $(srcdir)/Include/pystrcmp.h \ + $(srcdir)/Include/pystrhex.h \ + $(srcdir)/Include/pystrtod.h \ + $(srcdir)/Include/pythonrun.h \ + $(srcdir)/Include/pythread.h \ + $(srcdir)/Include/rangeobject.h \ + $(srcdir)/Include/setobject.h \ + $(srcdir)/Include/sliceobject.h \ + $(srcdir)/Include/structmember.h \ + $(srcdir)/Include/structseq.h \ + $(srcdir)/Include/sysmodule.h \ + $(srcdir)/Include/token.h \ + $(srcdir)/Include/traceback.h \ + $(srcdir)/Include/tracemalloc.h \ + $(srcdir)/Include/tupleobject.h \ + $(srcdir)/Include/unicodeobject.h \ + $(srcdir)/Include/warnings.h \ + $(srcdir)/Include/weakrefobject.h \ + \ + pyconfig.h \ + $(PARSER_HEADERS) \ + \ + $(srcdir)/Include/cpython/abstract.h \ + $(srcdir)/Include/cpython/bytearrayobject.h \ + $(srcdir)/Include/cpython/bytesobject.h \ + $(srcdir)/Include/cpython/ceval.h \ + $(srcdir)/Include/cpython/code.h \ + $(srcdir)/Include/cpython/compile.h \ + $(srcdir)/Include/cpython/dictobject.h \ + $(srcdir)/Include/cpython/fileobject.h \ + $(srcdir)/Include/cpython/fileutils.h \ + $(srcdir)/Include/cpython/frameobject.h \ + $(srcdir)/Include/cpython/import.h \ + $(srcdir)/Include/cpython/initconfig.h \ + $(srcdir)/Include/cpython/interpreteridobject.h \ + $(srcdir)/Include/cpython/listobject.h \ + $(srcdir)/Include/cpython/methodobject.h \ + $(srcdir)/Include/cpython/object.h \ + $(srcdir)/Include/cpython/objimpl.h \ + $(srcdir)/Include/cpython/odictobject.h \ + $(srcdir)/Include/cpython/picklebufobject.h \ + $(srcdir)/Include/cpython/pyctype.h \ + $(srcdir)/Include/cpython/pydebug.h \ + $(srcdir)/Include/cpython/pyerrors.h \ + $(srcdir)/Include/cpython/pyfpe.h \ + $(srcdir)/Include/cpython/pylifecycle.h \ + $(srcdir)/Include/cpython/pymem.h \ + $(srcdir)/Include/cpython/pystate.h \ + $(srcdir)/Include/cpython/pythonrun.h \ + $(srcdir)/Include/cpython/pytime.h \ + $(srcdir)/Include/cpython/sysmodule.h \ + $(srcdir)/Include/cpython/traceback.h \ + $(srcdir)/Include/cpython/tupleobject.h \ + $(srcdir)/Include/cpython/unicodeobject.h \ + \ + $(srcdir)/Include/internal/pycore_abstract.h \ + $(srcdir)/Include/internal/pycore_accu.h \ + $(srcdir)/Include/internal/pycore_asdl.h \ + $(srcdir)/Include/internal/pycore_ast.h \ + $(srcdir)/Include/internal/pycore_ast_state.h \ + $(srcdir)/Include/internal/pycore_atomic.h \ + $(srcdir)/Include/internal/pycore_atomic_funcs.h \ + $(srcdir)/Include/internal/pycore_bitutils.h \ + $(srcdir)/Include/internal/pycore_bytes_methods.h \ + $(srcdir)/Include/internal/pycore_call.h \ + $(srcdir)/Include/internal/pycore_ceval.h \ + $(srcdir)/Include/internal/pycore_code.h \ + $(srcdir)/Include/internal/pycore_compile.h \ + $(srcdir)/Include/internal/pycore_condvar.h \ + $(srcdir)/Include/internal/pycore_context.h \ + $(srcdir)/Include/internal/pycore_dtoa.h \ + $(srcdir)/Include/internal/pycore_fileutils.h \ + $(srcdir)/Include/internal/pycore_format.h \ + $(srcdir)/Include/internal/pycore_getopt.h \ + $(srcdir)/Include/internal/pycore_gil.h \ + $(srcdir)/Include/internal/pycore_hamt.h \ + $(srcdir)/Include/internal/pycore_hashtable.h \ + $(srcdir)/Include/internal/pycore_import.h \ + $(srcdir)/Include/internal/pycore_initconfig.h \ + $(srcdir)/Include/internal/pycore_interp.h \ + $(srcdir)/Include/internal/pycore_list.h \ + $(srcdir)/Include/internal/pycore_long.h \ + $(srcdir)/Include/internal/pycore_moduleobject.h \ + $(srcdir)/Include/internal/pycore_object.h \ + $(srcdir)/Include/internal/pycore_pathconfig.h \ + $(srcdir)/Include/internal/pycore_pyarena.h \ + $(srcdir)/Include/internal/pycore_pyerrors.h \ + $(srcdir)/Include/internal/pycore_pyhash.h \ + $(srcdir)/Include/internal/pycore_pylifecycle.h \ + $(srcdir)/Include/internal/pycore_pymem.h \ + $(srcdir)/Include/internal/pycore_pystate.h \ + $(srcdir)/Include/internal/pycore_runtime.h \ + $(srcdir)/Include/internal/pycore_structseq.h \ + $(srcdir)/Include/internal/pycore_symtable.h \ + $(srcdir)/Include/internal/pycore_sysmodule.h \ + $(srcdir)/Include/internal/pycore_traceback.h \ + $(srcdir)/Include/internal/pycore_tuple.h \ + $(srcdir)/Include/internal/pycore_ucnhash.h \ + $(srcdir)/Include/internal/pycore_unionobject.h \ + $(srcdir)/Include/internal/pycore_warnings.h \ + $(DTRACE_HEADERS) \ + \ + $(srcdir)/Python/stdlib_module_names.h + +$(LIBRARY_OBJS) $(MODOBJS) Programs/python.o: $(PYTHON_HEADERS) + + +###################################################################### + +TESTOPTS= $(EXTRATESTOPTS) +TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) $(TESTPYTHONOPTS) +TESTRUNNER= $(TESTPYTHON) $(srcdir)/Tools/scripts/run_tests.py +TESTTIMEOUT= 1200 + +.PHONY: test testall testuniversal buildbottest pythoninfo + +# Remove "test_python_*" directories of previous failed test jobs. +# Pass TESTOPTS options because it can contain --tempdir option. +cleantest: build_all + $(TESTRUNNER) $(TESTOPTS) --cleanup + +# Run a basic set of regression tests. +# This excludes some tests that are particularly resource-intensive. +test: build_all platform + $(TESTRUNNER) $(TESTOPTS) + +# Run the full test suite twice - once without .pyc files, and once with. +# In the past, we've had problems where bugs in the marshalling or +# elsewhere caused bytecode read from .pyc files to behave differently +# than bytecode generated directly from a .py source file. Sometimes +# the bytecode read from a .pyc file had the bug, sometimes the directly +# generated bytecode. This is sometimes a very shy bug needing a lot of +# sample data. +testall: build_all platform + -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f + $(TESTPYTHON) -E $(srcdir)/Lib/compileall.py + -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f + -$(TESTRUNNER) -u all $(TESTOPTS) + $(TESTRUNNER) -u all $(TESTOPTS) + +# Run the test suite for both architectures in a Universal build on OSX. +# Must be run on an Intel box. +testuniversal: build_all platform + @if [ `arch` != 'i386' ]; then \ + echo "This can only be used on OSX/i386" ;\ + exit 1 ;\ + fi + $(TESTRUNNER) -u all $(TESTOPTS) + $(RUNSHARED) /usr/libexec/oah/translate \ + ./$(BUILDPYTHON) -E -m test -j 0 -u all $(TESTOPTS) + +# Like testall, but with only one pass and without multiple processes. +# Run an optional script to include information about the build environment. +buildbottest: build_all platform + -@if which pybuildbot.identify >/dev/null 2>&1; then \ + pybuildbot.identify "CC='$(CC)'" "CXX='$(CXX)'"; \ + fi + $(TESTRUNNER) -j 1 -u all -W --slowest --fail-env-changed --timeout=$(TESTTIMEOUT) $(TESTOPTS) + +pythoninfo: build_all + $(RUNSHARED) ./$(BUILDPYTHON) -m test.pythoninfo + +QUICKTESTOPTS= $(TESTOPTS) -x test_subprocess test_io test_lib2to3 \ + test_multibytecodec test_urllib2_localnet test_itertools \ + test_multiprocessing_fork test_multiprocessing_spawn \ + test_multiprocessing_forkserver \ + test_mailbox test_socket test_poll \ + test_select test_zipfile test_concurrent_futures +quicktest: build_all platform + $(TESTRUNNER) $(QUICKTESTOPTS) + +# SSL tests +.PHONY: multisslcompile multissltest +multisslcompile: build_all + $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/ssl/multissltests.py --steps=modules + +multissltest: build_all + $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/ssl/multissltests.py + +install: commoninstall bininstall maninstall + if test "x$(ENSUREPIP)" != "xno" ; then \ + case $(ENSUREPIP) in \ + upgrade) ensurepip="--upgrade" ;; \ + install|*) ensurepip="" ;; \ + esac; \ + $(RUNSHARED) $(PY_BUILD_ENVIRON) $(PYTHON_FOR_BUILD) -m ensurepip \ + $$ensurepip --root=$(DESTDIR)/ ; \ + fi + +altinstall: commoninstall + if test "x$(ENSUREPIP)" != "xno" ; then \ + case $(ENSUREPIP) in \ + upgrade) ensurepip="--altinstall --upgrade" ;; \ + install|*) ensurepip="--altinstall" ;; \ + esac; \ + $(RUNSHARED) $(PY_BUILD_ENVIRON) $(PYTHON_FOR_BUILD) -m ensurepip \ + $$ensurepip --root=$(DESTDIR)/ ; \ + fi + +commoninstall: check-clean-src \ + altbininstall libinstall inclinstall libainstall \ + sharedinstall oldsharedinstall altmaninstall \ + + +# Install shared libraries enabled by Setup +DESTDIRS= $(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED) + +oldsharedinstall: $(DESTSHARED) $(SHAREDMODS) + @for i in X $(SHAREDMODS); do \ + if test $$i != X; then \ + echo $(INSTALL_SHARED) $$i $(DESTSHARED)/`basename $$i`; \ + $(INSTALL_SHARED) $$i $(DESTDIR)$(DESTSHARED)/`basename $$i`; \ + fi; \ + done + +$(DESTSHARED): + @for i in $(DESTDIRS); \ + do \ + if test ! -d $(DESTDIR)$$i; then \ + echo "Creating directory $$i"; \ + $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \ + else true; \ + fi; \ + done + +# Install the interpreter with $(VERSION) affixed +# This goes into $(exec_prefix) +altbininstall: $(BUILDPYTHON) + @for i in $(BINDIR) $(LIBDIR); \ + do \ + if test ! -d $(DESTDIR)$$i; then \ + echo "Creating directory $$i"; \ + $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \ + else true; \ + fi; \ + done + if test "$(PYTHONFRAMEWORKDIR)" = "no-framework" ; then \ + $(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/python$(LDVERSION)$(EXE); \ + else \ + $(INSTALL_PROGRAM) $(STRIPFLAG) Mac/pythonw $(DESTDIR)$(BINDIR)/python$(LDVERSION)$(EXE); \ + fi + -if test "$(VERSION)" != "$(LDVERSION)"; then \ + if test -f $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE) -o -h $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \ + then rm -f $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \ + fi; \ + (cd $(DESTDIR)$(BINDIR); $(LN) python$(LDVERSION)$(EXE) python$(VERSION)$(EXE)); \ + fi + @if test "$(PY_ENABLE_SHARED)" = 1 -o "$(STATIC_LIBPYTHON)" = 1; then \ + if test -f $(LDLIBRARY) && test "$(PYTHONFRAMEWORKDIR)" = "no-framework" ; then \ + if test -n "$(DLLLIBRARY)" ; then \ + $(INSTALL_SHARED) $(DLLLIBRARY) $(DESTDIR)$(BINDIR); \ + else \ + $(INSTALL_SHARED) $(LDLIBRARY) $(DESTDIR)$(LIBDIR)/$(INSTSONAME); \ + if test $(LDLIBRARY) != $(INSTSONAME); then \ + (cd $(DESTDIR)$(LIBDIR); $(LN) -sf $(INSTSONAME) $(LDLIBRARY)) \ + fi \ + fi; \ + if test -n "$(PY3LIBRARY)"; then \ + $(INSTALL_SHARED) $(PY3LIBRARY) $(DESTDIR)$(LIBDIR)/$(PY3LIBRARY); \ + fi; \ + else true; \ + fi; \ + fi + if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \ + rm -f $(DESTDIR)$(BINDIR)python$(VERSION)-32$(EXE); \ + lipo $(LIPO_32BIT_FLAGS) \ + -output $(DESTDIR)$(BINDIR)/python$(VERSION)-32$(EXE) \ + $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \ + fi + if test "x$(LIPO_INTEL64_FLAGS)" != "x" ; then \ + rm -f $(DESTDIR)$(BINDIR)python$(VERSION)-intel64$(EXE); \ + lipo $(LIPO_INTEL64_FLAGS) \ + -output $(DESTDIR)$(BINDIR)/python$(VERSION)-intel64$(EXE) \ + $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \ + fi + +bininstall: altbininstall + if test ! -d $(DESTDIR)$(LIBPC); then \ + echo "Creating directory $(LIBPC)"; \ + $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(LIBPC); \ + fi + -if test -f $(DESTDIR)$(BINDIR)/python3$(EXE) -o -h $(DESTDIR)$(BINDIR)/python3$(EXE); \ + then rm -f $(DESTDIR)$(BINDIR)/python3$(EXE); \ + else true; \ + fi + (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)$(EXE) python3$(EXE)) + -if test "$(VERSION)" != "$(LDVERSION)"; then \ + rm -f $(DESTDIR)$(BINDIR)/python$(VERSION)-config; \ + (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(LDVERSION)-config python$(VERSION)-config); \ + rm -f $(DESTDIR)$(LIBPC)/python-$(LDVERSION).pc; \ + (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python-$(LDVERSION).pc); \ + rm -f $(DESTDIR)$(LIBPC)/python-$(LDVERSION)-embed.pc; \ + (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION)-embed.pc python-$(LDVERSION)-embed.pc); \ + fi + -rm -f $(DESTDIR)$(BINDIR)/python3-config + (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python3-config) + -rm -f $(DESTDIR)$(LIBPC)/python3.pc + (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python3.pc) + -rm -f $(DESTDIR)$(LIBPC)/python3-embed.pc + (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION)-embed.pc python3-embed.pc) + -rm -f $(DESTDIR)$(BINDIR)/idle3 + (cd $(DESTDIR)$(BINDIR); $(LN) -s idle$(VERSION) idle3) + -rm -f $(DESTDIR)$(BINDIR)/pydoc3 + (cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3) + -rm -f $(DESTDIR)$(BINDIR)/2to3 + (cd $(DESTDIR)$(BINDIR); $(LN) -s 2to3-$(VERSION) 2to3) + if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \ + rm -f $(DESTDIR)$(BINDIR)/python3-32$(EXE); \ + (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-32$(EXE) python3-32$(EXE)) \ + fi + if test "x$(LIPO_INTEL64_FLAGS)" != "x" ; then \ + rm -f $(DESTDIR)$(BINDIR)/python3-intel64$(EXE); \ + (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-intel64$(EXE) python3-intel64$(EXE)) \ + fi + +# Install the versioned manual page +altmaninstall: + @for i in $(MANDIR) $(MANDIR)/man1; \ + do \ + if test ! -d $(DESTDIR)$$i; then \ + echo "Creating directory $$i"; \ + $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \ + else true; \ + fi; \ + done + $(INSTALL_DATA) $(srcdir)/Misc/python.man \ + $(DESTDIR)$(MANDIR)/man1/python$(VERSION).1 + +# Install the unversioned manual page +maninstall: altmaninstall + -rm -f $(DESTDIR)$(MANDIR)/man1/python3.1 + (cd $(DESTDIR)$(MANDIR)/man1; $(LN) -s python$(VERSION).1 python3.1) + +# Install the library +XMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax +LIBSUBDIRS= asyncio \ + collections \ + concurrent concurrent/futures \ + csv \ + ctypes ctypes/macholib \ + curses \ + dbm \ + distutils distutils/command \ + email email/mime \ + encodings \ + ensurepip ensurepip/_bundled \ + html \ + http \ + idlelib idlelib/Icons \ + importlib importlib/metadata \ + json \ + lib2to3 lib2to3/fixes lib2to3/pgen2 \ + logging \ + multiprocessing multiprocessing/dummy \ + pydoc_data \ + site-packages \ + sqlite3 \ + tkinter \ + turtledemo \ + unittest \ + urllib \ + venv venv/scripts venv/scripts/common venv/scripts/posix \ + wsgiref \ + $(XMLLIBSUBDIRS) \ + xmlrpc \ + zoneinfo +TESTSUBDIRS= ctypes/test \ + distutils/tests \ + idlelib/idle_test \ + lib2to3/tests \ + lib2to3/tests/data \ + lib2to3/tests/data/fixers \ + lib2to3/tests/data/fixers/myfixes \ + sqlite3/test \ + test test/audiodata \ + test/capath test/cjkencodings \ + test/data test/decimaltestdata \ + test/dtracedata test/eintrdata \ + test/encoded_modules test/imghdrdata \ + test/libregrtest test/sndhdrdata \ + test/subprocessdata test/support \ + test/test_asyncio \ + test/test_email test/test_email/data \ + test/test_import \ + test/test_import/data \ + test/test_import/data/circular_imports \ + test/test_import/data/circular_imports/subpkg \ + test/test_import/data/package \ + test/test_import/data/package2 \ + test/test_import/data/unwritable \ + test/test_importlib \ + test/test_importlib/builtin \ + test/test_importlib/data \ + test/test_importlib/data01 \ + test/test_importlib/data01/subdirectory \ + test/test_importlib/data02 \ + test/test_importlib/data02/one \ + test/test_importlib/data02/two \ + test/test_importlib/data03 \ + test/test_importlib/data03/namespace \ + test/test_importlib/data03/namespace/portion1 \ + test/test_importlib/data03/namespace/portion2 \ + test/test_importlib/extension \ + test/test_importlib/frozen \ + test/test_importlib/import_ \ + test/test_importlib/namespace_pkgs \ + test/test_importlib/namespace_pkgs/both_portions \ + test/test_importlib/namespace_pkgs/both_portions/foo \ + test/test_importlib/namespace_pkgs/module_and_namespace_package \ + test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test \ + test/test_importlib/namespace_pkgs/not_a_namespace_pkg \ + test/test_importlib/namespace_pkgs/not_a_namespace_pkg/foo \ + test/test_importlib/namespace_pkgs/portion1 \ + test/test_importlib/namespace_pkgs/portion1/foo \ + test/test_importlib/namespace_pkgs/portion2 \ + test/test_importlib/namespace_pkgs/portion2/foo \ + test/test_importlib/namespace_pkgs/project1 \ + test/test_importlib/namespace_pkgs/project1/parent \ + test/test_importlib/namespace_pkgs/project1/parent/child \ + test/test_importlib/namespace_pkgs/project2 \ + test/test_importlib/namespace_pkgs/project2/parent \ + test/test_importlib/namespace_pkgs/project2/parent/child \ + test/test_importlib/namespace_pkgs/project3 \ + test/test_importlib/namespace_pkgs/project3/parent \ + test/test_importlib/namespace_pkgs/project3/parent/child \ + test/test_importlib/namespacedata01 \ + test/test_importlib/partial \ + test/test_importlib/source \ + test/test_importlib/zipdata01 \ + test/test_importlib/zipdata02 \ + test/test_json \ + test/test_peg_generator \ + test/test_tools \ + test/test_warnings test/test_warnings/data \ + test/test_zoneinfo test/test_zoneinfo/data \ + test/tracedmodules \ + test/typinganndata \ + test/xmltestdata test/xmltestdata/c14n-20 \ + test/ziptestdata \ + tkinter/test tkinter/test/test_tkinter \ + tkinter/test/test_ttk \ + unittest/test unittest/test/testmock + +TEST_MODULES=yes +libinstall: build_all $(srcdir)/Modules/xxmodule.c + @for i in $(SCRIPTDIR) $(LIBDEST); \ + do \ + if test ! -d $(DESTDIR)$$i; then \ + echo "Creating directory $$i"; \ + $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \ + else true; \ + fi; \ + done + @if test "$(TEST_MODULES)" = yes; then \ + subdirs="$(LIBSUBDIRS) $(TESTSUBDIRS)"; \ + else \ + subdirs="$(LIBSUBDIRS)"; \ + fi; \ + for d in $$subdirs; \ + do \ + a=$(srcdir)/Lib/$$d; \ + if test ! -d $$a; then continue; else true; fi; \ + b=$(LIBDEST)/$$d; \ + if test ! -d $(DESTDIR)$$b; then \ + echo "Creating directory $$b"; \ + $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$b; \ + else true; \ + fi; \ + done + @for i in $(srcdir)/Lib/*.py; \ + do \ + if test -x $$i; then \ + $(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \ + echo $(INSTALL_SCRIPT) $$i $(LIBDEST); \ + else \ + $(INSTALL_DATA) $$i $(DESTDIR)$(LIBDEST); \ + echo $(INSTALL_DATA) $$i $(LIBDEST); \ + fi; \ + done + @if test "$(TEST_MODULES)" = yes; then \ + subdirs="$(LIBSUBDIRS) $(TESTSUBDIRS)"; \ + else \ + subdirs="$(LIBSUBDIRS)"; \ + fi; \ + for d in $$subdirs; \ + do \ + a=$(srcdir)/Lib/$$d; \ + if test ! -d $$a; then continue; else true; fi; \ + if test `ls $$a | wc -l` -lt 1; then continue; fi; \ + b=$(LIBDEST)/$$d; \ + for i in $$a/*; \ + do \ + case $$i in \ + *CVS) ;; \ + *.py[co]) ;; \ + *.orig) ;; \ + *~) ;; \ + *) \ + if test -d $$i; then continue; fi; \ + if test -x $$i; then \ + echo $(INSTALL_SCRIPT) $$i $$b; \ + $(INSTALL_SCRIPT) $$i $(DESTDIR)$$b; \ + else \ + echo $(INSTALL_DATA) $$i $$b; \ + $(INSTALL_DATA) $$i $(DESTDIR)$$b; \ + fi;; \ + esac; \ + done; \ + done + $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py \ + $(DESTDIR)$(LIBDEST); \ + $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt + if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \ + $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ + $(DESTDIR)$(LIBDEST)/distutils/tests ; \ + fi + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ + -j0 -d $(LIBDEST) -f \ + -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ + $(DESTDIR)$(LIBDEST) + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \ + -j0 -d $(LIBDEST) -f \ + -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ + $(DESTDIR)$(LIBDEST) + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \ + -j0 -d $(LIBDEST) -f \ + -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ + $(DESTDIR)$(LIBDEST) + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ + -j0 -d $(LIBDEST)/site-packages -f \ + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \ + -j0 -d $(LIBDEST)/site-packages -f \ + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \ + -j0 -d $(LIBDEST)/site-packages -f \ + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt + +# bpo-21536: Misc/python-config.sh is generated in the build directory +# from $(srcdir)Misc/python-config.sh.in. +python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh + @ # Substitution happens here, as the completely-expanded BINDIR + @ # is not available in configure + sed -e "s,@EXENAME@,$(BINDIR)/python$(LDVERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config.py + @ # Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR} + LC_ALL=C sed -e 's,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g' < Misc/python-config.sh >python-config + @ # On Darwin, always use the python version of the script, the shell + @ # version doesn't use the compiler customizations that are provided + @ # in python (_osx_support.py). + @if test `uname -s` = Darwin; then \ + cp python-config.py python-config; \ + fi + + +# Install the include files +INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY) +inclinstall: + @for i in $(INCLDIRSTOMAKE); \ + do \ + if test ! -d $(DESTDIR)$$i; then \ + echo "Creating directory $$i"; \ + $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \ + else true; \ + fi; \ + done + @if test ! -d $(DESTDIR)$(INCLUDEPY)/cpython; then \ + echo "Creating directory $(DESTDIR)$(INCLUDEPY)/cpython"; \ + $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(INCLUDEPY)/cpython; \ + else true; \ + fi + @if test ! -d $(DESTDIR)$(INCLUDEPY)/internal; then \ + echo "Creating directory $(DESTDIR)$(INCLUDEPY)/internal"; \ + $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(INCLUDEPY)/internal; \ + else true; \ + fi + @for i in $(srcdir)/Include/*.h; \ + do \ + echo $(INSTALL_DATA) $$i $(INCLUDEPY); \ + $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY); \ + done + @for i in $(srcdir)/Include/cpython/*.h; \ + do \ + echo $(INSTALL_DATA) $$i $(INCLUDEPY)/cpython; \ + $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY)/cpython; \ + done + @for i in $(srcdir)/Include/internal/*.h; \ + do \ + echo $(INSTALL_DATA) $$i $(INCLUDEPY)/internal; \ + $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY)/internal; \ + done + $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h + +# Install the library and miscellaneous stuff needed for extending/embedding +# This goes into $(exec_prefix) +LIBPL= $(prefix)/lib/python3.10/config-$(VERSION)$(ABIFLAGS)-x86_64-linux-gnu + +# pkgconfig directory +LIBPC= $(LIBDIR)/pkgconfig + +libainstall: build_all python-config + @for i in $(LIBDIR) $(LIBPL) $(LIBPC) $(BINDIR); \ + do \ + if test ! -d $(DESTDIR)$$i; then \ + echo "Creating directory $$i"; \ + $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \ + else true; \ + fi; \ + done + @if test "$(STATIC_LIBPYTHON)" = 1; then \ + if test -d $(LIBRARY); then :; else \ + if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \ + if test "$(SHLIB_SUFFIX)" = .dll; then \ + $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \ + else \ + $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \ + fi; \ + else \ + echo Skip install of $(LIBRARY) - use make frameworkinstall; \ + fi; \ + fi; \ + $(INSTALL_DATA) Programs/python.o $(DESTDIR)$(LIBPL)/python.o; \ + fi + $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c + $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in + $(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile + $(INSTALL_DATA) $(srcdir)/Modules/Setup $(DESTDIR)$(LIBPL)/Setup + $(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local + $(INSTALL_DATA) Misc/python.pc $(DESTDIR)$(LIBPC)/python-$(VERSION).pc + $(INSTALL_DATA) Misc/python-embed.pc $(DESTDIR)$(LIBPC)/python-$(VERSION)-embed.pc + $(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup + $(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh + $(INSTALL_SCRIPT) python-config.py $(DESTDIR)$(LIBPL)/python-config.py + $(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(LDVERSION)-config + @if [ -s Modules/python.exp -a \ + "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \ + echo; echo "Installing support files for building shared extension modules on AIX:"; \ + $(INSTALL_DATA) Modules/python.exp \ + $(DESTDIR)$(LIBPL)/python.exp; \ + echo; echo "$(LIBPL)/python.exp"; \ + $(INSTALL_SCRIPT) $(srcdir)/Modules/makexp_aix \ + $(DESTDIR)$(LIBPL)/makexp_aix; \ + echo "$(LIBPL)/makexp_aix"; \ + $(INSTALL_SCRIPT) Modules/ld_so_aix \ + $(DESTDIR)$(LIBPL)/ld_so_aix; \ + echo "$(LIBPL)/ld_so_aix"; \ + echo; echo "See Misc/README.AIX for details."; \ + else true; \ + fi + +# Install the dynamically loadable modules +# This goes into $(exec_prefix) +sharedinstall: sharedmods + $(RUNSHARED) $(PY_BUILD_ENVIRON) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \ + --prefix=$(prefix) \ + --install-scripts=$(BINDIR) \ + --install-platlib=$(DESTSHARED) \ + --root=$(DESTDIR)/ + -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py + -rm -r $(DESTDIR)$(DESTSHARED)/__pycache__ + +# Here are a couple of targets for MacOSX again, to install a full +# framework-based Python. frameworkinstall installs everything, the +# subtargets install specific parts. Much of the actual work is offloaded to +# the Makefile in Mac +# +# +# This target is here for backward compatibility, previous versions of Python +# hadn't integrated framework installation in the normal install process. +frameworkinstall: install + +# On install, we re-make the framework +# structure in the install location, /Library/Frameworks/ or the argument to +# --enable-framework. If --enable-framework has been specified then we have +# automatically set prefix to the location deep down in the framework, so we +# only have to cater for the structural bits of the framework. + +frameworkinstallframework: frameworkinstallstructure install frameworkinstallmaclib + +frameworkinstallstructure: $(LDLIBRARY) + @if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \ + echo Not configured with --enable-framework; \ + exit 1; \ + else true; \ + fi + @for i in $(prefix)/Resources/English.lproj $(prefix)/lib; do\ + if test ! -d $(DESTDIR)$$i; then \ + echo "Creating directory $(DESTDIR)$$i"; \ + $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \ + else true; \ + fi; \ + done + $(LN) -fsn include/python$(LDVERSION) $(DESTDIR)$(prefix)/Headers + sed 's/%VERSION%/'"`$(RUNSHARED) ./$(BUILDPYTHON) -c 'import platform; print(platform.python_version())'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist + $(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current + $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK) + $(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers + $(LN) -fsn Versions/Current/Resources $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Resources + $(INSTALL_SHARED) $(LDLIBRARY) $(DESTDIR)$(PYTHONFRAMEWORKPREFIX)/$(LDLIBRARY) + +# This installs Mac/Lib into the framework +# Install a number of symlinks to keep software that expects a normal unix +# install (which includes python-config) happy. +frameworkinstallmaclib: + $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(LDVERSION).a" + $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(LDVERSION).dylib" + $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(VERSION).a" + $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(VERSION).dylib" + $(LN) -fs "../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/libpython$(LDVERSION).dylib" + $(LN) -fs "../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/libpython$(VERSION).dylib" + +# This installs the IDE, the Launcher and other apps into /Applications +frameworkinstallapps: + cd Mac && $(MAKE) installapps DESTDIR="$(DESTDIR)" + +# Build the bootstrap executable that will spawn the interpreter inside +# an app bundle within the framework. This allows the interpreter to +# run OS X GUI APIs. +frameworkpythonw: + cd Mac && $(MAKE) pythonw + +# This installs the python* and other bin symlinks in $prefix/bin or in +# a bin directory relative to the framework root +frameworkinstallunixtools: + cd Mac && $(MAKE) installunixtools DESTDIR="$(DESTDIR)" + +frameworkaltinstallunixtools: + cd Mac && $(MAKE) altinstallunixtools DESTDIR="$(DESTDIR)" + +# This installs the Tools into the applications directory. +# It is not part of a normal frameworkinstall +frameworkinstallextras: + cd Mac && $(MAKE) installextras DESTDIR="$(DESTDIR)" + +# Build the toplevel Makefile +Makefile.pre: $(srcdir)/Makefile.pre.in config.status + CONFIG_FILES=Makefile.pre CONFIG_HEADERS= $(SHELL) config.status + $(MAKE) -f Makefile.pre Makefile + +# Run the configure script. +config.status: $(srcdir)/configure + $(SHELL) $(srcdir)/configure $(CONFIG_ARGS) + +.PRECIOUS: config.status $(BUILDPYTHON) Makefile Makefile.pre + +# Some make's put the object file in the current directory +.c.o: + $(CC) -c $(PY_CORE_CFLAGS) -o $@ $< + +# bpo-30104: dtoa.c uses union to cast double to unsigned long[2]. clang 4.0 +# with -O2 or higher and strict aliasing miscompiles the ratio() function +# causing rounding issues. Compile dtoa.c using -fno-strict-aliasing on clang. +# https://bugs.llvm.org//show_bug.cgi?id=31928 +Python/dtoa.o: Python/dtoa.c + $(CC) -c $(PY_CORE_CFLAGS) $(CFLAGS_ALIASING) -o $@ $< + +# Run reindent on the library +reindent: + ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib + +# Rerun configure with the same options as it was run last time, +# provided the config.status script exists +recheck: + $(SHELL) config.status --recheck + $(SHELL) config.status + +# Regenerate configure and pyconfig.h.in +.PHONY: autoconf +autoconf: + # Regenerate the configure script from configure.ac using autoconf + (cd $(srcdir); autoconf -Wall) + # Regenerate pyconfig.h.in from configure.ac using autoheader + (cd $(srcdir); autoheader -Wall) + +# See https://github.com/tiran/cpython_autoconf container +.PHONY: regen-configure +regen-configure: + @if command -v podman >/dev/null; then RUNTIME="podman"; else RUNTIME="docker"; fi; \ + if ! command -v $$RUNTIME; then echo "$@ needs either Podman or Docker container runtime." >&2; exit 1; fi; \ + if command -v selinuxenabled >/dev/null && selinuxenabled; then OPT=":Z"; fi; \ + # Manifest corresponds with tag '269' \ + CPYTHON_AUTOCONF_MANIFEST="sha256:f370fee95eefa3d57b00488bce4911635411fa83e2d293ced8cf8a3674ead939" \ + CMD="$$RUNTIME run --rm --pull=missing -v $(abs_srcdir):/src$$OPT quay.io/tiran/cpython_autoconf@$$CPYTHON_AUTOCONF_MANIFEST"; \ + echo $$CMD; \ + $$CMD || exit $? + +# Create a tags file for vi +tags:: + ctags -w $(srcdir)/Include/*.h $(srcdir)/Include/cpython/*.h $(srcdir)/Include/internal/*.h + for i in $(SRCDIRS); do ctags -f tags -w -a $(srcdir)/$$i/*.[ch]; done + ctags -f tags -w -a $(srcdir)/Modules/_ctypes/*.[ch] + find $(srcdir)/Lib -type f -name "*.py" -not -name "test_*.py" -not -path "*/test/*" -not -path "*/tests/*" -not -path "*/*_test/*" | ctags -f tags -w -a -L - + LC_ALL=C sort -o tags tags + +# Create a tags file for GNU Emacs +TAGS:: + cd $(srcdir); \ + etags Include/*.h Include/cpython/*.h Include/internal/*.h; \ + for i in $(SRCDIRS); do etags -a $$i/*.[ch]; done + etags -a $(srcdir)/Modules/_ctypes/*.[ch] + find $(srcdir)/Lib -type f -name "*.py" -not -name "test_*.py" -not -path "*/test/*" -not -path "*/tests/*" -not -path "*/*_test/*" | etags - -a + +# Sanitation targets -- clean leaves libraries, executables and tags +# files, which clobber removes as well +pycremoval: + -find $(srcdir) -depth -name '__pycache__' -exec rm -rf {} ';' + -find $(srcdir) -name '*.py[co]' -exec rm -f {} ';' + +rmtestturds: + -rm -f *BAD *GOOD *SKIPPED + -rm -rf OUT + -rm -f *.TXT + -rm -f *.txt + -rm -f gb-18030-2000.xml + +docclean: + $(MAKE) -C $(srcdir)/Doc clean + +# like the 'clean' target but retain the profile guided optimization (PGO) +# data. The PGO data is only valid if source code remains unchanged. +clean-retain-profile: pycremoval + find . -name '*.[oa]' -exec rm -f {} ';' + find . -name '*.s[ol]' -exec rm -f {} ';' + find . -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';' + find . -name '*.lst' -exec rm -f {} ';' + find build -name 'fficonfig.h' -exec rm -f {} ';' || true + find build -name '*.py' -exec rm -f {} ';' || true + find build -name '*.py[co]' -exec rm -f {} ';' || true + -rm -f pybuilddir.txt + -rm -f Lib/lib2to3/*Grammar*.pickle + -rm -f Programs/_testembed Programs/_freeze_importlib + -find build -type f -a ! -name '*.gc??' -exec rm -f {} ';' + -rm -f Include/pydtrace_probes.h + -rm -f profile-gen-stamp + +profile-removal: + find . -name '*.gc??' -exec rm -f {} ';' + find . -name '*.profclang?' -exec rm -f {} ';' + find . -name '*.dyn' -exec rm -f {} ';' + rm -f $(COVERAGE_INFO) + rm -rf $(COVERAGE_REPORT) + rm -f profile-run-stamp + +clean: clean-retain-profile + @if test profile-opt = profile-opt; then \ + rm -f profile-gen-stamp profile-clean-stamp; \ + $(MAKE) profile-removal; \ + fi + +clobber: clean + -rm -f $(BUILDPYTHON) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \ + tags TAGS \ + config.cache config.log pyconfig.h Modules/config.c + -rm -rf build platform + -rm -rf $(PYTHONFRAMEWORKDIR) + -rm -f python-config.py python-config + +# Make things extra clean, before making a distribution: +# remove all generated files, even Makefile[.pre] +# Keep configure and Python-ast.[ch], it's possible they can't be generated +distclean: clobber docclean + for file in $(srcdir)/Lib/test/data/* ; do \ + if test "$$file" != "$(srcdir)/Lib/test/data/README"; then rm "$$file"; fi; \ + done + -rm -f core Makefile Makefile.pre config.status Modules/Setup.local \ + Modules/ld_so_aix Modules/python.exp Misc/python.pc \ + Misc/python-embed.pc Misc/python-config.sh + -rm -f python*-gdb.py + # Issue #28258: set LC_ALL to avoid issues with Estonian locale. + # Expansion is performed here by shell (spawned by make) itself before + # arguments are passed to find. So LC_ALL=C must be set as a separate + # command. + LC_ALL=C; find $(srcdir)/[a-zA-Z]* '(' -name '*.fdc' -o -name '*~' \ + -o -name '[@,#]*' -o -name '*.old' \ + -o -name '*.orig' -o -name '*.rej' \ + -o -name '*.bak' ')' \ + -exec rm -f {} ';' + +# Check that all symbols exported by libpython start with "Py" or "_Py" +smelly: build_all + $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/smelly.py + +# Find files with funny names +funny: + find $(SUBDIRS) $(SUBDIRSTOO) \ + -type d \ + -o -name '*.[chs]' \ + -o -name '*.py' \ + -o -name '*.pyw' \ + -o -name '*.dat' \ + -o -name '*.el' \ + -o -name '*.fd' \ + -o -name '*.in' \ + -o -name '*.gif' \ + -o -name '*.txt' \ + -o -name '*.xml' \ + -o -name '*.xbm' \ + -o -name '*.xpm' \ + -o -name '*.uue' \ + -o -name '*.decTest' \ + -o -name '*.tmCommand' \ + -o -name '*.tmSnippet' \ + -o -name 'Setup' \ + -o -name 'Setup.*' \ + -o -name README \ + -o -name NEWS \ + -o -name HISTORY \ + -o -name Makefile \ + -o -name ChangeLog \ + -o -name .hgignore \ + -o -name MANIFEST \ + -o -print + +# Perform some verification checks on any modified files. +patchcheck: build_all + $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py + +check-limited-abi: all + $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/stable_abi.py --all $(srcdir)/Misc/stable_abi.txt + +.PHONY: update-config +update-config: + curl -sL -o config.guess 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' + curl -sL -o config.sub 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' + chmod +x config.guess config.sub + +# Dependencies + +Python/thread.o: $(srcdir)/Python/thread_nt.h $(srcdir)/Python/thread_pthread.h $(srcdir)/Python/condvar.h + +# Declare targets that aren't real files +.PHONY: all build_all sharedmods check-clean-src oldsharedmods test quicktest +.PHONY: install altinstall oldsharedinstall bininstall altbininstall +.PHONY: maninstall libinstall inclinstall libainstall sharedinstall +.PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure +.PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools +.PHONY: frameworkaltinstallunixtools recheck clean clobber distclean +.PHONY: smelly funny patchcheck touch altmaninstall commoninstall +.PHONY: clean-retain-profile profile-removal run_profile_task +.PHONY: build_all_generate_profile build_all_merge_profile +.PHONY: gdbhooks + +# IF YOU PUT ANYTHING HERE IT WILL GO AWAY +# Local Variables: +# mode: makefile +# End: + +# Rules appended by makesetup + +Modules/posixmodule.o: $(srcdir)/Modules/posixmodule.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal -c $(srcdir)/Modules/posixmodule.c -o Modules/posixmodule.o +Modules/posix$(EXT_SUFFIX): Modules/posixmodule.o; $(BLDSHARED) Modules/posixmodule.o -o Modules/posix$(EXT_SUFFIX) +Modules/errnomodule.o: $(srcdir)/Modules/errnomodule.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/errnomodule.c -o Modules/errnomodule.o +Modules/errno$(EXT_SUFFIX): Modules/errnomodule.o; $(BLDSHARED) Modules/errnomodule.o -o Modules/errno$(EXT_SUFFIX) +Modules/pwdmodule.o: $(srcdir)/Modules/pwdmodule.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/pwdmodule.c -o Modules/pwdmodule.o +Modules/pwd$(EXT_SUFFIX): Modules/pwdmodule.o; $(BLDSHARED) Modules/pwdmodule.o -o Modules/pwd$(EXT_SUFFIX) +Modules/_sre.o: $(srcdir)/Modules/_sre.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN -c $(srcdir)/Modules/_sre.c -o Modules/_sre.o +Modules/_sre$(EXT_SUFFIX): Modules/_sre.o; $(BLDSHARED) Modules/_sre.o -o Modules/_sre$(EXT_SUFFIX) +Modules/_codecsmodule.o: $(srcdir)/Modules/_codecsmodule.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/_codecsmodule.c -o Modules/_codecsmodule.o +Modules/_codecs$(EXT_SUFFIX): Modules/_codecsmodule.o; $(BLDSHARED) Modules/_codecsmodule.o -o Modules/_codecs$(EXT_SUFFIX) +Modules/_weakref.o: $(srcdir)/Modules/_weakref.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/_weakref.c -o Modules/_weakref.o +Modules/_weakref$(EXT_SUFFIX): Modules/_weakref.o; $(BLDSHARED) Modules/_weakref.o -o Modules/_weakref$(EXT_SUFFIX) +Modules/_functoolsmodule.o: $(srcdir)/Modules/_functoolsmodule.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal -c $(srcdir)/Modules/_functoolsmodule.c -o Modules/_functoolsmodule.o +Modules/_functools$(EXT_SUFFIX): Modules/_functoolsmodule.o; $(BLDSHARED) Modules/_functoolsmodule.o -o Modules/_functools$(EXT_SUFFIX) +Modules/_operator.o: $(srcdir)/Modules/_operator.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN -c $(srcdir)/Modules/_operator.c -o Modules/_operator.o +Modules/_operator$(EXT_SUFFIX): Modules/_operator.o; $(BLDSHARED) Modules/_operator.o -o Modules/_operator$(EXT_SUFFIX) +Modules/_collectionsmodule.o: $(srcdir)/Modules/_collectionsmodule.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/_collectionsmodule.c -o Modules/_collectionsmodule.o +Modules/_collections$(EXT_SUFFIX): Modules/_collectionsmodule.o; $(BLDSHARED) Modules/_collectionsmodule.o -o Modules/_collections$(EXT_SUFFIX) +Modules/_abc.o: $(srcdir)/Modules/_abc.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN -c $(srcdir)/Modules/_abc.c -o Modules/_abc.o +Modules/_abc$(EXT_SUFFIX): Modules/_abc.o; $(BLDSHARED) Modules/_abc.o -o Modules/_abc$(EXT_SUFFIX) +Modules/itertoolsmodule.o: $(srcdir)/Modules/itertoolsmodule.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/itertoolsmodule.c -o Modules/itertoolsmodule.o +Modules/itertools$(EXT_SUFFIX): Modules/itertoolsmodule.o; $(BLDSHARED) Modules/itertoolsmodule.o -o Modules/itertools$(EXT_SUFFIX) +Modules/atexitmodule.o: $(srcdir)/Modules/atexitmodule.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/atexitmodule.c -o Modules/atexitmodule.o +Modules/atexit$(EXT_SUFFIX): Modules/atexitmodule.o; $(BLDSHARED) Modules/atexitmodule.o -o Modules/atexit$(EXT_SUFFIX) +Modules/signalmodule.o: $(srcdir)/Modules/signalmodule.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal -c $(srcdir)/Modules/signalmodule.c -o Modules/signalmodule.o +Modules/_signal$(EXT_SUFFIX): Modules/signalmodule.o; $(BLDSHARED) Modules/signalmodule.o -o Modules/_signal$(EXT_SUFFIX) +Modules/_stat.o: $(srcdir)/Modules/_stat.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/_stat.c -o Modules/_stat.o +Modules/_stat$(EXT_SUFFIX): Modules/_stat.o; $(BLDSHARED) Modules/_stat.o -o Modules/_stat$(EXT_SUFFIX) +Modules/timemodule.o: $(srcdir)/Modules/timemodule.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal -c $(srcdir)/Modules/timemodule.c -o Modules/timemodule.o +Modules/time$(EXT_SUFFIX): Modules/timemodule.o; $(BLDSHARED) Modules/timemodule.o -o Modules/time$(EXT_SUFFIX) +Modules/_threadmodule.o: $(srcdir)/Modules/_threadmodule.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal -c $(srcdir)/Modules/_threadmodule.c -o Modules/_threadmodule.o +Modules/_thread$(EXT_SUFFIX): Modules/_threadmodule.o; $(BLDSHARED) Modules/_threadmodule.o -o Modules/_thread$(EXT_SUFFIX) +Modules/_localemodule.o: $(srcdir)/Modules/_localemodule.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN -c $(srcdir)/Modules/_localemodule.c -o Modules/_localemodule.o +Modules/_locale$(EXT_SUFFIX): Modules/_localemodule.o; $(BLDSHARED) Modules/_localemodule.o -o Modules/_locale$(EXT_SUFFIX) +Modules/_iomodule.o: $(srcdir)/Modules/_io/_iomodule.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal -I$(srcdir)/Modules/_io -c $(srcdir)/Modules/_io/_iomodule.c -o Modules/_iomodule.o +Modules/iobase.o: $(srcdir)/Modules/_io/iobase.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal -I$(srcdir)/Modules/_io -c $(srcdir)/Modules/_io/iobase.c -o Modules/iobase.o +Modules/fileio.o: $(srcdir)/Modules/_io/fileio.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal -I$(srcdir)/Modules/_io -c $(srcdir)/Modules/_io/fileio.c -o Modules/fileio.o +Modules/bytesio.o: $(srcdir)/Modules/_io/bytesio.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal -I$(srcdir)/Modules/_io -c $(srcdir)/Modules/_io/bytesio.c -o Modules/bytesio.o +Modules/bufferedio.o: $(srcdir)/Modules/_io/bufferedio.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal -I$(srcdir)/Modules/_io -c $(srcdir)/Modules/_io/bufferedio.c -o Modules/bufferedio.o +Modules/textio.o: $(srcdir)/Modules/_io/textio.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal -I$(srcdir)/Modules/_io -c $(srcdir)/Modules/_io/textio.c -o Modules/textio.o +Modules/stringio.o: $(srcdir)/Modules/_io/stringio.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal -I$(srcdir)/Modules/_io -c $(srcdir)/Modules/_io/stringio.c -o Modules/stringio.o +Modules/_io$(EXT_SUFFIX): Modules/_iomodule.o Modules/iobase.o Modules/fileio.o Modules/bytesio.o Modules/bufferedio.o Modules/textio.o Modules/stringio.o; $(BLDSHARED) Modules/_iomodule.o Modules/iobase.o Modules/fileio.o Modules/bytesio.o Modules/bufferedio.o Modules/textio.o Modules/stringio.o -o Modules/_io$(EXT_SUFFIX) +Modules/faulthandler.o: $(srcdir)/Modules/faulthandler.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/faulthandler.c -o Modules/faulthandler.o +Modules/faulthandler$(EXT_SUFFIX): Modules/faulthandler.o; $(BLDSHARED) Modules/faulthandler.o -o Modules/faulthandler$(EXT_SUFFIX) +Modules/_tracemalloc.o: $(srcdir)/Modules/_tracemalloc.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/_tracemalloc.c -o Modules/_tracemalloc.o +Modules/_tracemalloc$(EXT_SUFFIX): Modules/_tracemalloc.o; $(BLDSHARED) Modules/_tracemalloc.o -o Modules/_tracemalloc$(EXT_SUFFIX) +Modules/symtablemodule.o: $(srcdir)/Modules/symtablemodule.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/symtablemodule.c -o Modules/symtablemodule.o +Modules/_symtable$(EXT_SUFFIX): Modules/symtablemodule.o; $(BLDSHARED) Modules/symtablemodule.o -o Modules/_symtable$(EXT_SUFFIX) +Modules/xxsubtype.o: $(srcdir)/Modules/xxsubtype.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/xxsubtype.c -o Modules/xxsubtype.o +Modules/xxsubtype$(EXT_SUFFIX): Modules/xxsubtype.o; $(BLDSHARED) Modules/xxsubtype.o -o Modules/xxsubtype$(EXT_SUFFIX) diff --git a/lib/python3.10/config-3.10-x86_64-linux-gnu/Setup b/lib/python3.10/config-3.10-x86_64-linux-gnu/Setup new file mode 100644 index 0000000000000000000000000000000000000000..87c6a152f86eac094d3a8ff64d389986cae16e66 --- /dev/null +++ b/lib/python3.10/config-3.10-x86_64-linux-gnu/Setup @@ -0,0 +1,377 @@ +# -*- makefile -*- +# The file Setup is used by the makesetup script to construct the files +# Makefile and config.c, from Makefile.pre and config.c.in, +# respectively. Note that Makefile.pre is created from Makefile.pre.in +# by the toplevel configure script. + +# (VPATH notes: Setup and Makefile.pre are in the build directory, as +# are Makefile and config.c; the *.in files are in the source directory.) + +# Each line in this file describes one or more optional modules. +# Modules configured here will not be compiled by the setup.py script, +# so the file can be used to override setup.py's behavior. +# Tag lines containing just the word "*static*", "*shared*" or "*disabled*" +# (without the quotes but with the stars) are used to tag the following module +# descriptions. Tag lines may alternate throughout this file. Modules are +# built statically when they are preceded by a "*static*" tag line or when +# there is no tag line between the start of the file and the module +# description. Modules are built as a shared library when they are preceded by +# a "*shared*" tag line. Modules are not built at all, not by the Makefile, +# nor by the setup.py script, when they are preceded by a "*disabled*" tag +# line. + +# Lines have the following structure: +# +# ... [ ...] [ ...] [ ...] +# +# is anything ending in .c (.C, .cc, .c++ are C++ files) +# is anything starting with -I, -D, -U or -C +# is anything ending in .a or beginning with -l or -L +# is anything else but should be a valid Python +# identifier (letters, digits, underscores, beginning with non-digit) +# +# (As the makesetup script changes, it may recognize some other +# arguments as well, e.g. *.so and *.sl as libraries. See the big +# case statement in the makesetup script.) +# +# Lines can also have the form +# +# = +# +# which defines a Make variable definition inserted into Makefile.in +# +# The build process works like this: +# +# 1. Build all modules that are declared as static in Modules/Setup, +# combine them into libpythonxy.a, combine that into python. +# 2. Build all modules that are listed as shared in Modules/Setup. +# 3. Invoke setup.py. That builds all modules that +# a) are not builtin, and +# b) are not listed in Modules/Setup, and +# c) can be build on the target +# +# Therefore, modules declared to be shared will not be +# included in the config.c file, nor in the list of objects to be +# added to the library archive, and their linker options won't be +# added to the linker options. Rules to create their .o files and +# their shared libraries will still be added to the Makefile, and +# their names will be collected in the Make variable SHAREDMODS. This +# is used to build modules as shared libraries. (They can be +# installed using "make sharedinstall", which is implied by the +# toplevel "make install" target.) (For compatibility, +# *noconfig* has the same effect as *shared*.) +# +# NOTE: As a standard policy, as many modules as can be supported by a +# platform should be present. The distribution comes with all modules +# enabled that are supported by most platforms and don't require you +# to ftp sources from elsewhere. + + +# Some special rules to define PYTHONPATH. +# Edit the definitions below to indicate which options you are using. +# Don't add any whitespace or comments! + +# Directories where library files get installed. +# DESTLIB is for Python modules; MACHDESTLIB for shared libraries. +DESTLIB=$(LIBDEST) +MACHDESTLIB=$(BINLIBDEST) + +# NOTE: all the paths are now relative to the prefix that is computed +# at run time! + +# Standard path -- don't edit. +# No leading colon since this is the first entry. +# Empty since this is now just the runtime prefix. +DESTPATH= + +# Site specific path components -- should begin with : if non-empty +SITEPATH= + +# Standard path components for test modules +TESTPATH= + +COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH) +PYTHONPATH=$(COREPYTHONPATH) + + +# The modules listed here can't be built as shared libraries for +# various reasons; therefore they are listed here instead of in the +# normal order. + +# This only contains the minimal set of modules required to run the +# setup.py script in the root of the Python source tree. + +posix -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal posixmodule.c # posix (UNIX) system calls +errno errnomodule.c # posix (UNIX) errno values +pwd pwdmodule.c # this is needed to find out the user's home dir + # if $HOME is not set +_sre -DPy_BUILD_CORE_BUILTIN _sre.c # Fredrik Lundh's new regular expressions +_codecs _codecsmodule.c # access to the builtin codecs and codec registry +_weakref _weakref.c # weak references +_functools -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal _functoolsmodule.c # Tools for working with functions and callable objects +_operator -DPy_BUILD_CORE_BUILTIN _operator.c # operator.add() and similar goodies +_collections _collectionsmodule.c # Container types +_abc -DPy_BUILD_CORE_BUILTIN _abc.c # Abstract base classes +itertools itertoolsmodule.c # Functions creating iterators for efficient looping +atexit atexitmodule.c # Register functions to be run at interpreter-shutdown +_signal -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal signalmodule.c +_stat _stat.c # stat.h interface +time -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal timemodule.c # -lm # time operations and variables +_thread -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal _threadmodule.c # low-level threading interface + +# access to ISO C locale support +_locale -DPy_BUILD_CORE_BUILTIN _localemodule.c # -lintl + +# Standard I/O baseline +_io -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal -I$(srcdir)/Modules/_io _io/_iomodule.c _io/iobase.c _io/fileio.c _io/bytesio.c _io/bufferedio.c _io/textio.c _io/stringio.c + +# faulthandler module +faulthandler faulthandler.c + +# debug tool to trace memory blocks allocated by Python +# +# bpo-35053: The module must be builtin since _Py_NewReference() +# can call _PyTraceMalloc_NewReference(). +_tracemalloc _tracemalloc.c + +# The rest of the modules listed in this file are all commented out by +# default. Usually they can be detected and built as dynamically +# loaded modules by the new setup.py script added in Python 2.1. If +# you're on a platform that doesn't support dynamic loading, want to +# compile modules statically into the Python binary, or need to +# specify some odd set of compiler switches, you can uncomment the +# appropriate lines below. + +# ====================================================================== + +# The Python symtable module depends on .h files that setup.py doesn't track +_symtable symtablemodule.c + +# Uncommenting the following line tells makesetup that all following +# modules are to be built as shared libraries (see above for more +# detail; also note that *static* or *disabled* cancels this effect): + +#*shared* + +# GNU readline. Unlike previous Python incarnations, GNU readline is +# now incorporated in an optional module, configured in the Setup file +# instead of by a configure script switch. You may have to insert a +# -L option pointing to the directory where libreadline.* lives, +# and you may have to change -ltermcap to -ltermlib or perhaps remove +# it, depending on your system -- see the GNU readline instructions. +# It's okay for this to be a shared library, too. + +#readline readline.c -lreadline -ltermcap + + +# Modules that should always be present (non UNIX dependent): + +#array -DPy_BUILD_CORE_MODULE arraymodule.c # array objects +#cmath cmathmodule.c _math.c -DPy_BUILD_CORE_MODULE # -lm # complex math library functions +#math mathmodule.c _math.c -DPy_BUILD_CORE_MODULE # -lm # math library functions, e.g. sin() +#_contextvars _contextvarsmodule.c # Context Variables +#_struct -DPy_BUILD_CORE_MODULE _struct.c # binary structure packing/unpacking +#_weakref _weakref.c # basic weak reference support +#_testcapi _testcapimodule.c # Python C API test module +#_testinternalcapi _testinternalcapi.c -I$(srcdir)/Include/internal -DPy_BUILD_CORE_MODULE # Python internal C API test module +#_random _randommodule.c -DPy_BUILD_CORE_MODULE # Random number generator +#_elementtree -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI _elementtree.c # elementtree accelerator +#_pickle -DPy_BUILD_CORE_MODULE _pickle.c # pickle accelerator +#_datetime _datetimemodule.c # datetime accelerator +#_zoneinfo _zoneinfo.c -DPy_BUILD_CORE_MODULE # zoneinfo accelerator +#_bisect _bisectmodule.c # Bisection algorithms +#_heapq _heapqmodule.c -DPy_BUILD_CORE_MODULE # Heap queue algorithm +#_asyncio _asynciomodule.c # Fast asyncio Future +#_json -I$(srcdir)/Include/internal -DPy_BUILD_CORE_BUILTIN _json.c # _json speedups +#_statistics _statisticsmodule.c # statistics accelerator + +#unicodedata unicodedata.c -DPy_BUILD_CORE_BUILTIN # static Unicode character database + + +# Modules with some UNIX dependencies -- on by default: +# (If you have a really backward UNIX, select and socket may not be +# supported...) + +#fcntl fcntlmodule.c # fcntl(2) and ioctl(2) +#spwd spwdmodule.c # spwd(3) +#grp grpmodule.c # grp(3) +#select selectmodule.c # select(2); not on ancient System V + +# Memory-mapped files (also works on Win32). +#mmap mmapmodule.c + +# CSV file helper +#_csv _csv.c + +# Socket module helper for socket(2) +#_socket socketmodule.c + +# Socket module helper for SSL support; you must comment out the other +# socket line above, and edit the OPENSSL variable: +# OPENSSL=/path/to/openssl/directory +# _ssl _ssl.c \ +# -I$(OPENSSL)/include -L$(OPENSSL)/lib \ +# -lssl -lcrypto +#_hashlib _hashopenssl.c \ +# -I$(OPENSSL)/include -L$(OPENSSL)/lib \ +# -lcrypto + +# To statically link OpenSSL: +# _ssl _ssl.c \ +# -I$(OPENSSL)/include -L$(OPENSSL)/lib \ +# -l:libssl.a -Wl,--exclude-libs,libssl.a \ +# -l:libcrypto.a -Wl,--exclude-libs,libcrypto.a +#_hashlib _hashopenssl.c \ +# -I$(OPENSSL)/include -L$(OPENSSL)/lib \ +# -l:libcrypto.a -Wl,--exclude-libs,libcrypto.a + +# The crypt module is now disabled by default because it breaks builds +# on many systems (where -lcrypt is needed), e.g. Linux (I believe). + +#_crypt _cryptmodule.c # -lcrypt # crypt(3); needs -lcrypt on some systems + + +# Some more UNIX dependent modules -- off by default, since these +# are not supported by all UNIX systems: + +#nis nismodule.c -lnsl # Sun yellow pages -- not everywhere +#termios termios.c # Steen Lumholt's termios module +#resource resource.c # Jeremy Hylton's rlimit interface + +#_posixsubprocess -DPy_BUILD_CORE_BUILTIN _posixsubprocess.c # POSIX subprocess module helper + +# Multimedia modules -- off by default. +# These don't work for 64-bit platforms!!! +# #993173 says audioop works on 64-bit platforms, though. +# These represent audio samples or images as strings: + +#audioop audioop.c # Operations on audio samples + + +# Note that the _md5 and _sha modules are normally only built if the +# system does not have the OpenSSL libs containing an optimized version. + +# The _md5 module implements the RSA Data Security, Inc. MD5 +# Message-Digest Algorithm, described in RFC 1321. + +#_md5 md5module.c + + +# The _sha module implements the SHA checksum algorithms. +# (NIST's Secure Hash Algorithms.) +#_sha1 sha1module.c +#_sha256 sha256module.c -DPy_BUILD_CORE_BUILTIN +#_sha512 sha512module.c -DPy_BUILD_CORE_BUILTIN +#_sha3 _sha3/sha3module.c + +# _blake module +#_blake2 _blake2/blake2module.c _blake2/blake2b_impl.c _blake2/blake2s_impl.c + +# The _tkinter module. +# +# The command for _tkinter is long and site specific. Please +# uncomment and/or edit those parts as indicated. If you don't have a +# specific extension (e.g. Tix or BLT), leave the corresponding line +# commented out. (Leave the trailing backslashes in! If you +# experience strange errors, you may want to join all uncommented +# lines and remove the backslashes -- the backslash interpretation is +# done by the shell's "read" command and it may not be implemented on +# every system. + +# *** Always uncomment this (leave the leading underscore in!): +# _tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \ +# *** Uncomment and edit to reflect where your Tcl/Tk libraries are: +# -L/usr/local/lib \ +# *** Uncomment and edit to reflect where your Tcl/Tk headers are: +# -I/usr/local/include \ +# *** Uncomment and edit to reflect where your X11 header files are: +# -I/usr/X11R6/include \ +# *** Or uncomment this for Solaris: +# -I/usr/openwin/include \ +# *** Uncomment and edit for Tix extension only: +# -DWITH_TIX -ltix8.1.8.2 \ +# *** Uncomment and edit for BLT extension only: +# -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \ +# *** Uncomment and edit for PIL (TkImaging) extension only: +# (See http://www.pythonware.com/products/pil/ for more info) +# -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \ +# *** Uncomment and edit for TOGL extension only: +# -DWITH_TOGL togl.c \ +# *** Uncomment and edit to reflect your Tcl/Tk versions: +# -ltk8.2 -ltcl8.2 \ +# *** Uncomment and edit to reflect where your X11 libraries are: +# -L/usr/X11R6/lib \ +# *** Or uncomment this for Solaris: +# -L/usr/openwin/lib \ +# *** Uncomment these for TOGL extension only: +# -lGL -lGLU -lXext -lXmu \ +# *** Uncomment for AIX: +# -lld \ +# *** Always uncomment this; X11 libraries to link with: +# -lX11 + +# Lance Ellinghaus's syslog module +#syslog syslogmodule.c # syslog daemon interface + + +# Curses support, requiring the System V version of curses, often +# provided by the ncurses library. e.g. on Linux, link with -lncurses +# instead of -lcurses). + +#_curses _cursesmodule.c -lcurses -ltermcap -DPy_BUILD_CORE_MODULE +# Wrapper for the panel library that's part of ncurses and SYSV curses. +#_curses_panel _curses_panel.c -lpanel -lncurses + + +# Modules that provide persistent dictionary-like semantics. You will +# probably want to arrange for at least one of them to be available on +# your machine, though none are defined by default because of library +# dependencies. The Python module dbm/__init__.py provides an +# implementation independent wrapper for these; dbm/dumb.py provides +# similar functionality (but slower of course) implemented in Python. + +#_dbm _dbmmodule.c # dbm(3) may require -lndbm or similar + +# Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm: + +#_gdbm _gdbmmodule.c -I/usr/local/include -L/usr/local/lib -lgdbm + + +# Helper module for various ascii-encoders +#binascii binascii.c + +# Andrew Kuchling's zlib module. +# This require zlib 1.1.3 (or later). +# See http://www.gzip.org/zlib/ +#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz + +# Interface to the Expat XML parser +# More information on Expat can be found at www.libexpat.org. +# +#pyexpat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DXML_POOR_ENTROPY -DUSE_PYEXPAT_CAPI + +# Hye-Shik Chang's CJKCodecs + +# multibytecodec is required for all the other CJK codec modules +#_multibytecodec cjkcodecs/multibytecodec.c + +#_codecs_cn cjkcodecs/_codecs_cn.c +#_codecs_hk cjkcodecs/_codecs_hk.c +#_codecs_iso2022 cjkcodecs/_codecs_iso2022.c +#_codecs_jp cjkcodecs/_codecs_jp.c +#_codecs_kr cjkcodecs/_codecs_kr.c +#_codecs_tw cjkcodecs/_codecs_tw.c + +# Example -- included for reference only: +# xx xxmodule.c + +# Another example -- the 'xxsubtype' module shows C-level subtyping in action +xxsubtype xxsubtype.c + +# Uncommenting the following line tells makesetup that all following modules +# are not built (see above for more detail). +# +#*disabled* +# +#_sqlite3 _tkinter _curses pyexpat +#_codecs_jp _codecs_kr _codecs_tw unicodedata diff --git a/lib/python3.10/config-3.10-x86_64-linux-gnu/Setup.local b/lib/python3.10/config-3.10-x86_64-linux-gnu/Setup.local new file mode 100644 index 0000000000000000000000000000000000000000..ca2983e22e8602b865d2d7e6283c8f11e7e8415e --- /dev/null +++ b/lib/python3.10/config-3.10-x86_64-linux-gnu/Setup.local @@ -0,0 +1 @@ +# Edit this file for local setup changes diff --git a/lib/python3.10/config-3.10-x86_64-linux-gnu/config.c b/lib/python3.10/config-3.10-x86_64-linux-gnu/config.c new file mode 100644 index 0000000000000000000000000000000000000000..7662b44026ecbe726187bae61c18cfe467ae44fc --- /dev/null +++ b/lib/python3.10/config-3.10-x86_64-linux-gnu/config.c @@ -0,0 +1,114 @@ +/* Generated automatically from /croot/python-split_1749128751284/work/Modules/config.c.in by makesetup. */ +/* -*- C -*- *********************************************** +Copyright (c) 2000, BeOpen.com. +Copyright (c) 1995-2000, Corporation for National Research Initiatives. +Copyright (c) 1990-1995, Stichting Mathematisch Centrum. +All rights reserved. + +See the file "Misc/COPYRIGHT" for information on usage and +redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. +******************************************************************/ + +/* Module configuration */ + +/* !!! !!! !!! This file is edited by the makesetup script !!! !!! !!! */ + +/* This file contains the table of built-in modules. + See create_builtin() in import.c. */ + +#include "Python.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +extern PyObject* PyInit_posix(void); +extern PyObject* PyInit_errno(void); +extern PyObject* PyInit_pwd(void); +extern PyObject* PyInit__sre(void); +extern PyObject* PyInit__codecs(void); +extern PyObject* PyInit__weakref(void); +extern PyObject* PyInit__functools(void); +extern PyObject* PyInit__operator(void); +extern PyObject* PyInit__collections(void); +extern PyObject* PyInit__abc(void); +extern PyObject* PyInit_itertools(void); +extern PyObject* PyInit_atexit(void); +extern PyObject* PyInit__signal(void); +extern PyObject* PyInit__stat(void); +extern PyObject* PyInit_time(void); +extern PyObject* PyInit__thread(void); +extern PyObject* PyInit__locale(void); +extern PyObject* PyInit__io(void); +extern PyObject* PyInit_faulthandler(void); +extern PyObject* PyInit__tracemalloc(void); +extern PyObject* PyInit__symtable(void); +extern PyObject* PyInit_xxsubtype(void); + +/* -- ADDMODULE MARKER 1 -- */ + +extern PyObject* PyMarshal_Init(void); +extern PyObject* PyInit__imp(void); +extern PyObject* PyInit_gc(void); +extern PyObject* PyInit__ast(void); +extern PyObject* _PyWarnings_Init(void); +extern PyObject* PyInit__string(void); + +struct _inittab _PyImport_Inittab[] = { + + {"posix", PyInit_posix}, + {"errno", PyInit_errno}, + {"pwd", PyInit_pwd}, + {"_sre", PyInit__sre}, + {"_codecs", PyInit__codecs}, + {"_weakref", PyInit__weakref}, + {"_functools", PyInit__functools}, + {"_operator", PyInit__operator}, + {"_collections", PyInit__collections}, + {"_abc", PyInit__abc}, + {"itertools", PyInit_itertools}, + {"atexit", PyInit_atexit}, + {"_signal", PyInit__signal}, + {"_stat", PyInit__stat}, + {"time", PyInit_time}, + {"_thread", PyInit__thread}, + {"_locale", PyInit__locale}, + {"_io", PyInit__io}, + {"faulthandler", PyInit_faulthandler}, + {"_tracemalloc", PyInit__tracemalloc}, + {"_symtable", PyInit__symtable}, + {"xxsubtype", PyInit_xxsubtype}, + +/* -- ADDMODULE MARKER 2 -- */ + + /* This module lives in marshal.c */ + {"marshal", PyMarshal_Init}, + + /* This lives in import.c */ + {"_imp", PyInit__imp}, + + /* This lives in Python/Python-ast.c */ + {"_ast", PyInit__ast}, + + /* These entries are here for sys.builtin_module_names */ + {"builtins", NULL}, + {"sys", NULL}, + + /* This lives in gcmodule.c */ + {"gc", PyInit_gc}, + + /* This lives in _warnings.c */ + {"_warnings", _PyWarnings_Init}, + + /* This lives in Objects/unicodeobject.c */ + {"_string", PyInit__string}, + + /* Sentinel */ + {0, 0} +}; + + +#ifdef __cplusplus +} +#endif diff --git a/lib/python3.10/config-3.10-x86_64-linux-gnu/config.c.in b/lib/python3.10/config-3.10-x86_64-linux-gnu/config.c.in new file mode 100644 index 0000000000000000000000000000000000000000..d69e8e88b0ca458b31c247d98f3747f2f11ebe67 --- /dev/null +++ b/lib/python3.10/config-3.10-x86_64-linux-gnu/config.c.in @@ -0,0 +1,67 @@ +/* -*- C -*- *********************************************** +Copyright (c) 2000, BeOpen.com. +Copyright (c) 1995-2000, Corporation for National Research Initiatives. +Copyright (c) 1990-1995, Stichting Mathematisch Centrum. +All rights reserved. + +See the file "Misc/COPYRIGHT" for information on usage and +redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. +******************************************************************/ + +/* Module configuration */ + +/* !!! !!! !!! This file is edited by the makesetup script !!! !!! !!! */ + +/* This file contains the table of built-in modules. + See create_builtin() in import.c. */ + +#include "Python.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/* -- ADDMODULE MARKER 1 -- */ + +extern PyObject* PyMarshal_Init(void); +extern PyObject* PyInit__imp(void); +extern PyObject* PyInit_gc(void); +extern PyObject* PyInit__ast(void); +extern PyObject* _PyWarnings_Init(void); +extern PyObject* PyInit__string(void); + +struct _inittab _PyImport_Inittab[] = { + +/* -- ADDMODULE MARKER 2 -- */ + + /* This module lives in marshal.c */ + {"marshal", PyMarshal_Init}, + + /* This lives in import.c */ + {"_imp", PyInit__imp}, + + /* This lives in Python/Python-ast.c */ + {"_ast", PyInit__ast}, + + /* These entries are here for sys.builtin_module_names */ + {"builtins", NULL}, + {"sys", NULL}, + + /* This lives in gcmodule.c */ + {"gc", PyInit_gc}, + + /* This lives in _warnings.c */ + {"_warnings", _PyWarnings_Init}, + + /* This lives in Objects/unicodeobject.c */ + {"_string", PyInit__string}, + + /* Sentinel */ + {0, 0} +}; + + +#ifdef __cplusplus +} +#endif diff --git a/lib/python3.10/config-3.10-x86_64-linux-gnu/install-sh b/lib/python3.10/config-3.10-x86_64-linux-gnu/install-sh new file mode 100644 index 0000000000000000000000000000000000000000..8175c640fe6288a75cc846567ea5506086f326f4 --- /dev/null +++ b/lib/python3.10/config-3.10-x86_64-linux-gnu/install-sh @@ -0,0 +1,518 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2018-03-11.20; # UTC + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# 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 +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# 'make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +tab=' ' +nl=' +' +IFS=" $tab$nl" + +# Set DOITPROG to "echo" to test this script. + +doit=${DOITPROG-} +doit_exec=${doit:-exec} + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +is_target_a_directory=possibly + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; + + -t) + is_target_a_directory=always + dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; + + -T) is_target_a_directory=never;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift +done + +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. + +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then + echo "$0: target directory not allowed when installing a directory." >&2 + exit 1 + fi +fi + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call 'install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + if test $# -gt 1 || test "$is_target_a_directory" = always; then + if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 + fi + fi +fi + +if test -z "$dir_arg"; then + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names problematic for 'test' and other utilities. + case $src in + -* | [=\(\)!]) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + dst=$dst_arg + + # If destination is a directory, append the input filename. + if test -d "$dst"; then + if test "$is_target_a_directory" = never; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dstbase=`basename "$src"` + case $dst in + */) dst=$dst$dstbase;; + *) dst=$dst/$dstbase;; + esac + dstdir_status=0 + else + dstdir=`dirname "$dst"` + test -d "$dstdir" + dstdir_status=$? + fi + fi + + case $dstdir in + */) dstdirslash=$dstdir;; + *) dstdirslash=$dstdir/;; + esac + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + # Note that $RANDOM variable is not portable (e.g. dash); Use it + # here however when possible just to lower collision chance. + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + + trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 + + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p' feature. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; + esac + + oIFS=$IFS + IFS=/ + set -f + set fnord $dstdir + shift + set +f + IFS=$oIFS + + prefixes= + + for d + do + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=${dstdirslash}_inst.$$_ + rmtmp=${dstdirslash}_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + set +f && + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/lib/python3.10/config-3.10-x86_64-linux-gnu/makesetup b/lib/python3.10/config-3.10-x86_64-linux-gnu/makesetup new file mode 100644 index 0000000000000000000000000000000000000000..1a767838c92be9b87b20a0deaa7f3f3810ab04fa --- /dev/null +++ b/lib/python3.10/config-3.10-x86_64-linux-gnu/makesetup @@ -0,0 +1,309 @@ +#! /bin/sh + +# Convert templates into Makefile and config.c, based on the module +# definitions found in the file Setup. +# +# Usage: makesetup [-s dir] [-c file] [-m file] [Setup] ... [-n [Setup] ...] +# +# Options: +# -s directory: alternative source directory (default .) +# -l directory: library source directory (default derived from $0) +# -c file: alternative config.c template (default $libdir/config.c.in) +# -c -: don't write config.c +# -m file: alternative Makefile template (default ./Makefile.pre) +# -m -: don't write Makefile +# +# Remaining arguments are one or more Setup files (default ./Setup). +# Setup files after a -n option are used for their variables, modules +# and libraries but not for their .o files. +# +# See Setup for a description of the format of the Setup file. +# +# The following edits are made: +# +# Copying config.c.in to config.c: +# - insert an identifying comment at the start +# - for each mentioned in Setup before *noconfig*: +# + insert 'extern PyObject* PyInit_(void);' before MARKER 1 +# + insert '{"", PyInit_},' before MARKER 2 +# +# Copying Makefile.pre to Makefile: +# - insert an identifying comment at the start +# - replace _MODBUILT_NAMES_ by the list of *static* and *shared* modules +# from Setup +# - replace _MODDISABLED_NAMES_ by the list of *disabled* modules from Setup +# - replace _MODOBJS_ by the list of objects from Setup (except for +# Setup files after a -n option) +# - replace _MODLIBS_ by the list of libraries from Setup +# - for each object file mentioned in Setup, append a rule +# '.o: .c; ' to the end of the Makefile +# - for each module mentioned in Setup, append a rule +# which creates a shared library version to the end of the Makefile +# - for each variable definition found in Setup, insert the definition +# before the comment 'Definitions added by makesetup' + +# Loop over command line options +usage=' +usage: makesetup [-s srcdir] [-l libdir] [-c config.c.in] [-m Makefile.pre] + [Setup] ... [-n [Setup] ...]' +srcdir='.' +libdir='' +config='' +makepre='' +noobjects='' +doconfig=yes +while : +do + case $1 in + -s) shift; srcdir=$1; shift;; + -l) shift; libdir=$1; shift;; + -c) shift; config=$1; shift;; + -m) shift; makepre=$1; shift;; + --) shift; break;; + -n) noobjects=yes;; + -*) echo "$usage" 1>&2; exit 2;; + *) break;; + esac +done + +# Set default libdir and config if not set by command line +# (Not all systems have dirname) +case $libdir in +'') case $0 in + */*) libdir=`echo $0 | sed 's,/[^/]*$,,'`;; + *) libdir=.;; + esac;; +esac +case $config in +'') config=$libdir/config.c.in;; +esac +case $makepre in +'') makepre=Makefile.pre;; +esac + +# Newline for sed i and a commands +NL='\ +' + +# Setup to link with extra libraries when making shared extensions. +# Currently, only Cygwin needs this baggage. +case `uname -s` in +CYGWIN*) if test $libdir = . + then + ExtraLibDir=. + else + ExtraLibDir='$(LIBPL)' + fi + ExtraLibs="-L$ExtraLibDir -lpython\$(LDVERSION)";; +esac + +# Main loop +for i in ${*-Setup} +do + case $i in + -n) echo '*noobjects*';; + *) echo '*doconfig*'; cat "$i";; + esac +done | +sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' | +( + rulesf="@rules.$$" + trap 'rm -f $rulesf' 0 1 2 3 + echo " +# Rules appended by makesetup +" >$rulesf + DEFS= + BUILT= + DISABLED= + MODS= + SHAREDMODS= + OBJS= + LIBS= + LOCALLIBS= + BASELIBS= + while read line + do + # to handle backslashes for sh's that don't automatically + # continue a read when the last char is a backslash + while echo $line | grep '\\$' > /dev/null + do + read extraline + line=`echo $line| sed s/.$//`$extraline + done + + # Output DEFS in reverse order so first definition overrides + case $line in + *=*) DEFS="$line$NL$DEFS"; continue;; + 'include '*) DEFS="$line$NL$DEFS"; continue;; + '*noobjects*') + case $noobjects in + yes) ;; + *) LOCALLIBS=$LIBS; LIBS=;; + esac + noobjects=yes; + continue;; + '*doconfig*') doconfig=yes; continue;; + '*static*') doconfig=yes; continue;; + '*noconfig*') doconfig=no; continue;; + '*shared*') doconfig=no; continue;; + '*disabled*') doconfig=disabled; continue;; + esac + srcs= + cpps= + libs= + mods= + skip= + for arg in $line + do + case $skip in + libs) libs="$libs $arg"; skip=; continue;; + cpps) cpps="$cpps $arg"; skip=; continue;; + srcs) srcs="$srcs $arg"; skip=; continue;; + esac + case $arg in + -framework) libs="$libs $arg"; skip=libs; + # OSX/OSXS/Darwin framework link cmd + ;; + -[IDUCfF]*) cpps="$cpps $arg";; + -Xcompiler) skip=cpps;; + -Xlinker) libs="$libs $arg"; skip=libs;; + -rpath) libs="$libs $arg"; skip=libs;; + --rpath) libs="$libs $arg"; skip=libs;; + -[A-Zl]*) libs="$libs $arg";; + *.a) libs="$libs $arg";; + *.so) libs="$libs $arg";; + *.sl) libs="$libs $arg";; + /*.o) libs="$libs $arg";; + *.def) libs="$libs $arg";; + *.o) srcs="$srcs `basename $arg .o`.c";; + *.[cC]) srcs="$srcs $arg";; + *.m) srcs="$srcs $arg";; # Objective-C src + *.cc) srcs="$srcs $arg";; + *.c++) srcs="$srcs $arg";; + *.cxx) srcs="$srcs $arg";; + *.cpp) srcs="$srcs $arg";; + \$*) libs="$libs $arg" + cpps="$cpps $arg";; + *.*) echo 1>&2 "bad word $arg in $line" + exit 1;; + -u) skip=libs; libs="$libs -u";; + [a-zA-Z_]*) mods="$mods $arg";; + *) echo 1>&2 "bad word $arg in $line" + exit 1;; + esac + done + case $doconfig in + yes) + LIBS="$LIBS $libs" + MODS="$MODS $mods" + BUILT="$BUILT $mods" + ;; + no) + BUILT="$BUILT $mods" + ;; + disabled) + DISABLED="$DISABLED $mods" + continue + ;; + esac + case $noobjects in + yes) continue;; + esac + objs='' + for src in $srcs + do + case $src in + *.c) obj=`basename $src .c`.o; cc='$(CC)';; + *.cc) obj=`basename $src .cc`.o; cc='$(CXX)';; + *.c++) obj=`basename $src .c++`.o; cc='$(CXX)';; + *.C) obj=`basename $src .C`.o; cc='$(CXX)';; + *.cxx) obj=`basename $src .cxx`.o; cc='$(CXX)';; + *.cpp) obj=`basename $src .cpp`.o; cc='$(CXX)';; + *.m) obj=`basename $src .m`.o; cc='$(CC)';; # Obj-C + *) continue;; + esac + obj="$srcdir/$obj" + objs="$objs $obj" + case $src in + glmodule.c) ;; + /*) ;; + \$*) ;; + *) src='$(srcdir)/'"$srcdir/$src";; + esac + case $doconfig in + no) cc="$cc \$(CCSHARED) \$(PY_CFLAGS_NODIST) \$(PY_CPPFLAGS)";; + *) + cc="$cc \$(PY_BUILTIN_MODULE_CFLAGS)";; + esac + rule="$obj: $src; $cc $cpps -c $src -o $obj" + echo "$rule" >>$rulesf + done + case $doconfig in + yes) OBJS="$OBJS $objs";; + esac + for mod in $mods + do + file="$srcdir/$mod\$(EXT_SUFFIX)" + case $doconfig in + no) SHAREDMODS="$SHAREDMODS $file";; + esac + rule="$file: $objs" + rule="$rule; \$(BLDSHARED) $objs $libs $ExtraLibs -o $file" + echo "$rule" >>$rulesf + done + done + + case $SHAREDMODS in + '') ;; + *) DEFS="SHAREDMODS=$SHAREDMODS$NL$DEFS";; + esac + + case $noobjects in + yes) BASELIBS=$LIBS;; + *) LOCALLIBS=$LIBS;; + esac + LIBS='$(LOCALMODLIBS) $(BASEMODLIBS)' + DEFS="BASEMODLIBS=$BASELIBS$NL$DEFS" + DEFS="LOCALMODLIBS=$LOCALLIBS$NL$DEFS" + + EXTDECLS= + INITBITS= + for mod in $MODS + do + EXTDECLS="${EXTDECLS}extern PyObject* PyInit_$mod(void);$NL" + INITBITS="${INITBITS} {\"$mod\", PyInit_$mod},$NL" + done + + + case $config in + -) ;; + *) sed -e " + 1i$NL/* Generated automatically from $config by makesetup. */ + /MARKER 1/i$NL$EXTDECLS + + /MARKER 2/i$NL$INITBITS + + " $config >config.c + ;; + esac + + case $makepre in + -) ;; + *) sedf="@sed.in.$$" + trap 'rm -f $sedf' 0 1 2 3 + echo "1i\\" >$sedf + str="# Generated automatically from $makepre by makesetup." + echo "$str" >>$sedf + echo "s%_MODBUILT_NAMES_%$BUILT%" >>$sedf + echo "s%_MODDISABLED_NAMES_%$DISABLED%" >>$sedf + echo "s%_MODOBJS_%$OBJS%" >>$sedf + echo "s%_MODLIBS_%$LIBS%" >>$sedf + echo "/Definitions added by makesetup/a$NL$NL$DEFS" >>$sedf + sed -f $sedf $makepre >Makefile + cat $rulesf >>Makefile + rm -f $sedf + ;; + esac + + rm -f $rulesf +) diff --git a/lib/python3.10/config-3.10-x86_64-linux-gnu/python-config.py b/lib/python3.10/config-3.10-x86_64-linux-gnu/python-config.py new file mode 100644 index 0000000000000000000000000000000000000000..25d9b78a876e40414df7e8b914af2b8dc709a5ba --- /dev/null +++ b/lib/python3.10/config-3.10-x86_64-linux-gnu/python-config.py @@ -0,0 +1,74 @@ +#!/home/aioz-nghiale/anaconda3/envs/testing_softzoo_pointe/bin/python3.10 +# -*- python -*- + +# Keep this script in sync with python-config.sh.in + +import getopt +import os +import sys +import sysconfig + +valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags', + 'ldflags', 'extension-suffix', 'help', 'abiflags', 'configdir', + 'embed'] + +def exit_with_usage(code=1): + print("Usage: {0} [{1}]".format( + sys.argv[0], '|'.join('--'+opt for opt in valid_opts)), file=sys.stderr) + sys.exit(code) + +try: + opts, args = getopt.getopt(sys.argv[1:], '', valid_opts) +except getopt.error: + exit_with_usage() + +if not opts: + exit_with_usage() + +getvar = sysconfig.get_config_var +pyver = getvar('VERSION') + +opt_flags = [flag for (flag, val) in opts] + +if '--help' in opt_flags: + exit_with_usage(code=0) + +for opt in opt_flags: + if opt == '--prefix': + print(getvar('prefix')) + + elif opt == '--exec-prefix': + print(getvar('exec_prefix')) + + elif opt in ('--includes', '--cflags'): + flags = ['-I' + sysconfig.get_path('include'), + '-I' + sysconfig.get_path('platinclude')] + if opt == '--cflags': + flags.extend(getvar('CFLAGS').split()) + print(' '.join(flags)) + + elif opt in ('--libs', '--ldflags'): + libs = [] + if '--embed' in opt_flags: + libs.append('-lpython' + pyver + sys.abiflags) + else: + libpython = getvar('LIBPYTHON') + if libpython: + libs.append(libpython) + libs.extend(getvar('LIBS').split() + getvar('SYSLIBS').split()) + + # add the prefix/lib/pythonX.Y/config dir, but only if there is no + # shared library in prefix/lib/. + if opt == '--ldflags': + if not getvar('Py_ENABLE_SHARED'): + libs.insert(0, '-L' + getvar('LIBPL')) + print(' '.join(libs)) + + elif opt == '--extension-suffix': + print(getvar('EXT_SUFFIX')) + + elif opt == '--abiflags': + print(sys.abiflags) + + elif opt == '--configdir': + print(getvar('LIBPL')) diff --git a/lib/python3.10/config-3.10-x86_64-linux-gnu/python.o b/lib/python3.10/config-3.10-x86_64-linux-gnu/python.o new file mode 100644 index 0000000000000000000000000000000000000000..352856a0fa5144630bfc4c26cf6331ed3b47ca51 Binary files /dev/null and b/lib/python3.10/config-3.10-x86_64-linux-gnu/python.o differ diff --git a/lib/python3.10/configparser.py b/lib/python3.10/configparser.py new file mode 100644 index 0000000000000000000000000000000000000000..785527082d07a0616503f9809bb747b19bd29aaa --- /dev/null +++ b/lib/python3.10/configparser.py @@ -0,0 +1,1368 @@ +"""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.buildbot`` + 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 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