fivetran-connector-sdk 1.4.4__py3-none-any.whl → 1.4.5__py3-none-any.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.
@@ -32,13 +32,26 @@ from fivetran_connector_sdk.protos import connector_sdk_pb2_grpc
32
32
 
33
33
  # Version format: <major_version>.<minor_version>.<patch_version>
34
34
  # (where Major Version = 1 for GA, Minor Version is incremental MM from Jan 25 onwards, Patch Version is incremental within a month)
35
- __version__ = "1.4.4"
35
+ __version__ = "1.4.5"
36
36
 
37
- MAC_OS = "mac"
38
37
  WIN_OS = "windows"
39
- LINUX_OS = "linux"
38
+ ARM_64 = "arm64"
39
+ X64 = "x64"
40
40
 
41
- TESTER_VERSION = "0.25.0515.001"
41
+ OS_MAP = {
42
+ "darwin": "mac",
43
+ "linux": "linux",
44
+ WIN_OS: WIN_OS
45
+ }
46
+
47
+ ARCH_MAP = {
48
+ "x86_64": X64,
49
+ "amd64": X64,
50
+ ARM_64: ARM_64,
51
+ "aarch64": ARM_64
52
+ }
53
+
54
+ TESTER_VERSION = "0.25.0521.001"
42
55
  TESTER_FILENAME = "run_sdk_tester.jar"
43
56
  VERSION_FILENAME = "version.txt"
44
57
  UPLOAD_FILENAME = "code.zip"
@@ -1315,20 +1328,22 @@ class Connector(connector_sdk_pb2_grpc.ConnectorServicer):
1315
1328
  return False
1316
1329
 
1317
1330
  @staticmethod
1318
- def __get_os_name() -> str:
1319
- """Returns the name of the operating system.
1320
-
1321
- Returns:
1322
- str: The name of the operating system.
1331
+ def __get_os_arch_suffix() -> str:
1323
1332
  """
1324
- os_sysname = platform.system().lower()
1325
- if os_sysname.startswith("darwin"):
1326
- return MAC_OS
1327
- elif os_sysname.startswith("windows"):
1328
- return WIN_OS
1329
- elif os_sysname.startswith("linux"):
1330
- return LINUX_OS
1331
- raise ValueError(f"Unrecognized OS: {os_sysname}")
1333
+ Returns the operating system and architecture suffix for the current operating system.
1334
+ """
1335
+ system = platform.system().lower()
1336
+ machine = platform.machine().lower()
1337
+
1338
+ if system not in OS_MAP:
1339
+ raise RuntimeError(f"Unsupported OS: {system}")
1340
+
1341
+ plat = OS_MAP[system]
1342
+
1343
+ if machine not in ARCH_MAP or (plat == WIN_OS and ARCH_MAP[machine] != X64):
1344
+ raise RuntimeError(f"Unsupported architecture '{machine}' for {plat}")
1345
+
1346
+ return f"{plat}-{ARCH_MAP[machine]}"
1332
1347
 
1333
1348
  @staticmethod
1334
1349
  def __get_group_info(group: str, deploy_key: str) -> tuple[str, str]:
@@ -1439,9 +1454,9 @@ class Connector(connector_sdk_pb2_grpc.ConnectorServicer):
1439
1454
  check_newer_version()
1440
1455
 
1441
1456
  Logging.LOG_LEVEL = log_level
1442
- os_name = self.__get_os_name()
1457
+ os_arch_suffix = self.__get_os_arch_suffix()
1443
1458
  tester_root_dir = _tester_root_dir()
1444
- java_exe = self.__java_exe(tester_root_dir, os_name)
1459
+ java_exe = self.__java_exe(tester_root_dir, os_arch_suffix)
1445
1460
  install_tester = False
1446
1461
  version_file = os.path.join(tester_root_dir, VERSION_FILENAME)
1447
1462
  if os.path.isfile(version_file):
@@ -1457,7 +1472,7 @@ class Connector(connector_sdk_pb2_grpc.ConnectorServicer):
1457
1472
 
1458
1473
  if install_tester:
1459
1474
  os.makedirs(tester_root_dir, exist_ok=True)
1460
- download_filename = f"sdk-connector-tester-{os_name}-{TESTER_VERSION}.zip"
1475
+ download_filename = f"sdk-connector-tester-{os_arch_suffix}-{TESTER_VERSION}.zip"
1461
1476
  download_filepath = os.path.join(tester_root_dir, download_filename)
1462
1477
  try:
1463
1478
  print_library_log(f"Downloading connector tester version: {TESTER_VERSION} ")
@@ -1514,18 +1529,18 @@ class Connector(connector_sdk_pb2_grpc.ConnectorServicer):
1514
1529
  server.stop(grace=2.0)
1515
1530
 
1516
1531
  @staticmethod
1517
- def __java_exe(location: str, os_name: str) -> str:
1532
+ def __java_exe(location: str, os_arch_suffix: str) -> str:
1518
1533
  """Returns the path to the Java executable.
1519
1534
 
1520
1535
  Args:
1521
1536
  location (str): The location of the Java executable.
1522
- os_name (str): The name of the operating system.
1537
+ os_arch_suffix (str): The name of the operating system and architecture
1523
1538
 
1524
1539
  Returns:
1525
1540
  str: The path to the Java executable.
1526
1541
  """
1527
1542
  java_exe_base = os.path.join(location, "bin", "java")
1528
- return f"{java_exe_base}.exe" if os_name == WIN_OS else java_exe_base
1543
+ return f"{java_exe_base}.exe" if os_arch_suffix == f"{WIN_OS}-{X64}" else java_exe_base
1529
1544
 
1530
1545
  @staticmethod
1531
1546
  def process_stream(stream):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fivetran_connector_sdk
3
- Version: 1.4.4
3
+ Version: 1.4.5
4
4
  Summary: Build custom connectors on Fivetran platform
5
5
  Author-email: Fivetran <developers@fivetran.com>
6
6
  Project-URL: Homepage, https://fivetran.com/docs/connectors/connector-sdk
@@ -35,10 +35,11 @@ To learn more, see our [Connector SDK documentation](https://fivetran.com/docs/c
35
35
  pip install fivetran-connector-sdk
36
36
 
37
37
  ## **Requirements**
38
- - Python ≥3.9 and ≤3.12
39
- - Operating System:
40
- - Windows 10 or later
41
- - MacOS 13 (Ventura) or later
38
+ - Python version ≥3.9 and ≤3.12
39
+ - Operating system:
40
+ - Windows: 10 or later (64-bit only)
41
+ - macOS: 13 (Ventura) or later (Apple Silicon [arm64] or Intel [x86_64])
42
+ - Linux: Distributions such as Ubuntu 20.04 or later, Debian 10 or later, or Amazon Linux 2 or later (arm64 or x86_64)
42
43
 
43
44
  ## **Getting started**
44
45
  See [Quickstart guide](https://fivetran.com/docs/connectors/connector-sdk/quickstart-guide) to get started.
@@ -1,4 +1,4 @@
1
- fivetran_connector_sdk/__init__.py,sha256=F9JHnACrfz0PdbAUr9CK_MOIatbD_TvM8qr0fq4QB20,86592
1
+ fivetran_connector_sdk/__init__.py,sha256=BF_eAT9h-UCVMX9d-ZDgC8jtOYMAp15gbKzEMPoLMos,86932
2
2
  fivetran_connector_sdk/protos/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  fivetran_connector_sdk/protos/common_pb2.py,sha256=kUwVcyZHgLigNR-KnHZn7dHrlxaMnUXqzprsRx6T72M,6831
4
4
  fivetran_connector_sdk/protos/common_pb2.pyi,sha256=S0hdIzoXyyOKD5cjiGeDDLYpQ9J3LjAvu4rCj1JvJWE,9038
@@ -6,8 +6,8 @@ fivetran_connector_sdk/protos/common_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXH
6
6
  fivetran_connector_sdk/protos/connector_sdk_pb2.py,sha256=9Ke_Ti1s0vAeXapfXT-EryrT2-TSGQb8mhs4gxTpUMk,7732
7
7
  fivetran_connector_sdk/protos/connector_sdk_pb2.pyi,sha256=FWYxRgshEF3QDYAE0TM_mv4N2gGvkxCH_uPpxnMc4oA,8406
8
8
  fivetran_connector_sdk/protos/connector_sdk_pb2_grpc.py,sha256=ZfJLp4DW7uP4pFOZ74s_wQ6tD3eIPi-08UfnLwe4tzo,7163
9
- fivetran_connector_sdk-1.4.4.dist-info/METADATA,sha256=fjO7rX80-TWKjHLdCRepUr_3eI3VZEJ8EWvC2B6PK3c,2967
10
- fivetran_connector_sdk-1.4.4.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
11
- fivetran_connector_sdk-1.4.4.dist-info/entry_points.txt,sha256=uQn0KPnFlQmXJfxlk0tifdNsSXWfVlnAFzNqjXZM_xM,57
12
- fivetran_connector_sdk-1.4.4.dist-info/top_level.txt,sha256=-_xk2MFY4psIh7jw1lJePMzFb5-vask8_ZtX-UzYWUI,23
13
- fivetran_connector_sdk-1.4.4.dist-info/RECORD,,
9
+ fivetran_connector_sdk-1.4.5.dist-info/METADATA,sha256=oHKyhb91aaZ_obddY7yURX_SXNDqHYocbmi9lIDnlVs,3150
10
+ fivetran_connector_sdk-1.4.5.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
11
+ fivetran_connector_sdk-1.4.5.dist-info/entry_points.txt,sha256=uQn0KPnFlQmXJfxlk0tifdNsSXWfVlnAFzNqjXZM_xM,57
12
+ fivetran_connector_sdk-1.4.5.dist-info/top_level.txt,sha256=-_xk2MFY4psIh7jw1lJePMzFb5-vask8_ZtX-UzYWUI,23
13
+ fivetran_connector_sdk-1.4.5.dist-info/RECORD,,