Commit graph

408 commits

Author SHA1 Message Date
Nguyen Anh Quynh
3bd582ef64 python: bump version to 3.0.5 2016-10-26 10:52:53 +08:00
Nguyen Anh Quynh
6bb33edf7e python: capitalized cython name 2016-10-26 04:52:58 +08:00
Andrew Dutcher
4c4d129f86 Python: Actually attempt to load .so.3 extension on linux 2016-10-25 12:56:10 -07:00
Andrew Dutcher
97422c15bd Python: Spelling/capitalization/contact fixes in readme 2016-10-25 12:56:10 -07:00
Andrew Dutcher
ffd5320690 Minor english fixes 2016-10-25 12:56:10 -07:00
Andrew Dutcher
a75324fc03 Python: remove special case for cygwin build 2016-10-25 12:56:10 -07:00
Andrew Dutcher
c3f602e71d Python: Make cython work with extreme prejudice 2016-10-25 12:56:10 -07:00
Andrew Dutcher
21a241192c Python: Clean up the capstone-windows stuff with extreme prejudice 2016-10-25 12:56:10 -07:00
Andrew Dutcher
3c9a1eea08 Python: make setup work as expected 2016-10-25 12:56:10 -07:00
Nguyen Anh Quynh
6624dc446e add CS_VERSION_{MAJOR, MINOR, EXTRA} 2016-10-25 14:23:55 +08:00
Richo Healey
9413509982 Workaround unicorn handing back bytearrays 2016-10-05 22:47:40 -07:00
Benno Fünfstück
df96d9ee6d 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`.
2016-10-02 15:25:13 +02:00
Nguyen Anh Quynh
744181744f python: cast skipdata function inside binding to simplify the API 2016-10-02 01:36:03 +08:00
Nguyen Anh Quynh
a83352a33b python: fix CS_SKIPDATA_CALLBACK prototype 2016-10-01 01:33:09 +08:00
Akihiko Odaki
2876044815 arm: treat ARM address as unsigned
It should be unsigned because:
* It does arithmetic operations
* Format strings have "%u" instead of "%d"
2016-09-03 14:28:46 +09:00
Andrew Dutcher
0ed9820d2f Python bindings: Changes to how structures are copied so that capstone works correctly in PyPy 2016-06-09 19:04:27 -07:00
Sean Heelan
6f043f1635 __getattr__ should raise AttributeError, not return None, on failure
Fix for issue #624
2016-04-18 17:52:10 +08:00
jmechnich
066febc6fe bugfix: removed leading ./ from OBJDIR to avoid corrupting setup.py install 2016-03-26 10:29:52 +08:00
Nguyen Anh Quynh
3ffc798787 python: add __version__ 2016-03-06 21:28:45 +08:00
Michael Cohen
29ee560688 Support all OSs. 2016-02-11 23:43:22 +01:00
Michael Cohen
ff5b295b88 Fix setup.py. 2016-02-11 15:24:17 +01:00
Raijinili
491ebd217a Python 3: CsError.__str__
Choose `CsError.__str__` implementation based on Python version.
2015-11-30 23:51:25 -05:00
Nguyen Anh Quynh
5def39eab0 python: perform the last dylib loader only if it fails before that (for El Capitan) 2015-10-19 20:04:47 +08:00
Nguyen Anh Quynh
6c22904682 Merge pull request #515 from strazzere/master
Add OSX 10.11 dylib load fix
2015-10-17 11:06:40 +08:00
Tim Strazzere
36cabb6b1d Add OSX 10.11 dylib load fix
El Capitan does not guaranteed that
(DY)LD_LIBRARY_PATH will exist, so force
one last check for the default install
directory that the install script uses.
2015-10-16 17:09:00 -07:00
Nicolas PLANEL
a496bbfc0c [binding][python] fixup python 3 compatibility
In Python 3.x dict.keys() return a dict_keys object not a list.
2015-10-04 10:44:17 +08:00
Nicolas PLANEL
65106cfde7 file.write() need bytes when file is opened in binary mode 2015-10-04 00:31:25 +08:00
Nguyen Anh Quynh
932381aacc python: do not copy msvc/headers directory in setup.py 2015-07-15 15:44:42 +08:00
Nguyen Anh Quynh
1a7a13e4da Merge branch 'master' into v3 2015-06-22 16:50:35 +08:00
Alex Chernetz
5799c485a6 [Python binding] Fix setup.py to allow installing in a virtualenv
In a virtualenv:
- site.getusersitepackages() won't import
- get_python_lib() will return the directory inside the virtualenv
- the "--user" option can therefore be safely ignored.
2015-06-19 23:22:36 -07:00
Nguyen Anh Quynh
ebc370ff40 bump version to 3.0.4 2015-06-08 22:29:55 +08:00
Nguyen Anh Quynh
0c391bb88b Merge branch 'patch-1' of https://github.com/neuromancer/capstone into t5 2015-06-04 21:40:58 +08:00
Nguyen Anh Quynh
8ac478bd4b python: shared library can be unloaded from under our feet. issue reported by @joelpx 2015-06-04 11:38:26 +08:00
neuromancer
911d0506cd Allow local installations of the python bindings
These changes will allow a pypi user to locally install capstone using the --user flag. If it possible, please update the correspondent package (https://pypi.python.org/pypi/capstone/3.0.3)
2015-06-02 14:31:36 +02:00
Nguyen Anh Quynh
cff5186e08 python: cleanup README.pypi-win 2015-05-15 17:04:16 +08:00
Nguyen Anh Quynh
53c2b0a290 python: update PyPi packages installation doc 2015-05-15 17:01:18 +08:00
Nguyen Anh Quynh
1af98dc352 cython: bump version in setup_cython.py to 3.0.3 2015-05-12 09:33:38 +08:00
Zach Riggle
a10fbb2b3f Fix error when _cs is None during teardown 2015-05-12 09:26:59 +08:00
Nguyen Anh Quynh
a34b231220 python: README.pypi-src 2015-05-10 22:57:47 +08:00
Nguyen Anh Quynh
f5785613ba python: add links to PyPi packages in their README 2015-05-08 17:26:57 +08:00
Nguyen Anh Quynh
b89c95fc99 python: bump package version to 3.0.3 (setup.py) 2015-05-08 17:06:59 +08:00
Nguyen Anh Quynh
d1e2a292a0 bump version to 3.0.3 2015-05-08 15:22:26 +08:00
danghvu
14029d8b37 Fix a bug in Cython due to renaming 2015-04-28 00:19:41 -05:00
Nguyen Anh Quynh
4504dcdc48 Merge branch 'master' into v3 2015-04-07 13:21:56 +08:00
Hank Leininger
cf6dea61e8 Add DESTDIR support for the python binding.
Without this patch, DESTDIR is ignored, so build systems that use a
staging sandbox prior to installing in real-root, such as Gentoo,
cannot build the python binding.

Caveats:

1) I wrote/tested this against the 3.0.2 release, not current HEAD.

2) It might be preferable to do DESTDIR ?= / at the top of the Makefile,
   so that the if/else/fi can be squashed back out.

3) The install_cython target probably needs a similar change; untested.

4) Other bindings might need something similar.
2015-04-06 16:40:31 -04:00
Nguyen Anh Quynh
0187ad1b8a python: X86Op.avx_zero_mask should have c_bool type 2015-04-02 12:43:57 +08:00
Nguyen Anh Quynh
3036ada407 python: simplify setup.py 2015-03-19 16:57:39 +08:00
Nguyen Anh Quynh
986bc23233 python: simplify setup.py 2015-03-19 16:57:22 +08:00
Nguyen Tan Cong
569f7a5b08 python: properly build the core in Cygwin environment for setup.py 2015-03-19 16:05:32 +08:00
Nguyen Anh Quynh
7eef7d34ac python: properly build the core in Cygwin environment for setup.py 2015-03-19 08:19:18 +07:00