|
55 | 55 | f"{PRJ_URL}/raw/master/images/App_screenshot1.png")
|
56 | 56 |
|
57 | 57 | # So that the vehicle_templates directory contents get correctly read by the MANIFEST.in file
|
58 |
| -source_dir = 'vehicle_templates' |
59 |
| -dest_dir = 'MethodicConfigurator/vehicle_templates' |
| 58 | +TEMPLATES_SRC_DIR = 'vehicle_templates' |
| 59 | +TEMPLATES_DST_DIR = 'MethodicConfigurator/vehicle_templates' |
60 | 60 |
|
61 |
| -if os.path.exists(dest_dir): |
62 |
| - shutil.rmtree(dest_dir) |
| 61 | +if os.path.exists(TEMPLATES_DST_DIR): |
| 62 | + shutil.rmtree(TEMPLATES_DST_DIR) |
63 | 63 |
|
64 | 64 | try:
|
65 |
| - shutil.copytree(source_dir, dest_dir) |
| 65 | + shutil.copytree(TEMPLATES_SRC_DIR, TEMPLATES_DST_DIR) |
66 | 66 | print("Directory tree copied successfully.")
|
67 | 67 | except FileExistsError as e:
|
68 |
| - print(f"The destination directory '{dest_dir}' already exists and cannot be overwritten.") |
| 68 | + print(f"The destination directory '{TEMPLATES_DST_DIR}' already exists and cannot be overwritten.") |
69 | 69 | except PermissionError as e:
|
70 |
| - print(f"Permission denied when trying to copy '{source_dir}' to '{dest_dir}'. Please check your permissions.") |
| 70 | + print(f"Permission denied when trying to copy '{TEMPLATES_SRC_DIR}' to '{TEMPLATES_DST_DIR}'. Please check your permissions.") |
71 | 71 | except Exception as e: # pylint: disable=broad-except
|
72 | 72 | print(f"An unexpected error occurred while copying the directory tree: {e}")
|
73 | 73 |
|
|
137 | 137 | )
|
138 | 138 |
|
139 | 139 | # Remove the symbolic link now that the setup is done
|
140 |
| -if os.path.exists(dest_dir): |
141 |
| - shutil.rmtree(dest_dir) |
| 140 | +if os.path.exists(TEMPLATES_DST_DIR): |
| 141 | + shutil.rmtree(TEMPLATES_DST_DIR) |
0 commit comments