GNU bug report logs - #10194
24.0.91; Python scripts run by python-load-file cannot use eggs installed in home directory

Previous Next

Package: emacs;

Reported by: Reuben Thomas <rrt <at> sc3d.org>

Date: Fri, 2 Dec 2011 13:41:01 UTC

Severity: normal

Found in version 24.0.91

Done: Fabián Ezequiel Gallina <fabian <at> anue.biz>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 10194 <at> debbugs.gnu.org (full text, mbox):

From: Reuben Thomas <rrt <at> sc3d.org>
To: 10194 <at> debbugs.gnu.org
Subject: Re: bug#10194: Acknowledgement (24.0.91; Python scripts run by
	python-load-file cannot use eggs installed in home directory)
Date: Sat, 3 Dec 2011 00:30:00 +0100
I think I've found the bug: emacs2.py's eimport overwrites sys.path[0]
while loading the given file. sys.path[0] is normally '' (the current
directory), but by default Emacs removes this entry when starting up
Python (python-remove-cwd-from-path), and so instead sys.path[0] is
some non-empty path element, and modules on it cannot be found when
loaded via eimport.

A workaround is to set python-remove-cwd-from-path to nil, but to work
properly, eimport should prepend the file's path to sys.path, thereby
allowing modules to be loaded from the current directory if
python-remove-cwd-from-path is nil, as currently that won't work
either.

-- 
http://rrt.sc3d.org




This bug report was last modified 12 years and 243 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.