

def compile_css(item):
    path_src = get_path(item)
    path_dst = get_path(('%s.css' % item))
    updated_src = os.path.getmtime(get_path(item))
    updated_css = 0
    if os.path.exists(path_dst):
        updated_css = os.path.getmtime(path_dst)
    if ((not updated_css) or (updated_src > updated_css)):
        ensure_path_exists(os.path.dirname(path_dst))
        if item.endswith('.less'):
            with open(path_dst, 'w') as output:
                subprocess.Popen([settings.LESS_BIN, path_src], stdout=output)
        elif item.endswith(('.sass', '.scss')):
            with open(path_dst, 'w') as output:
                subprocess.Popen([settings.SASS_BIN, path_src], stdout=output)
        elif item.endswith('.styl'):
            subprocess.call(('%s --include-css --include %s < %s > %s' % (settings.STYLUS_BIN, os.path.dirname(path_src), path_src, path_dst)), shell=True)

dataset/ETHPy150Open jsocol/jingo-minify/jingo_minify/helpers.py compile_css/original