JonathanSalwan / Triton

Triton is a dynamic binary analysis library. Build your own program analysis tools, automate your reverse engineering, perform software verification or just emulate code.
https://triton-library.github.io
Apache License 2.0
3.4k stars 524 forks source link

Switch to CMake's `Python3` package #1229

Closed mrexodia closed 11 months ago

mrexodia commented 1 year ago

The find_package(PythonInterp) and find_package(PythonLibs) are deprecated and on my system they were returning results from two different python versions installed (interpreter from my PATH and libraries from homebrew's python). This caused me to run into this (very confusing) error: https://github.com/JonathanSalwan/Triton/issues/1145#issuecomment-1206549486

The Python3 package fixed this behaviour and I made sure to keep the interface compatible (PYTHON_XXX variables work the same). The default behaviour (you just run cmake -B build) now also finds the python the user would expect (the one that's currently in the PATH) and things are working properly from a virtual environment. Here is a requirements.txt to test:

git+https://github.com/mrexodia/Triton@8ee04d36ff732f0a89dfe7609806ad45addc0e45#egg=triton-library
cnheitman commented 11 months ago

Hi @mrexodia, what's the status of this PR? Can I attempt to rebase and merge it?

mrexodia commented 11 months ago

From my side this is finished and working. Just for unclear reasons that I cannot reproduce the CI fails.

cnheitman commented 11 months ago

Great, thanks for the update @mrexodia. I'll test it on my side and check the CI fails.