pombreda / arscons

Automatically exported from code.google.com/p/arscons
0 stars 0 forks source link

on windows (py2.7) os.WIFEXITED not defined #26

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
On Windows Python 2.7(not sure about other versions)  does not know about 
os.WIFEXITED  or os.WEXITSTATUS

I tried this patch (bad HACK !!, because it doesn't provide os.WEXITSTATUS):

# around line 61... of
#   kylecgordon-arscons     Arduino Sconstruct, tweaked to work #       with Arduino 
v1.0    Mar 13, 2012
elif platform == 'win32':
    def WIFEXITED(res):
        return res
    os.WIFEXITED = WIFEXITED

It seems to work ... for now.problems....

-SH

Original issue reported on code.google.com by seb.ha...@gmail.com on 21 Mar 2012 at 11:00

GoogleCodeExporter commented 9 years ago
I forgot to mention that I also had to change line (around) 191:
def fnCompressCore(target, source, env):
    # seb windows 
    core_files = filter(lambda x: str(x).startswith('build/core/') or str(x).startswith('build\\core\\'), source)
    for file in core_files:
        # seb windows added 'r'
        run(AVR_BIN_PREFIX+r'ar rcs %s %s'%(target[0], file))

i.e. I added    or str(x).startswith('build\\core\\')
to handle the windows backslashes....

-Sebastian

Original comment by seb.ha...@gmail.com on 21 Mar 2012 at 1:12

GoogleCodeExporter commented 9 years ago
It seems that fnCompressCore was a little bit overdone. or I can't see, what 
the filter was good for. I simply exchanged fnCompressCore by a direct call to 
"avr-ar rcs ..." - Now arscons comes even under WinXP to a successfull end.

Original comment by uraco...@quantentunnel.de on 7 Apr 2012 at 10:23

Attachments: