Skip to content

Install *.yaml files from meta-schemas and schemas#182

Merged
robherring merged 1 commit intodevicetree-org:mainfrom
xdarklight:install-yaml-schemas
Jan 12, 2026
Merged

Install *.yaml files from meta-schemas and schemas#182
robherring merged 1 commit intodevicetree-org:mainfrom
xdarklight:install-yaml-schemas

Conversation

@xdarklight
Copy link

The Arch Linux package uses the following commands to build and install the project:

python -m build --wheel --no-isolation
python -m installer --destdir="$pkgdir" dist/*.whl

The installed output in $pkgdir however does not contain the *.yaml schemas from dtschema/meta-schemas and dtschema/schemas. Add setuptools configuration so the *.yaml files are installed.

@xdarklight xdarklight force-pushed the install-yaml-schemas branch from 3379010 to 17fc337 Compare January 10, 2026 14:33
@xdarklight xdarklight changed the title Install schemas and meta-schemas Install *.yaml files from meta-schemas and schemas Jan 10, 2026
@xdarklight xdarklight force-pushed the install-yaml-schemas branch from 17fc337 to f6082ec Compare January 10, 2026 16:47
The Arch Linux package uses the following commands to build and install
the project:
  $ python -m build --wheel --no-isolation
  $ python -m installer --destdir="$pkgdir" dist/*.whl

The installed output in $pkgdir however does not contain the *.yaml
schemas from dtschema/meta-schemas and dtschema/schemas. Add setuptools
configuration so the *.yaml files are installed.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
@xdarklight xdarklight force-pushed the install-yaml-schemas branch from f6082ec to 7d1ea01 Compare January 10, 2026 17:54
@xdarklight
Copy link
Author

This updated version now includes the schemas from sub-directories as well

@robherring
Copy link
Member

Isn't directly depending on setuptools fragile in general? Some projects use a different backend now I think.

@robherring robherring merged commit 8d48878 into devicetree-org:main Jan 12, 2026
7 checks passed
@xdarklight
Copy link
Author

pyproject.toml references setuptools and setuptools_scm - for the latter there's already a configuration (right above where I added the package-data setup).
That said, I'm not a python expert. If there's a better (more universal, ...) approach I'm happy to test it.

@robherring
Copy link
Member

pyproject.toml references setuptools and setuptools_scm - for the latter there's already a configuration (right above where I added the package-data setup).

Right, I'm just a little bit concerned about adding more.

That said, I'm not a python expert. If there's a better (more universal, ...) approach I'm happy to test it.

I'm not either, but AIUI the motivation for pyproject.toml is to allow different backends. I have no reason at the moment to care about anything other than setuptools, but who knows how python will evolve.

I was a bit curious why this worked already with pip and not for you. It seems setuptools_scm will include all tracked files automatically.

@xdarklight
Copy link
Author

I was a bit curious why this worked already with pip and not for you. It seems setuptools_scm will include all tracked files automatically.

Ah, I didn't realize this - thanks for investigating and sharing!
So not using the latest-and-greatest resulting in me having to learn more about pyproject.toml

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