import shutil
import os
from setuptools import setup
TEMP_DIR = "temp_ubse"
if os.path.exists(TEMP_DIR):
shutil.rmtree(TEMP_DIR)
shutil.copytree("src/sdk/python", TEMP_DIR, dirs_exist_ok=True)
shutil.copytree("src/addons/virt_agent/sdk/python", TEMP_DIR, dirs_exist_ok=True)
TEMP_FFI_DIR = "temp_ubse_ffi"
shutil.copytree("src/sdk/python/ffi", TEMP_FFI_DIR, dirs_exist_ok=True)
shutil.copytree("src/addons/virt_agent/sdk/python/ffi", TEMP_FFI_DIR, dirs_exist_ok=True)
TEMP_MODELS_DIR = "temp_ubse_models"
shutil.copytree("src/sdk/python/models", TEMP_MODELS_DIR, dirs_exist_ok=True)
shutil.copytree("src/addons/virt_agent/sdk/python/models", TEMP_MODELS_DIR, dirs_exist_ok=True)
setup(
name="ubse",
version="1.0.1",
package_dir={"ubse": TEMP_DIR,
"ubse.ffi": TEMP_FFI_DIR,
"ubse.models": TEMP_MODELS_DIR},
packages=["ubse", "ubse.ffi", "ubse.models"],
)