"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > I have a Makefile target that uses a python script, like: > > %.abc: %.def > python myscript.py > > The problem is that myscript.py and some modules that myscript.py > imports are not in the current directory, but in another place in the > filesystem, say, /path/to/stuff. If this was a tcsh script, I would > just do: > > setenv PYTHONPATH /path/to/stuff > python myscript.py
And that still wouldn't work, because you said that myscript.py wasn't in the current directory either. > but this cannot be done from a Makefile. So what do I do? Is there > another way to set the PYTHONPATH? Like giving an option to "python" > itself? Or? No, you can't. You have to tweak the makefile. Try: %.abc: %.def (cd /path/to/myscripts/dir; python myscript.py) N.B. - this probably depends on both the system and the make you're using. <mike -- Mike Meyer <[EMAIL PROTECTED]> http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list