Merge pull request #325882 from Mrmaxmeier/python-capstone-python312
python312Packages.capstone: enable, add distutils patch
This commit is contained in:
@@ -4,19 +4,24 @@
|
||||
capstone,
|
||||
stdenv,
|
||||
setuptools,
|
||||
pythonAtLeast,
|
||||
fetchpatch,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "capstone";
|
||||
version = lib.getVersion capstone;
|
||||
format = "setuptools";
|
||||
|
||||
# distutils usage
|
||||
disabled = pythonAtLeast "3.12";
|
||||
|
||||
src = capstone.src;
|
||||
sourceRoot = "${src.name}/bindings/python";
|
||||
patches = [
|
||||
# Drop distutils in python binding (PR 2271)
|
||||
(fetchpatch {
|
||||
name = "drop-distutils-in-python-binding.patch";
|
||||
url = "https://github.com/capstone-engine/capstone/commit/d63211e3acb64fceb8b1c4a0d804b4b027f4ef71.patch";
|
||||
hash = "sha256-zUGeFmm3xH5dzfPJE8nnHwqwFBrsZ7w8LBJAy20/3RI=";
|
||||
stripLen = 2;
|
||||
})
|
||||
];
|
||||
|
||||
# libcapstone.a is not built with BUILD_SHARED_LIBS. For some reason setup.py
|
||||
# checks if it exists but it is not really needed. Most likely a bug in setup.py.
|
||||
|
||||
Reference in New Issue
Block a user