hyperstellar 1.0.0__cp313-cp313-win_amd64.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.
- hyperstellar/__init__.py +68 -0
- hyperstellar/__init__.pyi +899 -0
- hyperstellar/_native/windows-x64/shaders/axis.frag +8 -0
- hyperstellar/_native/windows-x64/shaders/axis.vert +13 -0
- hyperstellar/_native/windows-x64/shaders/fragShader.frag +27 -0
- hyperstellar/_native/windows-x64/shaders/geoShader.geom +69 -0
- hyperstellar/_native/windows-x64/shaders/math.comp +2177 -0
- hyperstellar/_native/windows-x64/shaders/paint.comp +434 -0
- hyperstellar/_native/windows-x64/shaders/quad.frag +26 -0
- hyperstellar/_native/windows-x64/shaders/quad.geom +157 -0
- hyperstellar/_native/windows-x64/shaders/quad.vert +39 -0
- hyperstellar/_native/windows-x64/shaders/vertexShader.vert +13 -0
- hyperstellar/_native/windows-x64/stellar.pyd +0 -0
- hyperstellar/py.typed +0 -0
- hyperstellar-1.0.0.dist-info/METADATA +470 -0
- hyperstellar-1.0.0.dist-info/RECORD +19 -0
- hyperstellar-1.0.0.dist-info/WHEEL +5 -0
- hyperstellar-1.0.0.dist-info/licenses/LICENSE +24 -0
- hyperstellar-1.0.0.dist-info/top_level.txt +1 -0
hyperstellar/__init__.py
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# hyperstellar/src/hyperstellar/__init__.py
|
|
2
|
+
import os
|
|
3
|
+
import sys
|
|
4
|
+
import platform
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
__version__ = "1.0.0"
|
|
8
|
+
|
|
9
|
+
# Platform detection
|
|
10
|
+
system = platform.system().lower()
|
|
11
|
+
arch = platform.machine().lower()
|
|
12
|
+
|
|
13
|
+
if system == "windows" and ("amd64" in arch or "x86_64" in arch):
|
|
14
|
+
platform_dir = "windows-x64"
|
|
15
|
+
lib_name = "stellar.pyd"
|
|
16
|
+
elif system == "linux" and ("x86_64" in arch or "amd64" in arch):
|
|
17
|
+
platform_dir = "linux-x64"
|
|
18
|
+
lib_name = "stellar.so"
|
|
19
|
+
elif system == "darwin":
|
|
20
|
+
platform_dir = "macos-x64"
|
|
21
|
+
lib_name = "stellar.so"
|
|
22
|
+
else:
|
|
23
|
+
raise ImportError(f"Unsupported platform: {system} {arch}")
|
|
24
|
+
|
|
25
|
+
# Native module path
|
|
26
|
+
module_dir = Path(__file__).parent / "_native" / platform_dir
|
|
27
|
+
module_path = module_dir / lib_name
|
|
28
|
+
|
|
29
|
+
if not module_path.exists():
|
|
30
|
+
raise ImportError(
|
|
31
|
+
f"Native module not found: {module_path}\n"
|
|
32
|
+
f"Platform detected: {system} {arch}\n"
|
|
33
|
+
f"Expected: {platform_dir}/{lib_name}"
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
# Windows: help loader find DLL dependencies
|
|
37
|
+
if system == "windows":
|
|
38
|
+
dll_dir = str(module_dir)
|
|
39
|
+
os.environ['PATH'] = dll_dir + ';' + os.environ.get('PATH', '')
|
|
40
|
+
try:
|
|
41
|
+
os.add_dll_directory(dll_dir)
|
|
42
|
+
except Exception:
|
|
43
|
+
pass
|
|
44
|
+
|
|
45
|
+
# Import native module
|
|
46
|
+
try:
|
|
47
|
+
sys.modules.pop('stellar', None)
|
|
48
|
+
sys.path.insert(0, str(module_dir))
|
|
49
|
+
import stellar as _stellar_module
|
|
50
|
+
sys.path.pop(0)
|
|
51
|
+
|
|
52
|
+
for attr_name in dir(_stellar_module):
|
|
53
|
+
if not attr_name.startswith('__'):
|
|
54
|
+
globals()[attr_name] = getattr(_stellar_module, attr_name)
|
|
55
|
+
|
|
56
|
+
if hasattr(_stellar_module, '__all__'):
|
|
57
|
+
__all__ = _stellar_module.__all__
|
|
58
|
+
|
|
59
|
+
print(f"✓ hyperstellar {__version__} loaded ({system} {arch})")
|
|
60
|
+
|
|
61
|
+
except ImportError as e:
|
|
62
|
+
raise ImportError(
|
|
63
|
+
f"Failed to load native module: {e}\n"
|
|
64
|
+
f"Module path: {module_path}\n"
|
|
65
|
+
f"Platform: {system} {arch}"
|
|
66
|
+
)
|
|
67
|
+
except Exception as e:
|
|
68
|
+
raise ImportError(f"Unexpected error loading hyperstellar: {e}")
|