2121
2222Archive Contents:
2323```
24+ ├── LICENSE
25+ ├── NOTICE.txt
26+ ├── README.md
2427├── bin/
2528│ └── az → ../libexec/bin/az
2629├── completions/
3336└── libexec/
3437 ├── bin/
3538 │ └── az (entry script - Homebrew or AZ_PYTHON)
36- ├── lib/
37- │ └── python3.13
38- │ └── site-packages/
39- │ ├── azure/
40- │ ├── msal/
41- │ └── ... (all CLI packages)
42- └── README.txt
39+ └── lib/
40+ └── python3.13
41+ └── site-packages/
42+ ├── azure/
43+ ├── msal/
44+ └── ... (all CLI packages)
4345```
4446
4547Usage:
8284PYTHON_BIN = "python3"
8385TEMPLATE_DIR = Path (__file__ ).resolve ().parent / "templates"
8486LAUNCHER_TEMPLATE_PATH = TEMPLATE_DIR / "az_launcher.sh.in"
85- README_TEMPLATE_PATH = TEMPLATE_DIR / "README.txt.in"
8687
8788
8889class BuildError (RuntimeError ):
@@ -249,7 +250,7 @@ def create_install_structure(venv_dir: Path, install_dir: Path, version: str, pl
249250 az_symlink .symlink_to (az_target )
250251 print (f"Created symlink: { az_symlink } -> { az_target } " )
251252
252- _create_readme (install_dir = libexec_dir , version = version , platform_tag = platform_tag )
253+ _copy_legal_files (install_dir = install_dir )
253254
254255 _generate_shell_completions (venv_dir = venv_dir , install_dir = install_dir )
255256
@@ -275,21 +276,18 @@ def _create_launcher_script(bin_dir: Path, python_version: str) -> None:
275276 print (f"Created launcher script: { az_path } " )
276277
277278
278- def _create_readme (install_dir : Path , version : str , platform_tag : str ) -> None :
279- """Create README.txt."""
280- template = _load_template (path = README_TEMPLATE_PATH )
281- readme_content = _render_template (
282- template = template ,
283- values = {
284- "AZURE_CLI_VERSION" : version ,
285- "PLATFORM_TAG" : platform_tag ,
286- "PYTHON_MAJOR_MINOR" : PYTHON_MAJOR_MINOR ,
287- },
288- )
279+ def _copy_legal_files (install_dir : Path ) -> None :
280+ """Copy legal and documentation files from the project root into the install directory."""
281+ print ("\n === Copying legal files ===" )
289282
290- readme_path = install_dir / "README.txt"
291- readme_path .write_text (readme_content , encoding = "utf-8" )
292- print (f"Created README: { readme_path } " )
283+ for filename in ("LICENSE" , "NOTICE.txt" , "README.md" ):
284+ src = PROJECT_ROOT / filename
285+ if src .exists ():
286+ dst = install_dir / filename
287+ shutil .copy2 (src , dst )
288+ print (f"Copied { filename } : { dst } " )
289+ else :
290+ print (f"Warning: { filename } not found at { src } " )
293291
294292
295293def _generate_shell_completions (venv_dir : Path , install_dir : Path ) -> None :
0 commit comments