Commit Graph

792 Commits

Author SHA1 Message Date
Nguyen Anh Quynh 91808ab6cd python: cleanup 2016-10-30 16:19:10 +08:00
Andrew Dutcher b2504b963e Python setup: Clean up some merge failures, adapt for changes on next branch 2016-10-26 23:15:42 -07:00
Andrew Dutcher 5acdd97ca2 Python: Actually attempt to load .so.3 extension on linux 2016-10-25 21:49:59 -07:00
Andrew Dutcher 97fac00499 Python: Spelling/capitalization/contact fixes in readme 2016-10-25 21:49:58 -07:00
Andrew Dutcher 73f92384ee Minor english fixes 2016-10-25 21:49:58 -07:00
Andrew Dutcher 06b26efbf4 Python: remove special case for cygwin build 2016-10-25 21:49:58 -07:00
Andrew Dutcher 816f131d27 Python: Make cython work with extreme prejudice 2016-10-25 21:49:58 -07:00
Andrew Dutcher 1008716ee5 Python: Clean up the capstone-windows stuff with extreme prejudice 2016-10-25 21:48:41 -07:00
Andrew Dutcher 3b5b5ff58c Python: make setup work as expected 2016-10-25 21:48:18 -07:00
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 c72ab6014f bindings: regenerate consts 2016-10-25 14:30:13 +08:00
Nguyen Anh Quynh 1e5a48535c add CS_VERSION_{MAJOR, MINOR, EXTRA} 2016-10-25 14:29:21 +08:00
Nguyen Anh Quynh 6624dc446e add CS_VERSION_{MAJOR, MINOR, EXTRA} 2016-10-25 14:23:55 +08:00
Fish 8a5f7af308 Change pointer-deref-then-assignment to memmove to make PyPy happy. 2016-10-13 19:56:41 -07:00
Richo Healey 57cbb8beeb Workaround unicorn handing back bytearrays 2016-10-06 14:40:37 +08:00
Richo Healey 9413509982 Workaround unicorn handing back bytearrays 2016-10-05 22:47:40 -07:00
Benno Fünfstück b446327f3b 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-03 10:50:08 +08: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 71a42c13c6 python: cast skipdata function inside binding to simplify the API 2016-10-02 01:35:28 +08:00
Nguyen Anh Quynh a83352a33b python: fix CS_SKIPDATA_CALLBACK prototype 2016-10-01 01:33:09 +08:00
Nguyen Anh Quynh 0cac0ec5e8 python: fix CS_SKIPDATA_CALLBACK prototype 2016-10-01 01:31:24 +08:00
Nguyen Anh Quynh 399dd9da81 Merge pull request #764 from akihikodaki/next
arm: treat ARM address as unsigned
2016-09-07 09:51:04 +08:00
Akihiko Odaki e7e4e1dfda arm: treat ARM address as unsigned
It should be unsigned because:
* It does arithmetic operations
* Format strings have "%u" instead of "%d"

# Conflicts:
#	arch/ARM/ARMInstPrinter.c
#	bindings/python/test_arm.py
#	tests/test_arm.c
2016-09-04 00:13:50 +09: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
mrexodia fb2c843f66 changed fcompi to fcomip and fucompi to fucomip 2016-08-30 23:10:04 +02:00
Nguyen Anh Quynh e93290962c arm64: add NEGS & NGCS alias instructions. this fixes issue #752 2016-08-23 14:01:17 +08:00
Nguyen Anh Quynh a4634b45dc Merge pull request #696 from emoon/m68k-reg-read-write
[M68K] Implemented regs read/write lists
2016-08-11 11:22:48 +08:00
Daniel Collin 147083be67 [M68K] Implemented regs read/write lists 2016-08-09 17:29:36 +02:00
Nguyen Anh Quynh fae35cedac x86: properly handle SSE/AVX instructions 2016-07-15 20:37:19 +08:00
lucasg 8b1899d859 Replace copy.deepcopy by copy_ctypes_list for get_arch_info
This replacement was done for commit
1647720656, allowing the python binding to
be used in PyPy. It seems the m68k arch has been forgotten.
2016-07-09 14:38:01 +02:00
Pranith Kumar ddaeb354ee Fix error return code 2016-06-29 11:08:13 -04:00
Andrew Dutcher fcd06dedd7 Re-apply changes from 1647720656 on next branch, that's the commit that lets the python bindings run in pypy 2016-06-16 15:47:43 -07:00
Niels Boehm 06cc17d41c Fix typo in m68k constant for immediate operand. 2016-06-15 08:25:59 +02:00
Niels Boehm 78893a5473 Add m68k to the general Python tests. 2016-06-14 13:35:02 +02:00
Niels Boehm 901928e28d Add missing architectures to test_lite.py.
The code constants and the all_tests tuple is now analogous to
test_basic.py.
2016-06-14 13:28:14 +02:00
Niels Boehm 0f4ecc6ccc Use and test syntax against None in all_tests.
Comparing against 0 or just testing the truthiness is suboptimal, as you
lose the ability to explicitly set the syntax to CS_OPT_SYNTAX_DEFAULT
or 0.

Also, using None to mean "don't change" or other "here is no value"
interpretations is much more pythonic than the C-idiomatic 0.
2016-06-13 12:25:24 +02: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
Nguyen Anh Quynh e3f94ac4ab fix merging conflict 2016-05-22 08:58:33 +08:00
Nguyen Anh Quynh 7b03323b8c Merge pull request #682 from ibabushkin/next
Reduced confusion caused by the m68k test being out of date
2016-05-14 18:19:36 +08:00
Nguyen Anh Quynh 820d7d02c7 Merge pull request #669 from zachriggle/next-mips
Add MIPS_GRP_INT and MIPS_GRP_CALL
2016-05-14 09:36:49 +08:00
Inokentiy Babushkin bdb1d2988c Further refinements to the tests + python test fix for M68K 2016-05-13 18:39:32 +02:00
Inokentiy Babushkin e488a7ed8e Fixed ordering in files 2016-05-12 08:57:25 +02:00
Inokentiy Babushkin 1b0779b97a Fixed python bindings to align with struct changes 2016-05-12 08:50:05 +02:00
Zach Riggle 1b3f07ad12 Add MIPS_GRP_XXX aliases for generic types. 2016-05-03 07:30:31 -07:00
Pranith Kumar 4a3af7b1c8 Handle python test failure properly 2016-04-30 13:12:16 -04:00
Nguyen Anh Quynh 6858c0f590 binding: remove cx_x86_op::fp following the change in the core 2016-04-24 00:16:08 +08:00
Sean Heelan 83cd155db2 __getattr__ should raise AttributeError, not return None, on failure
Fix for issue #624
2016-04-18 18:21:24 +08: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
Nguyen Anh Quynh 5c85a75d40 m68k: fix conflicts when merging with #625 2016-04-12 19:58:29 +07:00
Nguyen Anh Quynh 7fff673415 bindings: update after recent changes on some M68k enums 2016-04-12 18:47:19 +08:00
Nguyen Anh Quynh c6397bf354 python: add access field for ARM64 2016-04-12 13:42:07 +08:00
Nicolas PLANEL a66b4b425c update generated bindings 2016-04-11 23:05:11 +10:00
Nicolas PLANEL c086c904d3 fixup indentation, mix of spaces and tabs 2016-04-11 23:03:45 +10:00
Daniel Collin 0bcb2e546c Various fixes
* Fixed a break indentation
* Fixed incorrect enum value for M68K_GRP_IRET
* Fixed so groups_count is set to 0 at init
* Added group_count printing in python example
2016-04-10 16:16:28 +02:00
jmechnich 066febc6fe bugfix: removed leading ./ from OBJDIR to avoid corrupting setup.py install 2016-03-26 10:29:52 +08:00
jmechnich 52294728e5 bugfix: removed leading ./ from OBJDIR to avoid corrupting setup.py install 2016-03-25 22:31:13 +01:00
Nguyen Anh Quynh a23f9d37ed add CS_OPT_UNSIGNED option to print immediate in unsigned form. only ARM is supported for now (issue #585) 2016-03-14 13:52:23 +08:00
Nguyen Anh Quynh 3ffc798787 python: add __version__ 2016-03-06 21:28:45 +08:00
Nguyen Anh Quynh c69b6a921d Merge branch 'next' of https://github.com/aquynh/capstone into next 2016-03-06 21:28:16 +08:00
Nguyen Anh Quynh 3766ed1282 python: add __version__ 2016-03-06 21:27:55 +08:00
Michael Cohen 32923cf004 Added a missed dependency to MANIFEST.in to allow packaging of C src in the sdist. 2016-03-04 08:06:05 -08:00
Michael Cohen 40a42b4939 Fix setup.py to use setuptools and put the libcapstone.so in the right place. 2016-02-15 02:34:32 +01: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
Nguyen Anh Quynh 31f239f920 python: implement setter for skipdata_setup. this fixes issue 564 so it is now possible to redefine skipdata's mnemonic 2015-12-06 01:00:21 +07:00
Raijinili 6ea7ec83ad Python 3: CsError.__str__
Choose `CsError.__str__` implementation based on Python version.
2015-12-02 12:19:11 +07: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 7fc95e82bb python: perform the last dylib loader only if it fails before that (for El Capitan) 2015-10-19 20:03:45 +08:00
Tim Strazzere 73c255a0cf 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-17 11:08:58 +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 051140f3ba [binding][python] print the string value of CsError
Print the string error of CsError.
2015-10-08 16:48:26 +11:00
Nicolas PLANEL 3593749e29 [python] test_m68k sync with C implementation
Sync the sample test to have the same output than the C implementation.
2015-10-06 16:08:33 +11:00
Nicolas PLANEL b2e3ff296f [binding][python] fixup M68KOpMem structure
Fixup the structure, to be in sync with the C implementation.
2015-10-06 16:05:09 +11: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
Nicolas PLANEL 0db56e33da [binding][python] fixup python 3 compatibility
In Python 3.x dict.keys() return a dict_keys object not a list.
2015-10-03 21:11:17 +10:00
Daniel Collin 2ee675c10a This adds M68K support to Capstone 2015-10-02 20:47:00 +02:00
Nguyen Anh Quynh 4d7d5c13a1 python: support newly added MASM syntax 2015-08-09 10:52:43 -07:00
learn_more 07a7f6c8aa Add missing const for arm64
update suite/test_group_name
2015-08-02 14:21:55 +02:00
Nguyen Anh Quynh cc7434c57e python: do not copy msvc/headers directory in setup.py 2015-07-15 17:38:12 +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
Alex Chernetz 38094b1098 [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:18:52 -07:00
w4kfu 3dcb8fbc49 remove the redundant detail copy 2015-06-18 11:44:12 +02:00
w4kfu 7a4e5f7305 remove duplicate detail info, modify all access to _detail to _raw.detail.contents 2015-06-18 11:07:05 +02:00
w4kfu 5ffd2f0761 fix issue #398 (Python binding no deep copy of detail pointer) 2015-06-17 17:25:56 +02:00
Nguyen Anh Quynh ebc370ff40 bump version to 3.0.4 2015-06-08 22:29:55 +08:00
Nguyen Anh Quynh 2737135350 python: rename test to test_basic in test_all.py 2015-06-08 17:21:27 +08:00
neuromancer a210229a0f 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-04 21:46:09 +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
Nguyen Anh Quynh 3808eec033 python: shared library can be unloaded from under our feet. issue reported by @joelpx 2015-06-04 11:37:45 +08:00
Nguyen Anh Quynh 1319f0c6d7 python: rename test.py to test_basic.py 2015-06-03 22:14:59 +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 147729e8d7 python: change PpcOpValue.imm type to c_int64 after the recent change in the core 2015-05-16 09:29:02 +08:00
Nguyen Anh Quynh cff5186e08 python: cleanup README.pypi-win 2015-05-15 17:04:16 +08:00
Nguyen Anh Quynh 38d3f661aa python: update README.pypi-src 2015-05-15 17:02:47 +08:00
Nguyen Anh Quynh 53c2b0a290 python: update PyPi packages installation doc 2015-05-15 17:01:18 +08:00
Nguyen Anh Quynh 87ba408aff python: update PyPi packages installation doc 2015-05-15 16:59:09 +08:00
Zach Riggle 73537ceeaf Add reverse lookup for top-level Capstone constants 2015-05-13 11:54:22 +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 76e46d6e9b Merge branch 'next' of https://github.com/aquynh/capstone into next 2015-05-12 09:26:18 +08:00
Nguyen Anh Quynh a34b231220 python: README.pypi-src 2015-05-10 22:57:47 +08:00
Nguyen Anh Quynh 4b7616183c python: do not try to load libcapstone.so.3 2015-05-10 10:23:05 +08:00
Zach Riggle 1b293064f6 Fix error when _cs is None during teardown 2015-05-09 16:06:48 -04:00
Nguyen Anh Quynh af416e2ff8 bindings: update newly added ARM groups CALL & INT 2015-05-08 23:59:15 +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
Nguyen Anh Quynh 34502fad7d python: remove the leftover code in the last commit 2015-05-02 11:39:38 +08:00
Nguyen Anh Quynh 91a1cb4b03 arm: correct the alias instruction id for MOVsi instructions. bug reported by @joelpx 2015-05-02 11:38:34 +08:00
learn_more 3e915db782 give reg_name, insn_name, group_name a customizable default instead of returning something else for id 0
remove the check for self._raw.id on reg_name and group_name (in CsInsn, since the to_name functions don't operate on the current instruction)
Add reg_name, insn_name and group_name to Cs.
update test_group_name.py with the new api.
2015-04-28 19:29:51 +02:00
danghvu 60a7f422fd Fix a bug in Cython due to renaming 2015-04-28 13:55:29 +08:00
danghvu 14029d8b37 Fix a bug in Cython due to renaming 2015-04-28 00:19:41 -05:00
Nguyen Anh Quynh 9554a4f318 python: a minor fix for test_customized_mnem.py 2015-04-27 12:56:31 +08:00
Nguyen Anh Quynh 03d1e1f86d python: clean up test_*.py 2015-04-27 11:51:48 +08:00
Nguyen Anh Quynh bbde6d5c63 python: support option CS_OPT_MNEMONIC 2015-04-27 11:34:44 +08:00
Nguyen Anh Quynh 44adb35f6a python: clean test_skipdata.py 2015-04-27 11:12:53 +08:00
Nguyen Anh Quynh 97eba89f3d python: correct a comment of method CsInsn.group_name() 2015-04-26 10:44:34 +08:00
Vincent Bénony d2f47d065f Remove enum for ASRS, LSRS, SUBS and MOVS
These instructions are now disassembled ASR, LSR, SUB and MOV, with the "update_flags" bit set.
2015-04-17 11:42:45 +02:00
Nguyen Anh Quynh cbbbac24c3 Merge branch 'next' of https://github.com/aquynh/capstone into next 2015-04-07 16:06:27 +08:00
Nguyen Anh Quynh c343a917fb python: revert to use distutils rather than setuptools 2015-04-07 16:03:01 +08:00
Hank Leininger 3feaa11cd9 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-07 15:39:05 +08:00
Nguyen Anh Quynh 4504dcdc48 Merge branch 'master' into v3 2015-04-07 13:21:56 +08:00
Hank Leininger 1c0288043c 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-07 13:16:55 +08:00
Nguyen Anh Quynh 2a36c1631b python: fix test_arm.py (indentation on output) 2015-04-07 13:09:16 +08:00
Nguyen Anh Quynh 8fa48fbd8a bindings: update java/ocaml/python bindings after the last change on Arm core 2015-04-07 12:22:51 +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 4544ba1f02 cython: support cs_regs_access() API 2015-04-02 22:54:52 +08: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 a9015396eb python: X86Op.avx_zero_mask should have c_bool type 2015-04-01 01:10:27 +08:00
Nguyen Anh Quynh 076dc6f124 Merge branch 'newapi' into next 2015-03-26 00:40:57 +08:00
Nguyen Anh Quynh 95d4e9fd00 python: fix access info of test_x86.py (CS_AC_READ|CS_AC_WRITE) 2015-03-26 00:27:19 +08:00
Nguyen Anh Quynh 10647aef58 bindings: update java/ocaml/python after the latest changes in the core for the new API 2015-03-25 17:35:59 +08:00
Richo Healey 3c862d5c11 python: Use setuptools if avilable 2015-03-22 23:05:58 -07:00
Nguyen Anh Quynh 88a95535d0 python: simplify setup.py 2015-03-19 16:57:47 +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 e830b75d94 python: properly build the core in Cygwin environment for setup.py 2015-03-19 16:09:38 +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
Nguyen Tan Cong c99436669f -return package name and package version to origin 2015-03-19 00:12:36 +07:00
Nguyen Tan Cong 80ab95d89f *fixbug pip on Cygwin 2015-03-19 00:08:59 +07:00
Mario Vilas 6f72b878d6 Fixed #289 2015-03-18 07:44:15 +07:00
Mario Vilas 0950943392 Fixed #289 2015-03-18 07:43:53 +07:00
Mario Vilas 34831d0bd6 Fixed #289 2015-03-17 15:02:29 +01:00
Nguyen Anh Quynh 85120cce23 bindings: add ARM64_GRP_CALL & ARM64_GRP_RET groups after the related change in the core 2015-03-16 23:53:59 +07:00
Nguyen Anh Quynh 197fe1c14c bindings: add {ARM|ARM6}GRP_PRIVILEGE 2015-03-12 18:18:24 +08:00
Nguyen Anh Quynh cac770a0cb bindings: support QPX mode & QPX alias instructions 2015-03-12 17:03:33 +08:00
Nguyen Anh Quynh 4dd0dcb9d4 add CS_GRP_PRIVILEGE group, and also add X86_GRP_PRIVILEGE group for bunch of X86 privileged instructions 2015-03-09 00:04:45 +08:00
Nguyen Anh Quynh e4ca35d561 x86: delete the fiction instruction X86_INS_VPCOM 2015-03-07 16:05:06 +08:00
Nguyen Anh Quynh 7a94483452 x86: remove another fiction instruction VCMP 2015-03-07 14:37:59 +08:00
Nguyen Anh Quynh e402e021b8 x86: remove unreal instruction VPCMP 2015-03-07 14:33:40 +08:00
Nguyen Anh Quynh 825a228a0f python: make Cython binding support X86's @xop_cc 2015-03-07 13:49:14 +08:00
Nguyen Anh Quynh debaa2eefc bindings: support newly added field @xop_cc in the last commit (Java, Ocaml, Python) 2015-03-07 13:46:21 +08:00
Nguyen Anh Quynh ad42f16b14 mips: remove the confusing mode CS_MODE_MIPSGP64 2015-03-07 00:48:06 +08:00
Nguyen Anh Quynh 54d5071288 x86: update core. also update all the bindings Java, Ocaml & Python 2015-03-06 00:52:49 +08:00
Nguyen Anh Quynh 18336b7039 bindings: update Java, Ocaml & Python bindings after the last Mips update 2015-03-02 18:16:56 +08:00
Nguyen Anh Quynh ff3a29e6ac python: fix Version of PKG-INFO.win 2015-02-28 09:30:15 +08:00
Nguyen Anh Quynh 72d3c4fb81 bindings: change include dir after the patch of @pancake 2015-02-28 08:42:40 +08:00
Nguyen Anh Quynh cd3d186944 bump version to 3.0.2 for next stable release 2015-02-25 12:27:26 +08:00
Nguyen Anh Quynh 764112d144 python: fix a bug in test_arm.py 2015-02-15 09:53:39 +08:00
Nguyen Anh Quynh 540185d186 python: fix a bug in test_arm.py 2015-02-15 09:51:29 +08:00
StalkR 0822c3459f python bindings: rename member struct to _csh to avoid conflict with typedef csh 2015-02-11 22:16:13 +08:00
StalkR 6561c138e0 python bindings: rename member struct to _csh to avoid conflict with typedef csh 2015-02-11 22:15:47 +08:00
Nguyen Anh Quynh d7c0f5dcae python: indentation for README.TXT 2015-02-04 10:35:17 +08:00
Nguyen Anh Quynh f5cc2cea10 python: add instructions for PyPi packages 2015-02-04 10:35:04 +08:00
Nguyen Anh Quynh 9cb73a01fb python: typo in setup.py 2015-02-04 10:34:50 +08:00
Nguyen Anh Quynh a87c0b01ad python: rename Windows package from capstone-win to capstone-windows 2015-02-04 10:34:38 +08:00
Nguyen Anh Quynh 42e8388b61 python: do not include msvcr120.dll because we can static compile it 2015-02-04 10:34:28 +08:00
Nguyen Anh Quynh df5f908a4a python: setup.py builds Windows core with cmake in release mode 2015-02-04 10:34:06 +08:00
Nguyen Anh Quynh 59bc84de1d python: distribute msvcr120.dll for Windows installer 2015-02-04 10:33:55 +08:00
Nguyen Anh Quynh 58a8369067 python: clean prebuilt core in install targets of Makefile 2015-02-04 10:33:43 +08:00
Nguyen Anh Quynh 35ceed7b8f python: fix installer 2015-02-04 10:33:29 +08:00
Nguyen Anh Quynh 0498085a1c python: add README.pypi* 2015-02-04 10:31:54 +08:00
Nguyen Anh Quynh 00eb3dea4f python: setup.py only copies source if prebuilt libs are not existent 2015-02-04 10:31:28 +08:00
Nguyen Anh Quynh e00bb43e25 python: add dummy prebuilt/ dir to keep Windows binaries 2015-02-04 10:31:18 +08:00
Nguyen Anh Quynh 1585d88406 python: make setup.py support pre-built Windows core 2015-02-04 10:31:02 +08:00
Nguyen Anh Quynh e62c6ce467 python: rename README to README.TXT 2015-02-04 10:30:51 +08:00
Nguyen Tan Cong f392901fa5 add prebuilt setup for Windows system 2015-02-04 10:30:36 +08:00
Nguyen Tan Cong 907d9e9b8a copy msvc/headers/ in both linux and win32 system 2015-02-04 10:29:30 +08:00
Nguyen Tan Cong be67c26973 copy msvc/headers/ to src/ to build win32 core library 2015-02-04 10:29:20 +08:00
Nguyen Tan Cong d954dae090 fixbug: can't install on centos & python 2.6 2015-02-04 10:29:07 +08:00
Nguyen Anh Quynh 3fb3b24b03 python: indentation for README.TXT 2015-02-03 23:50:28 +08:00
Nguyen Anh Quynh e9be7ec26c python: add instructions for PyPi packages 2015-02-03 22:41:07 +08:00
Nguyen Anh Quynh ca101281ca python: typo in setup.py 2015-02-03 22:31:19 +08:00
Nguyen Anh Quynh 4892c45204 python: rename Windows package from capstone-win to capstone-windows 2015-02-03 22:30:10 +08:00
Nguyen Anh Quynh 9a672e1dc0 python: do not include msvcr120.dll because we can static compile it 2015-02-03 20:18:05 +08:00
Nguyen Anh Quynh 8aef143f69 python: setup.py builds Windows core with cmake in release mode 2015-02-03 17:45:55 +08:00
Nguyen Anh Quynh c6b1be8b0b python: distribute msvcr120.dll for Windows installer 2015-02-03 16:28:27 +08:00
Nguyen Anh Quynh 6685aa5889 python: clean prebuilt core in install targets of Makefile 2015-02-03 12:08:56 +08:00
Nguyen Anh Quynh a2b60305dc python: fix installer 2015-02-03 11:45:20 +08:00
Nguyen Anh Quynh 064a602b03 python: add README.pypi* 2015-02-03 10:20:30 +08:00
Nguyen Anh Quynh 77bd828465 python: setup.py only copies source if prebuilt libs are not existent 2015-02-03 09:24:14 +08:00
Nguyen Anh Quynh eeef2d0b7b python: add dummy prebuilt/ dir to keep Windows binaries 2015-02-03 09:11:32 +08:00
Nguyen Anh Quynh 0d55bde98a python: make setup.py support pre-built Windows core 2015-02-03 09:05:57 +08:00
Nguyen Anh Quynh 8b583e1787 Merge branch 'master' of https://github.com/tacoxnguyen/capstone into v3c 2015-02-03 08:47:11 +08:00
Nguyen Anh Quynh ba96587b36 python: rename README to README.TXT 2015-02-03 08:45:44 +08:00
Nguyen Tan Cong 9aeff29575 Merge branch 'master' of https://github.com/tacoxnguyen/capstone 2015-02-03 00:18:15 +07:00
Nguyen Tan Cong e504b81054 add prebuilt setup for Windows system 2015-02-03 00:16:51 +07:00
Nguyen Tan Cong bc3ffd4c64 copy msvc/headers/ in both linux and win32 system 2015-02-02 22:32:46 +07:00
Nguyen Tan Cong ca8298ca18 copy msvc/headers/ to src/ to build win32 core library 2015-02-02 22:16:47 +07:00
Nguyen Tan Cong 33f75a2319 fixbug: can't install on centos & python 2.6 2015-02-02 12:08:45 +07:00
Nguyen Anh Quynh 692b02ffd0 python: change package version to 3.0.1 2015-01-30 14:46:25 +08:00
Nguyen Anh Quynh 18e41b8221 python: add LICENSE & PKG-INFO for Python module 2015-01-30 14:45:58 +08:00
Nguyen Anh Quynh 78746a4235 python: add LICENSE & PKG-INFO for Python module 2015-01-30 14:45:33 +08:00
Nguyen Anh Quynh bf54d4b1a8 python: add targets 'sdist' & 'sdist3' to Makefile 2015-01-30 14:20:09 +08:00
Nguyen Anh Quynh ca3999f9e6 python: add targets 'sdist' & 'sdist3' to Makefile 2015-01-30 14:20:04 +08:00
Nguyen Anh Quynh e49f1a5c23 python: bump package version to 3.0.1 2015-01-30 14:17:03 +08:00
Nguyen Anh Quynh 5af0ceda09 python: delete src/ in Makefile 2015-01-30 13:31:21 +08:00
Nguyen Anh Quynh 1798adaa6d python: tolerance of the build process in setup.py 2015-01-30 13:31:10 +08:00
Nguyen Anh Quynh 8113cda2f9 python: delete src/ in Makefile 2015-01-30 13:27:25 +08:00
Nguyen Anh Quynh 1685df6f88 python: tolerance of the build process in setup.py 2015-01-30 13:25:16 +08:00
Nguyen Anh Quynh 5115d6eebe python: installer now can compile Window core from source with CMake+MSVC 2015-01-30 11:55:16 +08:00
Nguyen Anh Quynh 55e27c125d python: installer now can compile Window core from source with CMake+MSVC 2015-01-30 11:54:44 +08:00
Nguyen Anh Quynh 36e8312646 python: rename variable 'result' to 'src' 2015-01-30 11:28:51 +08:00
Nguyen Anh Quynh bcf684dbad python: rename variable 'result' to 'src' 2015-01-30 11:16:48 +08:00
Nguyen Anh Quynh 84fc7401fe python: port some old fixes from setup.py on pypi branch to v3 branch 2015-01-30 10:52:17 +08:00
Nguyen Anh Quynh ce10b01ad5 python: fix setup.py, so we only copy the core with sdist, thus normal build/compile process does not build the core 2015-01-30 10:49:01 +08:00
Nguyen Anh Quynh 19af3ec9e0 Makefile: rename BUILD_CORE_ONLY to CAPSTONE_BUILD_CORE_ONLY for consistency 2015-01-30 10:48:52 +08:00
Nguyen Anh Quynh 08a21a6558 python: fix README (libcapstone.dll -> capstone.dll) 2015-01-30 10:48:42 +08:00
Nguyen Tan Cong 1b8cc8d2af reverse -b option in Makefile; parse parameters with parse_known_args to ignore error when passing extra options; fixbug python3: use print statement 2015-01-30 10:48:29 +08:00
Nguyen Tan Cong b54c60c063 Edit Makefile to appropriate with new setup.py 2015-01-30 10:48:12 +08:00
Nguyen Tan Cong 60dcfa0948 add --do-not-build-core to setup.py to prevent it install core library 2015-01-30 10:47:46 +08:00
Nguyen Tan Cong 8b839a2af4 edit script to create Pypi package 2015-01-30 10:47:36 +08:00
Nguyen Anh Quynh af19b53119 python: make setup.py support other *nix systems (i.e non-Windows) 2015-01-30 10:45:51 +08:00
Nguyen Anh Quynh 53e92938ce python: build the core with make.sh for all non-Windows system 2015-01-30 10:45:00 +08:00
Nguyen Tan Cong ac0cb810f4 python: prevent Windows system copying *nix core library to Python library directory 2015-01-30 10:43:18 +08:00
Nguyen Tan Cong 3e605a00ac python: fix another conflict when merging pypi to v3 2015-01-30 10:40:05 +08:00
Nguyen Anh Quynh 8d4a78cd83 python: setup.py should not install the core, and no need to put BUILD_CORE_ONLY into config.mk 2015-01-30 10:38:40 +08:00
Nguyen Tan Cong 3d6e56a66f python: fix conflict when merging pypi branch to v3 branch 2015-01-30 10:37:58 +08:00
Nguyen Tan Cong 30f08588ef fixbug: wrong library extension on Mac OS X 2015-01-30 10:36:25 +08:00
Michael Cohen f051e8fd8e python: another conflict on API version between pypi & v3 branch 2015-01-30 10:34:01 +08:00
Michael Cohen aac18de793 python: fix a conflict when cherry-pick code from old pypi branch 2015-01-30 10:32:24 +08:00
Michael Cohen 18ee47b366 Updated setup.py so it can build the capstone library by itself.
This is a requirement for an automated install via pip. After this change it
should be possible to depend on captone in pip and have it built automatically.
2015-01-30 10:25:09 +08:00
Nguyen Anh Quynh 6b9b032081 python: fix setup.py, so we only copy the core with sdist, thus normal build/compile process does not build the core 2015-01-30 10:21:09 +08:00
Nguyen Anh Quynh 794a706b3e Makefile: rename BUILD_CORE_ONLY to CAPSTONE_BUILD_CORE_ONLY for consistency 2015-01-30 09:07:51 +08:00