commit | e199eb9cfe903c018fc76eaf2d9e32f262392eaf | [log] [tgz] |
---|---|---|
author | Benno Fünfstück <benno.fuenfstueck@gmail.com> | Sun Oct 02 15:11:23 2016 +0200 |
committer | Nguyen Anh Quynh <aquynh@gmail.com> | Mon Oct 03 10:50:08 2016 +0800 |
tree | 299dc061f4e17a596356ee1c4ab9c8f69945746d | |
parent | bd8e5ba3707007a67245e1b16d04b9418014782b [diff] |
python-bindings: fix setup.py for wheel installation When the python bindings are installed using the new wheels infrastructure, data_files are relative to the site-packages directory even if using absolute paths. The following example demonstrates the bug fixed by this commit: (ran on archlinux) ```bash $ pip install wheel # if this package is installed, wheel installation is made the default Collecting wheel Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB) 100% |################################| 71kB 124kB/s Installing collected packages: wheel Successfully installed wheel-0.29.0 $ pip install capstone # this will use the wheel installation method now Collecting capstone Using cached capstone-3.0.4.tar.gz Building wheels for collected packages: capstone Running setup.py bdist_wheel for capstone ... done Stored in directory: /root/.cache/pip/wheels/7c/d1/d0/db6e2c5ef1063aabb9de2dd8b92b4c27ee6f9fd213240099b8 Successfully built capstone Installing collected packages: capstone Successfully installed capstone-3.0.4 $ find /usr/lib/ -name "libcapstone.so" /usr/lib/python3.5/site-packages/usr/lib/python3.5/site-packages/capstone/libcapstone.so ``` So the path `SITE_PACKAGES` in the `data_files` specification of the setup.py file was interpreted relative to the python site-packages directory. The fix for this is simple: use `/capstone` instead of an absolute path for `SITE_PACKAGES`.
Capstone is a disassembly framework with the target of becoming the ultimate disasm engine for binary analysis and reversing in the security community.
Created by Nguyen Anh Quynh, then developed and maintained by a small community, Capstone offers some unparalleled features:
Support multiple hardware architectures: ARM, ARM64 (ARMv8), M68K, Mips, PPC, Sparc, SystemZ, XCore and X86 (including X86_64).
Having clean/simple/lightweight/intuitive architecture-neutral API.
Provide details on disassembled instruction (called “decomposer” by others).
Provide semantics of the disassembled instruction, such as list of implicit registers read & written.
Implemented in pure C language, with lightweight wrappers for C++, C#, Go, Java, Lua, NodeJS, Ocaml, Python, Ruby, Rust & Vala ready (available in main code, or provided externally by the community).
Native support for all popular platforms: Windows, Mac OSX, iOS, Android, Linux, *BSD, Solaris, etc.
Thread-safe by design.
Special support for embedding into firmware or OS kernel.
High performance & suitable for malware analysis (capable of handling various X86 malware tricks).
Distributed under the open source BSD license.
Further information is available at http://www.capstone-engine.org
See COMPILE.TXT file for how to compile and install Capstone.
See docs/README for how to customize & program your own tools with Capstone.
See HACK.TXT file for the structure of the source code.
This project is released under the BSD license. If you redistribute the binary or source code of Capstone, please attach file LICENSE.TXT with your products.