Skip to main content

build master branch test code coverage Static Badge PyPI - Version PyPI - Status PyPI - Python Version PyPI - License

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/.qrc as part of a standard Python build, no extra steps needed.
  • Specify paths to .ui/.ts/.qrc using glob patterns in pyproject.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.

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.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyside-hatch-project 0.1.0
File Size Uploaded Provenance
pyside_hatch_project-0.1.0.tar.gz 27.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pyside-hatch-project 0.1.0
File Interpreter ABI Platform
pyside_hatch_project-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 33.6 kB

Release files / pyside_hatch_project-0.1.0.tar.gz

Download URL pyside_hatch_project-0.1.0.tar.gz
Size 27.3 kB
Tags Source
SHA-256 checksum
How to use checksums
356b6c7f5e07eaabefe7165a3de1b90e84a3774d56ab694e446d3245b0e0b37f
BLAKE2b-256 checksum
How to use checksums
956692dc921bd0028dbe65f0f13f99d3e991d6ff4ae1c14f2441450d48ae300c
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.0-py3-none-any.whl

Download URL pyside_hatch_project-0.1.0-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
02ea5bbf04daf88d64f5227b8e609921789447fa9a658c9e52946d13de520893
BLAKE2b-256 checksum
How to use checksums
730dc9e27add95b8540fec2f2135cf9554a4d0b6dffdb841ee4ca231d382ae95
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.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page