# Path: ros2_batch_job/__main__.py
# def main(sysargv=None):
#     args = get_args(sysargv=sysargv)
#     blacklisted_package_names = []
#     if not args.packaging:
#         build_function = build_and_test
#         blacklisted_package_names += [
#             'actionlib_msgs',
#             'common_interfaces',
#             'cv_bridge',
#             'opencv_tests',
#             'ros1_bridge',
#             'shape_msgs',
#             'stereo_msgs',
#             'vision_opencv',
#         ]
#     else:
#         build_function = build_and_test_and_package
#         if sys.platform in ('darwin', 'win32'):
#             blacklisted_package_names += [
#                 'pendulum_control',
#                 'ros1_bridge',
#                 'rttest',
#                 'tlsf',
#                 'tlsf_cpp',
#             ]
# 
#     # There are no Windows debug packages available for PyQt5 and PySide2, so
#     # python_qt_bindings can't be imported to run or test rqt_graph or
#     # rqt_py_common.
#     if sys.platform == 'win32' and args.cmake_build_type == 'Debug':
#         blacklisted_package_names.append('rqt_graph')
#         blacklisted_package_names.append('rqt_py_common')
#         blacklisted_package_names.append('rqt_reconfigure')
# 
#     # TODO(wjwwood): remove this when a better solution is found, as
#     #   this is just a work around for https://github.com/ros2/build_cop/issues/161
#     # If on Windows, kill any still running `colcon` processes to avoid
#     # problems when trying to delete files from pip or the workspace during
#     # this job.
#     if sys.platform == 'win32':
#         os.system('taskkill /f /im colcon.exe')
#         time.sleep(2)  # wait a bit to avoid a race
# 
#     return run(args, build_function, blacklisted_package_names=blacklisted_package_names)


import os
import sys
import ros2_batch_job
from ros2_batch_job.__main__ import main
#!/usr/bin/env python3

# Copyright 2015 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


# Make sure we're using Python3
assert sys.version.startswith('3'), "This script is only meant to work with Python3"

# Make sure we get the local imports
this_dir = os.path.abspath(os.path.dirname(__file__))
sys.path.insert(0, this_dir)
assert ros2_batch_job.__file__.startswith(this_dir), \
    "ros2_batch_job was imported from somewhere other than the local directory of this script"

if __name__ == '__main__':

# Path: ros2_batch_job/__main__.py
# def main(sysargv=None):
#     args = get_args(sysargv=sysargv)
#     blacklisted_package_names = []
#     if not args.packaging:
#         build_function = build_and_test
#         blacklisted_package_names += [
#             'actionlib_msgs',
#             'common_interfaces',
#             'cv_bridge',
#             'opencv_tests',
#             'ros1_bridge',
#             'shape_msgs',
#             'stereo_msgs',
#             'vision_opencv',
#         ]
#     else:
#         build_function = build_and_test_and_package
#         if sys.platform in ('darwin', 'win32'):
#             blacklisted_package_names += [
#                 'pendulum_control',
#                 'ros1_bridge',
#                 'rttest',
#                 'tlsf',
#                 'tlsf_cpp',
#             ]
# 
#     # There are no Windows debug packages available for PyQt5 and PySide2, so
#     # python_qt_bindings can't be imported to run or test rqt_graph or
#     # rqt_py_common.
#     if sys.platform == 'win32' and args.cmake_build_type == 'Debug':
#         blacklisted_package_names.append('rqt_graph')
#         blacklisted_package_names.append('rqt_py_common')
#         blacklisted_package_names.append('rqt_reconfigure')
# 
#     # TODO(wjwwood): remove this when a better solution is found, as
#     #   this is just a work around for https://github.com/ros2/build_cop/issues/161
#     # If on Windows, kill any still running `colcon` processes to avoid
#     # problems when trying to delete files from pip or the workspace during
#     # this job.
#     if sys.platform == 'win32':
#         os.system('taskkill /f /im colcon.exe')
#         time.sleep(2)  # wait a bit to avoid a race
# 
#     return run(args, build_function, blacklisted_package_names=blacklisted_package_names)


# Path: run_ros2_batch.py
import os
import sys
import ros2_batch_job
from ros2_batch_job.__main__ import main

#!/usr/bin/env python3

# Copyright 2015 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


# Make sure we're using Python3
assert sys.version.startswith('3'), "This script is only meant to work with Python3"

# Make sure we get the local imports
this_dir = os.path.abspath(os.path.dirname(__file__))
sys.path.insert(0, this_dir)
assert ros2_batch_job.__file__.startswith(this_dir), \
    "ros2_batch_job was imported from somewhere other than the local directory of this script"

if __name__ == '__main__':

    sys.exit(main())