Skip to content

Commit

Permalink
Added C++ framework (#85)
Browse files Browse the repository at this point in the history
* Add and update dependencies

* Bump plugin python dependency

* Added blank level info layout

This layout will be the landing page for the level instance.
It will show metadata about the level.

* Move back the selection plugin

* Added py.typed marker

* Moved back the resource pack plugin

* Moved back the 3D Editor

* Added type hints to solve most mypy errors.

* Simplify unregister_widget call

* Add noexcept marker

* Fix View3D inheritance

* Refactor View3D plugin

* Added blank pybind chunk builder module

* Updated build tools

* Reformatted

* Added script to generate VS solution file

* Ignore solution files

* Removed pymctranslate requirement

* Fixed solution generator

* Updated type hints

* Removed cython references

* Ignore compiled files

* Fixed solution generator

* Added stub generator

* Removed minecraft_resource_pack library

This has been merged into the core library.

* Added ignored compiled file

* Added chunk generator function definition

* Fixed mypy issues in resource pack

* Fixed texture atlas mypy errors

* Reformatted

* Updated PyObject name

* Refactored and fixed mypy errors

* Reformatted

* Bumped versions

* Bumped core version

* Updated solution generator
  • Loading branch information
gentlegiantJGC authored Sep 25, 2024
1 parent ae49e9c commit 79aa6e5
Show file tree
Hide file tree
Showing 52 changed files with 1,432 additions and 507 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/python-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
fail-fast: false
matrix:
cfg:
- {os: windows-latest, python-version: '3.10', architecture: x64}
- {os: macos-latest, python-version: '3.10', architecture: x64}
- {os: ubuntu-latest, python-version: '3.10', architecture: x64}
- {os: windows-latest, python-version: '3.12', architecture: x64}
- {os: macos-latest, python-version: '3.12', architecture: x64}
- {os: ubuntu-latest, python-version: '3.12', architecture: x64}

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-stylecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
python-version: ['3.12']

steps:
- uses: actions/checkout@v2
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/python-unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ jobs:
unittests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11']
python-version: ['3.11', '3.12']
os: [windows-latest, macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v2
Expand Down
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ __pycache__/
# C extensions
*.so

# Cython
*.c
*.html

# Distribution / packaging
.Python
/build/
Expand Down Expand Up @@ -116,6 +112,11 @@ venv.bak/
*.user
*.pyproj
*.sln
src/sln/
*.exp
*.lib
*.pdb
*.ilk

# Visual Studio Code extensions
.qt_for_python
Expand Down
8 changes: 2 additions & 6 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
# Python files
recursive-include src/amulet_editor *.py *.pyi *.pyx *.pxd
# Images
recursive-include src/amulet_editor *.jpg *.png *.svg *.ico
# Misc
recursive-include src/amulet_editor *.mcmeta *.lang *.json *.qss
recursive-include src/amulet_editor *.pyi py.typed *.py *.cpp *.hpp *.jpg *.png *.svg *.ico *.lang *.json *.qss
recursive-include src/builtin_plugins *.pyi py.typed *.py *.cpp *.hpp *.jpg *.png *.svg *.ico *.lang *.json *.qss
2 changes: 0 additions & 2 deletions build_system/build/settings/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
"hidden_imports": [
"amulet",
"amulet_nbt",
"PyMCTranslate",
"minecraft_model_reader",
"PySide6",
"pkg_resources",
"OpenGL",
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
requires = [
"setuptools >= 42",
"wheel",
"cython >= 3.0.0a9",
"versioneer",
"numpy ~= 1.17"
"pybind11 ~= 2.12",
"amulet_nbt ~= 4.0a2",
"amulet_core == 2.0a7"
]
build-backend = "setuptools.build_meta"
29 changes: 23 additions & 6 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,40 @@ long_description_content_type = text/markdown
platforms = any

[options]
include_package_data = True
python_requires = >=3.11
install_requires =
PySide6_Essentials~=6.5
numpy~=1.17
numpy~=2.0
pyopengl~=3.0
packaging
amulet_core~=2.0a0
amulet_nbt~=3.0a2
minecraft_resource_pack~=1.3
amulet_nbt~=4.0a2
amulet_core==2.0a7
amulet_runtime_final~=1.1
Pillow

package_dir=
=src
packages = find:
packages = find_namespace:

[options.packages.find]
where=src

[options.package_data]
* =
**/*.hpp
**/*.cpp
**/*.jpg
**/*.png
**/*.svg
**/*.ico
**/*.lang
**/*.json
**/*.qss

[options.exclude_package_data]
* =
**/*.py.cpp


[options.extras_require]
docs =
Expand All @@ -42,9 +56,12 @@ dev =
black>=22.3
pre_commit>=1.11.1
pylint>=2.12.2
isort
autoflake
mypy
types-pyinstaller
wheel
versioneer


[options.entry_points]
Expand Down
Loading

0 comments on commit 79aa6e5

Please sign in to comment.