Skip to content

generate-bindings: allow to use local files#19

Merged
JPEWdev merged 1 commit intospdx:mainfrom
benjarobin:shacl2code-local-file
Feb 25, 2026
Merged

generate-bindings: allow to use local files#19
JPEWdev merged 1 commit intospdx:mainfrom
benjarobin:shacl2code-local-file

Conversation

@benjarobin
Copy link
Contributor

shacl2code needs to download the following URLs during build time:

There are a lot of package build tools that do not allow to download a file during the build. So provide a way to use local file: If the environment variable SHACL2CODE_SPDX_DIR is defined, load the SPDX model and SPDX context from the directory specified by this environment variable.

shacl2code needs to download the following URLs during build time:
 - https://spdx.org/rdf/3.0.1/spdx-model.ttl
 - https://spdx.org/rdf/3.0.1/spdx-json-serialize-annotations.ttl
 - https://spdx.org/rdf/3.0.1/spdx-context.jsonld

There are a lot of package build tools that do not allow to download
a file during the build. So provide a way to use local file:
If the environment variable SHACL2CODE_SPDX_DIR is defined, load
the SPDX model and SPDX context from the directory specified by this
environment variable.

Signed-off-by: Benjamin Robin <benjamin.robin@bootlin.com>
@JPEWdev
Copy link
Collaborator

JPEWdev commented Feb 25, 2026

@benjarobin Ah, sorry I missed this PR. Anyway, I think #20 will work a little better

@JPEWdev
Copy link
Collaborator

JPEWdev commented Feb 25, 2026

Note that #20 means you'll be able to enforce that the build doesn't download files by adding:

export SPDX_PYTHON_MODEL_DOWNLOAD="never"

to the recipe

@JPEWdev
Copy link
Collaborator

JPEWdev commented Feb 25, 2026

Actually, I kinda like yours better :)

@JPEWdev JPEWdev merged commit ee0e889 into spdx:main Feb 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants