Re: Calling GNU/make from a Python Script

2006-10-30 Thread skip
>> os.system("make -C %s" % build_dir) >> OP specified GNU make, so that works fine, but make sure you're not >> going to need to use it with another make before settling on that >> alternative. Frederik's works with more versions of make. Understood. That was the only reason I

Re: Calling GNU/make from a Python Script

2006-10-30 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > Fredrik> build_dir = "path/to/makefile" > > Fredrik> cwd = os.getcwd() # get current directory > Fredrik> try: > Fredrik> os.chdir(build_dir) > Fredrik> os.system("make") > Fredrik> finally: > Fredrik> os.chdir(cwd) > > Or even: > >

Re: Calling GNU/make from a Python Script

2006-10-30 Thread skip
Fredrik> build_dir = "path/to/makefile" Fredrik> cwd = os.getcwd() # get current directory Fredrik> try: Fredrik> os.chdir(build_dir) Fredrik> os.system("make") Fredrik> finally: Fredrik> os.chdir(cwd) Or even: os.system("make -C %s" % build_dir)

Re: Calling GNU/make from a Python Script

2006-10-30 Thread Fredrik Lundh
Efrat Regev wrote: > 1. The script is not in the directory of the makefile, and changing the > locations of either is not an option. Consequently, the makefile fails, > since it can't find the targets/dependencies. build_dir = "path/to/makefile" cwd = os.getcwd() # get current directory try:

Re: Calling GNU/make from a Python Script

2006-10-30 Thread Rob Williscroft
Efrat Regev wrote in news:[EMAIL PROTECTED] in comp.lang.python: >Hello, > >I need to call GNU/make from within a Python script. This raised some > problems: > 1. The script is not in the directory of the makefile, and changing the > locations of either is not an option. Consequently, t

Calling GNU/make from a Python Script

2006-10-30 Thread Efrat Regev
Hello, I need to call GNU/make from within a Python script. This raised some problems: 1. The script is not in the directory of the makefile, and changing the locations of either is not an option. Consequently, the makefile fails, since it can't find the targets/dependencies. 2. After sea