Skip to content

Commit a55f00f

Browse files
author
jayeshmepani
committed
chore: update version to 1.0.7 across all relevant files
1 parent 4976622 commit a55f00f

5 files changed

Lines changed: 27 additions & 20 deletions

File tree

build/fetch-prebuilt.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env php
22
<?php
33

4-
$postalkitVersion = "v1.0.6";
4+
$postalkitVersion = "v1.0.7";
55
$repoUrl = "https://github.com/jayeshmepani/libpostal-ffi-python/releases/download/{$postalkitVersion}";
66

77
$targets = [

build/fetch-prebuilt.py

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,44 +5,46 @@
55
import sys
66
from pathlib import Path
77

8-
POSTALKIT_VERSION = "v1.0.6"
8+
POSTALKIT_VERSION = "v1.0.7"
99
REPO_URL = f"https://github.com/jayeshmepani/libpostal-ffi-python/releases/download/{POSTALKIT_VERSION}"
1010

1111
TARGETS = {
12-
'linux-x64': 'libpostal-linux-x64.tar.gz',
13-
'linux-arm64': 'libpostal-linux-arm64.tar.gz',
14-
'macos-x64': 'libpostal-macos-x64.tar.gz',
15-
'macos-arm64': 'libpostal-macos-arm64.tar.gz',
16-
'windows-x64': 'libpostal-windows-x64.zip',
12+
"linux-x64": "libpostal-linux-x64.tar.gz",
13+
"linux-arm64": "libpostal-linux-arm64.tar.gz",
14+
"macos-x64": "libpostal-macos-x64.tar.gz",
15+
"macos-arm64": "libpostal-macos-arm64.tar.gz",
16+
"windows-x64": "libpostal-windows-x64.zip",
1717
}
1818

19+
1920
def fetch_prebuilt():
2021
libs_dir = Path(__file__).parent.parent / "postalkit" / "libs"
21-
22+
2223
for target, filename in TARGETS.items():
2324
target_dir = libs_dir / target
2425
target_dir.mkdir(parents=True, exist_ok=True)
25-
26+
2627
url = f"{REPO_URL}/{filename}"
2728
dest = target_dir / filename
28-
29+
2930
print(f"Downloading {url}...")
3031
try:
3132
urllib.request.urlretrieve(url, dest)
3233
except Exception as e:
3334
print(f"Failed to download {url}: {e}")
3435
continue
35-
36+
3637
print(f"Extracting {dest}...")
37-
if filename.endswith('.zip'):
38-
with zipfile.ZipFile(dest, 'r') as zip_ref:
38+
if filename.endswith(".zip"):
39+
with zipfile.ZipFile(dest, "r") as zip_ref:
3940
zip_ref.extractall(target_dir)
4041
else:
4142
with tarfile.open(dest, "r:gz") as tar:
4243
tar.extractall(path=target_dir)
43-
44+
4445
os.remove(dest)
4546
print(f"Successfully setup {target}")
4647

48+
4749
if __name__ == "__main__":
4850
fetch_prebuilt()

postalkit/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55

66
from .core.ffi import *
77

8-
__version__ = "1.0.6"
8+
__version__ = "1.0.7"

postalkit/data/manager.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77
from ..runtime.platform import get_library_name, get_platform_identifier
88
from .checksum import verify_checksum
99

10-
POSTALKIT_VERSION = "v1.0.6"
10+
POSTALKIT_VERSION = "v1.0.7"
1111
BINARIES_BASE_URL = os.environ.get(
1212
"POSTALKIT_BINARIES_URL",
1313
f"https://github.com/jayeshmepani/libpostal-ffi-python/releases/download/{POSTALKIT_VERSION}",
1414
)
1515
MODEL_DATA_URL = os.environ.get(
16-
"POSTALKIT_MODEL_URL", "https://s3.amazonaws.com/libpostal/data/libpostal_data.tar.gz"
16+
"POSTALKIT_MODEL_URL",
17+
"https://s3.amazonaws.com/libpostal/data/libpostal_data.tar.gz",
1718
)
1819

1920

@@ -26,14 +27,18 @@ def _download_and_verify(url: str, tar_path: Path, desc: str):
2627
checksum_url = f"{url}.sha256"
2728
checksum_path = tar_path.with_suffix(".tar.gz.sha256")
2829
try:
29-
download_file(checksum_url, checksum_path, extract=False, desc=f"{desc} Checksum")
30+
download_file(
31+
checksum_url, checksum_path, extract=False, desc=f"{desc} Checksum"
32+
)
3033
with open(checksum_path) as f:
3134
# typical format: "hash filename"
3235
expected_hash = f.read().strip().split()[0]
3336

3437
if not verify_checksum(tar_path, expected_hash):
3538
os.remove(tar_path)
36-
raise DependencyMissingError(f"Checksum verification failed for {tar_path.name}")
39+
raise DependencyMissingError(
40+
f"Checksum verification failed for {tar_path.name}"
41+
)
3742
except Exception as e:
3843
# If the checksum file doesn't exist remotely or fails to download,
3944
# we strictly fail to prevent compromised or corrupt binaries in production.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "postalkit"
7-
version = "1.0.6"
7+
version = "1.0.7"
88
description = "Complete 100% 1:1 Python FFI Wrapper for the libpostal C Library - Direct C function calls with zero abstraction for maximum address parsing precision"
99
readme = "README.md"
1010
requires-python = ">=3.10"

0 commit comments

Comments
 (0)