Commit graph

65 commits

Author SHA1 Message Date
Audrey Dutcher
aeda70f3cb Add option for inhibiting the core build while installing the python components. Add option for loading the core from a custom path. (#1089) 2018-02-20 21:11:19 +08:00
tdube
cdf523ce12 Update setup.py (#1073)
Check to make sure static library file exists before trying to copy it. Current build options include option to not build a static lib.
2018-01-15 13:30:51 +08:00
Andrew Dutcher
9d3e929ae6 Add ability to copy prebuilt libraries from prebuilt directory during python build 2017-03-04 17:09:07 -08:00
Nguyen Anh Quynh
85c1b4b687 Python: Automatically conform to PEP440 for version numbers. ported from Unicorn Python binding 2017-02-01 13:11:21 +08:00
Nguyen Anh Quynh
665d404b0d python: bump version to 3.0.5 2016-10-26 10:52:53 +08:00
Andrew Dutcher
10a9c3ac86 Python: remove special case for cygwin build 2016-10-21 03:30:53 -07:00
Andrew Dutcher
3a5c10686b Python: Make cython work with extreme prejudice 2016-10-21 03:30:50 -07:00
Andrew Dutcher
90bd230274 Python: Clean up the capstone-windows stuff with extreme prejudice 2016-10-21 03:30:44 -07:00
Andrew Dutcher
7ff79aabc9 Python: make setup work as expected 2016-10-14 05:06:30 -07:00
Benno Fünfstück
23fe9f3662 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
Michael Cohen
8d2642fa6a Support all OSs. 2016-02-11 23:43:22 +01:00
Michael Cohen
7032ff2802 Fix setup.py. 2016-02-11 15:24:17 +01:00
Nguyen Anh Quynh
e710e4fcf4 python: do not copy msvc/headers directory in setup.py 2015-07-15 15:44:42 +08:00
Nguyen Anh Quynh
2bb3933260 Merge branch 'master' into v3 2015-06-22 16:50:35 +08:00
Alex Chernetz
801178bea4 [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
33bf2d11b9 bump version to 3.0.4 2015-06-08 22:29:55 +08:00
neuromancer
6fd804412a 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
697ee40247 python: bump package version to 3.0.3 (setup.py) 2015-05-08 17:06:59 +08:00
Nguyen Anh Quynh
3036ada407 python: simplify setup.py 2015-03-19 16:57:39 +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
Mario Vilas
34831d0bd6 Fixed #289 2015-03-17 15:02:29 +01: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
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
a2b60305dc python: fix installer 2015-02-03 11:45:20 +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
0d55bde98a python: make setup.py support pre-built Windows core 2015-02-03 09:05:57 +08: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
c1f1913fa1 python: bump package version to 3.0.1 2015-01-30 14:17:42 +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
55e27c125d python: installer now can compile Window core from source with CMake+MSVC 2015-01-30 11:54:44 +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 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