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 <sirio@b-ad.ch>
pull/55/head
Sirio Balmelli 4 years ago
parent b9c62540b7
commit 9cf87ae036
No known key found for this signature in database
GPG Key ID: 0437A96EFE4C426E

@ -1,5 +1,8 @@
from setuptools import setup
import os
for f in ['git-filter-repo', 'git_filter_repo.py', 'README.md']:
os.symlink("../"+f, f)
try:
os.symlink("../"+f, f)
except FileExistsError:
pass
setup(use_scm_version=dict(root="..", relative_to=__file__))

Loading…
Cancel
Save