Skip to content

Commit 7394285

Browse files
Update pybind11 and enable meta build (#41)
* Update pybind11 version * Enable meta build * Update stubs
1 parent 19555ed commit 7394285

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

requirements.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
AMULET_COMPILER_TARGET_REQUIREMENT = "==2.0"
55
AMULET_COMPILER_VERSION_REQUIREMENT = "==3.0.0"
66

7-
PYBIND11_REQUIREMENT = "==2.13.6"
7+
PYBIND11_REQUIREMENT = "==3.0.0"
88
AMULET_PYBIND11_EXTENSIONS_REQUIREMENT = "~=1.1.0.0a0"
99

1010
if os.environ.get("AMULET_PYBIND11_EXTENSIONS_REQUIREMENT", None):

src/amulet/leveldb/__init__.pyi

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ class CompressionType:
1313
1414
NoCompression : No compression.
1515
16+
SnappyCompression : Snappy compression.
17+
1618
ZstdCompression : Zstd compression.
1719
1820
ZlibRawCompression : Zlib raw compression.
@@ -21,6 +23,9 @@ class CompressionType:
2123
NoCompression: typing.ClassVar[
2224
CompressionType
2325
] # value = amulet.leveldb.CompressionType.NoCompression
26+
SnappyCompression: typing.ClassVar[
27+
CompressionType
28+
] # value = amulet.leveldb.CompressionType.SnappyCompression
2429
ZlibRawCompression: typing.ClassVar[
2530
CompressionType
2631
] # value = amulet.leveldb.CompressionType.ZlibRawCompression
@@ -29,11 +34,11 @@ class CompressionType:
2934
] # value = amulet.leveldb.CompressionType.ZstdCompression
3035
__members__: typing.ClassVar[
3136
dict[str, CompressionType]
32-
] # value = {'NoCompression': amulet.leveldb.CompressionType.NoCompression, 'ZstdCompression': amulet.leveldb.CompressionType.ZstdCompression, 'ZlibRawCompression': amulet.leveldb.CompressionType.ZlibRawCompression}
37+
] # value = {'NoCompression': amulet.leveldb.CompressionType.NoCompression, 'SnappyCompression': amulet.leveldb.CompressionType.SnappyCompression, 'ZstdCompression': amulet.leveldb.CompressionType.ZstdCompression, 'ZlibRawCompression': amulet.leveldb.CompressionType.ZlibRawCompression}
3338
def __eq__(self, other: typing.Any) -> bool: ...
3439
def __hash__(self) -> int: ...
3540
def __index__(self) -> int: ...
36-
def __init__(self, value: int) -> None: ...
41+
def __init__(self, value: typing.SupportsInt) -> None: ...
3742
def __int__(self) -> int: ...
3843
def __ne__(self, other: typing.Any) -> bool: ...
3944
def __repr__(self) -> str: ...

tests/CMakeLists.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,15 @@ else()
1818
endif()
1919

2020
# Find dependencies
21-
find_package(pybind11 CONFIG REQUIRED)
22-
find_package(amulet_pybind11_extensions CONFIG REQUIRED)
23-
find_package(amulet_leveldb CONFIG REQUIRED)
21+
if (NOT TARGET pybind11::modulepybind11::module)
22+
find_package(pybind11 CONFIG REQUIRED)
23+
endif()
24+
if (NOT TARGET amulet_pybind11_extensionspybind11::module)
25+
find_package(amulet_pybind11_extensions CONFIG REQUIRED)
26+
endif()
27+
if (NOT TARGET leveldbpybind11::module)
28+
find_package(amulet_leveldb CONFIG REQUIRED)
29+
endif()
2430

2531
# Find sources
2632
file(GLOB_RECURSE SOURCES LIST_DIRECTORIES false "${CMAKE_CURRENT_LIST_DIR}/*.py.cpp")

0 commit comments

Comments
 (0)