Skip to content

Re-estructure to enable packaging of the tool + convetional test structure#126

Draft
gastmaier wants to merge 2 commits into
TNG:mainfrom
gastmaier:feature/package
Draft

Re-estructure to enable packaging of the tool + convetional test structure#126
gastmaier wants to merge 2 commits into
TNG:mainfrom
gastmaier:feature/package

Conversation

@gastmaier
Copy link
Copy Markdown
Contributor

As is, the scripts are invoked by path, being brittle for CI/CD usage
and inconvenient for local usage. Add a basic pyproject.toml to enable

pip install git+https://github.com/TNG/KernelSbom

And future pypi deployment. The invocation changes to

SRCARCH=... kernel-sbom ...

a wrapper like

"""
Entry point for backwards compatibility.
"""

from kernel_sbom.__main__ import main

if __name__ == "__main__":
    main()
	
	

is not tried because requires kernel_sbom installed as a package, so still breaks the CI/CD of any users of the package anyway.

Also restructure the tests for a pythonic tests/ folder structure.

As is, the scripts are invoked by path, being brittle for CI/CD usage
and inconvenient for local usage. Add a basic pyproject.toml to enable

  pip install git+https://github.com/TNG/KernelSbom

And future pypi deployment. The invocation changes to

  SRCARCH=... kernel-sbom ...

Signed-off-by: Jorge Marques <jorge.marques@analog.com>
Considering the tool is now packaged as 'kernel-sbom', also restructure
the tests for a pythonic tests/ folder structure.

Signed-off-by: Jorge Marques <jorge.marques@analog.com>
@augelu-tng
Copy link
Copy Markdown
Contributor

augelu-tng commented May 6, 2026

Thanks for your ideas.

Our main goal is to contribute this project to the mainline Linux kernel repository. For that, we need to be able to map the sbom directory directly into linux/scripts/sbom (see for example augelu-tng/linux#3). We do want to contribute the unit tests but no integration tests which is why we keep integration tests outside of the sbom directory.

Can you update the PR to not conflict with these requirements ?

@gastmaier gastmaier marked this pull request as draft May 14, 2026 18:23
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