
import glob
import os
import shutil

sol_po = glob.glob("po/*.po")
sol_po = [os.path.split(x)[1] for x in sol_po]
sol_po = [os.path.splitext(x)[0] for x in sol_po]

gtk_po = glob.glob(r"win32\GTK\share\locale\*")

for lang in gtk_po:
    if os.path.split(lang)[-1] not in sol_po:
        shutil.rmtree(lang)

shutil.rmtree(r"win32\python\Lib\test")
shutil.rmtree(r"win32\python\Lib\curses")
shutil.rmtree(r"win32\etc")
shutil.rmtree(r"win32\share\applications")
shutil.rmtree(r"win32\share\man")
os.remove(r"win32\GTK\uninst.exe")
