Commit Graph

126 Commits

Author SHA1 Message Date
Nguyen Anh Quynh 74136cab65 python: classifier Python3 for setup.py 2020-01-26 13:26:58 +08:00
Benno Fünfstück 6800af85c1 bindings/python: fix install error due to old libname (#1338) 2019-01-11 00:10:25 +08:00
Hugo fbeffa489c Add python_requires and update Trove classifiers (#1251) 2018-10-02 17:45:45 +08:00
Nguyen Anh Quynh afffa5d741 merge next to master 2018-07-20 12:36:50 +08:00
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
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
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
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
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 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 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
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 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
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 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 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 cc7434c57e python: do not copy msvc/headers directory in setup.py 2015-07-15 17:38:12 +08: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
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
Nguyen Anh Quynh 33bf2d11b9 bump version to 3.0.4 2015-06-08 22:29:55 +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
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 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 Anh Quynh 3036ada407 python: simplify setup.py 2015-03-19 16:57:39 +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
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 cd3d186944 bump version to 3.0.2 for next stable release 2015-02-25 12:27:26 +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