From 5bd575410920f208c806c76a39c0d973d52e117a Mon Sep 17 00:00:00 2001 From: Jordan Wiens Date: Tue, 9 Apr 2019 22:54:24 -0400 Subject: add py2 and py3 folders when installing to the python path for the new UI plugin APIs --- scripts/install_api.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts/install_api.py') diff --git a/scripts/install_api.py b/scripts/install_api.py index 0ffd04ab..4f34a272 100644 --- a/scripts/install_api.py +++ b/scripts/install_api.py @@ -96,6 +96,9 @@ else: sys.exit(1) binaryninja_pth_path = os.path.join(install_path, 'binaryninja.pth') -open(binaryninja_pth_path, 'wb').write(api_path.encode('charmap')) +with open(binaryninja_pth_path, 'wb') as pth_file: + pth_file.write((api_path+"\n").encode('charmap')) + pth_file.write((api_path+"2\n").encode('charmap')) #support for python2 QT bindings + pth_file.write((api_path+"3\n").encode('charmap')) #support for python3 QT bindings print("Binary Ninja API installed using {}".format(binaryninja_pth_path)) -- cgit v1.3.1