~ubuntu-branches/ubuntu/quantal/enigmail/quantal-security

« back to all changes in this revision

Viewing changes to build/pymake/tests/pycmd.py

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2013-09-13 16:02:15 UTC
  • mfrom: (0.12.16)
  • Revision ID: package-import@ubuntu.com-20130913160215-u3g8nmwa0pdwagwc
Tags: 2:1.5.2-0ubuntu0.12.10.1
* New upstream release v1.5.2 for Thunderbird 24

* Build enigmail using a stripped down Thunderbird 17 build system, as it's
  now quite difficult to build the way we were doing previously, with the
  latest Firefox build system
* Add debian/patches/no_libxpcom.patch - Don't link against libxpcom, as it
  doesn't exist anymore (but exists in the build system)
* Add debian/patches/use_sdk.patch - Use the SDK version of xpt.py and
  friends
* Drop debian/patches/ipc-pipe_rename.diff (not needed anymore)
* Drop debian/patches/makefile_depth.diff (not needed anymore)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
import os, sys, subprocess
2
 
 
3
 
def writetofile(args):
4
 
  with open(args[0], 'w') as f:
5
 
    f.write(' '.join(args[1:]))
6
 
 
7
 
def writeenvtofile(args):
8
 
  with open(args[0], 'w') as f:
9
 
    f.write(os.environ[args[1]])
10
 
 
11
 
def writesubprocessenvtofile(args):
12
 
  with open(args[0], 'w') as f:
13
 
    p = subprocess.Popen([sys.executable, "-c",
14
 
                          "import os; print os.environ['%s']" % args[1]],
15
 
                          stdout=subprocess.PIPE, stderr=subprocess.PIPE)
16
 
    stdout, stderr = p.communicate()
17
 
    assert p.returncode == 0
18
 
    f.write(stdout)
19
 
 
20
 
def convertasplode(arg):
21
 
  try:
22
 
    return int(arg)
23
 
  except:
24
 
    return (None if arg == "None" else arg)
25
 
 
26
 
def asplode(args):
27
 
  arg0 = convertasplode(args[0])
28
 
  sys.exit(arg0)
29
 
 
30
 
def asplode_return(args):
31
 
  arg0 = convertasplode(args[0])
32
 
  return arg0