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

python bindings depends on setuptools #2341

Open
trufae opened this issue Apr 26, 2024 · 3 comments
Open

python bindings depends on setuptools #2341

trufae opened this issue Apr 26, 2024 · 3 comments
Labels
bug build & packaging Build system and packaging related python bindings
Milestone

Comments

@trufae
Copy link
Contributor

trufae commented Apr 26, 2024

Work environment

Questions Answers
OS/arch/bits Debian arm 64
Architecture armv8
Source of Capstone pip
Version/git commit v5.0.1

Expected behavior

import capstone to work

Actual behavior

is not working

Steps to reproduce the behavior

pip install capstone results in "error unable to import pkg_resources". which is a module distributed with setuptools package. In order to fix that one of those two options must be picked

  • remove setuptools dependency
  • add setuptools as dependency

Additional Logs, screenshots, source code, configuration dump, ...

Drag and drop zip archives containing the Additional info here, don't use external services or link.
Screenshots can be directly dropped here.

@Rot127
Copy link
Collaborator

Rot127 commented Apr 26, 2024

Please fill out the issue template. Also for the other issues. Which Capstone version are you talking about?

@Rot127 Rot127 added python bindings build & packaging Build system and packaging related labels Apr 26, 2024
@trufae
Copy link
Contributor Author

trufae commented Apr 26, 2024

root@7a1a5043e38d:/# pip3 install capstone --break-system-packages
Collecting capstone
  Downloading capstone-5.0.1.tar.gz (2.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.9/2.9 MB 16.9 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: capstone
  Building wheel for capstone (pyproject.toml) ... done
  Created wheel for capstone: filename=capstone-5.0.1-py3-none-manylinux1_aarch64.whl size=2828045 sha256=dfc2f39d0bd3d4b4336db71515cd6858227cbb7ce037923ab3180c435db30f49
  Stored in directory: /root/.cache/pip/wheels/5c/b1/25/2e6a9e9483eb8dbf0a852572ab53a8f4bb15e219bf356322fb
Successfully built capstone
Installing collected packages: capstone
Successfully installed capstone-5.0.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
root@7a1a5043e38d:/# python3
Python 3.11.9 (main, Apr 10 2024, 13:16:36) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import capstone
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.11/dist-packages/capstone/__init__.py", line 380, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'
>>>

@trufae
Copy link
Contributor Author

trufae commented Apr 26, 2024

honored the issue template now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug build & packaging Build system and packaging related python bindings
Projects
None yet
Development

No branches or pull requests

2 participants