Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-pipeline
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
django-pipeline
Commits
df1b9dd9
Commit
df1b9dd9
authored
Jun 19, 2013
by
Timothée Peignier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
import some modules later to be able to run on GAE
parent
cf113963
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
pipeline/compilers/__init__.py
+3
-4
pipeline/compressors/__init__.py
+1
-1
No files found.
pipeline/compilers/__init__.py
View file @
df1b9dd9
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
)
...
...
pipeline/compressors/__init__.py
View file @
df1b9dd9
...
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment