diff --git a/.github/workflows/ci-flatpak.yml b/.github/workflows/ci-flatpak.yml index 29dae1822..e7c9b4025 100644 --- a/.github/workflows/ci-flatpak.yml +++ b/.github/workflows/ci-flatpak.yml @@ -60,7 +60,7 @@ jobs: id: python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: - python-version: '3.12' + python-version: '3.14' - name: Setup Dependencies Linux Flatpak run: | diff --git a/.github/workflows/ci-freebsd.yml b/.github/workflows/ci-freebsd.yml index d510bf303..d39189dc3 100644 --- a/.github/workflows/ci-freebsd.yml +++ b/.github/workflows/ci-freebsd.yml @@ -114,7 +114,7 @@ jobs: ftp/curl \ graphics/libdrm \ graphics/wayland \ - lang/python312 \ + lang/python314 \ multimedia/libva \ multimedia/pipewire \ net/miniupnpc \ @@ -133,13 +133,13 @@ jobs: ln -s /usr/local/bin/bash /bin/bash # setup python - ln -s /usr/local/bin/python3.12 /usr/local/bin/python + ln -s /usr/local/bin/python3.14 /usr/local/bin/python python -m ensurepip release: ${{ matrix.bsd_release }} run: | set -e # install gcvor - python -m pip install gcovr + python -m pip install "./scripts[test]" # fix git safe.directory issues git config --global --add safe.directory "*" diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index 3d2969576..59f928936 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -62,7 +62,7 @@ jobs: id: python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: - python-version: '3.11' + python-version: '3.14' - name: Build latest libva env: @@ -181,7 +181,7 @@ jobs: (steps.test.outcome == 'success' || steps.test.outcome == 'failure') working-directory: build run: | - ${{ steps.python.outputs.python-path }} -m pip install gcovr + ${{ steps.python.outputs.python-path }} -m pip install "../scripts[test]" ${{ steps.python.outputs.python-path }} -m gcovr --gcov-executable "gcov-${GCC_VERSION}" . -r ../src \ --exclude-noncode-lines \ --exclude-throw-branches \ diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index 4be28cf0d..23be124d3 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -173,7 +173,7 @@ jobs: id: setup-python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: - python-version: '3.11' + python-version: '3.14' - name: Python Path id: python-path @@ -258,7 +258,7 @@ jobs: shell: msys2 {0} working-directory: build run: | - ${{ steps.python-path.outputs.python-path }} -m pip install gcovr + ${{ steps.python-path.outputs.python-path }} -m pip install "../scripts[test]" ${{ steps.python-path.outputs.python-path }} -m gcovr . -r ../src \ --exclude-noncode-lines \ --exclude-throw-branches \ diff --git a/.github/workflows/localize.yml b/.github/workflows/localize.yml index ae115c9bf..f7eae8553 100644 --- a/.github/workflows/localize.yml +++ b/.github/workflows/localize.yml @@ -25,16 +25,16 @@ jobs: - name: Checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Install Python 3.9 + - name: Install Python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: - python-version: '3.9' + python-version: '3.14' - - name: Set up Python 3.9 Dependencies + - name: Set up Python Dependencies + working-directory: scripts run: | - cd ./scripts python -m pip install --upgrade pip setuptools - python -m pip install -r requirements.txt + python -m pip install ".[locale]" - name: Set up xgettext run: | diff --git a/docs/contributing.md b/docs/contributing.md index bce3a6289..a69cd25fe 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -127,9 +127,15 @@ any of the following paths are modified. - 'src/**' ``` -When testing locally it may be desirable to manually extract, initialize, update, and compile strings. Python is -required for this, along with the python dependencies in the `./scripts/requirements.txt` file. Additionally, -[xgettext](https://www.gnu.org/software/gettext) must be installed. +When testing locally, it may be desirable to manually extract, initialize, update, and compile strings. Python is +required for this, along with the python dependencies in the `./scripts/pyproject.toml` file. You can install this with +the following command. + +```bash +python -m pip install "./scripts[locale]" +``` + +Additionally, [xgettext](https://www.gnu.org/software/gettext) must be installed. * Extract, initialize, and update ```bash diff --git a/scripts/pyproject.toml b/scripts/pyproject.toml new file mode 100644 index 000000000..5b8c574a8 --- /dev/null +++ b/scripts/pyproject.toml @@ -0,0 +1,34 @@ +[build-system] +requires = ["setuptools", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "Sunshine" +dynamic = ["version"] +description = "Helper scripts for Sunshine" +requires-python = ">=3.14" +license = {text = "GPL-3.0-only"} +authors = [ + {name = "LizardByte", email = "lizardbyte@users.noreply.github.com"} +] + +dependencies = [] + +[project.optional-dependencies] +lint = [ + "clang-format==20.*", + "flake8==7.3.0", +] + +locale = [ + "Babel==2.18.0", +] + +test = [ + "gcovr==8.6", +] + +[project.urls] +Homepage = "https://app.lizardbyte.dev/Sunshine" +Repository = "https://github.com/LizardByte/Sunshine" +Issues = "https://github.com/LizardByte/Sunshine/issues" diff --git a/scripts/requirements.txt b/scripts/requirements.txt deleted file mode 100644 index 7375eb80f..000000000 --- a/scripts/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -Babel==2.18.0 -clang-format==20.*