Fix extension packaging with the new pipeline changes.
Review Request #8067 — Created March 21, 2016 and submitted — Latest diff uploaded
The new pipeline changes broke any extension-provided .less files that needed to include or reference anything from another module, along with any global variables provided by the app. There were also problems loading static media from installed packages. The arguments to lessc were still being set in the old setting, which Pipeline no longer respects, and it wasn't in a suitable format (it needed to be a list of strings, not a string). This fixes that setting, plus ensures that we don't have broken conflicts between what the app must now provide for normal use and what's needed for packaging. It does this by filtering out app-provided settings, replacing them with ours. It also disables the use of the special Djblets LessCompiler's import script for checking outdated dependencies. This isn't needed during packaging, and in fact fails due to static file storage access control checks. To fix the package static media, we now have specialized versions of the Pipeline CSS/JavaScript template nodes that change the rendering behavior to fall back on outputted (compiled) static media files if the sources are unavailable. This depends on a pending change in Pipeline (https://github.com/jazzband/django-pipeline/pull/552).
Tested against Power Pack, which wasn't working with the new Pipeline
changes due to referencing stylesheets in Review Board. I was able to
successfully compile them without problems.Tested loading Power Pack pages when installed via a package, and
tested when the package was in develop mode. Wiped myhtdocs/static/
tree each time, and verified that the page was loading the appropriate
files. Also verified that if I modified a file (source or output,
depending on which was being used), the changes were picked up when
next reloading the page.Existing unit tests pass.