amulet-core 2.0.2a2__tar.gz → 2.0.3a1__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 amulet-core might be problematic. Click here for more details.
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/CMakeLists.txt +5 -9
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/MANIFEST.in +3 -0
- {amulet_core-2.0.2a2/src/amulet_core.egg-info → amulet_core-2.0.3a1}/PKG-INFO +7 -5
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/build_requires.py +2 -1
- amulet_core-2.0.3a1/get_compiler/CMakeLists.txt +11 -0
- amulet_core-2.0.3a1/get_compiler/__init__.py +32 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/pyproject.toml +1 -3
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/requirements.py +40 -13
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/setup.py +32 -32
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/__init__.py +2 -2
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/_version.py +3 -3
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1/src/amulet_core.egg-info}/PKG-INFO +7 -5
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet_core.egg-info/SOURCES.txt +2 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet_core.egg-info/requires.txt +6 -4
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/README.md +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/setup.cfg +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/__pyinstaller/__init__.py +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/__pyinstaller/hook-amulet.core.py +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/_amulet_core.py.cpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/_amulet_core.pyi +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/amulet_coreConfig.cmake +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/biome/__init__.pyi +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/biome/biome.cpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/biome/biome.hpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/biome/biome.py.cpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/block/__init__.pyi +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/block/block.cpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/block/block.hpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/block/block.py.cpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/block_entity/__init__.pyi +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/block_entity/block_entity.cpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/block_entity/block_entity.hpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/block_entity/block_entity.py.cpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/chunk/__init__.pyi +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/chunk/chunk.cpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/chunk/chunk.hpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/chunk/chunk.py.cpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/chunk/component/__init__.pyi +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/chunk/component/__init_chunk_components.py.cpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/chunk/component/biome_3d_component.cpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/chunk/component/biome_3d_component.hpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/chunk/component/block_component.cpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/chunk/component/block_component.hpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/chunk/component/block_component.py.cpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/chunk/component/block_component.pyi +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/chunk/component/block_entity_component.cpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/chunk/component/block_entity_component.hpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/chunk/component/section_array_map.cpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/chunk/component/section_array_map.hpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/chunk/component/section_array_map.py.cpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/chunk/component/section_array_map.pyi +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/dll.hpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/entity/__init__.pyi +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/entity/entity.cpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/entity/entity.hpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/entity/entity.py.cpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/palette/__init__.pyi +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/palette/__init_palette.py.cpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/palette/biome_palette.cpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/palette/biome_palette.hpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/palette/biome_palette.py.cpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/palette/biome_palette.pyi +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/palette/block_palette.cpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/palette/block_palette.hpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/palette/block_palette.py.cpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/palette/block_palette.pyi +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/py.typed +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/selection/__init__.pyi +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/selection/__init_selection.py.cpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/selection/box.cpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/selection/box.hpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/selection/box.pyi +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/selection/group.cpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/selection/group.hpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/selection/group.pyi +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/version/__init__.pyi +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/version/version.cpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/version/version.hpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/version/version.py.cpp +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet_core.egg-info/dependency_links.txt +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet_core.egg-info/entry_points.txt +0 -0
- {amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet_core.egg-info/top_level.txt +0 -0
|
@@ -21,10 +21,8 @@ if (MSVC)
|
|
|
21
21
|
add_definitions("/MP")
|
|
22
22
|
endif()
|
|
23
23
|
|
|
24
|
-
#
|
|
24
|
+
# Find libraries
|
|
25
25
|
find_package(pybind11 CONFIG REQUIRED)
|
|
26
|
-
|
|
27
|
-
# Add Amulet libraries
|
|
28
26
|
find_package(amulet_pybind11_extensions CONFIG REQUIRED)
|
|
29
27
|
find_package(amulet_io CONFIG REQUIRED)
|
|
30
28
|
find_package(amulet_nbt CONFIG REQUIRED)
|
|
@@ -40,9 +38,9 @@ list(REMOVE_ITEM HEADERS ${EXTENSION_HEADERS})
|
|
|
40
38
|
|
|
41
39
|
# Add implementation
|
|
42
40
|
add_library(amulet_core SHARED)
|
|
43
|
-
target_link_libraries( amulet_core PRIVATE amulet_io )
|
|
44
|
-
target_link_libraries( amulet_core PRIVATE amulet_nbt )
|
|
45
41
|
target_compile_definitions(amulet_core PRIVATE ExportAmuletCore)
|
|
42
|
+
target_link_libraries(amulet_core PUBLIC amulet_io)
|
|
43
|
+
target_link_libraries(amulet_core PUBLIC amulet_nbt)
|
|
46
44
|
target_include_directories(amulet_core PUBLIC ${SOURCE_PATH})
|
|
47
45
|
target_sources(amulet_core PRIVATE ${SOURCES} ${HEADERS})
|
|
48
46
|
foreach(FILE ${SOURCES} ${HEADERS})
|
|
@@ -54,10 +52,8 @@ endforeach()
|
|
|
54
52
|
|
|
55
53
|
# Add python extension
|
|
56
54
|
pybind11_add_module(_amulet_core)
|
|
57
|
-
target_link_libraries(
|
|
58
|
-
target_link_libraries(
|
|
59
|
-
target_link_libraries( _amulet_core PRIVATE amulet_nbt )
|
|
60
|
-
target_link_libraries( _amulet_core PRIVATE amulet_core )
|
|
55
|
+
target_link_libraries(_amulet_core PRIVATE amulet_pybind11_extensions)
|
|
56
|
+
target_link_libraries(_amulet_core PRIVATE amulet_core)
|
|
61
57
|
target_compile_definitions(_amulet_core PRIVATE PYBIND11_DETAILED_ERROR_MESSAGES)
|
|
62
58
|
target_compile_definitions(_amulet_core PRIVATE PYBIND11_VERSION="${pybind11_VERSION}")
|
|
63
59
|
target_compile_definitions(_amulet_core PRIVATE COMPILER_ID="${CMAKE_CXX_COMPILER_ID}")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: amulet-core
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.3a1
|
|
4
4
|
Summary: A Python library for reading/writing Minecraft's various save formats.
|
|
5
5
|
Author: James Clare, Ben Gothard
|
|
6
6
|
Project-URL: Homepage, https://www.amuletmc.com
|
|
@@ -10,11 +10,14 @@ Classifier: Programming Language :: Python :: 3
|
|
|
10
10
|
Classifier: Operating System :: OS Independent
|
|
11
11
|
Requires-Python: >=3.11
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
|
-
Requires-Dist: amulet-compiler-target==
|
|
14
|
-
Requires-Dist: numpy~=2.0
|
|
13
|
+
Requires-Dist: amulet-compiler-target==2.0
|
|
15
14
|
Requires-Dist: amulet-compiler-version==3.0.0
|
|
15
|
+
Requires-Dist: pybind11==2.13.6
|
|
16
|
+
Requires-Dist: amulet-pybind11-extensions~=1.1.0.0a0
|
|
16
17
|
Requires-Dist: amulet-io~=1.0
|
|
17
|
-
Requires-Dist: amulet-
|
|
18
|
+
Requires-Dist: amulet-zlib~=1.0.0.0a6
|
|
19
|
+
Requires-Dist: amulet-nbt~=5.0.0.0a6
|
|
20
|
+
Requires-Dist: numpy~=2.0
|
|
18
21
|
Provides-Extra: docs
|
|
19
22
|
Requires-Dist: Sphinx>=1.7.4; extra == "docs"
|
|
20
23
|
Requires-Dist: sphinx-autodoc-typehints>=1.3.0; extra == "docs"
|
|
@@ -24,7 +27,6 @@ Requires-Dist: setuptools>=42; extra == "dev"
|
|
|
24
27
|
Requires-Dist: versioneer; extra == "dev"
|
|
25
28
|
Requires-Dist: packaging; extra == "dev"
|
|
26
29
|
Requires-Dist: wheel; extra == "dev"
|
|
27
|
-
Requires-Dist: pybind11==2.13.6; extra == "dev"
|
|
28
30
|
Requires-Dist: amulet_pybind11_extensions~=1.0; extra == "dev"
|
|
29
31
|
Requires-Dist: pybind11_stubgen>=2.5.4; extra == "dev"
|
|
30
32
|
Requires-Dist: black>=22.3; extra == "dev"
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
from typing import Union, Mapping
|
|
2
|
-
import requirements
|
|
3
2
|
|
|
4
3
|
from setuptools import build_meta
|
|
5
4
|
from setuptools.build_meta import *
|
|
6
5
|
|
|
6
|
+
import requirements
|
|
7
|
+
|
|
7
8
|
|
|
8
9
|
def get_requires_for_build_wheel(
|
|
9
10
|
config_settings: Union[Mapping[str, Union[str, list[str], None]], None] = None,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.13)
|
|
2
|
+
|
|
3
|
+
project(get_compiler LANGUAGES CXX)
|
|
4
|
+
|
|
5
|
+
# Set C++20
|
|
6
|
+
set(CMAKE_CXX_STANDARD 20)
|
|
7
|
+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
8
|
+
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
9
|
+
|
|
10
|
+
write_file("${CMAKE_BINARY_DIR}/compiler_id.txt" "${CMAKE_CXX_COMPILER_ID}")
|
|
11
|
+
write_file("${CMAKE_BINARY_DIR}/compiler_version.txt" "${CMAKE_CXX_COMPILER_VERSION}")
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import subprocess
|
|
3
|
+
|
|
4
|
+
Dir = os.path.dirname(__file__)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def main() -> str:
|
|
8
|
+
if subprocess.run(["cmake", "--version"]).returncode:
|
|
9
|
+
raise RuntimeError("Could not find cmake")
|
|
10
|
+
|
|
11
|
+
# get the compiler id and version
|
|
12
|
+
if subprocess.run(
|
|
13
|
+
["cmake", "-S", Dir, "-B", os.path.join(Dir, "build")]
|
|
14
|
+
).returncode:
|
|
15
|
+
raise RuntimeError(
|
|
16
|
+
"Could not find a C++ 20 compiler. Do you have a C++ 20 compiler installed?"
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
# Get the compiler variables generated by the cmake file
|
|
20
|
+
with open(os.path.join(Dir, "build", "compiler_id.txt")) as f:
|
|
21
|
+
compiler_id_str = f.read().strip()
|
|
22
|
+
with open(os.path.join(Dir, "build", "compiler_version.txt")) as f:
|
|
23
|
+
compiler_version = f.read().strip()
|
|
24
|
+
|
|
25
|
+
# convert the compiler id to an int so it can be used in a version number
|
|
26
|
+
compiler_id_int = 0
|
|
27
|
+
for b in compiler_id_str.encode("utf-8"):
|
|
28
|
+
compiler_id_int <<= 8
|
|
29
|
+
compiler_id_int += b
|
|
30
|
+
|
|
31
|
+
# combine the compiler id and compiler version into a version number
|
|
32
|
+
return f"==3.0.0.{compiler_id_int}.{compiler_version}"
|
|
@@ -3,7 +3,6 @@ requires = [
|
|
|
3
3
|
"setuptools>=42",
|
|
4
4
|
"versioneer",
|
|
5
5
|
"packaging",
|
|
6
|
-
"amulet-compiler-version@git+https://github.com/Amulet-Team/Amulet-Compiler-Version.git@3.0"
|
|
7
6
|
]
|
|
8
7
|
build-backend = "build_requires"
|
|
9
8
|
backend-path = [""]
|
|
@@ -33,7 +32,6 @@ dev = [
|
|
|
33
32
|
"versioneer",
|
|
34
33
|
"packaging",
|
|
35
34
|
"wheel",
|
|
36
|
-
"pybind11==2.13.6",
|
|
37
35
|
"amulet_pybind11_extensions~=1.0",
|
|
38
36
|
"pybind11_stubgen>=2.5.4",
|
|
39
37
|
"black>=22.3",
|
|
@@ -74,4 +72,4 @@ style = "pep440"
|
|
|
74
72
|
versionfile_source = "src/amulet/core/_version.py"
|
|
75
73
|
versionfile_build = "amulet/core/_version.py"
|
|
76
74
|
tag_prefix = ""
|
|
77
|
-
parentdir_prefix = "
|
|
75
|
+
parentdir_prefix = "amulet_core-"
|
|
@@ -1,24 +1,29 @@
|
|
|
1
1
|
import os
|
|
2
|
-
import amulet_compiler_version
|
|
3
2
|
from packaging.version import Version
|
|
4
3
|
|
|
5
|
-
AMULET_COMPILER_TARGET_REQUIREMENT = "==
|
|
4
|
+
AMULET_COMPILER_TARGET_REQUIREMENT = "==2.0"
|
|
6
5
|
AMULET_COMPILER_VERSION_REQUIREMENT = "==3.0.0"
|
|
7
6
|
|
|
8
7
|
PYBIND11_REQUIREMENT = "==2.13.6"
|
|
9
|
-
AMULET_PYBIND11_EXTENSIONS_REQUIREMENT = "~=1.0"
|
|
10
|
-
|
|
8
|
+
AMULET_PYBIND11_EXTENSIONS_REQUIREMENT = "~=1.1.0.0a0"
|
|
11
9
|
AMULET_IO_REQUIREMENT = "~=1.0"
|
|
12
|
-
|
|
13
|
-
AMULET_NBT_REQUIREMENT = "~=5.0.0.
|
|
10
|
+
AMULET_ZLIB_REQUIREMENT = "~=1.0.0.0a6"
|
|
11
|
+
AMULET_NBT_REQUIREMENT = "~=5.0.0.0a6"
|
|
14
12
|
NUMPY_REQUIREMENT = "~=2.0"
|
|
15
13
|
|
|
14
|
+
if os.environ.get("AMULET_PYBIND11_EXTENSIONS_REQUIREMENT", None):
|
|
15
|
+
AMULET_PYBIND11_EXTENSIONS_REQUIREMENT = f"{AMULET_PYBIND11_EXTENSIONS_REQUIREMENT},{os.environ['AMULET_PYBIND11_EXTENSIONS_REQUIREMENT']}"
|
|
16
16
|
|
|
17
17
|
if os.environ.get("AMULET_IO_REQUIREMENT", None):
|
|
18
18
|
AMULET_IO_REQUIREMENT = (
|
|
19
19
|
f"{AMULET_IO_REQUIREMENT},{os.environ['AMULET_IO_REQUIREMENT']}"
|
|
20
20
|
)
|
|
21
21
|
|
|
22
|
+
if os.environ.get("AMULET_ZLIB_REQUIREMENT", None):
|
|
23
|
+
AMULET_ZLIB_REQUIREMENT = (
|
|
24
|
+
f"{AMULET_ZLIB_REQUIREMENT},{os.environ['AMULET_ZLIB_REQUIREMENT']}"
|
|
25
|
+
)
|
|
26
|
+
|
|
22
27
|
if os.environ.get("AMULET_NBT_REQUIREMENT", None):
|
|
23
28
|
AMULET_NBT_REQUIREMENT = (
|
|
24
29
|
f"{AMULET_NBT_REQUIREMENT},{os.environ['AMULET_NBT_REQUIREMENT']}"
|
|
@@ -37,7 +42,18 @@ def get_specifier_set(version_str: str) -> str:
|
|
|
37
42
|
|
|
38
43
|
|
|
39
44
|
if os.environ.get("AMULET_FREEZE_COMPILER", None):
|
|
40
|
-
|
|
45
|
+
import get_compiler
|
|
46
|
+
|
|
47
|
+
AMULET_COMPILER_VERSION_REQUIREMENT = get_compiler.main()
|
|
48
|
+
|
|
49
|
+
try:
|
|
50
|
+
import amulet.pybind11_extensions
|
|
51
|
+
except ImportError:
|
|
52
|
+
pass
|
|
53
|
+
else:
|
|
54
|
+
AMULET_PYBIND11_EXTENSIONS_REQUIREMENT = get_specifier_set(
|
|
55
|
+
amulet.pybind11_extensions.__version__
|
|
56
|
+
)
|
|
41
57
|
|
|
42
58
|
try:
|
|
43
59
|
import amulet.io
|
|
@@ -46,6 +62,13 @@ if os.environ.get("AMULET_FREEZE_COMPILER", None):
|
|
|
46
62
|
else:
|
|
47
63
|
AMULET_IO_REQUIREMENT = get_specifier_set(amulet.io.__version__)
|
|
48
64
|
|
|
65
|
+
try:
|
|
66
|
+
import amulet.zlib
|
|
67
|
+
except ImportError:
|
|
68
|
+
pass
|
|
69
|
+
else:
|
|
70
|
+
AMULET_ZLIB_REQUIREMENT = get_specifier_set(amulet.zlib.__version__)
|
|
71
|
+
|
|
49
72
|
try:
|
|
50
73
|
import amulet.nbt
|
|
51
74
|
except ImportError:
|
|
@@ -56,19 +79,23 @@ if os.environ.get("AMULET_FREEZE_COMPILER", None):
|
|
|
56
79
|
|
|
57
80
|
def get_build_dependencies() -> list:
|
|
58
81
|
return [
|
|
59
|
-
f"pybind11{PYBIND11_REQUIREMENT}",
|
|
60
|
-
f"amulet_pybind11_extensions{AMULET_PYBIND11_EXTENSIONS_REQUIREMENT}",
|
|
61
|
-
f"amulet_nbt{AMULET_NBT_REQUIREMENT}",
|
|
62
|
-
f"amulet_io{AMULET_IO_REQUIREMENT}",
|
|
63
82
|
f"amulet-compiler-version{AMULET_COMPILER_VERSION_REQUIREMENT}",
|
|
64
|
-
|
|
83
|
+
f"pybind11{PYBIND11_REQUIREMENT}",
|
|
84
|
+
f"amulet-pybind11-extensions{AMULET_PYBIND11_EXTENSIONS_REQUIREMENT}",
|
|
85
|
+
f"amulet-io{AMULET_IO_REQUIREMENT}",
|
|
86
|
+
f"amulet-zlib{AMULET_ZLIB_REQUIREMENT}",
|
|
87
|
+
f"amulet-nbt{AMULET_NBT_REQUIREMENT}",
|
|
88
|
+
] * (not os.environ.get("AMULET_SKIP_COMPILE", None))
|
|
65
89
|
|
|
66
90
|
|
|
67
91
|
def get_runtime_dependencies() -> list[str]:
|
|
68
92
|
return [
|
|
69
93
|
f"amulet-compiler-target{AMULET_COMPILER_TARGET_REQUIREMENT}",
|
|
70
|
-
f"numpy{NUMPY_REQUIREMENT}",
|
|
71
94
|
f"amulet-compiler-version{AMULET_COMPILER_VERSION_REQUIREMENT}",
|
|
95
|
+
f"pybind11{PYBIND11_REQUIREMENT}",
|
|
96
|
+
f"amulet-pybind11-extensions{AMULET_PYBIND11_EXTENSIONS_REQUIREMENT}",
|
|
72
97
|
f"amulet-io{AMULET_IO_REQUIREMENT}",
|
|
98
|
+
f"amulet-zlib{AMULET_ZLIB_REQUIREMENT}",
|
|
73
99
|
f"amulet-nbt{AMULET_NBT_REQUIREMENT}",
|
|
100
|
+
f"numpy{NUMPY_REQUIREMENT}",
|
|
74
101
|
]
|
|
@@ -4,6 +4,7 @@ import sys
|
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
import platform
|
|
6
6
|
import datetime
|
|
7
|
+
from tempfile import TemporaryDirectory
|
|
7
8
|
|
|
8
9
|
from setuptools import setup, Extension, Command
|
|
9
10
|
from setuptools.command.build_ext import build_ext
|
|
@@ -14,7 +15,6 @@ import versioneer
|
|
|
14
15
|
|
|
15
16
|
import requirements
|
|
16
17
|
|
|
17
|
-
|
|
18
18
|
if (
|
|
19
19
|
os.environ.get("AMULET_FREEZE_COMPILER", None)
|
|
20
20
|
and sys.platform == "darwin"
|
|
@@ -27,8 +27,6 @@ def fix_path(path: str) -> str:
|
|
|
27
27
|
return os.path.realpath(path).replace(os.sep, "/")
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
dependencies = requirements.get_runtime_dependencies()
|
|
31
|
-
|
|
32
30
|
cmdclass: dict[str, type[Command]] = versioneer.get_cmdclass()
|
|
33
31
|
|
|
34
32
|
|
|
@@ -60,31 +58,34 @@ class CMakeBuild(cmdclass.get("build_ext", build_ext)):
|
|
|
60
58
|
if platform.machine() == "arm64":
|
|
61
59
|
platform_args.append("-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64")
|
|
62
60
|
|
|
63
|
-
if subprocess.run(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
61
|
+
if subprocess.run(["cmake", "--version"]).returncode:
|
|
62
|
+
raise RuntimeError("Could not find cmake")
|
|
63
|
+
with TemporaryDirectory() as tempdir:
|
|
64
|
+
if subprocess.run(
|
|
65
|
+
[
|
|
66
|
+
"cmake",
|
|
67
|
+
*platform_args,
|
|
68
|
+
f"-DPYTHON_EXECUTABLE={sys.executable}",
|
|
69
|
+
f"-Dpybind11_DIR={fix_path(pybind11.get_cmake_dir())}",
|
|
70
|
+
f"-Damulet_pybind11_extensions_DIR={fix_path(amulet.pybind11_extensions.__path__[0])}",
|
|
71
|
+
f"-Damulet_io_DIR={fix_path(amulet.io.__path__[0])}",
|
|
72
|
+
f"-Damulet_nbt_DIR={fix_path(amulet.nbt.__path__[0])}",
|
|
73
|
+
f"-Damulet_core_DIR={fix_path(core_src_dir)}",
|
|
74
|
+
f"-DAMULET_CORE_EXT_DIR={fix_path(ext_dir)}",
|
|
75
|
+
f"-DCMAKE_INSTALL_PREFIX=install",
|
|
76
|
+
"-B",
|
|
77
|
+
tempdir,
|
|
78
|
+
]
|
|
79
|
+
).returncode:
|
|
80
|
+
raise RuntimeError("Error configuring amulet-core")
|
|
81
|
+
if subprocess.run(
|
|
82
|
+
["cmake", "--build", tempdir, "--config", "Release"]
|
|
83
|
+
).returncode:
|
|
84
|
+
raise RuntimeError("Error building amulet-core")
|
|
85
|
+
if subprocess.run(
|
|
86
|
+
["cmake", "--install", tempdir, "--config", "Release"]
|
|
87
|
+
).returncode:
|
|
88
|
+
raise RuntimeError("Error installing amulet-core")
|
|
88
89
|
|
|
89
90
|
|
|
90
91
|
cmdclass["build_ext"] = CMakeBuild
|
|
@@ -98,11 +99,9 @@ def _get_version() -> str:
|
|
|
98
99
|
try:
|
|
99
100
|
with open("build/timestamp.txt", "r") as f:
|
|
100
101
|
timestamp = datetime.datetime.strptime(f.read(), date_format)
|
|
101
|
-
print("using cached timestamp")
|
|
102
102
|
except Exception:
|
|
103
103
|
timestamp = datetime.datetime(1, 1, 1)
|
|
104
104
|
if datetime.timedelta(minutes=10) < datetime.datetime.now() - timestamp:
|
|
105
|
-
print("get timestamp")
|
|
106
105
|
timestamp = datetime.datetime.now()
|
|
107
106
|
os.makedirs("build", exist_ok=True)
|
|
108
107
|
with open("build/timestamp.txt", "w") as f:
|
|
@@ -122,6 +121,7 @@ def _get_version() -> str:
|
|
|
122
121
|
setup(
|
|
123
122
|
version=_get_version(),
|
|
124
123
|
cmdclass=cmdclass,
|
|
125
|
-
ext_modules=[Extension("amulet.core._amulet_core", [])]
|
|
126
|
-
|
|
124
|
+
ext_modules=[Extension("amulet.core._amulet_core", [])]
|
|
125
|
+
* (not os.environ.get("AMULET_SKIP_COMPILE", None)),
|
|
126
|
+
install_requires=requirements.get_runtime_dependencies(),
|
|
127
127
|
)
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import logging
|
|
1
|
+
import logging as _logging
|
|
2
2
|
|
|
3
3
|
from . import _version
|
|
4
4
|
|
|
5
5
|
__version__ = _version.get_versions()["version"]
|
|
6
6
|
|
|
7
7
|
# init a default logger
|
|
8
|
-
|
|
8
|
+
_logging.basicConfig(level=_logging.INFO, format="%(levelname)s - %(message)s")
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
def _init() -> None:
|
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2025-06-
|
|
11
|
+
"date": "2025-06-25T16:00:57+0100",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "2.0.
|
|
14
|
+
"full-revisionid": "bdd78329fa8ffec0f992d795466ecf0a56e5d41c",
|
|
15
|
+
"version": "2.0.3a1"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: amulet-core
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.3a1
|
|
4
4
|
Summary: A Python library for reading/writing Minecraft's various save formats.
|
|
5
5
|
Author: James Clare, Ben Gothard
|
|
6
6
|
Project-URL: Homepage, https://www.amuletmc.com
|
|
@@ -10,11 +10,14 @@ Classifier: Programming Language :: Python :: 3
|
|
|
10
10
|
Classifier: Operating System :: OS Independent
|
|
11
11
|
Requires-Python: >=3.11
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
|
-
Requires-Dist: amulet-compiler-target==
|
|
14
|
-
Requires-Dist: numpy~=2.0
|
|
13
|
+
Requires-Dist: amulet-compiler-target==2.0
|
|
15
14
|
Requires-Dist: amulet-compiler-version==3.0.0
|
|
15
|
+
Requires-Dist: pybind11==2.13.6
|
|
16
|
+
Requires-Dist: amulet-pybind11-extensions~=1.1.0.0a0
|
|
16
17
|
Requires-Dist: amulet-io~=1.0
|
|
17
|
-
Requires-Dist: amulet-
|
|
18
|
+
Requires-Dist: amulet-zlib~=1.0.0.0a6
|
|
19
|
+
Requires-Dist: amulet-nbt~=5.0.0.0a6
|
|
20
|
+
Requires-Dist: numpy~=2.0
|
|
18
21
|
Provides-Extra: docs
|
|
19
22
|
Requires-Dist: Sphinx>=1.7.4; extra == "docs"
|
|
20
23
|
Requires-Dist: sphinx-autodoc-typehints>=1.3.0; extra == "docs"
|
|
@@ -24,7 +27,6 @@ Requires-Dist: setuptools>=42; extra == "dev"
|
|
|
24
27
|
Requires-Dist: versioneer; extra == "dev"
|
|
25
28
|
Requires-Dist: packaging; extra == "dev"
|
|
26
29
|
Requires-Dist: wheel; extra == "dev"
|
|
27
|
-
Requires-Dist: pybind11==2.13.6; extra == "dev"
|
|
28
30
|
Requires-Dist: amulet_pybind11_extensions~=1.0; extra == "dev"
|
|
29
31
|
Requires-Dist: pybind11_stubgen>=2.5.4; extra == "dev"
|
|
30
32
|
Requires-Dist: black>=22.3; extra == "dev"
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
amulet-compiler-target==
|
|
2
|
-
numpy~=2.0
|
|
1
|
+
amulet-compiler-target==2.0
|
|
3
2
|
amulet-compiler-version==3.0.0
|
|
3
|
+
pybind11==2.13.6
|
|
4
|
+
amulet-pybind11-extensions~=1.1.0.0a0
|
|
4
5
|
amulet-io~=1.0
|
|
5
|
-
amulet-
|
|
6
|
+
amulet-zlib~=1.0.0.0a6
|
|
7
|
+
amulet-nbt~=5.0.0.0a6
|
|
8
|
+
numpy~=2.0
|
|
6
9
|
|
|
7
10
|
[dev]
|
|
8
11
|
setuptools>=42
|
|
9
12
|
versioneer
|
|
10
13
|
packaging
|
|
11
14
|
wheel
|
|
12
|
-
pybind11==2.13.6
|
|
13
15
|
amulet_pybind11_extensions~=1.0
|
|
14
16
|
pybind11_stubgen>=2.5.4
|
|
15
17
|
black>=22.3
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/__pyinstaller/hook-amulet.core.py
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
{amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/block_entity/block_entity.py.cpp
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/chunk/component/biome_3d_component.cpp
RENAMED
|
File without changes
|
{amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/chunk/component/biome_3d_component.hpp
RENAMED
|
File without changes
|
{amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/chunk/component/block_component.cpp
RENAMED
|
File without changes
|
{amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/chunk/component/block_component.hpp
RENAMED
|
File without changes
|
{amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/chunk/component/block_component.py.cpp
RENAMED
|
File without changes
|
{amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/chunk/component/block_component.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/chunk/component/section_array_map.cpp
RENAMED
|
File without changes
|
{amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/chunk/component/section_array_map.hpp
RENAMED
|
File without changes
|
{amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/chunk/component/section_array_map.py.cpp
RENAMED
|
File without changes
|
{amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/chunk/component/section_array_map.pyi
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{amulet_core-2.0.2a2 → amulet_core-2.0.3a1}/src/amulet/core/selection/__init_selection.py.cpp
RENAMED
|
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
|
|
File without changes
|