f3d 3.0.0rc5__cp312-cp312-macosx_11_0_arm64.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.

Potentially problematic release.


This version of f3d might be problematic. Click here for more details.

f3d/__init__.py ADDED
@@ -0,0 +1,92 @@
1
+ # This file is auto-generated by CMake, do not edit!
2
+ # Refer to python/__init__.py.in source file
3
+
4
+ import os
5
+ import re
6
+ import sys
7
+ import warnings
8
+ from pathlib import Path
9
+ from typing import Any, Iterable, Mapping, Union
10
+
11
+ F3D_ABSOLUTE_DLLS = [
12
+ #
13
+ ]
14
+ F3D_RELATIVE_DLLS = [
15
+ #
16
+ ]
17
+ if sys.version_info >= (3, 8) and sys.platform == "win32":
18
+ for abs_path in F3D_ABSOLUTE_DLLS:
19
+ os.add_dll_directory(abs_path)
20
+ root = Path(__file__).parent
21
+ for rel_path in F3D_RELATIVE_DLLS:
22
+ os.add_dll_directory((root / rel_path).resolve())
23
+
24
+ from .pyf3d import *
25
+
26
+ # Automatically load plugins for the user
27
+ Engine.autoload_plugins()
28
+
29
+ __version__ = "3.0.0"
30
+
31
+
32
+ ################################################################################
33
+ # monkey patch `options.update`
34
+
35
+
36
+ def _f3d_options_update(
37
+ self, arg: Union[Mapping[str, Any], Iterable[tuple[str, Any]]]
38
+ ) -> None:
39
+ try:
40
+ for k, v in arg.items():
41
+ self[k] = v
42
+ return
43
+ except AttributeError: # `arg` doesn't have `.items()`
44
+ pass
45
+
46
+ try:
47
+ for k, v in arg:
48
+ self[k] = v
49
+ return
50
+ except TypeError: # `arg` isn't iterable
51
+ pass
52
+ except ValueError: # `arg` isn't iterable of pairs
53
+ pass
54
+
55
+ raise ValueError(f"cannot update {self} from {arg}")
56
+
57
+
58
+ Options.update = _f3d_options_update
59
+
60
+
61
+ ################################################################################
62
+ # add deprecated warnings
63
+
64
+
65
+ def _deprecated_decorator(f, reason):
66
+ def g(*args, **kwargs):
67
+ warnings.warn(reason, DeprecationWarning, 2)
68
+ return f(*args, **kwargs)
69
+
70
+ return g
71
+
72
+
73
+ def _add_deprecation_warnings():
74
+ for f3d_class in (
75
+ Camera,
76
+ Scene,
77
+ Options,
78
+ Interactor,
79
+ Engine,
80
+ Window,
81
+ Image,
82
+ ):
83
+ for name, member in f3d_class.__dict__.items():
84
+ if callable(member) and member.__doc__:
85
+ m = re.search(r"DEPRECATED(:\s*.+)?", member.__doc__)
86
+ if m:
87
+ reason = m.group(1) or ""
88
+ msg = f"{f3d_class.__qualname__}.{name} is deprecated{reason}"
89
+ setattr(f3d_class, name, _deprecated_decorator(member, msg))
90
+
91
+
92
+ _add_deprecation_warnings()
f3d/__init__.pyi ADDED
@@ -0,0 +1,32 @@
1
+ from __future__ import annotations
2
+ from f3d.pyf3d import Camera
3
+ from f3d.pyf3d import CameraState
4
+ from f3d.pyf3d import Engine
5
+ from f3d.pyf3d import Image
6
+ from f3d.pyf3d import InteractionBind
7
+ from f3d.pyf3d import Interactor
8
+ from f3d.pyf3d import LibInformation
9
+ from f3d.pyf3d import Log
10
+ from f3d.pyf3d import Mesh
11
+ from f3d.pyf3d import Options
12
+ from f3d.pyf3d import ReaderInformation
13
+ from f3d.pyf3d import Scene
14
+ from f3d.pyf3d import Utils
15
+ from f3d.pyf3d import Window
16
+ import os as os
17
+ from pathlib import Path
18
+ import re as re
19
+ import sys as sys
20
+ from typing import Any
21
+ import warnings as warnings
22
+ from . import pyf3d
23
+ __all__ = ['Any', 'Camera', 'CameraState', 'Engine', 'F3D_ABSOLUTE_DLLS', 'F3D_RELATIVE_DLLS', 'Image', 'InteractionBind', 'Interactor', 'LibInformation', 'Log', 'Mesh', 'Options', 'Path', 'ReaderInformation', 'Scene', 'Utils', 'Window', 'os', 'pyf3d', 're', 'sys', 'warnings']
24
+ def _add_deprecation_warnings():
25
+ ...
26
+ def _deprecated_decorator(f, reason):
27
+ ...
28
+ def _f3d_options_update(self, arg: typing.Union[typing.Mapping[str, typing.Any], typing.Iterable[tuple[str, typing.Any]]]) -> None:
29
+ ...
30
+ F3D_ABSOLUTE_DLLS: list = list()
31
+ F3D_RELATIVE_DLLS: list = list()
32
+ __version__: str = '3.0.0'
f3d/lib/libf3d.dylib ADDED
Binary file
Binary file