Commit graph

68 commits

Author SHA1 Message Date
Audrey Dutcher
3eed64c219 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:12:46 +08:00
Nguyen Anh Quynh
9e6605b60f python: cleanup 2018-01-15 13:42:00 +08:00
tdube
85b268c31b python: fix merge confliction of #1073 2018-01-15 13:34:13 +08:00
Andrew Dutcher
9f78ef2f70 Add ability to copy prebuilt libraries from prebuilt directory during python build 2017-03-05 06:08:36 +08:00
Nguyen Anh Quynh
9edf92cccd Python: Automatically conform to PEP440 for version numbers. ported from Unicorn Python binding 2017-02-01 13:23:15 +08:00
Nguyen Anh Quynh
003f50ee2d python: version 4.0.0 2016-11-04 23:55:20 +08:00
Andrew Dutcher
43585e5ef0 On this branch, dylib and so files are versioned 2016-10-31 10:54:58 -07:00
Andrew Dutcher
106d241cba Python setup: Clean up some merge failures, adapt for changes on next branch 2016-10-26 23:15:42 -07:00
Andrew Dutcher
8c132fb0e2 Python: remove special case for cygwin build 2016-10-25 21:49:58 -07:00
Andrew Dutcher
f4aed6025f Python: Make cython work with extreme prejudice 2016-10-25 21:49:58 -07:00
Andrew Dutcher
82928447e7 Python: Clean up the capstone-windows stuff with extreme prejudice 2016-10-25 21:48:41 -07:00
Andrew Dutcher
d8111c1dc9 Python: make setup work as expected 2016-10-25 21:48:18 -07:00
Benno Fünfstück
e199eb9cfe 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
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
Nguyen Anh Quynh
cc7434c57e python: do not copy msvc/headers directory in setup.py 2015-07-15 17:38:12 +08: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
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
c343a917fb python: revert to use distutils rather than setuptools 2015-04-07 16:03:01 +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 Tan Cong
e830b75d94 python: properly build the core in Cygwin environment for setup.py 2015-03-19 16:09:38 +08:00
Mario Vilas
0950943392 Fixed #289 2015-03-18 07:43:53 +07: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
35ceed7b8f python: fix installer 2015-02-04 10:33:29 +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
1585d88406 python: make setup.py support pre-built Windows core 2015-02-04 10:31:02 +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
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
36e8312646 python: rename variable 'result' to 'src' 2015-01-30 11:28:51 +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
Nguyen Tan Cong
dfe827e86a 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 00:25:08 +07:00
Nguyen Tan Cong
7c03cd88ed Edit Makefile to appropriate with new setup.py 2015-01-29 23:21:35 +07:00
Nguyen Tan Cong
17dfd3a1b6 add --do-not-build-core to setup.py to prevent it install core library 2015-01-29 17:06:14 +07:00
Nguyen Tan Cong
1947adb15c edit script to create Pypi package 2015-01-28 17:03:41 +07:00
Nguyen Anh Quynh
fdffe2b048 python: setup.py should use make.sh for non-Windows systems, so all the *nix systems are supported 2015-01-28 13:48:51 +08:00
Nguyen Anh Quynh
decc0d3d02 python: make setup.py support other *nix systems (i.e non-Windows) 2015-01-28 13:46:49 +08:00
Nguyen Tan Cong
36d293a19b prevent Windows system copying *nix core library to Python library directory 2015-01-28 12:33:06 +07:00
Nguyen Tan Cong
d4b00ae3cd config distutils setup to automate copying shared library to Python library directiory; fixbug: prevent make.sh running on windows system 2015-01-28 11:54:02 +07:00
Nguyen Anh Quynh
1de34c1aef python: setup.py should not install the core, and no need to put BUILD_CORE_ONLY into config.mk 2015-01-28 05:05:12 +08:00
Nguyen Tan Cong
39fd154139 Edit setup.py to build python binding with make.sh 2015-01-28 00:35:44 +07:00
Nguyen Tan Cong
ead10b7a60 fixbug: wrong library extension on Mac OS X 2015-01-27 11:25:33 +07:00
Michael Cohen
b9d3f1b833 Fix the extesion built on osx. 2015-01-26 18:03:14 +01:00