A setuptools plugin for converting Qt .ui and .qrc files to Python files with Qt.py.
setuptools-qt.py can be installed through pip:
pip install setuptools-qt.pyAdd setuptools-qt.py to the requires list in your project's pyproject.toml file.
[build-system]
requires = ["setuptools>=44.1", "setuptools-qt.py"]
build-backend = "setuptools.build_meta"The plugin will automatically find and compile .ui and .qrc file in your
packages' directories.
Compiled files are output with the same name as the source .ui or .qrc file,
with the file extension replaced with a suffix of _ui.py and _rc.py respectively.
myrepo
└── src
└── mypackage
├── myui.ui
├── myui_ui.py
├── myresources.ui
├── myresources_rc.py
└── __init__.py
The output filename can be configured in the pyproject.toml file.
[tool."setuptools-qt.py"]
filename-ui = "{stem}.py"
filename-qrc = "{stem}.py"myrepo
└── src
└── mypackage
├── myui.ui
├── myui.py
├── myresources.ui
├── myrrsources.py
└── __init__.py
Tests are executed through tox.
toxCode is formatted using ruff format.
You can check your formatting using ruff's check mode:
tox -e formatYou can also get ruff to format your changes for you:
.tox/format/bin/ruff format src/ tests/Release notes are managed through towncrier. When making a pull request you will need to create a news fragment to document your change:
tox -e release_notes -- create --helpWe use SemVer for versioning. For the versions available, see the tags on this repository.
This project is licensed under the MIT License. See the LICENSE.rst file for details.