nixpkgs/pkgs
aszlig ff15c31c37
python-wrapper: Fix handling __future__ imports.
The bazaar package is still broken even with 5f01cc7, because __future__
imports need to be the first imports before anything else. So this time
I'm going to make the sed expression with explicit branching so we can
properly match all the occasions we want to skip and insert the line
modifying sys.argv[0] only _once_ and leave the command block after
that one substitution. So no ugly swaps between hold and pattern space.

The label which is resonsible for not escaping the command block is "r"
and we jump to it as long as we need to skip something from the start of
the file.

While at it, I'm not only skipping every line with __future__ in it but
also backslashes at the end of the line, so for example:

```python
from __future__ import shiny_feature1, \
                       shiny_feature2, \
                       shiny_feature3
```

... will now be properly skipped as well.

Tested against bazaar and nixops.

Thanks to @edolstra for reporting this.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-07-29 06:40:39 +02:00
..
applications SimpleScreenRecorder 0.2.2 -> 0.3.0 2014-07-29 00:15:53 +02:00
build-support Filter out broken-completely links 2014-07-18 17:42:00 +04:00
data Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
desktops Fix broken license references. 2014-07-28 11:43:20 +02:00
development python-wrapper: Fix handling __future__ imports. 2014-07-29 06:40:39 +02:00
games Partially revert 7a45996 some more. 2014-07-28 20:52:47 +02:00
misc Remove obsolete jackaudio version 1. 2014-07-28 20:32:52 +02:00
os-specific gnu: Fix (evaluation of the) call to forceSystem. 2014-07-28 20:46:32 +02:00
servers Remove obsolete jackaudio version 1. 2014-07-28 20:32:52 +02:00
shells Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
stdenv
test
tools Partially revert 7a45996 some more. 2014-07-28 20:52:47 +02:00
top-level haskell-vty: update to version 5.1.3 2014-07-28 20:32:59 +02:00