Skip to contentSkip to conversation

python3-spdx-python-model: fix do_compile error for update of python3-shacl2code

PATCH New Wang Mingyu 1 participant 1 message Mar 20

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 python3-spdx-python-model: fix do_compile error for update of python3-shacl2code

From: Wang Mingyu <[email protected]>

Add patch 0001-Update-gen-generate-bindings-to-output-to-directory-.patch to fix bug when updated python3-shacl2code:

ERROR: python3-spdx-python-model-0.0.4-r0 do_compile: Execution of '/tmp/work/cortexa57-poky-linux/python3-spdx-python-model/0.0.4/temp/run.do_compile.2283925' failed with exit code 1
ERROR: Logfile of failure stored in: /tmp/work/cortexa57-poky-linux/python3-spdx-python-model/0.0.4/temp/log.do_compile.2283925
Log data follows:

| DEBUG: Executing shell function do_compile
| * Getting build dependencies for wheel...
|
| ERROR Missing dependencies:
|       shacl2code==0.0.24
| WARNING: exit code 1 from a shell command.
---
 ...ate-bindings-to-output-to-directory-.patch | 54 +++++++++++++++++++
 .../python/python3-spdx-python-model_0.0.4.bb |  1 +
 2 files changed, 55 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python3-spdx-python-model/0001-Update-gen-generate-bindings-to-output-to-directory-.patch
meta/recipes-devtools/python/python3-spdx-python-model/0001-Update-gen-generate-bindings-to-output-to-directory-.patch new file +54 -0
new file mode 100644
index 0000000000..a84ce54382
@@ -0,0 +1,54 @@
+From 1fd7e490a082ffb450283c43c3635e80110091e7 Mon Sep 17 00:00:00 2001
+From: Wang Mingyu <[email protected]>
+Date: Fri, 20 Mar 2026 09:02:18 +0000
+Subject: [PATCH] Update gen/generate-bindings to output to directory name
+
+Upstream-Status: Backport [https://github.com/spdx/spdx-python-model/commit/678f5af062743cb8a84fdb24bb9e63963464c86b]
+
+Signed-off-by: Wang Mingyu <[email protected]>
+---
+ gen/generate-bindings | 4 ++--
+ pyproject.toml        | 6 +++---
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/gen/generate-bindings b/gen/generate-bindings
+index bc7041e..d1e06aa 100755
+--- a/gen/generate-bindings
++++ b/gen/generate-bindings
+@@ -21,14 +21,14 @@ for v in $SPDX_VERSIONS; do
+             --context-url "file://${SHACL2CODE_SPDX_DIR}/$v/spdx-context.jsonld" https://spdx.org/rdf/$v/spdx-context.jsonld  \
+             --license Apache-2.0 \
+             python \
+-            -o "$MODNAME.py"
++            --output "$MODNAME"
+     else
+         shacl2code generate --input https://spdx.org/rdf/$v/spdx-model.ttl \
+             --input https://spdx.org/rdf/$v/spdx-json-serialize-annotations.ttl \
+             --context https://spdx.org/rdf/$v/spdx-context.jsonld \
+             --license Apache-2.0 \
+             python \
+-            -o "$MODNAME.py"
++i           --output "$MODNAME"
+     fi
+ 
+     echo "from . import $MODNAME" >> __init__.py
+diff --git a/pyproject.toml b/pyproject.toml
+index a0a5f4d..7075375 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -32,9 +32,9 @@ Issues = "https://github.com/spdx/spdx-python-model/issues"
+ 
+ [build-system]
+ requires = [
+-    "hatchling",
+-    "hatch-build-scripts",
+-    "shacl2code == 0.0.24",
++    "hatchling >= 1.27.0",
++    "hatch-build-scripts >= 0.0.4",
++    "shacl2code == 1.0.0",
+ ]
+ build-backend = "hatchling.build"
+ 
+-- 
+2.43.0
+
meta/recipes-devtools/python/python3-spdx-python-model_0.0.4.bb +1 -0
index 00c3b3913c..16adbc9577 100644
@@ -12,6 +12,7 @@ SRC_URI += " \
     https://spdx.org/rdf/3.0.1/spdx-json-serialize-annotations.ttl;name=spdx2 \
     https://spdx.org/rdf/3.0.1/spdx-model.ttl;name=spdx3 \
     file://0001-generate-bindings-allow-to-use-local-files.patch \
+    file://0001-Update-gen-generate-bindings-to-output-to-directory-.patch \
 "
 
 SRC_URI[spdx1.sha256sum] = "c72b0928f094c83e5c127784edb1ebca2af74a104fcacc007c332b23cbc788bd"
Signature · 1 line
2.43.0