Skip to content

Commit a65a94d

Browse files
committed
cicd/lib-build-and-push: use cibuildwheel[uv]
1 parent 209d999 commit a65a94d

File tree

5 files changed

+53
-12
lines changed

5 files changed

+53
-12
lines changed

.github/workflows/build-push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ jobs:
2626
with:
2727
upload: ${{ github.event_name == 'push' && endsWith(github.event.ref, 'scylla') }}
2828
python-version: '3.13'
29-
target: linux,macos,windows
29+
target: windows

.github/workflows/integration-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
- master
77
- 'branch-**'
88
pull_request:
9+
branches:
10+
- master1
11+
- 'branch-**'
912
paths-ignore:
1013
- docs/*
1114
- examples/*

.github/workflows/lib-build-and-push.yml

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ on:
2121
required: false
2222
default: "linux,macos,windows"
2323

24+
env:
25+
CIBW_ARCHS_WINDOWS: "AMD64"
26+
2427
jobs:
2528
prepare-matrix:
2629
name: "Prepare matrix to run for ${{ inputs.python-version }} on `${{ inputs.target }}`"
@@ -78,7 +81,7 @@ jobs:
7881
7982
- name: Install cibuildwheel
8083
run: |
81-
python3 -m pip install cibuildwheel==2.22.0
84+
python3 -m pip install cibuildwheel[uv]==2.22.0
8285
8386
- name: Install OpenSSL for Windows
8487
if: runner.os == 'Windows'
@@ -112,7 +115,43 @@ jobs:
112115
echo "Enforcing target deployment for 14.0"
113116
fi
114117
118+
# - name: Add clang path to $PATH env
119+
# if: runner.os == 'Windows'
120+
# run: echo "C:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
121+
122+
- name: Add clang path to $PATH env
123+
if: runner.os == 'Windows'
124+
run: |
125+
echo "CC=clang" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
126+
echo "CXX=clang++" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
127+
128+
- name: Check Clang Version
129+
run: clang --version
130+
131+
- name: Force Clang for Compilation
132+
run: |
133+
echo "[build]" >> $HOME/.pydistutils.cfg
134+
echo "compiler=clang" >> $HOME/.pydistutils.cfg
135+
136+
- name: Ensure cl.exe is Removed
137+
run: |
138+
cl.exe --version
139+
140+
- name: Build wheels for windows
141+
if: runner.os == 'Windows'
142+
run: |
143+
$envPath = $env:Path
144+
echo $envPath
145+
$pathArray = $envPath -split ";"
146+
$filteredPaths = $pathArray | Where-Object { $_ -notmatch "Microsoft Visual Studio" }
147+
$newPath = ($filteredPaths -join ";").TrimEnd(";")
148+
echo $newPath
149+
$env:Path = $newPath
150+
[System.Environment]::SetEnvironmentVariable("Path", $newPath, "User")
151+
python3 -m cibuildwheel --output-dir wheelhouse
152+
115153
- name: Build wheels
154+
if: runner.os != 'Windows'
116155
run: |
117156
python3 -m cibuildwheel --output-dir wheelhouse
118157
@@ -168,7 +207,7 @@ jobs:
168207

169208
- name: Install cibuildwheel
170209
run: |
171-
python -m pip install cibuildwheel==2.22.0
210+
python -m pip install cibuildwheel[uv]==2.22.0
172211
173212
- name: Build wheels
174213
env:

pyproject.toml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,12 @@ tag_regex = '(?P<version>\d*?\.\d*?\.\d*?)-scylla'
8787
#### CI BUILDWHEEL CONFIG ####
8888

8989
[tool.cibuildwheel]
90-
9190
build-frontend = "build[uv]"
91+
9292
environment = { CASS_DRIVER_BUILD_CONCURRENCY = "2", CASS_DRIVER_BUILD_EXTENSIONS_ARE_MUST = "yes", CFLAGS = "-g0 -O3" }
93+
9394
skip = ["cp2*", "cp36*", "pp36*", "cp37*", "pp37*", "*i686", "*musllinux*"]
95+
build = ["cp3*"]
9496

9597
before-test = "pip install -r {project}/test-requirements.txt"
9698

@@ -100,7 +102,6 @@ manylinux-pypy_x86_64-image = "manylinux_2_28"
100102
manylinux-pypy_aarch64-image = "manylinux_2_28"
101103

102104
[tool.cibuildwheel.linux]
103-
build = ["cp3*_x86_64"]
104105

105106
before-build = "rm -rf ~/.pyxbld && rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux && yum install -y libffi-devel libev libev-devel openssl openssl-devel"
106107
test-command = [
@@ -110,18 +111,18 @@ test-command = [
110111

111112
[tool.cibuildwheel.macos]
112113
build = ["cp3*"]
114+
build-frontend = "build"
113115
test-command = [
114116
"pytest {project}/tests/unit -k 'not (test_multi_timer_validation or test_empty_connections or test_timer_cancellation)'"
115117
]
116118

117119
[tool.cibuildwheel.windows]
118-
build = ["cp3*"]
119-
build-frontend = "build" # build[uv] seems to be broken on Windows
120+
build-frontend = "build[uv]" # build[uv] seems to be broken on Windows
120121
test-command = [
121-
"pytest {project}/tests/unit -k 'not (test_deserialize_date_range_year or test_datetype or test_libevreactor)'"
122+
"pytest {project}/tests/unit -k \"not (test_deserialize_date_range_year or test_datetype or test_libevreactor)\""
122123
]
123124

124-
environment = { CASS_DRIVER_BUILD_CONCURRENCY = "2", CASS_DRIVER_BUILD_EXTENSIONS_ARE_MUST = "yes", CFLAGS = "-g0 -O3", CC = "clang", CXX = "clang++" }
125+
environment = { CASS_DRIVER_BUILD_CONCURRENCY = "2", CASS_DRIVER_BUILD_EXTENSIONS_ARE_MUST = "yes", CC = "clang", CXX = "clang++" }
125126

126127
[[tool.cibuildwheel.overrides]]
127128
select = "pp*"

setup.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -453,9 +453,7 @@ def run_setup(extensions):
453453
else:
454454
sys.stderr.write("Bypassing Cython setup requirement\n")
455455

456-
setup(
457-
tests_require=['nose', 'mock>=2.0.0', 'PyYAML', 'pytz', 'sure'],
458-
**kw)
456+
setup(**kw)
459457

460458

461459
run_setup(None)

0 commit comments

Comments
 (0)