Пример #1
0
def main():
    # Show help even if there is no fsetup.py.
    if len(sys.argv) == 1:
        fbrp.main()
        return

    # Default the entrypoint file to the fsetup.py in the current directory.
    fsetup_path = os.path.abspath("fsetup.py")
    # The user may specify another entrypoint with:
    # fbrp -f <file> [args...]
    if len(sys.argv) >= 3 and sys.argv[1] == "-f":
        fsetup_path = os.path.abspath(sys.argv[2])
        sys.argv = sys.argv[:1] + sys.argv[3:]

    # Ensure the entrypoint file exists.
    if not os.path.exists(fsetup_path):
        fbrp.util.fail(f"No fsetup.py file found.")

    # Run the entrypoint file.
    SourceFileLoader("fsetup", fsetup_path).load_module()
Пример #2
0
    name="proc",
    runtime=fbrp.Conda(
        channels=[
            "conda-forge",
            "robostack",
        ],
        dependencies=[
            "python>=3.7",
            "ros-foxy-ompl",
        ],
        setup_commands=[
            [
                "g++",
                "-o",
                "proc",
                fbrp.NoEscape("-I${CONDA_PREFIX}/include"),
                fbrp.NoEscape("-I${CONDA_PREFIX}/include/eigen3"),
                fbrp.NoEscape("-I${CONDA_PREFIX}/include/ompl-1.5"),
                "./proc.cpp",
                fbrp.NoEscape("-L${CONDA_PREFIX}/lib"),
                "-lompl",
            ],
        ],
        run_command=[
            fbrp.NoEscape("LD_LIBRARY_PATH=${CONDA_PREFIX}/lib"), "./proc"
        ],
    ),
)

fbrp.main()