Home Download Buy Blog Forum Support

Using scons on mac with Sublime

Using scons on mac with Sublime

Postby Aranir on Sat Oct 06, 2012 10:18 am

Good Day

I try to make sublime work with my custom scons building file but without success.

My scons I have written is:

Code: Select all
Program('monster_program',Glob("*.cpp"))


and my build file is this:

Code: Select all
{
   "cmd": ["scons", "monster_program", "$file"],
   "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
   "working_dir": "${project_path:${folder:${file_path}}}",

   "variants":
   [
      {
         "name": "Clean",
         "cmd": ["scons", "-c"]
      }
   ]
}


But I get the following error:

[Errno 2] No such file or directory
[cmd: [u'scons', u'monster_program', u'']]
[dir: /Users/rogerkueng/myGit/project]
[path: /usr/bin:/bin:/usr/sbin:/sbin]
[Finished]

If I type in the same direcotry in the terminal just:
Code: Select all
scons monster_program


it works without a problem.

What am I missing? any help would be appreciated.
Aranir
 
Posts: 2
Joined: Sun Sep 30, 2012 10:20 am

Re: Using scons on mac with Sublime

Postby Nilium on Sat Oct 06, 2012 7:57 pm

Well, where do you have scons installed and is it in the PATH that Sublime is using? (Note: Sublime and other apps will only get their PATH from whatever is set in /etc/launchd.conf as of 10.8 — ~/.MacOSX is deprecated and your shell scripts have no effect). If it's not in the PATH, you know what you need to do.
Nilium
 
Posts: 52
Joined: Fri May 25, 2012 11:22 pm

Re: Using scons on mac with Sublime

Postby Aranir on Sun Oct 07, 2012 9:07 am

Thank you for your answer.

I tried to correct that by changing my build file to this:

Code: Select all
{
   "cmd": ["scons", "-j2", "debug=1"],
   "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
   "working_dir": "${project_path:${folder:${file_path}}}",
   "path": ["/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/scons-2.2.0/SCons/"],

   "variants":
   [
      {
         "name": "Clean",
         "cmd": ["scons", "-c"]
      }
   ]
}


And this should be where my scons installation is, but I still get the same error. What am I still missing?
Aranir
 
Posts: 2
Joined: Sun Sep 30, 2012 10:20 am


Return to Technical Support

Who is online

Users browsing this forum: Alexa [Bot], Exabot [Bot], Yahoo [Bot] and 27 guests