Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create pyproject.toml and add python 3.12 to CI #2377

Closed
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
8 changes: 8 additions & 0 deletions .github/workflows/CITest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ jobs:
python-version: '3.11',
build-system: 'cmake',
}
- {
name: 'ubuntu-22.04 x64 python3.12 cmake',
os: ubuntu-22.04,
arch: x64,
python-arch: x64,
python-version: '3.12',
build-system: 'cmake',
}

steps:
- uses: actions/checkout@v3
Expand Down
6 changes: 3 additions & 3 deletions bindings/python/capstone/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@
import ctypes, ctypes.util
from os.path import split, join, dirname
import sysconfig
import pkg_resources
from importlib import resources

import inspect
if not hasattr(sys.modules[__name__], '__file__'):
Expand Down Expand Up @@ -418,14 +418,14 @@ def _load_lib(path):

# Loading attempts, in order
# - user-provided environment variable
# - pkg_resources can get us the path to the local libraries
# - importlib.resources can get us the path to the local libraries
# - we can get the path to the local libraries by parsing our filename
# - global load
# - python's lib directory
# - last-gasp attempt at some hardcoded paths on darwin and linux

_path_list = [os.getenv('LIBCAPSTONE_PATH', None),
pkg_resources.resource_filename(__name__, 'lib'),
resources.files(__name__) / "lib",
join(split(__file__)[0], 'lib'),
'',
sysconfig.get_path('platlib'),
Expand Down
3 changes: 3 additions & 0 deletions bindings/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
Loading