diff --git a/docs/sphinx_build_test.py b/docs/sphinx_build_test.py index 9cde96f674f..4e35583ba03 100644 --- a/docs/sphinx_build_test.py +++ b/docs/sphinx_build_test.py @@ -38,7 +38,8 @@ def main() -> int: readme_src = os.path.join(os.path.dirname(DOCS_DIR), "README.md") if os.path.exists(readme_src): - shutil.copy2(readme_src, os.path.join(temp_root, "README.md")) + readme_dst = os.path.join(temp_root, "README.md") + shutil.copyfile(readme_src, readme_dst) # creates a writable copy # conf.py's setup(app) hook uses cwd-relative paths like "./main" # and "../README.md", so it must run with docs/ as cwd.