amulet-core 2.0.3a0__tar.gz → 2.0.3a2__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.

Files changed (82) hide show
  1. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/MANIFEST.in +3 -0
  2. {amulet_core-2.0.3a0/src/amulet_core.egg-info → amulet_core-2.0.3a2}/PKG-INFO +3 -3
  3. amulet_core-2.0.3a2/get_compiler/CMakeLists.txt +11 -0
  4. amulet_core-2.0.3a2/get_compiler/__init__.py +32 -0
  5. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/pyproject.toml +0 -1
  6. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/requirements.py +5 -4
  7. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/setup.py +27 -25
  8. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/__init__.py +1 -0
  9. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/_amulet_core.py.cpp +1 -1
  10. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/_version.py +3 -3
  11. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2/src/amulet_core.egg-info}/PKG-INFO +3 -3
  12. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet_core.egg-info/SOURCES.txt +2 -0
  13. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet_core.egg-info/requires.txt +2 -2
  14. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/CMakeLists.txt +0 -0
  15. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/README.md +0 -0
  16. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/build_requires.py +0 -0
  17. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/setup.cfg +0 -0
  18. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/__pyinstaller/__init__.py +0 -0
  19. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/__pyinstaller/hook-amulet.core.py +0 -0
  20. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/_amulet_core.pyi +0 -0
  21. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/amulet_coreConfig.cmake +0 -0
  22. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/biome/__init__.pyi +0 -0
  23. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/biome/biome.cpp +0 -0
  24. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/biome/biome.hpp +0 -0
  25. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/biome/biome.py.cpp +0 -0
  26. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/block/__init__.pyi +0 -0
  27. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/block/block.cpp +0 -0
  28. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/block/block.hpp +0 -0
  29. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/block/block.py.cpp +0 -0
  30. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/block_entity/__init__.pyi +0 -0
  31. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/block_entity/block_entity.cpp +0 -0
  32. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/block_entity/block_entity.hpp +0 -0
  33. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/block_entity/block_entity.py.cpp +0 -0
  34. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/chunk/__init__.pyi +0 -0
  35. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/chunk/chunk.cpp +0 -0
  36. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/chunk/chunk.hpp +0 -0
  37. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/chunk/chunk.py.cpp +0 -0
  38. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/chunk/component/__init__.pyi +0 -0
  39. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/chunk/component/__init_chunk_components.py.cpp +0 -0
  40. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/chunk/component/biome_3d_component.cpp +0 -0
  41. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/chunk/component/biome_3d_component.hpp +0 -0
  42. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/chunk/component/block_component.cpp +0 -0
  43. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/chunk/component/block_component.hpp +0 -0
  44. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/chunk/component/block_component.py.cpp +0 -0
  45. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/chunk/component/block_component.pyi +0 -0
  46. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/chunk/component/block_entity_component.cpp +0 -0
  47. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/chunk/component/block_entity_component.hpp +0 -0
  48. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/chunk/component/section_array_map.cpp +0 -0
  49. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/chunk/component/section_array_map.hpp +0 -0
  50. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/chunk/component/section_array_map.py.cpp +0 -0
  51. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/chunk/component/section_array_map.pyi +0 -0
  52. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/dll.hpp +0 -0
  53. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/entity/__init__.pyi +0 -0
  54. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/entity/entity.cpp +0 -0
  55. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/entity/entity.hpp +0 -0
  56. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/entity/entity.py.cpp +0 -0
  57. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/palette/__init__.pyi +0 -0
  58. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/palette/__init_palette.py.cpp +0 -0
  59. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/palette/biome_palette.cpp +0 -0
  60. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/palette/biome_palette.hpp +0 -0
  61. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/palette/biome_palette.py.cpp +0 -0
  62. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/palette/biome_palette.pyi +0 -0
  63. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/palette/block_palette.cpp +0 -0
  64. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/palette/block_palette.hpp +0 -0
  65. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/palette/block_palette.py.cpp +0 -0
  66. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/palette/block_palette.pyi +0 -0
  67. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/py.typed +0 -0
  68. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/selection/__init__.pyi +0 -0
  69. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/selection/__init_selection.py.cpp +0 -0
  70. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/selection/box.cpp +0 -0
  71. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/selection/box.hpp +0 -0
  72. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/selection/box.pyi +0 -0
  73. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/selection/group.cpp +0 -0
  74. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/selection/group.hpp +0 -0
  75. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/selection/group.pyi +0 -0
  76. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/version/__init__.pyi +0 -0
  77. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/version/version.cpp +0 -0
  78. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/version/version.hpp +0 -0
  79. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet/core/version/version.py.cpp +0 -0
  80. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet_core.egg-info/dependency_links.txt +0 -0
  81. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet_core.egg-info/entry_points.txt +0 -0
  82. {amulet_core-2.0.3a0 → amulet_core-2.0.3a2}/src/amulet_core.egg-info/top_level.txt +0 -0
@@ -1,6 +1,9 @@
1
1
  include build_requires.py
2
2
  include requirements.py
3
3
 
4
+ include get_compiler/CMakeLists.txt
5
+ include get_compiler/__init__.py
6
+
4
7
  recursive-include src/amulet *.cpp *.hpp *Config.cmake
5
8
 
6
9
  include CMakeLists.txt
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: amulet-core
3
- Version: 2.0.3a0
3
+ Version: 2.0.3a2
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
@@ -15,8 +15,8 @@ Requires-Dist: amulet-compiler-version==3.0.0
15
15
  Requires-Dist: pybind11==2.13.6
16
16
  Requires-Dist: amulet-pybind11-extensions~=1.1.0.0a0
17
17
  Requires-Dist: amulet-io~=1.0
18
- Requires-Dist: amulet-zlib~=1.0.0.0a4
19
- Requires-Dist: amulet-nbt~=5.0.0.0a4
18
+ Requires-Dist: amulet-zlib~=1.0.0.0a7
19
+ Requires-Dist: amulet-nbt~=5.0.0.0a7
20
20
  Requires-Dist: numpy~=2.0
21
21
  Provides-Extra: docs
22
22
  Requires-Dist: Sphinx>=1.7.4; extra == "docs"
@@ -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 = [""]
@@ -1,5 +1,4 @@
1
1
  import os
2
- import amulet_compiler_version
3
2
  from packaging.version import Version
4
3
 
5
4
  AMULET_COMPILER_TARGET_REQUIREMENT = "==2.0"
@@ -8,8 +7,8 @@ AMULET_COMPILER_VERSION_REQUIREMENT = "==3.0.0"
8
7
  PYBIND11_REQUIREMENT = "==2.13.6"
9
8
  AMULET_PYBIND11_EXTENSIONS_REQUIREMENT = "~=1.1.0.0a0"
10
9
  AMULET_IO_REQUIREMENT = "~=1.0"
11
- AMULET_ZLIB_REQUIREMENT = "~=1.0.0.0a4"
12
- AMULET_NBT_REQUIREMENT = "~=5.0.0.0a4"
10
+ AMULET_ZLIB_REQUIREMENT = "~=1.0.0.0a7"
11
+ AMULET_NBT_REQUIREMENT = "~=5.0.0.0a7"
13
12
  NUMPY_REQUIREMENT = "~=2.0"
14
13
 
15
14
  if os.environ.get("AMULET_PYBIND11_EXTENSIONS_REQUIREMENT", None):
@@ -43,7 +42,9 @@ def get_specifier_set(version_str: str) -> str:
43
42
 
44
43
 
45
44
  if os.environ.get("AMULET_FREEZE_COMPILER", None):
46
- AMULET_COMPILER_VERSION_REQUIREMENT = f"=={amulet_compiler_version.__version__}"
45
+ import get_compiler
46
+
47
+ AMULET_COMPILER_VERSION_REQUIREMENT = get_compiler.main()
47
48
 
48
49
  try:
49
50
  import amulet.pybind11_extensions
@@ -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
@@ -59,31 +60,32 @@ class CMakeBuild(cmdclass.get("build_ext", build_ext)):
59
60
 
60
61
  if subprocess.run(["cmake", "--version"]).returncode:
61
62
  raise RuntimeError("Could not find cmake")
62
- if subprocess.run(
63
- [
64
- "cmake",
65
- *platform_args,
66
- f"-DPYTHON_EXECUTABLE={sys.executable}",
67
- f"-Dpybind11_DIR={fix_path(pybind11.get_cmake_dir())}",
68
- f"-Damulet_pybind11_extensions_DIR={fix_path(amulet.pybind11_extensions.__path__[0])}",
69
- f"-Damulet_io_DIR={fix_path(amulet.io.__path__[0])}",
70
- f"-Damulet_nbt_DIR={fix_path(amulet.nbt.__path__[0])}",
71
- f"-Damulet_core_DIR={fix_path(core_src_dir)}",
72
- f"-DAMULET_CORE_EXT_DIR={fix_path(ext_dir)}",
73
- f"-DCMAKE_INSTALL_PREFIX=install",
74
- "-B",
75
- "build",
76
- ]
77
- ).returncode:
78
- raise RuntimeError("Error configuring amulet-core")
79
- if subprocess.run(
80
- ["cmake", "--build", "build", "--config", "Release"]
81
- ).returncode:
82
- raise RuntimeError("Error installing amulet-core")
83
- if subprocess.run(
84
- ["cmake", "--install", "build", "--config", "Release"]
85
- ).returncode:
86
- raise RuntimeError("Error installing amulet-core")
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")
87
89
 
88
90
 
89
91
  cmdclass["build_ext"] = CMakeBuild
@@ -23,6 +23,7 @@ def _init() -> None:
23
23
  raise RuntimeError(f"Unsupported platform {sys.platform}")
24
24
 
25
25
  # Import dependencies
26
+ import amulet.zlib
26
27
  import amulet.nbt
27
28
 
28
29
  # Load the shared library
@@ -1,7 +1,6 @@
1
1
  #include <pybind11/pybind11.h>
2
2
 
3
3
  #include <amulet/pybind11_extensions/compatibility.hpp>
4
- #include <amulet/pybind11_extensions/py_module.hpp>
5
4
 
6
5
  namespace py = pybind11;
7
6
  namespace pyext = Amulet::pybind11_extensions;
@@ -18,6 +17,7 @@ void init_chunk(py::module);
18
17
  void init_module(py::module m)
19
18
  {
20
19
  pyext::init_compiler_config(m);
20
+ pyext::check_compatibility(py::module::import("amulet.zlib"), m);
21
21
  pyext::check_compatibility(py::module::import("amulet.nbt"), m);
22
22
 
23
23
  // Submodules
@@ -8,11 +8,11 @@ import json
8
8
 
9
9
  version_json = '''
10
10
  {
11
- "date": "2025-06-24T15:49:50+0100",
11
+ "date": "2025-06-27T16:04:02+0100",
12
12
  "dirty": false,
13
13
  "error": null,
14
- "full-revisionid": "2360770e8508f0ae742ac79673ff6f84b539349f",
15
- "version": "2.0.3a0"
14
+ "full-revisionid": "e066fffa9dd7f65769e62a638a8b55659eae70d0",
15
+ "version": "2.0.3a2"
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.3a0
3
+ Version: 2.0.3a2
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
@@ -15,8 +15,8 @@ Requires-Dist: amulet-compiler-version==3.0.0
15
15
  Requires-Dist: pybind11==2.13.6
16
16
  Requires-Dist: amulet-pybind11-extensions~=1.1.0.0a0
17
17
  Requires-Dist: amulet-io~=1.0
18
- Requires-Dist: amulet-zlib~=1.0.0.0a4
19
- Requires-Dist: amulet-nbt~=5.0.0.0a4
18
+ Requires-Dist: amulet-zlib~=1.0.0.0a7
19
+ Requires-Dist: amulet-nbt~=5.0.0.0a7
20
20
  Requires-Dist: numpy~=2.0
21
21
  Provides-Extra: docs
22
22
  Requires-Dist: Sphinx>=1.7.4; extra == "docs"
@@ -5,6 +5,8 @@ build_requires.py
5
5
  pyproject.toml
6
6
  requirements.py
7
7
  setup.py
8
+ get_compiler/CMakeLists.txt
9
+ get_compiler/__init__.py
8
10
  src/amulet/core/__init__.py
9
11
  src/amulet/core/_amulet_core.py.cpp
10
12
  src/amulet/core/_amulet_core.pyi
@@ -3,8 +3,8 @@ amulet-compiler-version==3.0.0
3
3
  pybind11==2.13.6
4
4
  amulet-pybind11-extensions~=1.1.0.0a0
5
5
  amulet-io~=1.0
6
- amulet-zlib~=1.0.0.0a4
7
- amulet-nbt~=5.0.0.0a4
6
+ amulet-zlib~=1.0.0.0a7
7
+ amulet-nbt~=5.0.0.0a7
8
8
  numpy~=2.0
9
9
 
10
10
  [dev]
File without changes
File without changes