dhi 1.0.1__tar.gz → 1.0.11__tar.gz
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 dhi might be problematic. Click here for more details.
- {dhi-1.0.1/dhi.egg-info → dhi-1.0.11}/PKG-INFO +2 -2
- {dhi-1.0.1 → dhi-1.0.11/dhi.egg-info}/PKG-INFO +2 -2
- {dhi-1.0.1 → dhi-1.0.11}/dhi.egg-info/SOURCES.txt +0 -1
- {dhi-1.0.1 → dhi-1.0.11}/pyproject.toml +2 -2
- dhi-1.0.11/setup.py +80 -0
- dhi-1.0.1/dhi/libsatya.dylib +0 -0
- dhi-1.0.1/setup.py +0 -48
- {dhi-1.0.1 → dhi-1.0.11}/LICENSE +0 -0
- {dhi-1.0.1 → dhi-1.0.11}/MANIFEST.in +0 -0
- {dhi-1.0.1 → dhi-1.0.11}/README.md +0 -0
- {dhi-1.0.1 → dhi-1.0.11}/dhi/__init__.py +0 -0
- {dhi-1.0.1 → dhi-1.0.11}/dhi/_native.c +0 -0
- {dhi-1.0.1 → dhi-1.0.11}/dhi/batch.py +0 -0
- {dhi-1.0.1 → dhi-1.0.11}/dhi/validator.py +0 -0
- {dhi-1.0.1 → dhi-1.0.11}/dhi.egg-info/dependency_links.txt +0 -0
- {dhi-1.0.1 → dhi-1.0.11}/dhi.egg-info/requires.txt +0 -0
- {dhi-1.0.1 → dhi-1.0.11}/dhi.egg-info/top_level.txt +0 -0
- {dhi-1.0.1 → dhi-1.0.11}/setup.cfg +0 -0
- {dhi-1.0.1 → dhi-1.0.11}/tests/test_validators.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dhi
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.11
|
|
4
4
|
Summary: Ultra-fast data validation for Python - 28M validations/sec, 3x faster than Rust alternatives
|
|
5
5
|
Author-email: Rach Pradhan <rach@rachpradhan.com>
|
|
6
6
|
License: MIT
|
|
@@ -24,7 +24,7 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
24
24
|
Classifier: Programming Language :: Other
|
|
25
25
|
Classifier: Operating System :: OS Independent
|
|
26
26
|
Classifier: Typing :: Typed
|
|
27
|
-
Requires-Python: >=3.
|
|
27
|
+
Requires-Python: >=3.9
|
|
28
28
|
Description-Content-Type: text/markdown
|
|
29
29
|
License-File: LICENSE
|
|
30
30
|
Provides-Extra: dev
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dhi
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.11
|
|
4
4
|
Summary: Ultra-fast data validation for Python - 28M validations/sec, 3x faster than Rust alternatives
|
|
5
5
|
Author-email: Rach Pradhan <rach@rachpradhan.com>
|
|
6
6
|
License: MIT
|
|
@@ -24,7 +24,7 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
24
24
|
Classifier: Programming Language :: Other
|
|
25
25
|
Classifier: Operating System :: OS Independent
|
|
26
26
|
Classifier: Typing :: Typed
|
|
27
|
-
Requires-Python: >=3.
|
|
27
|
+
Requires-Python: >=3.9
|
|
28
28
|
Description-Content-Type: text/markdown
|
|
29
29
|
License-File: LICENSE
|
|
30
30
|
Provides-Extra: dev
|
|
@@ -4,10 +4,10 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "dhi"
|
|
7
|
-
version = "1.0.
|
|
7
|
+
version = "1.0.11"
|
|
8
8
|
description = "Ultra-fast data validation for Python - 28M validations/sec, 3x faster than Rust alternatives"
|
|
9
9
|
readme = "README.md"
|
|
10
|
-
requires-python = ">=3.
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
11
|
license = {text = "MIT"}
|
|
12
12
|
authors = [
|
|
13
13
|
{name = "Rach Pradhan", email = "rach@rachpradhan.com"}
|
dhi-1.0.11/setup.py
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
from setuptools import setup, Extension, find_packages
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
import os
|
|
4
|
+
import sys
|
|
5
|
+
import shutil
|
|
6
|
+
|
|
7
|
+
# Read README
|
|
8
|
+
readme_file = Path(__file__).parent / "README.md"
|
|
9
|
+
long_description = readme_file.read_text() if readme_file.exists() else ""
|
|
10
|
+
|
|
11
|
+
# Try to find and use the Zig library
|
|
12
|
+
ext_modules = []
|
|
13
|
+
|
|
14
|
+
try:
|
|
15
|
+
# Look for Zig library in multiple locations
|
|
16
|
+
lib_locations = [
|
|
17
|
+
Path(__file__).parent / ".." / "zig-out" / "lib", # Local build
|
|
18
|
+
Path(__file__).parent / "dhi", # Bundled in package
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
lib_name = 'satya'
|
|
22
|
+
lib_file = None
|
|
23
|
+
lib_dir = None
|
|
24
|
+
|
|
25
|
+
# Platform-specific library extension
|
|
26
|
+
if sys.platform == 'darwin':
|
|
27
|
+
lib_patterns = [f'lib{lib_name}.dylib']
|
|
28
|
+
elif sys.platform == 'win32':
|
|
29
|
+
lib_patterns = [f'{lib_name}.dll', f'lib{lib_name}.dll']
|
|
30
|
+
else:
|
|
31
|
+
lib_patterns = [f'lib{lib_name}.so']
|
|
32
|
+
|
|
33
|
+
# Find the library
|
|
34
|
+
for location in lib_locations:
|
|
35
|
+
if location.exists():
|
|
36
|
+
for pattern in lib_patterns:
|
|
37
|
+
lib_path = location / pattern
|
|
38
|
+
if lib_path.exists():
|
|
39
|
+
lib_file = str(lib_path)
|
|
40
|
+
lib_dir = str(location)
|
|
41
|
+
print(f"Found Zig library: {lib_file}")
|
|
42
|
+
break
|
|
43
|
+
if lib_file:
|
|
44
|
+
break
|
|
45
|
+
|
|
46
|
+
if lib_file and lib_dir:
|
|
47
|
+
# Copy library to package directory for bundling
|
|
48
|
+
package_lib_dir = Path(__file__).parent / "dhi"
|
|
49
|
+
package_lib_dir.mkdir(exist_ok=True)
|
|
50
|
+
|
|
51
|
+
for pattern in lib_patterns:
|
|
52
|
+
src = Path(lib_dir) / pattern
|
|
53
|
+
if src.exists():
|
|
54
|
+
dst = package_lib_dir / pattern
|
|
55
|
+
shutil.copy2(src, dst)
|
|
56
|
+
print(f"Copied {src} -> {dst}")
|
|
57
|
+
|
|
58
|
+
# Create extension
|
|
59
|
+
native_ext = Extension(
|
|
60
|
+
'dhi._dhi_native',
|
|
61
|
+
sources=['dhi/_native.c'],
|
|
62
|
+
include_dirs=[],
|
|
63
|
+
library_dirs=[lib_dir],
|
|
64
|
+
libraries=[lib_name],
|
|
65
|
+
runtime_library_dirs=[lib_dir] if sys.platform != 'darwin' else [],
|
|
66
|
+
extra_link_args=['-Wl,-rpath,@loader_path'] if sys.platform == 'darwin' else [],
|
|
67
|
+
)
|
|
68
|
+
ext_modules = [native_ext]
|
|
69
|
+
print("✅ Building with native Zig extension")
|
|
70
|
+
else:
|
|
71
|
+
print("⚠️ Zig library not found - installing pure Python version")
|
|
72
|
+
print(f" Searched in: {[str(loc) for loc in lib_locations]}")
|
|
73
|
+
|
|
74
|
+
except Exception as e:
|
|
75
|
+
print(f"⚠️ Error setting up native extension: {e}")
|
|
76
|
+
print(" Installing pure Python version")
|
|
77
|
+
|
|
78
|
+
setup(
|
|
79
|
+
ext_modules=ext_modules,
|
|
80
|
+
)
|
dhi-1.0.1/dhi/libsatya.dylib
DELETED
|
Binary file
|
dhi-1.0.1/setup.py
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
from setuptools import setup, Extension, find_packages
|
|
2
|
-
from pathlib import Path
|
|
3
|
-
import os
|
|
4
|
-
import sys
|
|
5
|
-
|
|
6
|
-
# Read README
|
|
7
|
-
readme_file = Path(__file__).parent / "README.md"
|
|
8
|
-
long_description = readme_file.read_text() if readme_file.exists() else ""
|
|
9
|
-
|
|
10
|
-
# Try to build native extension, but make it optional
|
|
11
|
-
try:
|
|
12
|
-
# Path to the Zig-built shared library
|
|
13
|
-
lib_dir = os.path.join(os.path.dirname(__file__), '..', 'zig-out', 'lib')
|
|
14
|
-
lib_name = 'satya'
|
|
15
|
-
|
|
16
|
-
# Platform-specific library extension
|
|
17
|
-
if sys.platform == 'darwin':
|
|
18
|
-
lib_file = f'lib{lib_name}.dylib'
|
|
19
|
-
elif sys.platform == 'win32':
|
|
20
|
-
lib_file = f'{lib_name}.dll'
|
|
21
|
-
else:
|
|
22
|
-
lib_file = f'lib{lib_name}.so'
|
|
23
|
-
|
|
24
|
-
lib_path = os.path.join(lib_dir, lib_file)
|
|
25
|
-
|
|
26
|
-
# Only build extension if library exists
|
|
27
|
-
if os.path.exists(lib_path):
|
|
28
|
-
native_ext = Extension(
|
|
29
|
-
'dhi._dhi_native',
|
|
30
|
-
sources=['dhi/_native.c'],
|
|
31
|
-
include_dirs=[],
|
|
32
|
-
library_dirs=[lib_dir],
|
|
33
|
-
libraries=[lib_name],
|
|
34
|
-
runtime_library_dirs=[lib_dir] if sys.platform != 'darwin' else [],
|
|
35
|
-
extra_link_args=[f'-Wl,-rpath,@loader_path'] if sys.platform == 'darwin' else [],
|
|
36
|
-
)
|
|
37
|
-
ext_modules = [native_ext]
|
|
38
|
-
else:
|
|
39
|
-
print("WARNING: Zig library not found, installing pure Python version")
|
|
40
|
-
ext_modules = []
|
|
41
|
-
except Exception as e:
|
|
42
|
-
print(f"WARNING: Could not build native extension: {e}")
|
|
43
|
-
print("Installing pure Python version")
|
|
44
|
-
ext_modules = []
|
|
45
|
-
|
|
46
|
-
setup(
|
|
47
|
-
ext_modules=ext_modules,
|
|
48
|
-
)
|
{dhi-1.0.1 → dhi-1.0.11}/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|