Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 875874 Details for
Bug 918705
dev-util/pwndbg-20230717: Cannot find Pwndbg virtualenv directory
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch which fixes the problem for me by removing the .venv check.
0001-Use-global-python-packages-instead-of-virtualenv.patch (text/plain), 1.69 KB, created by
Stefan Gloor
on 2023-11-28 19:33:06 UTC
(
hide
)
Description:
Patch which fixes the problem for me by removing the .venv check.
Filename:
MIME Type:
Creator:
Stefan Gloor
Created:
2023-11-28 19:33:06 UTC
Size:
1.69 KB
patch
obsolete
>From 6a351680675123ccc0d8fb192f28f3c654979c92 Mon Sep 17 00:00:00 2001 >From: Stefan Gloor <code@stefan-gloor.ch> >Date: Tue, 28 Nov 2023 20:24:26 +0100 >Subject: [PATCH] Use global python packages instead of virtualenv > >The upstream install script creates a .venv and installs the >dependencies there. This patch allows the normal python packages to be >used. > >Signed-off-by: Stefan Gloor <code@stefan-gloor.ch> >--- > gdbinit.py | 23 ----------------------- > 1 file changed, 23 deletions(-) > >diff --git a/gdbinit.py b/gdbinit.py >index 8bf44d2..f6a80a3 100644 >--- a/gdbinit.py >+++ b/gdbinit.py >@@ -20,29 +20,6 @@ directory, file = path.split(__file__) > directory = path.expanduser(directory) > directory = path.abspath(directory) > >-# Get virtualenv's site-packages path >-venv_path = os.environ.get("PWNDBG_VENV_PATH") >-if not venv_path: >- venv_path = os.path.join(directory, ".venv") >- >-if not os.path.exists(venv_path): >- print(f"Cannot find Pwndbg virtualenv directory: {venv_path}: please re-run setup.sh") >- sys.exit(1) >- >-site_pkgs_path = glob(os.path.join(venv_path, "lib/*/site-packages"))[0] >- >-# add virtualenv's site-packages to sys.path and run .pth files >-site.addsitedir(site_pkgs_path) >- >-# remove existing, system-level site-packages from sys.path >-for site_packages in site.getsitepackages(): >- if site_packages in sys.path: >- sys.path.remove(site_packages) >- >-# Set virtualenv's bin path (needed for utility tools like ropper, pwntools etc) >-bin_path = os.path.join(venv_path, "bin") >-os.environ["PATH"] = bin_path + os.pathsep + os.environ.get("PATH") >- > # Add gdb-pt-dump directory to sys.path so it can be imported > gdbpt = path.join(directory, "gdb-pt-dump") > sys.path.append(directory) >-- >2.41.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 918705
: 875874