Skip to content

Commit 24069ec

Browse files
committed
Update spdx-python-model to 0.0.6
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
1 parent 294b446 commit 24069ec

5 files changed

Lines changed: 8 additions & 25 deletions

File tree

.github/workflows/install_and_test.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,6 @@ jobs:
3636
python -m pip install tzdata
3737
python -m pip install networkx
3838
shell: bash
39-
- name: Install SPDX 3 bindings
40-
# The spdx-python-model bindings are built from git and their build-time
41-
# code generation does not currently work on Windows; install them only
42-
# where they build so the SPDX 3 tests run there (and are skipped elsewhere).
43-
if: runner.os != 'Windows'
44-
run: python -m pip install ".[spdx3]"
45-
shell: bash
4639
- name: Run tests
4740
run: pytest
4841
- name: Run CLI

pyproject.toml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ dependencies = [
3737
"pyyaml",
3838
"rdflib",
3939
"semantic_version",
40+
"spdx-python-model>=0.0.6",
4041
"uritools",
4142
"xmltodict",
4243
]
@@ -46,12 +47,6 @@ dynamic = ["version"]
4647
test = ["pyshacl", "pytest", "tzdata"]
4748
code_style = ["black", "flake8", "isort", "mypy"]
4849
graph_generation = ["networkx", "pygraphviz"]
49-
# Experimental SPDX 3.0 support is built on the spdx-python-model bindings.
50-
# It is an optional extra (not a core dependency) because the bindings are not
51-
# yet published to PyPI and must be built from git, where the build-time code
52-
# generation does not currently work on Windows. Keeping it optional ensures the
53-
# core package installs on all platforms. Install with: pip install ".[spdx3]"
54-
spdx3 = ["spdx-python-model @ git+https://github.com/spdx/spdx-python-model.git@main"]
5550
development = ["black", "flake8", "isort", "mypy", "networkx", "pyshacl", "pytest"]
5651

5752
[project.scripts]

src/spdx_tools/spdx3/py.typed

Whitespace-only changes.

tests/spdx3/conftest.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,2 @@
11
# SPDX-FileCopyrightText: 2026-present SPDX contributors
22
# SPDX-License-Identifier: Apache-2.0
3-
4-
# The SPDX 3 support depends on the optional `spdx-python-model` bindings, which
5-
# are not installed by default and currently cannot be built from git on Windows.
6-
# When the bindings are unavailable, skip collecting the SPDX 3 test suite instead
7-
# of failing at import time.
8-
try:
9-
import spdx_python_model # noqa: F401
10-
except ImportError:
11-
collect_ignore_glob = ["*"]

tests/spdx3/writer/tag_value/test_write_document.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ def test_render_creation_info():
2929
output_str = io.StringIO()
3030
write_spdx_document(spdx_document, text_output=output_str)
3131

32-
assert output_str.getvalue() == """\
32+
assert (
33+
output_str.getvalue()
34+
== """\
3335
## SPDX Document
3436
SPDXID: SPDXRef-FOO
3537
name: BAR
@@ -38,5 +40,7 @@ def test_render_creation_info():
3840
created: 2024-01-01T00:00:00Z
3941
profile: SOFTWARE
4042
data license: CC0-1.0
41-
elements:
42-
""" # noqa: W291 # elements: are printed with a space
43+
elements: \
44+
45+
""" # noqa: W291 # elements: are printed with trailing space
46+
)

0 commit comments

Comments
 (0)