[Python-modules-team] Bug#620551: any resolution?

Jakub Wilk jwilk at debian.org
Tue Jan 22 17:55:43 UTC 2013


* Yaroslav Halchenko <debian at onerussian.com>, 2013-01-22, 12:28:
>>One simple solution would be to run the script under the symlink path 
>>/usr/lib/pymodules/python2.6/ppworker.py.
>>Then /usr/lib/pymodules/python2.6/ would be added (again) to sys.path, 
>>which is harmless.
>
>FWIW that would not help apparently since
>
>pp already does that:
>
>DEBUG4:  ['/usr/bin/python', '-u', '/usr/lib/pymodules/python2.7/ppworker.py', '2>/dev/null']

pp should call this instead:

python -m ppworker

(This adds cwd to sys.path, so a chdiring to / first might be needed.)

>--- a/ppworker.py
>+++ b/ppworker.py
>@@ -109,7 +109,17 @@ class _WorkerProcess(object):
>
> if __name__ == "__main__":
>         # add the directory with ppworker.py to the path
>-        sys.path.append(os.path.dirname(__file__))

Removing this line would be still needed.

-- 
Jakub Wilk



More information about the Python-modules-team mailing list