Commit df1b9dd9 by Timothée Peignier

import some modules later to be able to run on GAE

parent cf113963
from __future__ import unicode_literals
import multiprocessing
import os
import subprocess
from concurrent import futures
from django.contrib.staticfiles import finders
from django.core.files.base import ContentFile
......@@ -26,6 +22,8 @@ class Compiler(object):
return [to_class(compiler) for compiler in settings.PIPELINE_COMPILERS]
def compile(self, paths, force=False):
import multiprocessing
from concurrent import futures
def _compile(input_path):
for compiler in self.compilers:
compiler = compiler(verbose=self.verbose, storage=self.storage)
......@@ -83,6 +81,7 @@ class CompilerBase(object):
class SubProcessCompiler(CompilerBase):
def execute_command(self, command, content=None, cwd=None):
import subprocess
pipe = subprocess.Popen(command, shell=True, cwd=cwd,
stdout=subprocess.PIPE, stdin=subprocess.PIPE,
stderr=subprocess.PIPE)
......
......@@ -4,7 +4,6 @@ import base64
import os
import posixpath
import re
import subprocess
from itertools import takewhile
......@@ -227,6 +226,7 @@ class CompressorBase(object):
class SubProcessCompressor(CompressorBase):
def execute_command(self, command, content):
import subprocess
pipe = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE,
stdin=subprocess.PIPE, stderr=subprocess.PIPE)
if content:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment