miracle2k/webassets — pull request #230 by jaraco (2013-03-31 19:27:34+00:00)
Title: Support multiple arguments for less binary

In attempting to invoke webassets on my Windows system, I ran into the following dilemma: node/npm installs the less binary as 'node_modules/bin/lessc' (with no extension). Windows doesn't support invoking scripts based on hashbang. Therefore, to invoke less, I must invoke node directly (i.e. `node node_modules/bin/lessc`). However, webassets doesn't allow for this form of invocation. Thus, when I try to run webassets, it's never able to find the lessc binary (regardless what values I pass for LESS_BIN).

This patch changes that. It creates a new classmethod in ExternalTool to resolve a string to a series of arguments suitable for passing to subprocess functions. I've included some doctests for clarity, but the method essentially just invokes shlex.split. After installing this patch, I'm able to pass a more complex binary such as:

```
environment.config['less_bin'] = 'node node_modules/less/bin/lessc'
```

I believe this approach is sound and backward-compatible. Please consider pulling it in and expanding its usage to the other ExternalTools.