Re: [Scons-dev] Fwd: [GSoC Mentors Announce] Now Accepting Applications for Mentoring Organizations for GSoC 2014
What I did was a bit more advance, it adds coloring to windows as well, command line support to control coloring, detection of redirection, logging support, and other stuff we found in the practice. But it does require like your solution to the remapping of the stderr or and stdin. I only suggest it as it does add value to the system as a whole. Jason From: scons-dev-boun...@scons.org [mailto:scons-dev-boun...@scons.org] On Behalf Of Alexandre Feblot Sent: Thursday, February 13, 2014 11:14 AM To: SCons developer list Subject: Re: [Scons-dev] Fwd: [GSoC Mentors Announce] Now Accepting Applications for Mentoring Organizations for GSoC 2014 Not sure exactly about what you fixed, but as you speak about coloring, I wanted to share the colorizer tool I am using. Compared to what was proposed in the wiki, it allows to colorize everything in stdout and/or stderr, being printed either by scons itself or by external commands spawned by scons. In order to do this, indeed, I had to overwrite the spawn method. Works only on unix, I used basic terminal color codes. import sys import os import re import select import subprocess import platform c_underline =\033[04m c_blink =\033[05m c_norm =\033[00m # Normal c_black= \033[30m c_red = \033[31m c_green= \033[32m c_yellow = \033[33m c_blue = \033[34m c_purple = \033[35m c_cyan = \033[36m c_white= \033[37m # Bold cb_black= \033[1;30m cb_red = \033[1;31m cb_green= \033[1;32m cb_yellow = \033[1;33m cb_blue = \033[1;34m cb_purple = \033[1;35m cb_cyan = \033[1;36m cb_white= \033[1;37m # BackGround cback_blue = \033[1;44m cback_white= \033[1;47m cback_black= \033[1;45m #-- # regexps and what they will be replaced with #-- colorPatterns = [ (re.compile(r'(.*: [Ww]arning[:,].*)'), r'%s[Warning] %s\1%s' % (cb_red, cb_yellow, c_norm)), (re.compile(r'(.*: [Ee]rror[:,].*)') , r'%s[Error] \1%s' % (cb_red, c_norm)), (re.compile(r'\[(CC|CXX|UIC|MOC|Q2K|RCC|RAN|LNK)\](.*?)([^/]+)$') , r'%s[\1]%s\2%s\3%s' % (c_blue, c_purple, cb_purple, c_norm)), ] #-- # Colorize a line according to defined patterns #-- def colorize(line): for regexp, replacement in colorPatterns: line = regexp.sub(replacement, line) return line; #-- # Allows to hijack default stdout and stderr to colorize them #-- class Colorizer(object): def __init__(self, redirected): self.buf = '' self.redirected = redirected def isatty(self): return self.redirected.isatty() def write(self, msg): if self.buf: msg = self.buf + msg self.buf = '' line, sep, msg = msg.partition('\n') while sep: self.redirected.write(colorize(line)+'\n') line, sep, msg = msg.partition('\n') if line: self.buf = line def __del__(self): if self.buf: self.redirected.write(colorize(self.buf)) #-- # Asynchroneously stream subprocess stdout/stderr to our own stdout/stderr #-- def colorizeSpawn(shell, escape, cmd, args, env): proc = subprocess.Popen(' '.join(args), stderr=subprocess.PIPE, stdout=subprocess.PIPE, shell=True, env=env ) monitoredStreams = [proc.stdout, proc.stderr] while monitoredStreams: rsig, wsig, xsig = select.select(monitoredStreams, [], []) if proc.stdout in rsig: data = os.read(proc.stdout.fileno(), 1024) if data: sys.stdout.write(data) else: proc.stdout.close() monitoredStreams.remove(proc.stdout) if proc.stderr in rsig: data = os.read(proc.stderr.fileno(), 1024) if data: sys.stderr.write(data) else: proc.stderr.close() monitoredStreams.remove(proc.stderr) ret = proc.poll() return ret #-- # Initialize the colorizer #-- def generate(env, **kw): if platform.system() != 'Windows': if type(sys.stdout) == file and sys.stdout.isatty(): env['SPAWN
Re: [Scons-dev] Fwd: [GSoC Mentors Announce] Now Accepting Applications for Mentoring Organizations for GSoC 2014
I think someone documenting properly how you write scanners and cleaning up the existing ones would be really really nice. The existing 'write your own scanner' example doesn't really say anything about how files are scanned, what sort of caching your scanner code should do (it seems to need to do some) and the code suggests that the method for creating and registering a scanner in the documentation is deprecated anyway - Original Message - From: scons-dev@scons.org To: scons-dev@scons.org At: Feb 3 2014 19:05:18 Hi folks; if we want to get a GSoC project this year, now's the time to think about it. Top of my priority list for a GSoC student would be someone to convert everything to python3, finishing what we've started already. Other ideas? -- Gary -- Forwarded message -- From: Carol Smith car...@google.com Date: Mon, Feb 3, 2014 at 2:01 PM Subject: [GSoC Mentors Announce] Now Accepting Applications for Mentoring Organizations for GSoC 2014 To: GSoC Mentors Announce gsoc-mentors-annou...@googlegroups.com Hi all, We're pleased to announce that applications for mentoring organizations for Google Summer of Code 2014 are now being accepted [1]. If you'd like to apply to be a mentoring organization you can do so now via Melange [2]. If you have questions about how to use Melange, please see our User's Guide [3]. Please note that the application process has changed a bit from previous years: to apply you must now create your individual profile and then an organization profile before submitting your application. Please note that the application period [4] closes on 14 February at 19:00 UTC [5]. We will not accept any late applications for any reason. [1] - http://google-opensource.blogspot.com/2014/02/mentoring-organization-applications-now.html [2] - http://www.google-melange.com [3] - http://en.flossmanuals.net/melange/ [4] - http://www.google-melange.com/gsoc/events/google/gsoc2014 [5] - http://goo.gl/bYYgV3 Cheers, Carol -- You received this message because you are subscribed to the Google Groups Google Summer of Code Mentors Announce List group. To unsubscribe from this group and stop receiving emails from it, send an email to gsoc-mentors-announce+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/gsoc-mentors-announce. For more options, visit https://groups.google.com/groups/opt_out. -- Gary 6952892592876002.txt Description: Binary data ___ Scons-dev mailing list Scons-dev@scons.org http://two.pairlist.net/mailman/listinfo/scons-dev
Re: [Scons-dev] Fwd: [GSoC Mentors Announce] Now Accepting Applications for Mentoring Organizations for GSoC 2014
to move the code over to SCons and integrated its usage into SCons. Just a thought. Jason *From:* scons-dev-boun...@scons.org [mailto:scons-dev-boun...@scons.org] *On Behalf Of *Bill Deegan *Sent:* Tuesday, February 11, 2014 5:58 PM *To:* SCons developer list *Subject:* Re: [Scons-dev] Fwd: [GSoC Mentors Announce] Now Accepting Applications for Mentoring Organizations for GSoC 2014 Anatoly, While I agree many of the things in your list would be nice to get done. I'm not sure most of them are a good thing for a GSOC student to attempt. Few students would have the time to ramp up on all the info needed and make some concrete contributions in the time allowed. my 2cents. -Bill On Tue, Feb 11, 2014 at 12:35 PM, anatoly techtonik techto...@gmail.com wrote: On Tue, Feb 11, 2014 at 11:30 PM, anatoly techtonik techto...@gmail.com wrote: On Mon, Feb 3, 2014 at 10:05 PM, Gary Oberbrunner ga...@oberbrunner.com wrote: Hi folks; if we want to get a GSoC project this year, now's the time to think about it. Top of my priority list for a GSoC student would be someone to convert everything to python3, finishing what we've started already. Can of worms. IMHO. Other ideas? Concentrate on visualizing and documenting how SCons works. Cleaning up and opening internals to the public. Enhance test running, bring back slaves. List current workflows and tools discovery, research best practices and see how the tool discovery should be improved. Research and document the problem of compiling C programs. Research and document the problem of compiling C++ programs. Enhance documentation. Add more design touches. Integrate best practices from other projects. Fix async subprocess execution with proper handling of std* streams. Also integrate with https://github.com/facebook/watchman to speed up rebuilds (instead of scanning the whole tree again and again). -- anatoly t. ___ Scons-dev mailing list Scons-dev@scons.org http://two.pairlist.net/mailman/listinfo/scons-dev ___ Scons-dev mailing list Scons-dev@scons.org http://two.pairlist.net/mailman/listinfo/scons-dev ___ Scons-dev mailing list Scons-dev@scons.org http://two.pairlist.net/mailman/listinfo/scons-dev
Re: [Scons-dev] Fwd: [GSoC Mentors Announce] Now Accepting Applications for Mentoring Organizations for GSoC 2014
The deadline for this is getting closer...do we apply? Dirk On 04.02.2014 01:06, Bill Deegan wrote: I like the packaging idea. For buildbot we use pip to install and run the development version, so easy. No need to set environment variables and such. And if users could pip install the package (which doesn't work right now btw), that would be awesome. -Bill On Mon, Feb 3, 2014 at 12:07 PM, Dirk Bächle tshor...@gmx.de mailto:tshor...@gmx.de wrote: On 03.02.2014 20:05, Gary Oberbrunner wrote: Hi folks; if we want to get a GSoC project this year, now's the time to think about it. Top of my priority list for a GSoC student would be someone to convert everything to python3, finishing what we've started already. Other ideas? Looking through the ideas at http://www.scons.org/wiki/GSoC2013Ideas , I'd think that improving the packaging and distributing of SCons would be a worthwhile project too. Dirk ___ Scons-dev mailing list Scons-dev@scons.org mailto:Scons-dev@scons.org http://two.pairlist.net/mailman/listinfo/scons-dev ___ Scons-dev mailing list Scons-dev@scons.org http://two.pairlist.net/mailman/listinfo/scons-dev
Re: [Scons-dev] Fwd: [GSoC Mentors Announce] Now Accepting Applications for Mentoring Organizations for GSoC 2014
On Mon, Feb 3, 2014 at 10:05 PM, Gary Oberbrunner ga...@oberbrunner.com wrote: Hi folks; if we want to get a GSoC project this year, now's the time to think about it. Top of my priority list for a GSoC student would be someone to convert everything to python3, finishing what we've started already. Can of worms. IMHO. Other ideas? Concentrate on visualizing and documenting how SCons works. Cleaning up and opening internals to the public. Enhance test running, bring back slaves. List current workflows and tools discovery, research best practices and see how the tool discovery should be improved. Research and document the problem of compiling C programs. Research and document the problem of compiling C++ programs. Enhance documentation. Add more design touches. Integrate best practices from other projects. Fix async subprocess execution with proper handling of std* streams. ___ Scons-dev mailing list Scons-dev@scons.org http://two.pairlist.net/mailman/listinfo/scons-dev
Re: [Scons-dev] Fwd: [GSoC Mentors Announce] Now Accepting Applications for Mentoring Organizations for GSoC 2014
Anatoly, While I agree many of the things in your list would be nice to get done. I'm not sure most of them are a good thing for a GSOC student to attempt. Few students would have the time to ramp up on all the info needed and make some concrete contributions in the time allowed. my 2cents. -Bill On Tue, Feb 11, 2014 at 12:35 PM, anatoly techtonik techto...@gmail.comwrote: On Tue, Feb 11, 2014 at 11:30 PM, anatoly techtonik techto...@gmail.com wrote: On Mon, Feb 3, 2014 at 10:05 PM, Gary Oberbrunner ga...@oberbrunner.com wrote: Hi folks; if we want to get a GSoC project this year, now's the time to think about it. Top of my priority list for a GSoC student would be someone to convert everything to python3, finishing what we've started already. Can of worms. IMHO. Other ideas? Concentrate on visualizing and documenting how SCons works. Cleaning up and opening internals to the public. Enhance test running, bring back slaves. List current workflows and tools discovery, research best practices and see how the tool discovery should be improved. Research and document the problem of compiling C programs. Research and document the problem of compiling C++ programs. Enhance documentation. Add more design touches. Integrate best practices from other projects. Fix async subprocess execution with proper handling of std* streams. Also integrate with https://github.com/facebook/watchman to speed up rebuilds (instead of scanning the whole tree again and again). -- anatoly t. ___ Scons-dev mailing list Scons-dev@scons.org http://two.pairlist.net/mailman/listinfo/scons-dev ___ Scons-dev mailing list Scons-dev@scons.org http://two.pairlist.net/mailman/listinfo/scons-dev
Re: [Scons-dev] Fwd: [GSoC Mentors Announce] Now Accepting Applications for Mentoring Organizations for GSoC 2014
On 03.02.2014 20:05, Gary Oberbrunner wrote: Hi folks; if we want to get a GSoC project this year, now's the time to think about it. Top of my priority list for a GSoC student would be someone to convert everything to python3, finishing what we've started already. Other ideas? Looking through the ideas at http://www.scons.org/wiki/GSoC2013Ideas , I'd think that improving the packaging and distributing of SCons would be a worthwhile project too. Dirk ___ Scons-dev mailing list Scons-dev@scons.org http://two.pairlist.net/mailman/listinfo/scons-dev
Re: [Scons-dev] Fwd: [GSoC Mentors Announce] Now Accepting Applications for Mentoring Organizations for GSoC 2014
I like the packaging idea. For buildbot we use pip to install and run the development version, so easy. No need to set environment variables and such. And if users could pip install the package (which doesn't work right now btw), that would be awesome. -Bill On Mon, Feb 3, 2014 at 12:07 PM, Dirk Bächle tshor...@gmx.de wrote: On 03.02.2014 20:05, Gary Oberbrunner wrote: Hi folks; if we want to get a GSoC project this year, now's the time to think about it. Top of my priority list for a GSoC student would be someone to convert everything to python3, finishing what we've started already. Other ideas? Looking through the ideas at http://www.scons.org/wiki/GSoC2013Ideas , I'd think that improving the packaging and distributing of SCons would be a worthwhile project too. Dirk ___ Scons-dev mailing list Scons-dev@scons.org http://two.pairlist.net/mailman/listinfo/scons-dev ___ Scons-dev mailing list Scons-dev@scons.org http://two.pairlist.net/mailman/listinfo/scons-dev