Skip to content

Commit 3e21b03

Browse files
committed
Add windows support
1 parent af0f1f9 commit 3e21b03

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
runs-on: ${{ matrix.os }}
3333
strategy:
3434
matrix:
35-
os: [ubuntu-24.04, ubuntu-24.04-arm, macos-14]
35+
os: [ubuntu-24.04, ubuntu-24.04-arm, macos-14, windows-2022]
3636
env:
3737
CIBW_SKIP: pp*
3838
CIBW_ENVIRONMENT: >-

setup.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@
33

44
from setuptools import Extension, setup
55

6-
if sysconfig.get_config_var("Py_GIL_DISABLED"):
7-
options = {}
8-
define_macros = []
9-
py_limited_api = False
10-
else:
11-
options = {"bdist_wheel": {"py_limited_api": "cp38"}}
12-
define_macros = [("Py_LIMITED_API", "0x030800f0")]
13-
py_limited_api = True
6+
options = {}
7+
define_macros = [("_POSIX_C_SOURCE", "199309L")]
8+
py_limited_api = not sysconfig.get_config_var("Py_GIL_DISABLED")
9+
10+
if py_limited_api:
11+
options["bdist_wheel"] = {"py_limited_api": "cp38"}
12+
define_macros.append(("Py_LIMITED_API", "0x030800f0"))
1413

1514
setup(
1615
options=options,

0 commit comments

Comments
 (0)