protocol/python-packages/cmd_pkgs_in_dep_order.py
Michael Huang 3099ba71eb New demos for Python packages (#1734)
End-to-end demos of constructing and signing an order and submitting it to a Relayer.  Docs are generated from the code, and include usage examples that are verified through automated testing.
2019-03-26 19:07:04 -04:00

27 lines
648 B
Python
Executable File

#!/usr/bin/env python
"""Run a command in every package, in order of increasing dependency."""
import os
import subprocess
import sys
PACKAGE_DEPENDENCY_LIST = [
# Order matters! Packages must be handled in dependency order (most
# independent first) in order for them to resolve properly.
"contract_addresses",
"contract_artifacts",
"contract_wrappers",
"json_schemas",
"sra_client",
"order_utils",
"middlewares",
]
for package in PACKAGE_DEPENDENCY_LIST:
print(f"Running command `{sys.argv[1:]}` in package {package}")
os.chdir(package)
subprocess.check_call(sys.argv[1:])
os.chdir("..")