Skip to content

Commit

Permalink
Merge pull request #50 from henryiii/henryiii/feat/pypy
Browse files Browse the repository at this point in the history
feat: PyPy support
  • Loading branch information
dcwatson authored May 10, 2024
2 parents 7efe740 + bbdb7c1 commit 066b00a
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
os: ["ubuntu-latest"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.8", "pypy3.10"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -34,7 +34,6 @@ jobs:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install
run: |
pip install -r requirements-dev.lock
run: pip install -r requirements-dev.lock
- name: Run Tests
run: pytest
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project(${SKBUILD_PROJECT_NAME} LANGUAGES C)

find_package(Python REQUIRED COMPONENTS Interpreter Development.Module ${SKBUILD_SABI_COMPONENT})

if(Python_VERSION VERSION_GREATER_EQUAL 3.11)
if(Python_VERSION VERSION_GREATER_EQUAL 3.11 AND Python_INTERPRETER_ID STREQUAL Python)
python_add_library(_deflate MODULE USE_SABI 3.11 src/_deflate.c)
else()
python_add_library(_deflate MODULE WITH_SOABI src/_deflate.c)
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,5 @@ extend-select = ["B", "I"]
isort.known-first-party = ["deflate"]

[tool.cibuildwheel]
skip = ["pp*"] # PyPy not supported
test-extras = ["test"]
test-command = "pytest {package}/tests"
2 changes: 0 additions & 2 deletions src/_deflate.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,6 @@ static struct PyModuleDef deflate_module = {PyModuleDef_HEAD_INIT, "_deflate",
deflate_methods};

PyMODINIT_FUNC PyInit__deflate(void) {
Py_Initialize();

PyObject *module = PyModule_Create(&deflate_module);
if (module == NULL)
return NULL;
Expand Down

0 comments on commit 066b00a

Please sign in to comment.