sharedbox 0.3.0__cp312-abi3-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.
sharedbox/__init__.py ADDED
@@ -0,0 +1,52 @@
1
+ from pathlib import Path
2
+
3
+ from ._box import SharedBox, SupportsSharedBox, fields
4
+ from ._events import BoxEvents, FieldWatch
5
+ from ._layout import Capacity, Field, field
6
+ from ._native import (
7
+ BoxClosedError,
8
+ LockTimeoutError,
9
+ SchemaMismatchError,
10
+ SegmentExistsError,
11
+ SegmentNotFoundError,
12
+ )
13
+ from ._refs import BoxRef, BrokenReferenceError, UnknownBoxClassError
14
+
15
+ __all__ = [
16
+ "BoxClosedError",
17
+ "BoxEvents",
18
+ "BoxRef",
19
+ "BrokenReferenceError",
20
+ "Capacity",
21
+ "Field",
22
+ "FieldWatch",
23
+ "LockTimeoutError",
24
+ "SchemaMismatchError",
25
+ "SegmentExistsError",
26
+ "SegmentNotFoundError",
27
+ "SharedBox",
28
+ "SupportsSharedBox",
29
+ "UnknownBoxClassError",
30
+ "field",
31
+ "fields",
32
+ "get_include",
33
+ ]
34
+
35
+
36
+ def get_include() -> str:
37
+ """Return the folder holding `sharedbox/sharedbox.hpp`, `sharedbox/sharedbox_c.h` and `sharedbox/sharedbox_c.cpp`.
38
+
39
+ Add it to the include path of an extension that uses a box through its capsule.
40
+
41
+ Raises
42
+ ------
43
+ FileNotFoundError
44
+ If `sharedbox.hpp` is not installed with this copy of sharedbox.
45
+ """
46
+ for folder in __path__:
47
+ include = Path(folder) / "include"
48
+ if (include / "sharedbox" / "sharedbox.hpp").is_file():
49
+ return str(include)
50
+ raise FileNotFoundError(
51
+ "sharedbox.hpp is not installed with this copy of sharedbox"
52
+ )