Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates on Sunday, 8PM UTC
interval: "weekly"
day: "sunday"
time: "20:00"

- package-ecosystem: "pip"
directory: "/"
schedule:
# Check for updates on Sunday, 8PM UTC
interval: "weekly"
day: "sunday"
time: "20:00"

- package-ecosystem: "pip"
directory: "/testbed"
schedule:
# Check for updates on Sunday, 8PM UTC
interval: "weekly"
day: "sunday"
time: "20:00"
117 changes: 117 additions & 0 deletions .github/workflows/ci.yaml
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why this CI isn't running on here... however it's passing over at johnzhou721#1

Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: CI

on:
pull_request:
push:
branches:
main
workflow_call:

concurrency:
group: ${{ github.workflow}}-${{ github.ref }}
cancel-in-progress: true

jobs:
pre-commit:
name: Pre-commit checks
uses: beeware/.github/.github/workflows/pre-commit-run.yml@main
with:
pre-commit-source: "--group pre-commit"

package:
name: Build Package
needs: [ pre-commit ]
runs-on: "ubuntu-latest"
permissions:
id-token: write
attestations: write
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Build and inspect package
uses: hynek/build-and-inspect-python-package@v2.14.0
with:
attest-build-provenance-github: 'true'

test:
name: Test (${{ matrix.distro }})
needs: package

strategy:
fail-fast: false
matrix:
include:
- distro: ubuntu:25.04
install_cmd: |
apt update
apt-get install -y \
git \
python3-pip \
python3-venv \
tox \
python3-pyside6.qtwidgets \
kde-style-breeze \
python3-torch \
build-essential

- distro: fedora:42
install_cmd: |
dnf install -y \
git \
python3 \
python3-pip \
python3-wheel \
python3-pyside6 \
tox \
plasma-breeze-qt6 \
python3-torch \
python3-devel \
gcc \
make \
pkgconf-pkg-config

# Technically an update after install
# is needed to not brick the system;
# however, this is a container, so do
# whatever we want to save time.
# dnf upgrade -y

- distro: archlinux:base
install_cmd: |
pacman -Sy --noconfirm \
git \
python \
python-virtualenv \
python-pip \
python-tox \
breeze \
pyside6 \
python-pytorch \
base-devel

# Without this, we get an error on ICUi18n:
# https://www.reddit.com/r/archlinux/comments/1oz6paq/
pacman -Syu --noconfirm

- distro: opensuse/tumbleweed
install_cmd: |
zypper refresh
zypper --non-interactive install \
git \
python3 \
python3-virtualenv \
python3-pip \
python3-tox \
breeze \
python3-pytorch \
python3-pyside6 \
patterns-devel-base-devel_basis \
python3-devel

uses: ./.github/workflows/reusable_tests.yaml
with:
distro: ${{ matrix.distro }}
install_cmd: ${{ matrix.install_cmd }}
15 changes: 15 additions & 0 deletions .github/workflows/pre-commit-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Update pre-commit

on:
schedule:
- cron: "0 20 * * SUN" # Sunday @ 2000 UTC
workflow_dispatch:

jobs:
pre-commit-update:
name: Update pre-commit
uses: beeware/.github/.github/workflows/pre-commit-update.yml@main
secrets: inherit
with:
pre-commit-source: "--group pre-commit"
create-changenote: false
22 changes: 22 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Upload Python Package

on:
release:
types: published

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
# This permission is required for trusted publishing.
id-token: write
steps:
- uses: dsaltares/fetch-gh-release-asset@1.1.2
with:
version: tags/${{ github.event.release.tag_name }}
file: ${{ github.event.repository.name }}.*
regex: true
target: dist/

- name: Publish release to production PyPI
uses: pypa/gh-action-pypi-publish@release/v1
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Create Release

on:
push:
tags:
- 'v*'

jobs:
ci:
name: CI
uses: ./.github/workflows/ci.yml

release:
name: Create Release
needs: ci
runs-on: ubuntu-latest
permissions:
contents: write
# This permission is required for trusted publishing.
id-token: write
steps:
- name: Set build variables
run: |
echo "VERSION=${GITHUB_REF_NAME#v}" | tee -a $GITHUB_ENV

- name: Set up Python
uses: actions/setup-python@v6.0.0
with:
python-version: "3.x"

- name: Get packages
uses: actions/download-artifact@v6.0.0
with:
pattern: Packages
path: dist

- name: Create release
uses: ncipollo/release-action@v1.20.0
with:
name: ${{ env.VERSION }}
draft: true
artifacts: dist/*
artifactErrorsFailBuild: true

- name: Publish release to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
66 changes: 66 additions & 0 deletions .github/workflows/reusable_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Common Workflow

on:
workflow_call:
inputs:
distro:
required: true
type: string
install_cmd:
required: true
type: string

jobs:
venv-test:
runs-on: ubuntu-latest
container:
image: ${{ inputs.distro }}
env:
QT_STYLE_OVERRIDE: breeze

steps:
- name: Dependencies
run: |
${{ inputs.install_cmd }}

- name: actions/checkout issue 363 workaround
run: |
git config --global --add safe.directory $PWD

- name: Checkout repository
uses: actions/checkout@v6

- name: Run tests
run: |
tox -e py

briefcase-testbed:
runs-on: ubuntu-latest
container:
image: ${{ inputs.distro }}
env:
QT_STYLE_OVERRIDE: breeze

steps:
- name: Dependencies
run: |
${{ inputs.install_cmd }}

- name: actions/checkout issue 363 workaround
run: |
git config --global --add safe.directory $PWD

- name: Checkout repository
uses: actions/checkout@v6

- name: Install Development Briefcase in venv
run: |
python3 -m venv venv
. venv/bin/activate
python3 -m pip install git+https://github.com/beeware/briefcase.git

- name: Run testbed
run: |
. venv/bin/activate
cd testbed
briefcase run --test
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ cython_debug/
.abstra/

# Visual Studio Code
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
# and can be added to the global gitignore or merged into this file. However, if you prefer,
# and can be added to the global gitignore or merged into this file. However, if you prefer,
# you could uncomment the following to ignore the entire vscode folder
# .vscode/

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ This package provides a customization of the Python import system that allows sy

To use `system-pyside6`, install the system packages for PySide6:

* **Ubuntu / Debian** - `sudo apt-get install python3-pyside6.qtwidgets` (Only available from Ubuntu 25.10+ / Debian 14+)
* **Ubuntu / Debian** - `sudo apt-get install python3-pyside6.qtwidgets` (and other modules you may need, such as ``python3-pyside6.qtcore``; Only available from Ubuntu 24.10+ / Debian 13+)

* **Fedora** - `sudo dnf install python3-pyside6`
* **Fedora** - `sudo dnf install python3-pyside6` and `sudo dnf upgrade --refresh` - **NOTE** that the second step is needed because installing PySide6 upgrades hundreds of packages, **some of them which have incorrect dependencies which MAY BRICK YOUR SYSTEM!**

* **Arch/ Manjaro** - `sudo pacman -Syu pyside6`

* **OpenSUSE Tumbleweed** - `sudo zypper install python3-pyside6`

Then, create a virtual environment, and install `system-pyside` into that environment. You should then be able to write a Python app using PySide6 without adding `PySide6` as a dependency of your app.
Then, create a virtual environment, and install `system-pyside6` into that environment. You should then be able to write a Python app using PySide6 without adding `PySide6` as a dependency of your app.

## Community

Expand Down
Loading