

def init_empty_package(base_dir, name, scala, java, python, r):
    repo_name = name.split('/')[1]
    package_dir = os.path.join(base_dir, repo_name)
    if os.path.exists(package_dir):
        raise RuntimeError(('Directory %s already exists' % package_dir))
    license_id = get_license_id()
    os.makedirs(package_dir)
    os.chdir(package_dir)
    create_license_file(license_id)
    create_static_file('README.md')
    create_static_file('.gitignore')
    if ((not scala) and (not java)):
        if python:
            init_python_directories()
        if r:
            init_r_directories(name, license_id)
    else:
        init_src_directories('resources')
        if (java or scala):
            init_sbt_directories(name, license_id)
        if java:
            init_src_directories('java')
        if scala:
            init_src_directories('scala')
        if python:
            init_python_directories()
        if r:
            init_r_directories(name, license_id)

dataset/ETHPy150Open databricks/spark-package-cmd-tool/python/spark_package/spark_package.py init_empty_package/original