Commit Graph

138 Commits

Author SHA1 Message Date
Rot127 eb3336373b
V5 - Fix sdist build and add CI job for testing it. (#2623)
* Fix sdist build and add CI job for testing it.

* Temporarily set QEMU version to v8.1.5.
2025-02-07 23:34:56 +08:00
Andrew ea42c2803a
Creating a functional Debian Package for Capstone v5 (#2569) 2024-12-17 13:07:13 +08:00
Rot127 828268c275
[v5] Wheel build fixes: manylinux1, trigger upload on release, Linux AArch64 (#2443)
* Enable verbose twine upload.

* Add step to show downloaded artifacts for debugging.

* Sync with next

* Sync with next.
2024-08-19 16:32:28 +08:00
Rot127 47f93e90b8
[v5] Updates and fixes to the Python wheel builder workflow (#2440) 2024-08-15 20:58:32 +08:00
Kevin Phoenix 1bd2a32f2a
Remove deprecated packaging and cython (#2400)
* Remove deprecated packaging and cython

* Fix some issues after cherry-picking

* Fix CI issues

* Remove test files added for v6

* Also remove test_alpha.py
2024-07-24 14:18:26 +08:00
Peace-Maker 47f3692d4f Normalize rc4 version string
/usr/local/lib/python2.7/dist-packages/setuptools/dist.py:476: UserWarning: Normalizing '5.0.0.rc4' to '5.0.0rc4'
  normalized_version,
2023-06-28 18:31:41 +02:00
kabeor 8784a6ea0a [bindings] Adapt python2 for setup.py 2023-06-18 19:38:22 +08:00
kabeor 5eb935d64e [bindings] fix twine issue when publish 2023-06-18 18:48:07 +08:00
kabeor ef44d9e4a6 [bindings] fix twine issue when publish 2023-06-18 18:44:46 +08:00
John Ott b62e69eb47 Remove outdated ctypes requirement
The library ctypes has shipped with the python standard library since
Python 2.5, however this was still added via the `requires` keyword in
setuptools.setup. This results in a spurious requirement being created
in the .whl METADATA file, causing warnings when packaged via tools like
pex:

```
$ python3 -m pex capstone -o capstone.pex
/Users/ott/.venv/lib/python3.9/site-packages/pex/dist_metadata.py:397: PEXWarning: Ignoring 1 `Requires` field in /Users/ott/.pex/installed_wheels/2a4c7a0d4c87aceed3134ae20997a764af1811fee8e151cf5da90e0462822893/capstone-4.0.2-py3-none-macosx_12_arm64.whl metadata:
1.) Requires: ctypes

You may have issues using the 'capstone' distribution as a result.
More information on this workaround can be found here:
  https://github.com/pantsbuild/pex/issues/1201#issuecomment-791715585
```

Since this requirement is outdated, it can just be removed.
2022-08-24 11:29:48 -07:00
kabeor aba8a06716 replace missing option CMAKE_BUILD_SHARED for python setup.py 2022-02-28 00:01:09 +08:00
Duncan Ogilvie c8172e4c10 Modernize CMake and switch to CMake 3.15 2022-02-25 20:39:30 +01:00
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