dhi 1.0.0__tar.gz → 1.0.1__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dhi
3
- Version: 1.0.0
3
+ Version: 1.0.1
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dhi
3
- Version: 1.0.0
3
+ Version: 1.0.1
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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "dhi"
7
- version = "1.0.0"
7
+ version = "1.0.1"
8
8
  description = "Ultra-fast data validation for Python - 28M validations/sec, 3x faster than Rust alternatives"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
dhi-1.0.1/setup.py ADDED
@@ -0,0 +1,48 @@
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.0/setup.py DELETED
@@ -1,37 +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
- # Path to the Zig-built shared library
11
- lib_dir = os.path.join(os.path.dirname(__file__), '..', 'zig-out', 'lib')
12
- lib_name = 'satya'
13
-
14
- # Platform-specific library extension
15
- if sys.platform == 'darwin':
16
- lib_file = f'lib{lib_name}.dylib'
17
- elif sys.platform == 'win32':
18
- lib_file = f'{lib_name}.dll'
19
- else:
20
- lib_file = f'lib{lib_name}.so'
21
-
22
- lib_path = os.path.join(lib_dir, lib_file)
23
-
24
- # Define native extension
25
- native_ext = Extension(
26
- 'dhi._dhi_native',
27
- sources=['dhi/_native.c'],
28
- include_dirs=[],
29
- library_dirs=[lib_dir],
30
- libraries=[lib_name],
31
- runtime_library_dirs=[lib_dir] if sys.platform != 'darwin' else [],
32
- extra_link_args=[f'-Wl,-rpath,@loader_path'] if sys.platform == 'darwin' else [],
33
- )
34
-
35
- setup(
36
- ext_modules=[native_ext],
37
- )
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
File without changes