Exemplo n.º 1
0
Arquivo: rezbuild.py Projeto: opcg/rez
def build(source_path, build_path, install_path, targets):

    # normal requirement 'foo' should be visible
    check_visible('anti', 'build_util')

    check_visible('anti', 'floob')
    import floob
    floob.hello()

    try:
        import loco
        raise Exception('loco should not be here')
    except ImportError:
        print('Intentionally raising an ImportError since loco should not be available')
        pass
Exemplo n.º 2
0
def build(source_path, build_path, install_path, targets):

    # normal requirement 'foo' should be visible
    check_visible("bah", "foo")
    import foo
    print foo.report()

    # 'floob' should be visible - it is a build requirement of foo, and
    # build requirements are transitive
    check_visible("bah", "floob")
    import floob
    print floob.hello()

    # note - this package intentionally doesn't build anything
    pass
Exemplo n.º 3
0
def build(source_path, build_path, install_path, targets):

    # normal requirement 'foo' should be visible
    check_visible('anti', 'build_util')

    check_visible('anti', 'floob')
    import floob
    floob.hello()

    try:
        import loco
        raise Exception('loco should not be here')
    except ImportError:
        print 'Intentionally raising an ImportError since loco should not be available'
        pass
Exemplo n.º 4
0
def build(source_path, build_path, install_path, targets):

    # build requirement 'floob' should be visible
    check_visible("foo", "floob")
    import floob
    print floob.hello()

    # do the build
    if "install" not in (targets or []):
        install_path = None

    build_directory_recurse(src_dir="foo",
                            dest_dir=os.path.join("python", "foo"),
                            source_path=source_path,
                            build_path=build_path,
                            install_path=install_path)
Exemplo n.º 5
0
def build(source_path, build_path, install_path, targets):

    # normal requirement 'foo' should be visible
    check_visible("anti", "build_util")

    check_visible("anti", "floob")
    import floob

    floob.hello()

    try:
        import loco

        raise Exception("loco should not be here")
    except ImportError:
        print "Intentionally raising an ImportError since loco should not be available"
        pass
Exemplo n.º 6
0
def build(source_path, build_path, install_path, targets):

    # normal requirement 'foo' should be visible
    check_visible("bah", "foo")
    import foo
    print foo.report()

    # 'floob' should be visible - it is a build requirement of foo, and
    # build requirements are transitive
    check_visible("bah", "floob")
    import floob
    print floob.hello()

    # do the build
    if "install" not in (targets or []):
        install_path = None

    build_directory_recurse(src_dir="bah",
                            dest_dir=os.path.join("python", "bah"),
                            source_path=source_path,
                            build_path=build_path,
                            install_path=install_path)
Exemplo n.º 7
0
def build(source_path, build_path, install_path, targets):

    # build requirement 'floob' should be visible
    check_visible("foo", "floob")
    import floob
    print(floob.hello())

    # env var should have been set in pre_build_commands
    if os.getenv("FOO_TEST_VAR") != "hello":
        raise RuntimeError("Expected $FOO_TEST_VAR to be set")

    # do the build
    if "install" not in (targets or []):
        install_path = None

    build_directory_recurse(src_dir="foo",
                            dest_dir=os.path.join("python", "foo"),
                            source_path=source_path,
                            build_path=build_path,
                            install_path=install_path)