diff --git a/my_build_ext.py b/my_build_ext.py index a64166de..049f0e73 100644 --- a/my_build_ext.py +++ b/my_build_ext.py @@ -24,13 +24,10 @@ def symlink_or_copy(src, dst): class build_ext(_build_ext): def build_extension(self, ext): self.inplace = 0 - result = _build_ext.build_extension(self, ext) - modpath = self.get_ext_fullname(ext.name).split('.') + _build_ext.build_extension(self, ext) filename = self.get_ext_filename(ext.name) - filename = os.path.split(filename)[-1] - filename = os.path.join(*modpath[:-1] + [filename]) build_path = os.path.abspath(os.path.join(self.build_lib, filename)) - src_path = os.path.abspath(os.path.basename(build_path)) + src_path = os.path.abspath(filename) if build_path != src_path: try: os.unlink(src_path) @@ -41,5 +38,3 @@ def build_extension(self, ext): sys.stderr.write('Linking %s to %s\n' % (build_path, src_path)) symlink_or_copy(build_path, src_path) - - return result