示例#1
0
文件: rezbuild.py 项目: 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
示例#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
示例#3
0
文件: rezbuild.py 项目: rvsiy/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
示例#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)
示例#5
0
文件: rezbuild.py 项目: sonictk/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
示例#6
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)
示例#7
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)
示例#8
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)