Browse Source

Don't error if path is already fullpath

copyfile raises a SameFileError if the source and destination are the same. In this case, the error should be ignored.
pull/13/head
James Murphy 5 years ago
parent
commit
40ba765fad
  1. 5
      src/python/setup.py.cmake

5
src/python/setup.py.cmake

@ -60,7 +60,10 @@ if '${MAGNUM_BUILD_STATIC}' != 'ON':
class TheExtensionIsAlreadyBuiltWhyThisHasToBeSoDamnComplicated(build_ext): class TheExtensionIsAlreadyBuiltWhyThisHasToBeSoDamnComplicated(build_ext):
def run(self): def run(self):
for ext in self.extensions: for ext in self.extensions:
shutil.copyfile(extension_paths[ext.name], self.get_ext_fullpath(ext.name)) try:
shutil.copyfile(extension_paths[ext.name], self.get_ext_fullpath(ext.name))
except shutil.SameFileError:
pass
setup( setup(
name='magnum', name='magnum',

Loading…
Cancel
Save