import platform
import subprocess
import sys

def _execute(*args, **kwargs):
    result = subprocess.call(*args, **kwargs)
    if result != 0:
        sys.exit(result)

if __name__ == '__main__':
    python_version = platform.python_version()

    deps = [
        "execnet",
        "Jinja2",
        "nose",
    ]

    if python_version < "2.6":
        deps.extend([
            "ssl",
            "multiprocessing",
            "pyzmq==2.1.11",
            "sqlalchemy",
            "simplejson",
        ])
    else:
        deps.append("sqlalchemy")
        deps.append("pyzmq")
    if python_version < "2.7":
        deps.append("unittest2")
    print("Setting up dependencies...")
    _execute("pip install %s" % " ".join(deps), shell=True)

import platform
import subprocess
import sys

def _execute(*args, **kwargs):
    result = subprocess.call(*args, **kwargs)
    if result != 0:
        sys.exit(result)

if __name__ == '__main__':
    python_version = platform.python_version()

    deps = [
        "execnet",
        "nose",
        "sqlalchemy",
    ]

    if python_version < "2.6":
        deps.extend([
            "ssl",
            "multiprocessing",
            "pyzmq==2.1.11",
            "simplejson",
        ])
    else:
        deps.extend([
            "pyzmq",
        ])

    # Jinja2 is a bit fragmented...
    if python_version < "3.3":
        deps.append("Jinja2==2.6")
    else:
        deps.append("Jinja2")


    if python_version < "2.7":
        deps.append("unittest2")
    print("Setting up dependencies...")
    _execute("pip install %s" % " ".join(deps), shell=True)

Test dependencies: On Python 2.5, require Jinja 2.6
Test dependencies: On Python 2.5, require Jinja 2.6

  import platform
  import subprocess
  import sys
  
  def _execute(*args, **kwargs):
      result = subprocess.call(*args, **kwargs)
      if result != 0:
          sys.exit(result)
  
  if __name__ == '__main__':
      python_version = platform.python_version()
  
      deps = [
          "execnet",
-         "Jinja2",
          "nose",
+         "sqlalchemy",
      ]
  
      if python_version < "2.6":
          deps.extend([
              "ssl",
              "multiprocessing",
              "pyzmq==2.1.11",
-             "sqlalchemy",
              "simplejson",
          ])
      else:
-         deps.append("sqlalchemy")
+         deps.extend([
+             "pyzmq",
+         ])
+ 
+     # Jinja2 is a bit fragmented...
+     if python_version < "3.3":
+         deps.append("Jinja2==2.6")
+     else:
-         deps.append("pyzmq")
+         deps.append("Jinja2")
+ 
+ 
      if python_version < "2.7":
          deps.append("unittest2")
      print("Setting up dependencies...")
      _execute("pip install %s" % " ".join(deps), shell=True)
  
Test dependencies: On Python 2.5, require Jinja 2.6
## Code Before:
import platform
import subprocess
import sys

def _execute(*args, **kwargs):
    result = subprocess.call(*args, **kwargs)
    if result != 0:
        sys.exit(result)

if __name__ == '__main__':
    python_version = platform.python_version()

    deps = [
        "execnet",
        "Jinja2",
        "nose",
    ]

    if python_version < "2.6":
        deps.extend([
            "ssl",
            "multiprocessing",
            "pyzmq==2.1.11",
            "sqlalchemy",
            "simplejson",
        ])
    else:
        deps.append("sqlalchemy")
        deps.append("pyzmq")
    if python_version < "2.7":
        deps.append("unittest2")
    print("Setting up dependencies...")
    _execute("pip install %s" % " ".join(deps), shell=True)

## Instruction:
Test dependencies: On Python 2.5, require Jinja 2.6
## Code After:
import platform
import subprocess
import sys

def _execute(*args, **kwargs):
    result = subprocess.call(*args, **kwargs)
    if result != 0:
        sys.exit(result)

if __name__ == '__main__':
    python_version = platform.python_version()

    deps = [
        "execnet",
        "nose",
        "sqlalchemy",
    ]

    if python_version < "2.6":
        deps.extend([
            "ssl",
            "multiprocessing",
            "pyzmq==2.1.11",
            "simplejson",
        ])
    else:
        deps.extend([
            "pyzmq",
        ])

    # Jinja2 is a bit fragmented...
    if python_version < "3.3":
        deps.append("Jinja2==2.6")
    else:
        deps.append("Jinja2")


    if python_version < "2.7":
        deps.append("unittest2")
    print("Setting up dependencies...")
    _execute("pip install %s" % " ".join(deps), shell=True)
