File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 1
1
import os
2
+ import subprocess
2
3
3
4
from .settings import BASE
4
5
63
64
64
65
PIPELINE_CSS_COMPRESSOR = 'pipeline.compressors.yui.YUICompressor'
65
66
PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.yui.YUICompressor'
67
+
68
+ # Homebrew installs yuicompressor as "yuicompressor", but Apt installs it as
69
+ # "yui-compressor". FLAIL.
70
+ for yuicompressor in ['yuicompressor' , 'yui-compressor' ]:
71
+ if subprocess .call (['which' , yuicompressor ], stdout = subprocess .PIPE ) == 0 :
72
+ PIPELINE_YUI_BINARY = yuicompressor
73
+ break
74
+ else :
75
+ import warnings
76
+ warnings .warn ("No yuicompressor found; this means collectstatic won't work." )
Original file line number Diff line number Diff line change 128
128
PIPELINE_CSS , PIPELINE_JS ,
129
129
PIPELINE_COMPILERS ,
130
130
PIPELINE_SASS_BINARY , PIPELINE_SASS_ARGUMENTS ,
131
- PIPELINE_CSS_COMPRESSOR , PIPELINE_JS_COMPRESSOR
131
+ PIPELINE_CSS_COMPRESSOR , PIPELINE_JS_COMPRESSOR ,
132
+ PIPELINE_YUI_BINARY ,
132
133
)
You can’t perform that action at this time.
0 commit comments