Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ dependency-versions = "pinned"
environment = {LIBGIT2_VERSION="1.9.1", LIBSSH2_VERSION="1.11.1", OPENSSL_VERSION="3.3.3", LIBGIT2="/project/ci"}

before-all = "sh build.sh"
test-command = "pytest"
test-sources = ["test"]
before-test = "pip install -r {project}/requirements-test.txt"

[tool.cibuildwheel.linux]
repair-wheel-command = "LD_LIBRARY_PATH=/project/ci/lib64 auditwheel repair -w {dest_dir} {wheel}"
Expand Down
4 changes: 4 additions & 0 deletions src/pygit2.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,10 @@ PyInit__pygit2(void)
if (m == NULL)
return NULL;

#ifdef Py_GIL_DISABLED
PyUnstable_Module_SetGIL(m, Py_MOD_GIL_NOT_USED);
#endif

/* libgit2 version info */
ADD_CONSTANT_INT(m, LIBGIT2_VER_MAJOR)
ADD_CONSTANT_INT(m, LIBGIT2_VER_MINOR)
Expand Down
5 changes: 3 additions & 2 deletions test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@
import sys

cwd = os.getcwd()
sys.path.remove(cwd)
sys.path.append(cwd)
if cwd in sys.path:
sys.path.remove(cwd)
sys.path.append(cwd)
6 changes: 0 additions & 6 deletions test/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import platform
from collections.abc import Generator
from pathlib import Path

Expand All @@ -22,11 +21,6 @@ def global_git_config() -> None:
for level in levels:
pygit2.settings.search_path[level] = ''

# Fix tests running in Windows
# XXX Still needed now we have moved to GitHub CI?
if platform.system() == 'Windows':
pygit2.option(pygit2.enums.Option.SET_OWNER_VALIDATION, False)


@pytest.fixture
def pygit2_empty_key() -> tuple[Path, str, str]:
Expand Down