diff options
| author | 2013-02-27 09:13:31 -0300 | |
|---|---|---|
| committer | 2013-02-27 09:13:31 -0300 | |
| commit | cb2680529d9447d94546c8c0960f0c4e299af18c (patch) | |
| tree | 335ce0e66c214a120aa51ac78e25afe6585c1a13 /nikola/plugins/command_build.py | |
| parent | 6e0996d54cad4586645fdc59164708e4b4b9dcec (diff) | |
| parent | 878ba1152ebc64a4a2609d23c9e400a6111db642 (diff) | |
Merge tag 'upstream/5.3'
Upstream version 5.3
Diffstat (limited to 'nikola/plugins/command_build.py')
| -rw-r--r-- | nikola/plugins/command_build.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/nikola/plugins/command_build.py b/nikola/plugins/command_build.py index 29d4c9d..8a1de5f 100644 --- a/nikola/plugins/command_build.py +++ b/nikola/plugins/command_build.py @@ -38,8 +38,10 @@ class CommandBuild(Command): """Build the site using doit.""" # FIXME: this is crap, do it right - with tempfile.NamedTemporaryFile(suffix='.py', delete=False) as dodo: - dodo.write(b''' + with tempfile.NamedTemporaryFile(suffix='.py', delete=False) as self.dodo: + self.dodo.write(b''' +import sys +sys.path.insert(0, '.') from doit.reporter import ExecutedOnlyReporter DOIT_CONFIG = { 'reporter': ExecutedOnlyReporter, @@ -53,12 +55,13 @@ SITE = Nikola(**conf.__dict__) def task_render_site(): return SITE.gen_tasks() ''') - dodo.flush() + self.dodo.flush() first = args[0] if args else None if first in ('auto', 'clean', 'forget', 'ignore', 'list', 'run'): cmd = first args = args[1:] else: cmd = 'run' - os.system('doit %s -f %s -d . %s' % (cmd, dodo.name, + os.system('doit %s -f %s -d . %s' % (cmd, self.dodo.name, ''.join(args))) + os.unlink(self.dodo.name) |
