pyside-hatch-project
A Hatch-friendly alternative to pyside6-project for managing UI files, resource files and translations.
This library provides a Hatchling plugin as well as stand-alone CLI tool, both called pyside-hatch-project.
It reimplements a subset of pyside6-project functionality.
What this library gives you over pyside6-project:
- Compile
.ui/.ts/.qrcas part of a standard Python build, no extra steps needed. - Specify paths to
.ui/.ts/.qrcusing glob patterns inpyproject.toml.
If you'd rather just call pyside6-project from Hatchling, there is a similar project that does this:
hatch-pyside.
Usage
Example pyproject.toml:
[project]
name = "example-project"
[dependency-groups]
dev = [
"pyside-hatch-project",
]
[build-system]
requires = ["hatchling>=1.27", "pyside-hatch-project"]
build-backend = "hatchling.build"
[tool.hatch.build.hooks.pyside-hatch-project]
ui_files = ["src/**/*.ui"]
ts_files = ["src/**/*.ts"]
qrc_files = ["src/**/*.qrc"]
# -- If you don't want to use the Hatchling plugin:
# [tool.pyside-hatch-project]
# ui_files = ["src/**/*.ui"]
# ts_files = ["src/**/*.ts"]
# qrc_files = ["src/**/*.qrc"]
# -- If you want to use standard pyside6-project definitions:
# [tool.hatch.build.hooks.pyside-hatch-project]
#
# [tool.pyside6-project]
# files = [
# "src/main.py",
# "src/my_widget.ui",
# "src/my_translation.ts",
# "src/my_resource.qrc",
# ]
From the terminal, you can use pyside6-project compatible commands:
pyside-hatch-project build # compile .ui/.ts/.qrc files
pyside-hatch-project lupdate # extract strings from .py/.ui files into .ts files
pyside-hatch-project clean # remove compilation outputs (ui_*.py, rc_*.py, *.qm)
The compiled files can be .gitignored - the build hook will add them as artifacts explicitly.
Troubleshooting
Qt tools fail with exit code 127 on Linux. Qt's tools need some system libraries on Linux: GLib for all
of them (uic, rcc, lrelease, lupdate), plus Kerberos GSSAPI and Brotli for lrelease/lupdate.
Desktop installs and GitHub-hosted runners have them, but minimal container images such as python:*-slim
or ubuntu:* don't. Install them in the image, e.g. on Debian/Ubuntu:
apt-get install -y libglib2.0-0t64 libgssapi-krb5-2 libbrotli1 # libglib2.0-0 on older releases
Development
uv sync
uv run pytest # unit and integration tests
uv run pytest -m e2e # end-to-end builds with pip and uv in fresh environments (slow, needs network)
uv run ruff check && uv run pyrefly check
License
MIT – see LICENSE.txt.
Metadata
Release files for pyside-hatch-project 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pyside_hatch_project-0.1.1.tar.gz | 28.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyside_hatch_project-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.3 kB
Release files / pyside_hatch_project-0.1.1.tar.gz
| Download URL | pyside_hatch_project-0.1.1.tar.gz |
|---|---|
| Size | 28.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cf5e4895e4695d20bf492ae4f69f448825df09e03329caa54823ae1a68c541f8
|
|
BLAKE2b-256 checksum How to use checksums |
643526619eb87467c716e4647a5e1f7ac6c3d7ec7d92291d5c28c4337b0e67fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pyside_hatch_project-0.1.1-py3-none-any.whl
| Download URL | pyside_hatch_project-0.1.1-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d91129636f6b6b39dd3b6594186cfcf9c66bc8770099cdfc2ec3e93b1261f60f
|
|
BLAKE2b-256 checksum How to use checksums |
3f9f14b249f693c497553b71a49d859c1b36761e721384209a033e018f2c2b25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for pyside-hatch-project 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.