Skip to content

Commit

Permalink
[setup] add check_submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
gouzil committed Apr 24, 2023
1 parent bfffa3d commit e34eb05
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1544,11 +1544,21 @@ def check_build_dependency():
if dependency.lower() not in installed_packages:
raise RuntimeError(missing_modules.format(dependency=dependency))

def check_submodules():
for sub_dir in os.listdir(TOP_DIR + "/third_party"):
if not os.path.exists(TOP_DIR + "/third_party/" + sub_dir +
"/.git"):
raise RuntimeError(
"Please run 'git submodule update --init --recursive' to make sure you have all the submodules installed."
)

def main():
# Parse the command line and check arguments before we proceed with building steps and setup
parse_input_command(filter_args_list)

# check third_party submodules
check_submodules()

# check build dependency
check_build_dependency()

Expand Down

0 comments on commit e34eb05

Please sign in to comment.