Exemple #1
0
def check_bakefile():
    'Checks for bakefile on PATH.'

    try:
        run(['bakefile', '--version'])
    except Exception:
        fatal('bakefile is not on PATH: please fix, or download and install from http://www.bakefile.org/download.html')
Exemple #2
0
def check_bakefile():
    'Checks for bakefile on PATH.'

    try:
        run(['bakefile', '--version'])
    except Exception:
        fatal(
            'bakefile is not on PATH: please fix, or download and install from http://www.bakefile.org/download.html'
        )
Exemple #3
0
def check_swig():
    'Checks for the correct version of SWIG.'

    try:
        run(['swig', '-version'], checkret=False)
    except Exception:
        fatal(SWIG_MSG)

    if not 'SWIG_LIB' in os.environ:
        fatal("ERROR: no SWIG_LIB\n"
              "please set SWIG_LIB in your environment to the Lib folder "
              "underneath Swig's installation folder")
Exemple #4
0
def check_swig():
    'Checks for the correct version of SWIG.'

    try:
        run(['swig', '-version'], checkret = False)
    except Exception:
        fatal(SWIG_MSG)

    if not 'SWIG_LIB' in os.environ:
        fatal("ERROR: no SWIG_LIB\n"
              "please set SWIG_LIB in your environment to the Lib folder "
              "underneath Swig's installation folder")
Exemple #5
0
def check_msvc():
    'Ensures that Microsoft Visual Studio 2008 paths are setup correctly.'

    try:
        devenvdir = os.environ['DevEnvDir']
    except KeyError:
        fatal('DevEnvDir environment variable not set -- did you start a Visual Studio 2008 Command Prompt?')

    if '9.0' not in devenvdir:
        fatal('error: not visual studio 2008')

    inform('Microsoft Visual Studio 2008 check: OK')
Exemple #6
0
def check_tools():

    # perl - required for _ssl module
    try:
        run(['perl', '--version'])
    except Exception:
        fatal('Missing perl!\nPlease install ActiveState Perl from '
              'http://www.activestate.com/Products/activeperl/')

    # nasm - required for _ssl module
    try:
        run(['nasmw', '-version'])
    except Exception:
        fatal('Missing NASM.\nPlease place binaries from '
              'http://www.nasm.us/ '
              'on your PATH. (copy nasm.exe to nasmw.exe)')
Exemple #7
0
def check_tools():

    # perl - required for _ssl module
    try:
        run(['perl', '--version'])
    except Exception:
        fatal('Missing perl!\nPlease install ActiveState Perl from '
              'http://www.activestate.com/Products/activeperl/')

    # nasm - required for _ssl module
    try:
        run(['nasmw', '-version'])
    except Exception:
        fatal('Missing NASM.\nPlease place binaries from '
              'http://www.nasm.us/ '
              'on your PATH. (copy nasm.exe to nasmw.exe)')
Exemple #8
0
def test():
    # check that python is there

    print
    print 'using python', PYTHON_EXE
    print 'current working directory is', os.getcwd()
    print

    try:
        run([PYTHON_EXE, '-c', 'import sys; sys.exit(0)'])
    except Exception:
        print_exc()
        fatal('Error building Python executable')

    # check that we can import ssl
    try:
        run([PYTHON_EXE, '-c', 'import socket; socket.ssl; import sys; sys.exit(0)'])
    except Exception:
        fatal('error building SSL module')

    inform('\nPython built successfully!')
Exemple #9
0
def test():
    # check that python is there

    print
    print 'using python', PYTHON_EXE
    print 'current working directory is', os.getcwd()
    print

    try:
        run([PYTHON_EXE, '-c', 'import sys; sys.exit(0)'])
    except Exception:
        print_exc()
        fatal('Error building Python executable')

    # check that we can import ssl
    try:
        run([
            PYTHON_EXE, '-c',
            'import socket; socket.ssl; import sys; sys.exit(0)'
        ])
    except Exception:
        fatal('error building SSL module')

    inform('\nPython built successfully!')
Exemple #10
0
def build_lxml():
    from compiledeps import libxml2_dirname

    libxml2_dir = abspath(libxml2_dirname)
    iconv_dir = abspath(iconv_dirname)

    lxml2_libs = pathjoin(libxml2_dir, 'win32', 'bin.msvc')
    if not isdir(lxml2_libs):
        fatal('could not find libxml2.lib in %s' % lxml2_libs)

    lxml2_inc = pathjoin(libxml2_dir, 'include')
    if not isdir(lxml2_inc):
        fatal('could not find libxml2 includes directory at %s' % lxml2_inc)

    if not isdir(iconv_dir):
        fatal('could not find iconv at %s' % iconv_dir)

    libxslt_dir = abspath(libxslt.dirname)
    if not isdir(libxslt_dir):
        fatal('could not find libxslt at %s' % libxslt_dir)
    libxslt_lib = pathjoin(libxslt_dir, 'win32', 'bin.msvc')

    zlib_dir = abspath('zlib-1.2.3')

    from compiledeps import lxml
    new = not os.path.exists(lxml.dirname)
    with cd(lxml.get()):
        if os.name == 'nt' and new:
            # after pulling a fresh tarball, apply the patch pointed to by lxml_patch.
            run([
                patch_cmd, '--ignore-whitespace', '-p0', '-i',
                '../%s' % lxml_patch
            ])
        dpy([
            'setup.py', 'build_ext', '-I' + os.pathsep.join(
                (lxml2_inc, libxslt_dir, pathjoin(iconv_dir, 'include'))),
            '-L' + os.pathsep.join((libxslt_lib, lxml2_libs,
                                    pathjoin(iconv_dir, 'lib'), zlib_dir))
        ] + (['--debug'] if DEBUG else []) +
            ['install', '--install-lib', DEPS_DIR])
        build_libxml2
Exemple #11
0
def build_lxml():
    from compiledeps import libxml2_dirname

    libxml2_dir = abspath(libxml2_dirname)
    iconv_dir = abspath(iconv_dirname)

    lxml2_libs = pathjoin(libxml2_dir, 'win32', 'bin.msvc')
    if not isdir(lxml2_libs):
        fatal('could not find libxml2.lib in %s' % lxml2_libs)

    lxml2_inc = pathjoin(libxml2_dir, 'include')
    if not isdir(lxml2_inc):
        fatal('could not find libxml2 includes directory at %s' % lxml2_inc)

    if not isdir(iconv_dir):
        fatal('could not find iconv at %s' % iconv_dir)

    libxslt_dir = abspath(libxslt.dirname)
    if not isdir(libxslt_dir):
        fatal('could not find libxslt at %s' % libxslt_dir)
    libxslt_lib = pathjoin(libxslt_dir, 'win32', 'bin.msvc')

    zlib_dir = abspath('zlib-1.2.3')

    from compiledeps import lxml
    new = not os.path.exists(lxml.dirname)
    with cd(lxml.get()):
        if os.name == 'nt' and new:
            # after pulling a fresh tarball, apply the patch pointed to by lxml_patch.
            run([patch_cmd, '--ignore-whitespace', '-p0', '-i', '../%s' % lxml_patch])
        dpy(['setup.py', 'build_ext',
            '-I' + os.pathsep.join((lxml2_inc, libxslt_dir, pathjoin(iconv_dir, 'include'))),
            '-L' + os.pathsep.join((libxslt_lib, lxml2_libs, pathjoin(iconv_dir, 'lib'), zlib_dir))] +
            (['--debug'] if DEBUG else []) +
            ['install', '--install-lib', DEPS_DIR])
        build_libxml2
Exemple #12
0
def patch_nsis():
    if not isdir(NSIS_PATH):
        fatal('Cannot find NSIS installation at %s')

    print '\nPlease copy the contents of\n%s into %s' % (abspath('NSIS'), NSIS_PATH)
Exemple #13
0
def patch_nsis():
    if not isdir(NSIS_PATH):
        fatal('Cannot find NSIS installation at %s')

    print '\nPlease copy the contents of\n%s into %s' % (abspath('NSIS'),
                                                         NSIS_PATH)