Skip to content

Commit 95a4d17

Browse files
committed
Add uv support, update python versions
1 parent 8c91564 commit 95a4d17

File tree

14 files changed

+36
-86
lines changed

14 files changed

+36
-86
lines changed

.github/dependabot.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
labels: []

.github/workflows/build.yml

+5-8
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,14 @@ jobs:
3030
run: touch pyproject.toml
3131

3232
- name: Setup Python
33-
uses: actions-ext/python/setup@v1
33+
uses: actions-ext/python/setup@main
3434
with:
35-
version: '3.9'
36-
37-
- name: Setup Python
38-
uses: actions-ext/python/setup-cache@v1
35+
version: '3.11'
3936

4037
- name: Setup cibuildwheel
41-
uses: actions-ext/python/setup-cibuildwheel@v1
38+
uses: actions-ext/python/setup-cibuildwheel@main
4239
with:
43-
version: '3.9'
40+
version: '3.11'
4441

4542
- name: Setup cibuildwheel caching
46-
uses: actions-ext/python/setup-cibuildwheel-cache@v1
43+
uses: actions-ext/python/setup-cibuildwheel-cache@main

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ Helper actions for Python projects
33

44
| Name | Action Reference | Description |
55
|:-----|:-----------------|:------------|
6-
| [setup](./setup) | actions-ext/python/setup | Setup Python and pip caching |
7-
| [setup-cache](./setup-cache) | actions-ext/python/setup-cache | Setup pip caching |
6+
| [setup](./setup) | actions-ext/python/setup | Setup Python with `pip` caching and `uv` |
87
| [setup-cibuildwheel](./setup-cibuildwheel) | actions-ext/python/setup-cibuildwheel | Setup [`cibuildwheel`](https://cibuildwheel.readthedocs.io/en/stable/) and caching |
98
| [setup-cibuildwheel-cache](./setup-cibuildwheel-cache) | actions-ext/python/setup-cibuildwheel-cache | Setup [`cibuildwheel`](https://cibuildwheel.readthedocs.io/en/stable/) caching |
109
| [run-cibuildwheel](./run-cibuildwheel) | actions-ext/python/run-cibuildwheel | Run [`cibuildwheel`](https://cibuildwheel.readthedocs.io/en/stable/) |

download-dist/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ An action to download and install a python `wheel` or `sdist`.
33

44
## Usage
55

6-
The following example yaml code will download and install a `cp37` wheel for `manylinux-x86_64` on `Linux` runners, `amd64` on `Windows` runners, and `x86_64` on `Macos` runners, in place on top of the current repo.
6+
The following example yaml code will download and install a `cp311` wheel for `manylinux-x86_64` on `Linux` runners, `amd64` on `Windows` runners, and `x86_64` on `Macos` runners, in place on top of the current repo.
77

88
```yaml
99
- name: Download wheels
1010
uses: actions-ext/python/download-dist@v1
1111
with:
12-
version: '3.7'
12+
version: '3.11'
1313
kind: 'wheel'
1414
install_path: '.'
1515
```

download-dist/action.yml

-32
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ inputs:
66
type: choice
77
description: 'Python Version to use'
88
options:
9-
- '3.7'
10-
- '3.8'
119
- '3.9'
1210
- '3.10'
1311
- '3.11'
@@ -37,16 +35,6 @@ runs:
3735
run: pip install -U dist/*.tar.gz --target ${{ inputs.install_path }}
3836
if: ${{ inputs.kind == 'sdist' }}
3937

40-
- name: Install artifact (${{ inputs.kind }} 3.7)
41-
shell: bash
42-
run: pip install -U dist/*cp37*manylinux*.whl --target ${{ inputs.install_path }}
43-
if: ${{ inputs.kind == 'wheel' && runner.os == 'Linux' && inputs.version == '3.7' }}
44-
45-
- name: Install artifact (${{ inputs.kind }} 3.8)
46-
shell: bash
47-
run: pip install -U dist/*cp38*manylinux*.whl --target ${{ inputs.install_path }}
48-
if: ${{ inputs.kind == 'wheel' && runner.os == 'Linux' && inputs.version == '3.8' }}
49-
5038
- name: Install artifact (${{ inputs.kind }} 3.9)
5139
shell: bash
5240
run: pip install -U dist/*cp39*manylinux*.whl --target ${{ inputs.install_path }}
@@ -67,16 +55,6 @@ runs:
6755
run: pip install -U dist/*cp312*manylinux*.whl --target ${{ inputs.install_path }}
6856
if: ${{ inputs.kind == 'wheel' && runner.os == 'Linux' && inputs.version == '3.12' }}
6957

70-
- name: Install artifact (${{ inputs.kind }} 3.7)
71-
shell: bash
72-
run: pip install -U dist/*cp37*macosx*x86_64.whl --target ${{ inputs.install_path }}
73-
if: ${{ inputs.kind == 'wheel' && runner.os == 'macOS' && inputs.version == '3.7' }}
74-
75-
- name: Install artifact (${{ inputs.kind }} 3.8)
76-
shell: bash
77-
run: pip install -U dist/*cp38*macosx*x86_64.whl --target ${{ inputs.install_path }}
78-
if: ${{ inputs.kind == 'wheel' && runner.os == 'macOS' && inputs.version == '3.8' }}
79-
8058
- name: Install artifact (${{ inputs.kind }} 3.9)
8159
shell: bash
8260
run: pip install -U dist/*cp39*macosx*x86_64.whl --target ${{ inputs.install_path }}
@@ -97,16 +75,6 @@ runs:
9775
run: pip install -U dist/*cp312*macosx*x86_64*.whl --target ${{ inputs.install_path }}
9876
if: ${{ inputs.kind == 'wheel' && runner.os == 'macOS' && inputs.version == '3.12' }}
9977

100-
- name: Install artifact (${{ inputs.kind }} 3.7)
101-
shell: bash
102-
run: pip install -U dist/*cp37*win*.whl --target ${{ inputs.install_path }}
103-
if: ${{ inputs.kind == 'wheel' && runner.os == 'Windows' && inputs.version == '3.7' }}
104-
105-
- name: Install artifact (${{ inputs.kind }} 3.8)
106-
shell: bash
107-
run: pip install -U dist/*cp38*win*.whl --target ${{ inputs.install_path }}
108-
if: ${{ inputs.kind == 'wheel' && runner.os == 'Windows' && inputs.version == '3.8' }}
109-
11078
- name: Install artifact (${{ inputs.kind }} 3.9)
11179
shell: bash
11280
run: pip install -U dist/*cp39*win*.whl --target ${{ inputs.install_path }}

run-cibuildwheel/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ An action to download and run [`cibuildwheel`](https://cibuildwheel.readthedocs.
33

44
## Usage
55

6-
The following example yaml code will build a `cp37` wheel for `manylinux-x86_64` on `Linux` runners, `amd64` on `Windows` runners, and `x86_64` and `arm64` on `Macos` runners.
6+
The following example yaml code will build a `cp311` wheel for `manylinux-x86_64` on `Linux` runners, `amd64` on `Windows` runners, and `x86_64` and `arm64` on `Macos` runners.
77

88
```yaml
99
- name: Run cibuildwheel
1010
uses: actions-ext/python/run-cibuildwheel@v1
1111
with:
12-
version: '3.7'
12+
version: '3.11'
1313
kind: 'cp'
1414
```
1515

run-cibuildwheel/action.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@ inputs:
66
type: choice
77
description: 'Python Version to use'
88
options:
9-
- '3.7'
10-
- '3.8'
119
- '3.9'
1210
- '3.10'
1311
- '3.11'
1412
- '3.12'
15-
default: '3.9'
13+
default: '3.11'
1614
kind:
1715
type: choice
1816
description: 'Kind of asset to install, "cp" or "pp"'

setup-cache/README.md

-11
This file was deleted.

setup-cache/action.yml

-12
This file was deleted.

setup-cibuildwheel-cache/action.yml

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ inputs:
66
type: choice
77
description: 'Python Version to use'
88
options:
9-
- '3.7'
10-
- '3.8'
119
- '3.9'
1210
- '3.10'
1311
- '3.11'

setup-cibuildwheel/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# setup-cibuildwheel
2-
An action to install and configure caching for [`cibuildwheel`](https://cibuildwheel.readthedocs.io/en/stable/)
2+
An action to install and configure caching for [`cibuildwheel`](https://cibuildwheel.readthedocs.io/en/stable/)
33

44
## Usage
55

@@ -9,5 +9,5 @@ The following example yaml code will install cibuildwheel and configure caching.
99
- name: Setup cibuildwheel
1010
uses: actions-ext/python/setup-cibuildwheel@v1
1111
with:
12-
version: '3.9'
12+
version: '3.11'
1313
```

setup-cibuildwheel/action.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ inputs:
66
type: choice
77
description: "Python version"
88
options:
9-
- '3.7'
10-
- '3.8'
119
- '3.9'
1210
- '3.10'
1311
- '3.11'
12+
- '3.12'
1413
default: '3.9'
1514

1615
runs:

setup/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ An action to setup and configure caching for Python.
33

44
## Usage
55

6-
The following example yaml code will setup Python 3.9 environment with pip caching against `setup.py` and `pyproject.toml` files.
6+
The following example yaml code will setup Python 3.11 environment with pip caching against `setup.py` and `pyproject.toml` files and `uv`.
77

88
```yaml
99
- name: Setup Python
1010
uses: actions-ext/python/setup@v1
1111
with:
12-
version: '3.9'
12+
version: '3.11'
1313
```

setup/action.yml

+13-6
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,15 @@ inputs:
66
type: choice
77
description: "Version to install"
88
options:
9-
- '3.7'
10-
- '3.8'
119
- '3.9'
1210
- '3.10'
1311
- '3.11'
14-
default: '3.9'
12+
- '3.12'
13+
default: '3.11'
1514

1615
runs:
1716
using: 'composite'
1817
steps:
19-
- name: Setup Pip caching
20-
uses: actions-ext/python/setup-cache@v1
21-
2218
- name: Set up Python ${{ inputs.version }}
2319
uses: actions/setup-python@v4
2420
with:
@@ -27,3 +23,14 @@ runs:
2723
cache-dependency-path: |
2824
"**/pyproject.toml"
2925
"**/setup.py"
26+
27+
- name: Install uv
28+
uses: astral-sh/setup-uv@v5
29+
with:
30+
enable-cache: true
31+
ignore-nothing-to-cache: true
32+
prune-cache: false
33+
34+
- name: Setup uv to use system python without extra flags
35+
shell: bash
36+
run: echo "UV_SYSTEM_PYTHON=1" >> $GITHUB_ENV

0 commit comments

Comments
 (0)