diff --git a/.github/scripts/setup_addon.py b/.github/scripts/setup_addon.py index 32b6522..20ada86 100644 --- a/.github/scripts/setup_addon.py +++ b/.github/scripts/setup_addon.py @@ -4,6 +4,7 @@ from pathlib import Path import shutil import platform +import sys TMP_DIRPATH = r"./tmp" @@ -14,7 +15,8 @@ def setup_addon_directory(): plateform_name = "windows" if platform.system() == "Windows" else "linux" if platform.system() == "Linux" else "macOS" version = read_version() - addon_dirpath = os.path.join(TMP_DIRPATH, f"modular_tree_{version}_{plateform_name}") + blender_version_suffix = get_blender_version_suffix() + addon_dirpath = os.path.join(TMP_DIRPATH, f"modular_tree_{version}_{plateform_name}{blender_version_suffix}") root = os.path.join(addon_dirpath, "modular_tree") Path(root).mkdir(exist_ok=True, parents=True) @@ -61,6 +63,9 @@ def read_version(): with open(VERSION_FILEPATH, "r") as f: return f.read() +def get_blender_version_suffix(): + return "_blender31" if sys.version_info >= (3, 10) else "_blender293-30" + if __name__ == "__main__": addon_dirpath = setup_addon_directory() archive_filepath = create_zip(addon_dirpath, TMP_DIRPATH) \ No newline at end of file diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 82e7db7..96ab036 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -7,13 +7,28 @@ jobs: include: - os: windows-latest extension: bat - name: windows + name: windows-blender293 + python: 3.9 - os: ubuntu-latest extension: sh - name: linux + name: linux-blender293 + python: 3.9 - os: macos-latest extension: osx - name: macOS + name: macOS-blender293 + python: 3.9 + - os: windows-latest + extension: bat + name: windows-blender31 + python: 3.9 + - os: ubuntu-latest + extension: sh + name: linux-blender31 + python: 3.9 + - os: macos-latest + extension: osx + name: macOS-blender31 + python: 3.9 runs-on: ${{ matrix.os }} steps: - name: checkout @@ -23,7 +38,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: ${{ matrix.python }} - name: build run: ./build_mtree.${{ matrix.extension }} - name: package addon @@ -53,7 +68,7 @@ jobs: uses: johnwbyrd/update-release@v1.0.0 with: token: ${{ secrets.GITHUB_TOKEN }} - files: ./modular_tree_windows/modular_tree_${{ steps.vars.outputs.version }}_windows.zip ./modular_tree_linux/modular_tree_${{ steps.vars.outputs.version }}_linux.zip ./modular_tree_macOS/modular_tree_${{ steps.vars.outputs.version }}_macOS.zip + files: ./modular_tree_windows-blender293/modular_tree_${{ steps.vars.outputs.version }}_windows_blender293-30.zip ./modular_tree_windows-blender31/modular_tree_${{ steps.vars.outputs.version }}_windows_blender31.zip ./modular_tree_linux-blender293/modular_tree_${{ steps.vars.outputs.version }}_linux_blender293-30.zip ./modular_tree_linux-blender31/modular_tree_${{ steps.vars.outputs.version }}_linux_blender31.zip ./modular_tree_macOS-blender293/modular_tree_${{ steps.vars.outputs.version }}_macOS_blender293-30.zip ./modular_tree_macOS-blender31/modular_tree_${{ steps.vars.outputs.version }}_macOS_blender31.zip release: Release V${{ steps.vars.outputs.version }}${{ env.STATUS }} tag: ${{ steps.vars.outputs.version }}${{ env.STATUS }} message: V${{ steps.vars.outputs.version }} diff --git a/__init__.py b/__init__.py index ab13085..7982749 100644 --- a/__init__.py +++ b/__init__.py @@ -20,7 +20,7 @@ "name" : "Modular Tree", "author" : "Maxime", "description" : "create trees", - "blender" : (2, 83, 0), + "blender" : (2, 93, 0), "version" : (4, 0, 2), "location" : "", "warning" : "", diff --git a/build_mtree.bat b/build_mtree.bat index 101a92f..f76228d 100644 --- a/build_mtree.bat +++ b/build_mtree.bat @@ -1,6 +1,6 @@ -py -3.9 m_tree/install.py +py -3.10 m_tree/install.py -COPY ".\m_tree\binaries\Release\m_tree.cp39-win_amd64.pyd" "./m_tree.cp39-win_amd64.pyd" +COPY ".\m_tree\binaries\Release\m_tree.cp310-win_amd64.pyd" "./m_tree.cp310-win_amd64.pyd" PAUSE diff --git a/build_mtree.osx b/build_mtree.osx index b21881a..fb9e52c 100755 --- a/build_mtree.osx +++ b/build_mtree.osx @@ -1,5 +1,5 @@ python3 m_tree/install.py -cp ./m_tree/binaries/m_tree.cpython-39-darwin.so ./m_tree.cpython-39-darwin.so +cp ./m_tree/binaries/m_tree.cpython-310-darwin.so ./m_tree.cpython-310-darwin.so diff --git a/build_mtree.sh b/build_mtree.sh index e25604f..127ac91 100755 --- a/build_mtree.sh +++ b/build_mtree.sh @@ -1,5 +1,5 @@ python3 m_tree/install.py -cp ./m_tree/binaries/m_tree.cpython-39-x86_64-linux-gnu.so ./m_tree.cpython-39-x86_64-linux-gnu.so +cp ./m_tree/binaries/m_tree.cpython-310-x86_64-linux-gnu.so ./m_tree.cpython-310-x86_64-linux-gnu.so diff --git a/m_tree/dependencies/pybind11 b/m_tree/dependencies/pybind11 index e25b150..91a6e12 160000 --- a/m_tree/dependencies/pybind11 +++ b/m_tree/dependencies/pybind11 @@ -1 +1 @@ -Subproject commit e25b1505dbca042289c4076141092cff49b0b96b +Subproject commit 91a6e129d9274a0b10943044e5aeae08471e00fe diff --git a/m_tree/dependencies/vcpkg b/m_tree/dependencies/vcpkg index 261c458..af22873 160000 --- a/m_tree/dependencies/vcpkg +++ b/m_tree/dependencies/vcpkg @@ -1 +1 @@ -Subproject commit 261c458af6e3eed5d099144aff95d2b5035f656b +Subproject commit af2287382b1991dbdcb7e5112d236f3323b9dd7a diff --git a/m_tree/install.py b/m_tree/install.py index d3b7104..67c08eb 100644 --- a/m_tree/install.py +++ b/m_tree/install.py @@ -48,7 +48,7 @@ def build(): if not os.path.exists(build_dir): os.makedirs(build_dir) - subprocess.check_call(['cmake', "../", "-DPYBIND11_PYTHON_VERSION=3.9"], cwd=build_dir) + subprocess.check_call(['cmake', "../", "-DPYBIND11_PYTHON_VERSION=3.10"], cwd=build_dir) subprocess.check_call(['cmake', '--build', '.', "--config", "Release"], cwd=build_dir) print([i for i in os.listdir(os.path.join(os.path.dirname(__file__), "binaries"))])