Skip to content

Commit

Permalink
Handle inplace build option for numscons.
Browse files Browse the repository at this point in the history
  • Loading branch information
cournape committed Jul 31, 2008
1 parent 04ad372 commit 33e3409
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion numpy/distutils/command/scons.py
Expand Up @@ -238,6 +238,7 @@ class scons(old_build_ext):
user_options = old_build_ext.user_options + \
[('jobs=', None,
"specify number of worker threads when executing scons"),
('inplace', 'i', 'If specified, build in place.'),
('scons-tool-path=', None, 'specify additional path '\
'(absolute) to look for scons tools'),
('silent=', None, 'specify whether scons output should less verbose'\
Expand All @@ -262,6 +263,7 @@ def initialize_options(self):
self.scons_fcompiler = None

self.package_list = None
self.inplace = 0

# Only critical things
self.log_level = 50
Expand Down Expand Up @@ -401,13 +403,15 @@ def run(self):
cmd = [scons_exec, "-f", sconscript, '-I.']
if self.jobs:
cmd.append(" --jobs=%d" % int(self.jobs))
if self.inplace:
cmd.append("inplace=1")
cmd.append('scons_tool_path="%s"' % self.scons_tool_path)
cmd.append('src_dir="%s"' % pdirname(sconscript))
cmd.append('pkg_name="%s"' % pkg_name)
cmd.append('log_level=%s' % self.log_level)
#cmd.append('distutils_libdir=%s' % protect_path(pjoin(self.build_lib,
# pdirname(sconscript))))
cmd.append('distutils_libdir=%s' %
cmd.append('distutils_libdir=%s' %
protect_path(get_distutils_libdir(self, sconscript)))

if not self._bypass_distutils_cc:
Expand Down

0 comments on commit 33e3409

Please sign in to comment.