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

Update Cython bindings #2068

Merged
merged 4 commits into from Jun 29, 2023
Merged

Conversation

peace-maker
Copy link
Contributor

Bring all new architectures to the cython binding and fix build warnings.

Loading the cython bindings was broken even when they were installed correctly. I've switched it to how the debug() function imports ccapstone.

diff --git a/bindings/python/capstone/__init__.py b/bindings/python/capstone/__init__.py
index 9098b3ed48..4ec23458d1 100755
--- a/bindings/python/capstone/__init__.py
+++ b/bindings/python/capstone/__init__.py
@@ -885,7 +885,7 @@ def __init__(self, arch, mode):
             raise CsError(status)
 
         try:
-            import ccapstone
+            from . import ccapstone
             # rewire disasm to use the faster version
             self.disasm = ccapstone.Cs(self).disasm
         except:

/usr/local/lib/python2.7/dist-packages/setuptools/dist.py:476: UserWarning: Normalizing '5.0.0.rc4' to '5.0.0rc4'
  normalized_version,
Always use the major version instead of requiring manual updates to the
file names.
@kabeor
Copy link
Member

kabeor commented Jun 29, 2023

Thanks, this is helpful a lot.

@kabeor kabeor merged commit 3ba8e54 into capstone-engine:next Jun 29, 2023
6 checks passed
@peace-maker peace-maker deleted the cython_bindings branch June 29, 2023 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants