diff --git a/src/pycage/constants.py b/src/pycage/constants.py index 41bd747..84710d2 100644 --- a/src/pycage/constants.py +++ b/src/pycage/constants.py @@ -1,10 +1,10 @@ from pathlib import Path from typing import Final -LIB_ROOT_FOLDER: Final[Path] = Path(__file__) +LIB_ROOT_FOLDER: Final[Path] = Path(__file__).parent if not LIB_ROOT_FOLDER.exists(): raise FileNotFoundError(f"Lib root folder not found under: >{LIB_ROOT_FOLDER}<") -MSVC_FOLDER: Final[Path] = LIB_ROOT_FOLDER / "msvc-redist" +MSVC_FOLDER: Final[Path] = LIB_ROOT_FOLDER / "_files/msvc-redist" if not MSVC_FOLDER.exists(): raise FileNotFoundError(f"Folder for MSVC Redist files not found under: >{MSVC_FOLDER}<") diff --git a/src/pycage/venv.py b/src/pycage/venv.py index 515e39f..2bfbf65 100644 --- a/src/pycage/venv.py +++ b/src/pycage/venv.py @@ -185,8 +185,12 @@ def add_msvc_redist() -> None: dll_files = MSVC_FOLDER.glob("**/*.dll") + click.echo("Start copying files...") for dll_src in dll_files: - shutil.copy(dll_src, target_path) + click.echo(f"Copy file >{dll_src.name}<") + shutil.copy2(dll_src, target_path) + + click.echo("Copied files successfully.") venv.add_command(create)