From 3a147d7f62a66f73ce80ec2842b11e6e0d54b152 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 5 Aug 2024 16:37:09 +0500 Subject: [PATCH] Remove Python 3.10 build from bbim builds Reverts 8514a42, removes python 3.10 from bbim builds as it's not suppored by Blender 4.2+ (https://github.com/gentoo/gentoo/pull/37671) --- .github/workflows/ci-blenderbim-daily.yml | 2 +- src/blenderbim/Makefile | 9 --------- src/blenderbim/blenderbim/__init__.py | 7 ++----- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci-blenderbim-daily.yml b/.github/workflows/ci-blenderbim-daily.yml index c9532068e0..f85bb59628 100644 --- a/.github/workflows/ci-blenderbim-daily.yml +++ b/.github/workflows/ci-blenderbim-daily.yml @@ -35,7 +35,7 @@ jobs: strategy: fail-fast: false matrix: - pyver: [py310, py311, py312] + pyver: [py311, py312] config: - { name: "Windows Build", diff --git a/src/blenderbim/Makefile b/src/blenderbim/Makefile index 2056b3a38f..ebe91db6b9 100644 --- a/src/blenderbim/Makefile +++ b/src/blenderbim/Makefile @@ -49,11 +49,6 @@ LAST_COMMIT_HASH:=$(shell git rev-parse HEAD) PYVERSION:=py310 PYPI_IMP:=cp -ifeq ($(PYVERSION), py310) -PYLIBDIR:=python3.10 -PYNUMBER:=310 -PYPI_VERSION:=3.10 -endif ifeq ($(PYVERSION), py311) PYLIBDIR:=python3.11 PYNUMBER:=311 @@ -184,10 +179,6 @@ else ifeq ($(PLATFORM), macos) else cd build && . env/$(VENV_ACTIVATE) && $(PIP) download pyradiance $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels endif - # tomllib replacement for < Python 3.11, used to parse blender_manifest -ifeq ($(PYVERSION), py310) - cd build && . env/$(VENV_ACTIVATE) && $(PIP) download tomli --dest=./wheels -endif # Provides jsgantt-improved supports for web-based construction sequencing gantt charts cd build/blenderbim/bim/data/gantt/ && wget https://raw.githubusercontent.com/jsGanttImproved/jsgantt-improved/master/dist/jsgantt.js diff --git a/src/blenderbim/blenderbim/__init__.py b/src/blenderbim/blenderbim/__init__.py index f11732590f..10bcee7006 100644 --- a/src/blenderbim/blenderbim/__init__.py +++ b/src/blenderbim/blenderbim/__init__.py @@ -68,14 +68,11 @@ def initialize_bbim_semver(): in `addon_utils.modules()->bl_info['version']`, therefore we just parse it from .toml. """ - if sys.version_info >= (3, 11): - import tomllib as toml - else: - import tomli as toml + import tomllib toml_path = Path(__file__).parent / "blender_manifest.toml" with open(toml_path, "rb") as f: - manifest = toml.load(f) + manifest = tomllib.load(f) semver_pattern = r"^(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)(?:-(?P(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?P[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$" version_str = manifest["version"] re_version = re.match(semver_pattern, version_str)