Skip to content

Commit 9cf87ae

Browse files
committed
setup.py: test for FileExistsError on symlink
Multiple runs of setuptools encounter a FileExistsError exception trying to re-symlink the same files. This exception is safe to ignore: the files were already symlinked so the call can be considered successful. Signed-off-by: Sirio Balmelli <[email protected]>
1 parent b9c6254 commit 9cf87ae

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

release/setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
from setuptools import setup
22
import os
33
for f in ['git-filter-repo', 'git_filter_repo.py', 'README.md']:
4-
os.symlink("../"+f, f)
4+
try:
5+
os.symlink("../"+f, f)
6+
except FileExistsError:
7+
pass
58
setup(use_scm_version=dict(root="..", relative_to=__file__))

0 commit comments

Comments
 (0)