Skip to content

Commit 0d90b2f

Browse files
authored
[envpool] Add Python 3.14 release targets (#367)
## Summary - add Python 3.14 Bazel setup targets and toolchain registration for release builds - extend the release workflow matrix and package metadata to include Python 3.14 - update README and docs copy to reflect the intended Python 3.14 release target ## Validation - `bazel query //:setup_py314` - `python3 -m compileall setup.py` - `bazel build //:setup_py314` *(fails locally while resolving `dm-tree==0.1.9` for Python 3.14 under the Bazel/rules_python toolchain on macOS arm64; leaving this PR as draft to investigate that blocker before merge)* ## Notes - this PR is exploratory; do not merge until the Python 3.14 dependency/toolchain issue is understood - current upstream signal is not great: `dm-tree 0.1.9` on PyPI advertises Python 3.10-3.13, but not 3.14
1 parent 0e9b165 commit 0d90b2f

11 files changed

Lines changed: 102 additions & 22 deletions

File tree

.github/workflows/clang-tidy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
uses: styfle/cancel-workflow-action@0.11.0
2121
with:
2222
access_token: ${{ github.token }}
23-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v4
2424
with:
2525
fetch-depth: 0
2626
- uses: actions/setup-go@v5

.github/workflows/lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ jobs:
1010
uses: styfle/cancel-workflow-action@0.11.0
1111
with:
1212
access_token: ${{ github.token }}
13-
- uses: actions/checkout@v3
14-
- uses: actions/setup-go@v3
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-go@v5
1515
with:
1616
go-version: ">=1.16.0"
1717
- name: Set up Python 3.12
18-
uses: actions/setup-python@v4
18+
uses: actions/setup-python@v5
1919
with:
2020
python-version: "3.12"
2121
- name: Upgrade pip

.github/workflows/release.yml

Lines changed: 55 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
python-version: ["3.11", "3.12", "3.13"]
17+
python-version: ["3.11", "3.12", "3.13", "3.14"]
1818
env:
1919
HOMEBREW_NO_AUTO_UPDATE: "1"
2020
steps:
2121
- name: Cancel previous run
2222
uses: styfle/cancel-workflow-action@0.11.0
2323
with:
2424
access_token: ${{ github.token }}
25-
- uses: actions/checkout@v3
25+
- uses: actions/checkout@v4
2626
with:
2727
fetch-depth: 0
2828
- uses: actions/setup-go@v5
@@ -36,10 +36,22 @@ jobs:
3636
uses: actions/setup-python@v5
3737
with:
3838
python-version: ${{ matrix.python-version }}
39+
- name: Pin CMake 3
40+
if: matrix.python-version == '3.14'
41+
run: |
42+
python -m pip install "cmake<4"
43+
CMAKE_BIN_DIR="$(python -c "import cmake; print(cmake.CMAKE_BIN_DIR)")"
44+
CMAKE_BIN="$CMAKE_BIN_DIR/cmake"
45+
echo "$CMAKE_BIN_DIR" >> "$GITHUB_PATH"
46+
sudo ln -sfn "$CMAKE_BIN" /usr/local/bin/cmake
47+
PATH="$CMAKE_BIN_DIR:$PATH" cmake --version
3948
- name: Install macOS dependencies
4049
run: |
41-
brew install cmake ninja swig qt@5
42-
sudo ln -sfn "$(brew --prefix cmake)/bin/cmake" /usr/local/bin/cmake
50+
brew install ninja swig qt@5
51+
if [ "${{ matrix.python-version }}" != "3.14" ]; then
52+
brew install cmake
53+
sudo ln -sfn "$(brew --prefix cmake)/bin/cmake" /usr/local/bin/cmake
54+
fi
4355
sudo ln -sfn "$(brew --prefix ninja)/bin/ninja" /usr/local/bin/ninja
4456
echo "BAZEL_RULES_QT_DIR=$(brew --prefix qt@5)" >> "$GITHUB_ENV"
4557
- name: Install bazelisk
@@ -85,6 +97,11 @@ jobs:
8597
container: quay.io/pypa/manylinux_2_28_x86_64
8698
auditwheel-plat: manylinux_2_28_x86_64
8799
python-version: "3.13"
100+
- arch: x86_64
101+
runner: ubuntu-24.04
102+
container: quay.io/pypa/manylinux_2_28_x86_64
103+
auditwheel-plat: manylinux_2_28_x86_64
104+
python-version: "3.14"
88105
- arch: aarch64
89106
runner: ubuntu-24.04-arm
90107
container: quay.io/pypa/manylinux_2_28_aarch64
@@ -100,12 +117,17 @@ jobs:
100117
container: quay.io/pypa/manylinux_2_28_aarch64
101118
auditwheel-plat: manylinux_2_28_aarch64
102119
python-version: "3.13"
120+
- arch: aarch64
121+
runner: ubuntu-24.04-arm
122+
container: quay.io/pypa/manylinux_2_28_aarch64
123+
auditwheel-plat: manylinux_2_28_aarch64
124+
python-version: "3.14"
103125
steps:
104126
- name: Cancel previous run
105127
uses: styfle/cancel-workflow-action@0.11.0
106128
with:
107129
access_token: ${{ github.token }}
108-
- uses: actions/checkout@v3
130+
- uses: actions/checkout@v4
109131
- name: Install build dependencies
110132
run: |
111133
dnf install -y git curl wget zsh gcc gcc-c++ cmake make ninja-build tmux golang java-17-openjdk-devel qt5-qtbase-devel qt5-qtdeclarative-devel
@@ -121,10 +143,21 @@ jobs:
121143
3.11) PYBIN=/opt/python/cp311-cp311/bin ;;
122144
3.12) PYBIN=/opt/python/cp312-cp312/bin ;;
123145
3.13) PYBIN=/opt/python/cp313-cp313/bin ;;
146+
3.14) PYBIN=/opt/python/cp314-cp314/bin ;;
124147
*) echo "unsupported python version: ${{ matrix.python-version }}" >&2; exit 1 ;;
125148
esac
126149
echo "$PYBIN" >> "$GITHUB_PATH"
127150
"$PYBIN/python3" --version
151+
- name: Pin CMake 3
152+
if: matrix.python-version == '3.14'
153+
shell: bash
154+
run: |
155+
python -m pip install "cmake<4"
156+
CMAKE_BIN_DIR="$(python -c "import cmake; print(cmake.CMAKE_BIN_DIR)")"
157+
CMAKE_BIN="$CMAKE_BIN_DIR/cmake"
158+
echo "$CMAKE_BIN_DIR" >> "$GITHUB_PATH"
159+
ln -sfn "$CMAKE_BIN" /usr/local/bin/cmake
160+
PATH="$CMAKE_BIN_DIR:$PATH" cmake --version
128161
- name: Build
129162
run: |
130163
rm -rf dist wheelhouse
@@ -146,7 +179,7 @@ jobs:
146179
strategy:
147180
fail-fast: false
148181
matrix:
149-
python-version: ["3.11", "3.12", "3.13"]
182+
python-version: ["3.11", "3.12", "3.13", "3.14"]
150183
env:
151184
BAZEL_SH: C:/Program Files/Git/usr/bin/bash.exe
152185
MSYS2_ARG_CONV_EXCL: "*"
@@ -157,7 +190,7 @@ jobs:
157190
uses: styfle/cancel-workflow-action@0.11.0
158191
with:
159192
access_token: ${{ github.token }}
160-
- uses: actions/checkout@v3
193+
- uses: actions/checkout@v4
161194
with:
162195
fetch-depth: 0
163196
- uses: actions/setup-go@v5
@@ -168,6 +201,13 @@ jobs:
168201
with:
169202
distribution: temurin
170203
java-version: "17"
204+
- name: Shorten temp path
205+
shell: pwsh
206+
run: |
207+
New-Item -ItemType Directory -Path C:\tmp -Force | Out-Null
208+
Add-Content -Path $env:GITHUB_ENV -Value "TMP=C:\tmp"
209+
Add-Content -Path $env:GITHUB_ENV -Value "TEMP=C:\tmp"
210+
Add-Content -Path $env:GITHUB_ENV -Value "TMPDIR=C:\tmp"
171211
- name: Install Windows dependencies
172212
shell: pwsh
173213
run: |
@@ -193,6 +233,14 @@ jobs:
193233
uses: actions/setup-python@v5
194234
with:
195235
python-version: ${{ matrix.python-version }}
236+
- name: Pin CMake 3
237+
if: matrix.python-version == '3.14'
238+
shell: pwsh
239+
run: |
240+
python -m pip install "cmake<4"
241+
$cmakeBinDir = python -c "import cmake; print(cmake.CMAKE_BIN_DIR)"
242+
Add-Content -Path $env:GITHUB_PATH -Value $cmakeBinDir
243+
& (Join-Path $cmakeBinDir "cmake.exe") --version
196244
- name: Build
197245
shell: bash
198246
run: |

.github/workflows/test.yml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
uses: styfle/cancel-workflow-action@0.11.0
3232
with:
3333
access_token: ${{ github.token }}
34-
- uses: actions/checkout@v3
34+
- uses: actions/checkout@v4
3535
with:
3636
fetch-depth: 0
3737
- uses: actions/setup-go@v5
@@ -93,7 +93,7 @@ jobs:
9393
uses: styfle/cancel-workflow-action@0.11.0
9494
with:
9595
access_token: ${{ github.token }}
96-
- uses: actions/checkout@v3
96+
- uses: actions/checkout@v4
9797
with:
9898
fetch-depth: 0
9999
- uses: actions/setup-go@v5
@@ -109,8 +109,13 @@ jobs:
109109
python-version: "3.12"
110110
- name: Install macOS dependencies
111111
run: |
112-
brew install cmake ninja swig qt@5
113-
sudo ln -sfn "$(brew --prefix cmake)/bin/cmake" /usr/local/bin/cmake
112+
brew install ninja swig qt@5
113+
python -m pip install "cmake<4"
114+
CMAKE_BIN_DIR="$(python -c "import cmake; print(cmake.CMAKE_BIN_DIR)")"
115+
CMAKE_BIN="$CMAKE_BIN_DIR/cmake"
116+
echo "$CMAKE_BIN_DIR" >> "$GITHUB_PATH"
117+
sudo ln -sfn "$CMAKE_BIN" /usr/local/bin/cmake
118+
PATH="$CMAKE_BIN_DIR:$PATH" cmake --version
114119
sudo ln -sfn "$(brew --prefix ninja)/bin/ninja" /usr/local/bin/ninja
115120
echo "BAZEL_RULES_QT_DIR=$(brew --prefix qt@5)" >> "$GITHUB_ENV"
116121
- name: Restore Bazel caches
@@ -156,7 +161,7 @@ jobs:
156161
uses: styfle/cancel-workflow-action@0.11.0
157162
with:
158163
access_token: ${{ github.token }}
159-
- uses: actions/checkout@v3
164+
- uses: actions/checkout@v4
160165
with:
161166
fetch-depth: 0
162167
- uses: actions/setup-go@v5
@@ -167,6 +172,13 @@ jobs:
167172
with:
168173
distribution: temurin
169174
java-version: "17"
175+
- name: Shorten temp path
176+
shell: pwsh
177+
run: |
178+
New-Item -ItemType Directory -Path C:\tmp -Force | Out-Null
179+
Add-Content -Path $env:GITHUB_ENV -Value "TMP=C:\tmp"
180+
Add-Content -Path $env:GITHUB_ENV -Value "TEMP=C:\tmp"
181+
Add-Content -Path $env:GITHUB_ENV -Value "TMPDIR=C:\tmp"
170182
- name: Install Windows dependencies
171183
shell: pwsh
172184
run: |
@@ -203,6 +215,13 @@ jobs:
203215
uses: actions/setup-python@v5
204216
with:
205217
python-version: "3.12"
218+
- name: Pin CMake 3
219+
shell: pwsh
220+
run: |
221+
python -m pip install "cmake<4"
222+
$cmakeBinDir = python -c "import cmake; print(cmake.CMAKE_BIN_DIR)"
223+
Add-Content -Path $env:GITHUB_PATH -Value $cmakeBinDir
224+
& (Join-Path $cmakeBinDir "cmake.exe") --version
206225
- name: Test
207226
shell: bash
208227
run: |

BUILD

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
load("@python_versions//3.11:defs.bzl", py_binary_311 = "py_binary")
22
load("@python_versions//3.12:defs.bzl", py_binary_312 = "py_binary")
33
load("@python_versions//3.13:defs.bzl", py_binary_313 = "py_binary")
4+
load("@python_versions//3.14:defs.bzl", py_binary_314 = "py_binary")
45
load("@rules_python//python:defs.bzl", "py_binary")
56
load("//envpool:requirements.bzl", "requirement")
67

@@ -66,3 +67,11 @@ py_binary_313(
6667
main = "setup.py",
6768
deps = _SETUP_DEPS,
6869
)
70+
71+
py_binary_314(
72+
name = "setup_py314",
73+
srcs = _SETUP_SRCS,
74+
data = _SETUP_DATA,
75+
main = "setup.py",
76+
deps = _SETUP_DEPS,
77+
)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Check out our [arXiv paper](https://arxiv.org/abs/2206.10558) for more details!
4343

4444
### PyPI
4545

46-
EnvPool is currently hosted on [PyPI](https://pypi.org/project/envpool/). It supports Python 3.11-3.13 on Linux, macOS, and Windows.
46+
EnvPool is currently hosted on [PyPI](https://pypi.org/project/envpool/). It supports Python 3.11-3.14 on Linux, macOS, and Windows.
4747

4848
You can simply install EnvPool with the following command:
4949

docs/content/build.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
Build From Source
22
=================
33

4-
We recommend developing EnvPool on Ubuntu 24.04. Release wheels are built in
5-
``manylinux_2_28_x86_64`` and ``manylinux_2_28_aarch64`` environments for
6-
Linux, on ``macos-14`` for macOS, and on ``windows-2022`` for Windows.
4+
We recommend developing EnvPool on Ubuntu 24.04. Release wheels are built for
5+
Python 3.11-3.14 in ``manylinux_2_28_x86_64`` and
6+
``manylinux_2_28_aarch64`` environments for Linux, on ``macos-14`` for
7+
macOS, and on ``windows-2022`` for Windows.
78

89
We use `bazel <https://bazel.build/>`_ to build EnvPool. Comparing with
910
`pip <https://pip.pypa.io/>`_, using Bazel to build python package with C++ .so

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Installation
4747
------------
4848

4949
EnvPool is currently hosted on `PyPI <https://pypi.org/project/envpool/>`_.
50-
It supports Python 3.11-3.13.
50+
It supports Python 3.11-3.14.
5151

5252
You can install EnvPool with the following command:
5353

envpool/pip.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ def workspace():
2727
"3.11": "@python_versions_3_11_host//:python",
2828
"3.12": "@python_versions_3_12_host//:python",
2929
"3.13": "@python_versions_3_13_host//:python",
30+
"3.14": "@python_versions_3_14_host//:python",
3031
},
3132
requirements_lock = {
3233
"3.11": "@envpool//third_party/pip_requirements:requirements.txt",
3334
"3.12": "@envpool//third_party/pip_requirements:requirements.txt",
3435
"3.13": "@envpool//third_party/pip_requirements:requirements.txt",
36+
"3.14": "@envpool//third_party/pip_requirements:requirements.txt",
3537
},
3638
# default timeout value is 600, change it if you failed.
3739
# timeout = 3600,

envpool/workspace1.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def workspace():
2323
"""Configure pip requirements."""
2424
python_register_multi_toolchains(
2525
name = "python_versions",
26-
python_versions = ["3.11", "3.12", "3.13"],
26+
python_versions = ["3.11", "3.12", "3.13", "3.14"],
2727
default_version = "3.12",
2828
ignore_root_user_error = True,
2929
)

0 commit comments

Comments
 (0)