import glob
import sys
sys.path.insert(0, ".")
import os
import shutil
import solfege.languages

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\include")
for fn in glob.glob("win32/share/locale/*"):
    if not os.path.split(fn)[1] in solfege.languages.languages:
        shutil.rmtree(fn)

