forked from datahub-project/datahub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcopy_wheels.py
27 lines (22 loc) · 863 Bytes
/
copy_wheels.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import pathlib
import shutil
PYTHON_BUILD_DIR = pathlib.Path(__file__).parent
ROOT_DIR = PYTHON_BUILD_DIR.parent
WHEEL_OUTPUT_DIR = PYTHON_BUILD_DIR / "wheels"
# These should line up with the build.gradle file.
wheel_dirs = [
ROOT_DIR / "metadata-ingestion/dist",
ROOT_DIR / "metadata-ingestion-modules/airflow-plugin/dist",
ROOT_DIR / "metadata-ingestion-modules/dagster-plugin/dist",
ROOT_DIR / "metadata-ingestion-modules/prefect-plugin/dist",
ROOT_DIR / "metadata-ingestion-modules/gx-plugin/dist",
]
# Delete and recreate the output directory.
if WHEEL_OUTPUT_DIR.exists():
shutil.rmtree(WHEEL_OUTPUT_DIR)
WHEEL_OUTPUT_DIR.mkdir(parents=True)
# Copy things over.
for wheel_dir in wheel_dirs:
for wheel_file in wheel_dir.glob("*"):
shutil.copy(wheel_file, WHEEL_OUTPUT_DIR)
print("Copied wheels to", WHEEL_OUTPUT_DIR)