Commit 6218e725 by Timothée Peignier

Merge branch 'master' into pipeline-next

Conflicts:
	pipeline/compressors/__init__.py
parents a3f94e59 c07721a2
......@@ -51,7 +51,7 @@ copyright = u'2011-2012, Timothée Peignier'
# The short X.Y version.
version = '1.2'
# The full version, including alpha/beta/rc tags.
release = '1.2.20'
release = '1.2.21'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
......@@ -29,8 +29,9 @@ Installation
Recommendations
===============
By default Pipeline uses YUI Compressor to compress CSS and JS.
YUI Compressor is an excellent stand-alone application for dealing with JS and CSS-files.
YUI Compressor can be downloaded from: http://developer.yahoo.com/yui/compressor/.
Pipeline's default CSS and JS compressor is the YUI compressor, which uses yuglify.
yuglify wraps UglifyJS and cssmin, applying the default YUI configurations to them.
It can be downloaded from: https://github.com/yui/yuglify/.
If you do not install yuglify, make sure to disable the compressor in your settings.
If you do not install YUI Compressor, make sure to disable the compressor in your settings.
......@@ -22,11 +22,20 @@ Pipeline is providing a storage for `staticfiles app <https://docs.djangoproject
to use it configure ``STATICFILES_STORAGE`` like so ::
STATICFILES_STORAGE = 'pipeline.storage.PipelineStorage'
And if you want versioning use ::
STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
There is also non-packing storage available, that allows you to run ``collectstatic`` command
without packaging your assets. Useful for production when you don't want to run compressor or compilers ::
STATICFILES_STORAGE = 'pipeline.storage.NonPackagingPipelineStorage'
Also available if you want versioning ::
STATICFILES_STORAGE = 'pipeline.storage.NonPackagingPipelineCachedStorage'
Pipeline is also providing a storage that play nicely with staticfiles app
particularly for development : ::
......@@ -43,11 +52,11 @@ You can also use your own custom storage, for example, if you want to use S3 for
Your storage only need to inherit from ``PipelineMixin`` and/or ``CachedFilesMixin`` : ::
from staticfiles.storage import CachedFilesMixin
from pipeline.storage import PipelineMixin
from storages.backends.s3boto import S3BotoStorage
class S3PipelineStorage(PipelineMixin, CachedFilesMixin, S3BotoStorage):
pass
......@@ -13,8 +13,6 @@ class StylusCompiler(SubProcessCompiler):
return filename.endswith('.styl')
def compile_file(self, infile, outfile, outdated=False, force=False):
if not outdated and not force:
return # File doesn't need to be recompiled
command = "%s %s < %s > %s" % (
settings.PIPELINE_STYLUS_BINARY,
settings.PIPELINE_STYLUS_ARGUMENTS,
......
......@@ -233,7 +233,12 @@ class SubProcessCompressor(CompressorBase):
def execute_command(self, command, content):
pipe = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE,
stdin=subprocess.PIPE, stderr=subprocess.PIPE)
pipe.stdin.write(smart_bytes(content))
try:
pipe.stdin.write(smart_bytes(content))
except IOError, e:
message = "Unable to pipe content to command: %s" % command
raise CompressorError(message, e)
pipe.stdin.close()
compressed_content = pipe.stdout.read()
......
......@@ -4,14 +4,14 @@ from setuptools import setup, find_packages
setup(
name='django-pipeline',
version='1.2.20',
version='1.2.21',
description='Pipeline is an asset packaging library for Django.',
long_description=open('README.rst').read() + '\n\n' +
open('HISTORY.rst').read(),
author='Timothée Peignier',
author_email='timothee.peignier@tryphon.org',
url='https://github.com/cyberdelia/django-pipeline',
license=open('LICENSE').read(),
license='MIT',
packages=find_packages(),
zip_safe=False,
include_package_data=True,
......
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