turingdb 1.12__cp311-cp311-manylinux_2_35_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of turingdb might be problematic. Click here for more details.
- bin/turing-import +0 -0
- bin/turingdb +0 -0
- lib/cmake/tabulate/tabulateConfig.cmake +31 -0
- lib/cmake/tabulate/tabulateConfigVersion.cmake +43 -0
- lib/cmake/tabulate/tabulateTargets.cmake +107 -0
- lib/cmake/termcolor/termcolor-config.cmake +28 -0
- lib/cmake/termcolor/termcolor-targets.cmake +107 -0
- turingdb/__init__.py +92 -0
- turingdb/exceptions.py +3 -0
- turingdb/path.py +16 -0
- turingdb/protocol.py +7 -0
- turingdb/s3.py +137 -0
- turingdb/turingdb.py +242 -0
- turingdb/turingsh/__init__.py +3 -0
- turingdb/turingsh/command.py +24 -0
- turingdb/turingsh/greeter.py +42 -0
- turingdb/turingsh/turingsh.py +367 -0
- turingdb-1.12.dist-info/METADATA +19 -0
- turingdb-1.12.dist-info/RECORD +51 -0
- turingdb-1.12.dist-info/WHEEL +5 -0
- turingdb-1.12.dist-info/entry_points.txt +3 -0
- turingdb-1.12.dist-info/licenses/LICENSE +5 -0
- turingdb-1.12.dist-info/sboms/auditwheel.cdx.json +1 -0
- turingdb.libs/libbrotlicommon-abf86ae9.so.1.0.9 +0 -0
- turingdb.libs/libbrotlidec-db9dbda7.so.1.0.9 +0 -0
- turingdb.libs/libcom_err-f196091d.so.2.1 +0 -0
- turingdb.libs/libcrypto-ef58def3.so.3 +0 -0
- turingdb.libs/libcurl-ef05c8ea.so.4.7.0 +0 -0
- turingdb.libs/libffi-247da4d5.so.8.1.0 +0 -0
- turingdb.libs/libgmp-4dc20a90.so.10.4.1 +0 -0
- turingdb.libs/libgnutls-a1c10edc.so.30.31.0 +0 -0
- turingdb.libs/libgssapi_krb5-74c938dc.so.2.2 +0 -0
- turingdb.libs/libhogweed-47d56894.so.6.4 +0 -0
- turingdb.libs/libidn2-1420c60a.so.0.3.7 +0 -0
- turingdb.libs/libk5crypto-43d6a714.so.3.1 +0 -0
- turingdb.libs/libkeyutils-ad20d5fb.so.1.9 +0 -0
- turingdb.libs/libkrb5-7ccebba4.so.3.3 +0 -0
- turingdb.libs/libkrb5support-134342ea.so.0.1 +0 -0
- turingdb.libs/liblber-2-ff904533.5.so.0.1.14 +0 -0
- turingdb.libs/libldap-2-22fb2ed0.5.so.0.1.14 +0 -0
- turingdb.libs/libnettle-2d3bda6c.so.8.4 +0 -0
- turingdb.libs/libnghttp2-1cc16764.so.14.20.1 +0 -0
- turingdb.libs/libp11-kit-d2b01eaa.so.0.3.0 +0 -0
- turingdb.libs/libpsl-95ca960e.so.5.3.2 +0 -0
- turingdb.libs/librtmp-2401c4fc.so.1 +0 -0
- turingdb.libs/libsasl2-344870a9.so.2.0.25 +0 -0
- turingdb.libs/libssh-f4c6722f.so.4.8.7 +0 -0
- turingdb.libs/libssl-660a6abe.so.3 +0 -0
- turingdb.libs/libtasn1-5982aae4.so.6.6.2 +0 -0
- turingdb.libs/libunistring-9c28d595.so.2.2.0 +0 -0
- turingdb.libs/libzstd-5df4f4df.so.1.4.8 +0 -0
bin/turing-import
ADDED
|
Binary file
|
bin/turingdb
ADDED
|
Binary file
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
|
|
2
|
+
####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######
|
|
3
|
+
####### Any changes to this file will be overwritten by the next CMake run ####
|
|
4
|
+
####### The input file was tabulateConfig.cmake.in ########
|
|
5
|
+
|
|
6
|
+
get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)
|
|
7
|
+
|
|
8
|
+
macro(set_and_check _var _file)
|
|
9
|
+
set(${_var} "${_file}")
|
|
10
|
+
if(NOT EXISTS "${_file}")
|
|
11
|
+
message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
|
|
12
|
+
endif()
|
|
13
|
+
endmacro()
|
|
14
|
+
|
|
15
|
+
macro(check_required_components _NAME)
|
|
16
|
+
foreach(comp ${${_NAME}_FIND_COMPONENTS})
|
|
17
|
+
if(NOT ${_NAME}_${comp}_FOUND)
|
|
18
|
+
if(${_NAME}_FIND_REQUIRED_${comp})
|
|
19
|
+
set(${_NAME}_FOUND FALSE)
|
|
20
|
+
endif()
|
|
21
|
+
endif()
|
|
22
|
+
endforeach()
|
|
23
|
+
endmacro()
|
|
24
|
+
|
|
25
|
+
####################################################################################
|
|
26
|
+
|
|
27
|
+
include(CMakeFindDependencyMacro)
|
|
28
|
+
|
|
29
|
+
if (NOT TARGET tabulate::tabulate)
|
|
30
|
+
include(${CMAKE_CURRENT_LIST_DIR}/tabulateTargets.cmake)
|
|
31
|
+
endif ()
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# This is a basic version file for the Config-mode of find_package().
|
|
2
|
+
# It is used by write_basic_package_version_file() as input file for configure_file()
|
|
3
|
+
# to create a version-file which can be installed along a config.cmake file.
|
|
4
|
+
#
|
|
5
|
+
# The created file sets PACKAGE_VERSION_EXACT if the current version string and
|
|
6
|
+
# the requested version string are exactly the same and it sets
|
|
7
|
+
# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version.
|
|
8
|
+
# The variable CVF_VERSION must be set before calling configure_file().
|
|
9
|
+
|
|
10
|
+
set(PACKAGE_VERSION "1.5.0")
|
|
11
|
+
|
|
12
|
+
if (PACKAGE_FIND_VERSION_RANGE)
|
|
13
|
+
# Package version must be in the requested version range
|
|
14
|
+
if ((PACKAGE_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MIN)
|
|
15
|
+
OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_GREATER PACKAGE_FIND_VERSION_MAX)
|
|
16
|
+
OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION_MAX)))
|
|
17
|
+
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
|
18
|
+
else()
|
|
19
|
+
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
|
20
|
+
endif()
|
|
21
|
+
else()
|
|
22
|
+
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
|
23
|
+
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
|
24
|
+
else()
|
|
25
|
+
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
|
26
|
+
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
|
|
27
|
+
set(PACKAGE_VERSION_EXACT TRUE)
|
|
28
|
+
endif()
|
|
29
|
+
endif()
|
|
30
|
+
endif()
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
|
|
34
|
+
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "")
|
|
35
|
+
return()
|
|
36
|
+
endif()
|
|
37
|
+
|
|
38
|
+
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
|
|
39
|
+
if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "8")
|
|
40
|
+
math(EXPR installedBits "8 * 8")
|
|
41
|
+
set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
|
|
42
|
+
set(PACKAGE_VERSION_UNSUITABLE TRUE)
|
|
43
|
+
endif()
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Generated by CMake
|
|
2
|
+
|
|
3
|
+
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8)
|
|
4
|
+
message(FATAL_ERROR "CMake >= 3.0.0 required")
|
|
5
|
+
endif()
|
|
6
|
+
if(CMAKE_VERSION VERSION_LESS "3.0.0")
|
|
7
|
+
message(FATAL_ERROR "CMake >= 3.0.0 required")
|
|
8
|
+
endif()
|
|
9
|
+
cmake_policy(PUSH)
|
|
10
|
+
cmake_policy(VERSION 3.0.0...4.0)
|
|
11
|
+
#----------------------------------------------------------------
|
|
12
|
+
# Generated CMake target import file.
|
|
13
|
+
#----------------------------------------------------------------
|
|
14
|
+
|
|
15
|
+
# Commands may need to know the format version.
|
|
16
|
+
set(CMAKE_IMPORT_FILE_VERSION 1)
|
|
17
|
+
|
|
18
|
+
# Protect against multiple inclusion, which would fail when already imported targets are added once more.
|
|
19
|
+
set(_cmake_targets_defined "")
|
|
20
|
+
set(_cmake_targets_not_defined "")
|
|
21
|
+
set(_cmake_expected_targets "")
|
|
22
|
+
foreach(_cmake_expected_target IN ITEMS tabulate::tabulate)
|
|
23
|
+
list(APPEND _cmake_expected_targets "${_cmake_expected_target}")
|
|
24
|
+
if(TARGET "${_cmake_expected_target}")
|
|
25
|
+
list(APPEND _cmake_targets_defined "${_cmake_expected_target}")
|
|
26
|
+
else()
|
|
27
|
+
list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}")
|
|
28
|
+
endif()
|
|
29
|
+
endforeach()
|
|
30
|
+
unset(_cmake_expected_target)
|
|
31
|
+
if(_cmake_targets_defined STREQUAL _cmake_expected_targets)
|
|
32
|
+
unset(_cmake_targets_defined)
|
|
33
|
+
unset(_cmake_targets_not_defined)
|
|
34
|
+
unset(_cmake_expected_targets)
|
|
35
|
+
unset(CMAKE_IMPORT_FILE_VERSION)
|
|
36
|
+
cmake_policy(POP)
|
|
37
|
+
return()
|
|
38
|
+
endif()
|
|
39
|
+
if(NOT _cmake_targets_defined STREQUAL "")
|
|
40
|
+
string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}")
|
|
41
|
+
string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}")
|
|
42
|
+
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")
|
|
43
|
+
endif()
|
|
44
|
+
unset(_cmake_targets_defined)
|
|
45
|
+
unset(_cmake_targets_not_defined)
|
|
46
|
+
unset(_cmake_expected_targets)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
# Compute the installation prefix relative to this file.
|
|
50
|
+
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
|
51
|
+
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
|
52
|
+
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
|
53
|
+
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
|
54
|
+
if(_IMPORT_PREFIX STREQUAL "/")
|
|
55
|
+
set(_IMPORT_PREFIX "")
|
|
56
|
+
endif()
|
|
57
|
+
|
|
58
|
+
# Create imported target tabulate::tabulate
|
|
59
|
+
add_library(tabulate::tabulate INTERFACE IMPORTED)
|
|
60
|
+
|
|
61
|
+
set_target_properties(tabulate::tabulate PROPERTIES
|
|
62
|
+
INTERFACE_COMPILE_FEATURES "cxx_std_11"
|
|
63
|
+
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
# Load information for each installed configuration.
|
|
67
|
+
file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/tabulateTargets-*.cmake")
|
|
68
|
+
foreach(_cmake_config_file IN LISTS _cmake_config_files)
|
|
69
|
+
include("${_cmake_config_file}")
|
|
70
|
+
endforeach()
|
|
71
|
+
unset(_cmake_config_file)
|
|
72
|
+
unset(_cmake_config_files)
|
|
73
|
+
|
|
74
|
+
# Cleanup temporary variables.
|
|
75
|
+
set(_IMPORT_PREFIX)
|
|
76
|
+
|
|
77
|
+
# Loop over all imported files and verify that they actually exist
|
|
78
|
+
foreach(_cmake_target IN LISTS _cmake_import_check_targets)
|
|
79
|
+
if(CMAKE_VERSION VERSION_LESS "3.28"
|
|
80
|
+
OR NOT DEFINED _cmake_import_check_xcframework_for_${_cmake_target}
|
|
81
|
+
OR NOT IS_DIRECTORY "${_cmake_import_check_xcframework_for_${_cmake_target}}")
|
|
82
|
+
foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}")
|
|
83
|
+
if(NOT EXISTS "${_cmake_file}")
|
|
84
|
+
message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file
|
|
85
|
+
\"${_cmake_file}\"
|
|
86
|
+
but this file does not exist. Possible reasons include:
|
|
87
|
+
* The file was deleted, renamed, or moved to another location.
|
|
88
|
+
* An install or uninstall procedure did not complete successfully.
|
|
89
|
+
* The installation package was faulty and contained
|
|
90
|
+
\"${CMAKE_CURRENT_LIST_FILE}\"
|
|
91
|
+
but not all the files it references.
|
|
92
|
+
")
|
|
93
|
+
endif()
|
|
94
|
+
endforeach()
|
|
95
|
+
endif()
|
|
96
|
+
unset(_cmake_file)
|
|
97
|
+
unset("_cmake_import_check_files_for_${_cmake_target}")
|
|
98
|
+
endforeach()
|
|
99
|
+
unset(_cmake_target)
|
|
100
|
+
unset(_cmake_import_check_targets)
|
|
101
|
+
|
|
102
|
+
# This file does not depend on other imported targets which have
|
|
103
|
+
# been exported from the same project but in a separate export set.
|
|
104
|
+
|
|
105
|
+
# Commands beyond this point should not need to know the version.
|
|
106
|
+
set(CMAKE_IMPORT_FILE_VERSION)
|
|
107
|
+
cmake_policy(POP)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
|
|
2
|
+
####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######
|
|
3
|
+
####### Any changes to this file will be overwritten by the next CMake run ####
|
|
4
|
+
####### The input file was config.cmake.in ########
|
|
5
|
+
|
|
6
|
+
get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)
|
|
7
|
+
|
|
8
|
+
macro(set_and_check _var _file)
|
|
9
|
+
set(${_var} "${_file}")
|
|
10
|
+
if(NOT EXISTS "${_file}")
|
|
11
|
+
message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
|
|
12
|
+
endif()
|
|
13
|
+
endmacro()
|
|
14
|
+
|
|
15
|
+
macro(check_required_components _NAME)
|
|
16
|
+
foreach(comp ${${_NAME}_FIND_COMPONENTS})
|
|
17
|
+
if(NOT ${_NAME}_${comp}_FOUND)
|
|
18
|
+
if(${_NAME}_FIND_REQUIRED_${comp})
|
|
19
|
+
set(${_NAME}_FOUND FALSE)
|
|
20
|
+
endif()
|
|
21
|
+
endif()
|
|
22
|
+
endforeach()
|
|
23
|
+
endmacro()
|
|
24
|
+
|
|
25
|
+
####################################################################################
|
|
26
|
+
|
|
27
|
+
include("${CMAKE_CURRENT_LIST_DIR}/termcolor-targets.cmake")
|
|
28
|
+
check_required_components("termcolor")
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Generated by CMake
|
|
2
|
+
|
|
3
|
+
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8)
|
|
4
|
+
message(FATAL_ERROR "CMake >= 3.0.0 required")
|
|
5
|
+
endif()
|
|
6
|
+
if(CMAKE_VERSION VERSION_LESS "3.0.0")
|
|
7
|
+
message(FATAL_ERROR "CMake >= 3.0.0 required")
|
|
8
|
+
endif()
|
|
9
|
+
cmake_policy(PUSH)
|
|
10
|
+
cmake_policy(VERSION 3.0.0...4.0)
|
|
11
|
+
#----------------------------------------------------------------
|
|
12
|
+
# Generated CMake target import file.
|
|
13
|
+
#----------------------------------------------------------------
|
|
14
|
+
|
|
15
|
+
# Commands may need to know the format version.
|
|
16
|
+
set(CMAKE_IMPORT_FILE_VERSION 1)
|
|
17
|
+
|
|
18
|
+
# Protect against multiple inclusion, which would fail when already imported targets are added once more.
|
|
19
|
+
set(_cmake_targets_defined "")
|
|
20
|
+
set(_cmake_targets_not_defined "")
|
|
21
|
+
set(_cmake_expected_targets "")
|
|
22
|
+
foreach(_cmake_expected_target IN ITEMS termcolor::termcolor)
|
|
23
|
+
list(APPEND _cmake_expected_targets "${_cmake_expected_target}")
|
|
24
|
+
if(TARGET "${_cmake_expected_target}")
|
|
25
|
+
list(APPEND _cmake_targets_defined "${_cmake_expected_target}")
|
|
26
|
+
else()
|
|
27
|
+
list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}")
|
|
28
|
+
endif()
|
|
29
|
+
endforeach()
|
|
30
|
+
unset(_cmake_expected_target)
|
|
31
|
+
if(_cmake_targets_defined STREQUAL _cmake_expected_targets)
|
|
32
|
+
unset(_cmake_targets_defined)
|
|
33
|
+
unset(_cmake_targets_not_defined)
|
|
34
|
+
unset(_cmake_expected_targets)
|
|
35
|
+
unset(CMAKE_IMPORT_FILE_VERSION)
|
|
36
|
+
cmake_policy(POP)
|
|
37
|
+
return()
|
|
38
|
+
endif()
|
|
39
|
+
if(NOT _cmake_targets_defined STREQUAL "")
|
|
40
|
+
string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}")
|
|
41
|
+
string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}")
|
|
42
|
+
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")
|
|
43
|
+
endif()
|
|
44
|
+
unset(_cmake_targets_defined)
|
|
45
|
+
unset(_cmake_targets_not_defined)
|
|
46
|
+
unset(_cmake_expected_targets)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
# Compute the installation prefix relative to this file.
|
|
50
|
+
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
|
51
|
+
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
|
52
|
+
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
|
53
|
+
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
|
54
|
+
if(_IMPORT_PREFIX STREQUAL "/")
|
|
55
|
+
set(_IMPORT_PREFIX "")
|
|
56
|
+
endif()
|
|
57
|
+
|
|
58
|
+
# Create imported target termcolor::termcolor
|
|
59
|
+
add_library(termcolor::termcolor INTERFACE IMPORTED)
|
|
60
|
+
|
|
61
|
+
set_target_properties(termcolor::termcolor PROPERTIES
|
|
62
|
+
INTERFACE_COMPILE_FEATURES "cxx_std_11"
|
|
63
|
+
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include;${_IMPORT_PREFIX}/include"
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
# Load information for each installed configuration.
|
|
67
|
+
file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/termcolor-targets-*.cmake")
|
|
68
|
+
foreach(_cmake_config_file IN LISTS _cmake_config_files)
|
|
69
|
+
include("${_cmake_config_file}")
|
|
70
|
+
endforeach()
|
|
71
|
+
unset(_cmake_config_file)
|
|
72
|
+
unset(_cmake_config_files)
|
|
73
|
+
|
|
74
|
+
# Cleanup temporary variables.
|
|
75
|
+
set(_IMPORT_PREFIX)
|
|
76
|
+
|
|
77
|
+
# Loop over all imported files and verify that they actually exist
|
|
78
|
+
foreach(_cmake_target IN LISTS _cmake_import_check_targets)
|
|
79
|
+
if(CMAKE_VERSION VERSION_LESS "3.28"
|
|
80
|
+
OR NOT DEFINED _cmake_import_check_xcframework_for_${_cmake_target}
|
|
81
|
+
OR NOT IS_DIRECTORY "${_cmake_import_check_xcframework_for_${_cmake_target}}")
|
|
82
|
+
foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}")
|
|
83
|
+
if(NOT EXISTS "${_cmake_file}")
|
|
84
|
+
message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file
|
|
85
|
+
\"${_cmake_file}\"
|
|
86
|
+
but this file does not exist. Possible reasons include:
|
|
87
|
+
* The file was deleted, renamed, or moved to another location.
|
|
88
|
+
* An install or uninstall procedure did not complete successfully.
|
|
89
|
+
* The installation package was faulty and contained
|
|
90
|
+
\"${CMAKE_CURRENT_LIST_FILE}\"
|
|
91
|
+
but not all the files it references.
|
|
92
|
+
")
|
|
93
|
+
endif()
|
|
94
|
+
endforeach()
|
|
95
|
+
endif()
|
|
96
|
+
unset(_cmake_file)
|
|
97
|
+
unset("_cmake_import_check_files_for_${_cmake_target}")
|
|
98
|
+
endforeach()
|
|
99
|
+
unset(_cmake_target)
|
|
100
|
+
unset(_cmake_import_check_targets)
|
|
101
|
+
|
|
102
|
+
# This file does not depend on other imported targets which have
|
|
103
|
+
# been exported from the same project but in a separate export set.
|
|
104
|
+
|
|
105
|
+
# Commands beyond this point should not need to know the version.
|
|
106
|
+
set(CMAKE_IMPORT_FILE_VERSION)
|
|
107
|
+
cmake_policy(POP)
|
turingdb/__init__.py
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import sys
|
|
3
|
+
import subprocess
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
from .turingdb import TuringDB, TuringDBException
|
|
6
|
+
from .turingsh import main as turingsh
|
|
7
|
+
|
|
8
|
+
__all__ = ["TuringDB", "TuringDBException", "turingsh"]
|
|
9
|
+
|
|
10
|
+
def get_executable_path():
|
|
11
|
+
"""Get the path to the compiled C++ executable."""
|
|
12
|
+
import site
|
|
13
|
+
import importlib.util
|
|
14
|
+
|
|
15
|
+
# Define possible executable names
|
|
16
|
+
executable_name = "turingdb" # Adjust this to match your actual binary name
|
|
17
|
+
|
|
18
|
+
# Search locations in order of preference
|
|
19
|
+
search_locations = []
|
|
20
|
+
|
|
21
|
+
# 1. Use first turingdb in the local build directory
|
|
22
|
+
try:
|
|
23
|
+
# Get the installed package location
|
|
24
|
+
spec = importlib.util.find_spec("turingdb") # Your actual module name
|
|
25
|
+
if spec and spec.origin:
|
|
26
|
+
installed_module_dir = Path(spec.origin).parent
|
|
27
|
+
project_dir = installed_module_dir.parent.parent
|
|
28
|
+
turingdb_build_path = project_dir/"build/turingdb/tools/turingdb/"
|
|
29
|
+
turingdb_bin_path = project_dir/"site-packages/bin/"
|
|
30
|
+
search_locations.append(turingdb_build_path)
|
|
31
|
+
search_locations.append(turingdb_bin_path)
|
|
32
|
+
except:
|
|
33
|
+
pass
|
|
34
|
+
|
|
35
|
+
# 4. User site-packages
|
|
36
|
+
try:
|
|
37
|
+
user_site = site.getusersitepackages()
|
|
38
|
+
if user_site:
|
|
39
|
+
turingdb_user_site_path = Path(user_site) / "bin"
|
|
40
|
+
search_locations.append(user_site_path)
|
|
41
|
+
except:
|
|
42
|
+
pass
|
|
43
|
+
|
|
44
|
+
# 2. Site-packages locations
|
|
45
|
+
for site_path in site.getsitepackages():
|
|
46
|
+
turingdbèsiteèpath = Path(site_path) / "bin"
|
|
47
|
+
search_locations.append(turingdbèsiteèpath)
|
|
48
|
+
|
|
49
|
+
# 5. Virtual environment site-packages (if we're in a venv)
|
|
50
|
+
if hasattr(sys, 'prefix') and sys.prefix != sys.base_prefix:
|
|
51
|
+
# We're in a virtual environment
|
|
52
|
+
venv_site = Path(sys.prefix) / "lib" / f"python{sys.version_info.major}.{sys.version_info.minor}" / "site-packages"
|
|
53
|
+
search_locations.append(venv_site / "turingdb")
|
|
54
|
+
|
|
55
|
+
# Search all locations
|
|
56
|
+
for location in search_locations:
|
|
57
|
+
if not location.exists():
|
|
58
|
+
continue
|
|
59
|
+
|
|
60
|
+
executable_path = location / executable_name
|
|
61
|
+
if executable_path.exists() and os.access(executable_path, os.X_OK):
|
|
62
|
+
return str(executable_path)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
print('Search directories:')
|
|
66
|
+
for location in search_locations:
|
|
67
|
+
print(location)
|
|
68
|
+
|
|
69
|
+
raise FileNotFoundError(f"Executable '{executable_name}' not found in any expected location")
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def main():
|
|
73
|
+
"""Entry point for the console script."""
|
|
74
|
+
try:
|
|
75
|
+
executable_path = get_executable_path()
|
|
76
|
+
|
|
77
|
+
# Execute the C++ binary directly, replacing the current process
|
|
78
|
+
os.execv(executable_path, [executable_path] + sys.argv[1:])
|
|
79
|
+
|
|
80
|
+
except FileNotFoundError as e:
|
|
81
|
+
print(f"Error: {e}", file=sys.stderr)
|
|
82
|
+
sys.exit(1)
|
|
83
|
+
except Exception as e:
|
|
84
|
+
print(f"Unexpected error: {e}", file=sys.stderr)
|
|
85
|
+
# Fallback to subprocess if execv fails
|
|
86
|
+
try:
|
|
87
|
+
executable_path = get_executable_path()
|
|
88
|
+
result = subprocess.run([executable_path] + sys.argv[1:])
|
|
89
|
+
sys.exit(result.returncode)
|
|
90
|
+
except:
|
|
91
|
+
sys.exit(1)
|
|
92
|
+
|
turingdb/exceptions.py
ADDED
turingdb/path.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class PathType(Enum):
|
|
5
|
+
LOCAL = "local"
|
|
6
|
+
S3 = "s3"
|
|
7
|
+
TURINGDB = "turingdb"
|
|
8
|
+
|
|
9
|
+
@staticmethod
|
|
10
|
+
def get_type(path: str):
|
|
11
|
+
if path.startswith("s3://"):
|
|
12
|
+
return PathType.S3
|
|
13
|
+
elif path.startswith("turingdb://"):
|
|
14
|
+
return PathType.TURINGDB
|
|
15
|
+
else:
|
|
16
|
+
return PathType.LOCAL
|
turingdb/protocol.py
ADDED
turingdb/s3.py
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from typing import Optional
|
|
3
|
+
|
|
4
|
+
from .exceptions import TuringDBException
|
|
5
|
+
from .path import PathType
|
|
6
|
+
from .protocol import QueryProtocol
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class S3Client:
|
|
10
|
+
def __init__(
|
|
11
|
+
self,
|
|
12
|
+
bucket_name: str,
|
|
13
|
+
access_key: Optional[str] = None,
|
|
14
|
+
secret_key: Optional[str] = None,
|
|
15
|
+
region: Optional[str] = None,
|
|
16
|
+
use_scratch: bool = True,
|
|
17
|
+
):
|
|
18
|
+
import boto3
|
|
19
|
+
|
|
20
|
+
self._use_scratch = use_scratch
|
|
21
|
+
self._scratch_folder = "__turing__scratch__"
|
|
22
|
+
|
|
23
|
+
# Credentials are optional, they override the installed credentials
|
|
24
|
+
self._s3_session = boto3.Session(
|
|
25
|
+
aws_access_key_id=access_key,
|
|
26
|
+
aws_secret_access_key=secret_key,
|
|
27
|
+
region_name=region,
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
self._s3 = self._s3_session.client("s3")
|
|
31
|
+
self._s3_resource = self._s3_session.resource("s3")
|
|
32
|
+
self._s3_bucket = self._s3_resource.Bucket(bucket_name) # type: ignore
|
|
33
|
+
|
|
34
|
+
credentials = self._s3_session.get_credentials()
|
|
35
|
+
assert credentials is not None
|
|
36
|
+
region = self._s3_session.region_name
|
|
37
|
+
secret_key = credentials.secret_key
|
|
38
|
+
access_key = credentials.access_key
|
|
39
|
+
|
|
40
|
+
self._access_key = access_key
|
|
41
|
+
self._secret_key = secret_key
|
|
42
|
+
self._region = region
|
|
43
|
+
|
|
44
|
+
if region is None:
|
|
45
|
+
region = ""
|
|
46
|
+
|
|
47
|
+
self._bucket_name = bucket_name
|
|
48
|
+
|
|
49
|
+
def connect(self, query_protocol: QueryProtocol):
|
|
50
|
+
self._query_protocol = query_protocol
|
|
51
|
+
self._query_protocol.query(
|
|
52
|
+
f'S3 CONNECT "{self._access_key}" "{self._secret_key}" "{self._region}"'
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
def transfer(self, src: str, dst: str):
|
|
56
|
+
import uuid
|
|
57
|
+
from pathlib import Path
|
|
58
|
+
|
|
59
|
+
if self._query_protocol is None:
|
|
60
|
+
raise TuringDBException("TuringDB client is not connected")
|
|
61
|
+
|
|
62
|
+
src_type = PathType.get_type(src)
|
|
63
|
+
dst_type = PathType.get_type(dst)
|
|
64
|
+
|
|
65
|
+
match src_type, dst_type:
|
|
66
|
+
case PathType.LOCAL, PathType.LOCAL:
|
|
67
|
+
raise NotImplementedError("Local to local transfer is not implemented")
|
|
68
|
+
case PathType.S3, PathType.S3:
|
|
69
|
+
raise NotImplementedError("S3 to S3 transfer is not implemented")
|
|
70
|
+
case PathType.TURINGDB, PathType.TURINGDB:
|
|
71
|
+
raise NotImplementedError(
|
|
72
|
+
"TuringDB to TuringDB transfer is not implemented"
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
# Local <-> S3
|
|
76
|
+
case PathType.LOCAL, PathType.S3:
|
|
77
|
+
src = str(Path(src).expanduser().resolve())
|
|
78
|
+
dst = dst.replace("s3://", "")
|
|
79
|
+
|
|
80
|
+
if os.path.isdir(src):
|
|
81
|
+
raise NotImplementedError("Directory upload is not implemented")
|
|
82
|
+
|
|
83
|
+
self._s3.upload_file(src, self._bucket_name, dst)
|
|
84
|
+
case PathType.S3, PathType.LOCAL:
|
|
85
|
+
src = src.replace("s3://", "")
|
|
86
|
+
dst = str(Path(dst).expanduser().resolve())
|
|
87
|
+
|
|
88
|
+
self._s3.download_file(self._bucket_name, src, dst)
|
|
89
|
+
|
|
90
|
+
# TuringDB <-> S3
|
|
91
|
+
case PathType.TURINGDB, PathType.S3:
|
|
92
|
+
src = src.replace("turingdb://", "")
|
|
93
|
+
dst = dst.replace("s3://", f"s3://{self._bucket_name}/")
|
|
94
|
+
|
|
95
|
+
if os.path.isdir(src):
|
|
96
|
+
raise NotImplementedError("Directory upload is not implemented")
|
|
97
|
+
|
|
98
|
+
query = f'S3 PUSH "{src}" "{dst}"'
|
|
99
|
+
self._query_protocol.query(query)
|
|
100
|
+
case PathType.S3, PathType.TURINGDB:
|
|
101
|
+
src = src.replace("s3://", f"s3://{self._bucket_name}/")
|
|
102
|
+
dst = dst.replace("turingdb://", "")
|
|
103
|
+
query = f'S3 PULL "{src}" "{dst}"'
|
|
104
|
+
self._query_protocol.query(query)
|
|
105
|
+
|
|
106
|
+
# TuringDB <-> Local
|
|
107
|
+
case PathType.LOCAL, PathType.TURINGDB:
|
|
108
|
+
if not self._use_scratch:
|
|
109
|
+
raise TuringDBException(
|
|
110
|
+
"Scratch is not enabled, please transfer to s3 first, then to TuringDB"
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
s3_path = f"s3://{self._scratch_folder}/{uuid.uuid4().hex}"
|
|
114
|
+
|
|
115
|
+
try:
|
|
116
|
+
self.transfer(src, s3_path)
|
|
117
|
+
self.transfer(s3_path, dst)
|
|
118
|
+
finally:
|
|
119
|
+
self._s3_bucket.objects.filter(
|
|
120
|
+
Prefix=f"{self._scratch_folder}/"
|
|
121
|
+
).delete()
|
|
122
|
+
|
|
123
|
+
case PathType.TURINGDB, PathType.LOCAL:
|
|
124
|
+
if not self._use_scratch:
|
|
125
|
+
raise TuringDBException(
|
|
126
|
+
"Scratch is not enabled, please transfer to s3 first, then to local"
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
s3_path = f"s3://{self._scratch_folder}/{uuid.uuid4().hex}"
|
|
130
|
+
|
|
131
|
+
try:
|
|
132
|
+
self.transfer(src, s3_path)
|
|
133
|
+
self.transfer(s3_path, dst)
|
|
134
|
+
finally:
|
|
135
|
+
self._s3_bucket.objects.filter(
|
|
136
|
+
Prefix=f"{self._scratch_folder}/"
|
|
137
|
+
).delete()
|