import os
import shutil

SOURCE_DIR = '../deploy/runtime'
TARGET_DIR = 'SAM.app/Contents/runtime'

if os.path.exists(TARGET_DIR):
    shutil.rmtree(TARGET_DIR)

shutil.copytree(SOURCE_DIR, TARGET_DIR, ignore=shutil.ignore_patterns('.git'))

SOURCE_DIR = '../deploy/solar_resource'
TARGET_DIR = 'SAM.app/Contents/solar_resource'

if os.path.exists(TARGET_DIR):
    shutil.rmtree(TARGET_DIR)

shutil.copytree(SOURCE_DIR, TARGET_DIR, ignore=shutil.ignore_patterns('.git'))

SOURCE_DIR = '../deploy/wind_resource'
TARGET_DIR = 'SAM.app/Contents/wind_resource'

if os.path.exists(TARGET_DIR):
    shutil.rmtree(TARGET_DIR)

shutil.copytree(SOURCE_DIR, TARGET_DIR, ignore=shutil.ignore_patterns('.git'))

SOURCE_DIR = '../deploy/libraries'
TARGET_DIR = 'SAM.app/Contents/libraries'

if os.path.exists(TARGET_DIR):
    shutil.rmtree(TARGET_DIR)

shutil.copytree(SOURCE_DIR, TARGET_DIR, ignore=shutil.ignore_patterns('.git'))

[((7, 3, 7, 29), 'os.path.exists', 'os.path.exists', ({(7, 18, 7, 28): 'TARGET_DIR'}, {}), '(TARGET_DIR)', False, 'import os\n'), ((15, 3, 15, 29), 'os.path.exists', 'os.path.exists', ({(15, 18, 15, 28): 'TARGET_DIR'}, {}), '(TARGET_DIR)', False, 'import os\n'), ((23, 3, 23, 29), 'os.path.exists', 'os.path.exists', ({(23, 18, 23, 28): 'TARGET_DIR'}, {}), '(TARGET_DIR)', False, 'import os\n'), ((31, 3, 31, 29), 'os.path.exists', 'os.path.exists', ({(31, 18, 31, 28): 'TARGET_DIR'}, {}), '(TARGET_DIR)', False, 'import os\n'), ((8, 4, 8, 29), 'shutil.rmtree', 'shutil.rmtree', ({(8, 18, 8, 28): 'TARGET_DIR'}, {}), '(TARGET_DIR)', False, 'import shutil\n'), ((16, 4, 16, 29), 'shutil.rmtree', 'shutil.rmtree', ({(16, 18, 16, 28): 'TARGET_DIR'}, {}), '(TARGET_DIR)', False, 'import shutil\n'), ((24, 4, 24, 29), 'shutil.rmtree', 'shutil.rmtree', ({(24, 18, 24, 28): 'TARGET_DIR'}, {}), '(TARGET_DIR)', False, 'import shutil\n'), ((32, 4, 32, 29), 'shutil.rmtree', 'shutil.rmtree', ({(32, 18, 32, 28): 'TARGET_DIR'}, {}), '(TARGET_DIR)', False, 'import shutil\n'), ((10, 47, 10, 77), 'shutil.ignore_patterns', 'shutil.ignore_patterns', ({(10, 70, 10, 76): '""".git"""'}, {}), "('.git')", False, 'import shutil\n'), ((18, 47, 18, 77), 'shutil.ignore_patterns', 'shutil.ignore_patterns', ({(18, 70, 18, 76): '""".git"""'}, {}), "('.git')", False, 'import shutil\n'), ((26, 47, 26, 77), 'shutil.ignore_patterns', 'shutil.ignore_patterns', ({(26, 70, 26, 76): '""".git"""'}, {}), "('.git')", False, 'import shutil\n'), ((34, 47, 34, 77), 'shutil.ignore_patterns', 'shutil.ignore_patterns', ({(34, 70, 34, 76): '""".git"""'}, {}), "('.git')", False, 'import shutil\n')]