Skip to content

Commit 9a4b718

Browse files
committed
Add plugin python directory to python modules search path to fix 'gccutils not found' error
1 parent ef48966 commit 9a4b718

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,10 @@ install: $(PLUGIN_DSO) gcc-with-$(PLUGIN_NAME).1.gz
234234
cp -a gccutils $(DESTDIR)$(GCCPLUGINS_DIR)/$(PLUGIN_DIR)
235235
cp -a libcpychecker $(DESTDIR)$(GCCPLUGINS_DIR)/$(PLUGIN_DIR)
236236

237+
# add python dir to python search path
238+
mkdir -p $(shell $(PYTHON) -m site --user-site)
239+
echo "$(DESTDIR)$(GCCPLUGINS_DIR)/$(PLUGIN_DIR)" > $(shell $(PYTHON) -m site --user-site)/gcc-python-plugin.pth
240+
237241
# Create "gcc-with-" support script:
238242
mkdir -p $(DESTDIR)$(bindir)
239243
install -m 755 gcc-with-python $(DESTDIR)/$(bindir)/gcc-with-$(PLUGIN_NAME)

0 commit comments

Comments
 (0)