Skip to content

Commit f230a67

Browse files
committed
make 'ginstall list' look at the system site if the user site is disabled
1 parent 38a2cb2 commit f230a67

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

graalpython/lib-graalpython/modules/ginstall.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,13 @@ def main(argv):
513513
args = parser.parse_args(argv)
514514

515515
if args.command == "list":
516-
user_site = site.getusersitepackages()
516+
if site.ENABLE_USER_SITE:
517+
user_site = site.getusersitepackages()
518+
else:
519+
for s in site.getsitepackages():
520+
if s.endswith("site-packages"):
521+
user_site = s
522+
break
517523
print("Installed packages:")
518524
for p in sys.path:
519525
if p.startswith(user_site):

0 commit comments

Comments
 (0)