Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
risemeup1 committed Aug 9, 2024
1 parent e95d277 commit 268de62
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,19 +171,19 @@ def build_extensions(self):
os.path.realpath(self.build_lib), "paddle2onnx", filename)
self.copy_file(src, dst)

# class CustomBuildExt(build_ext):
# def build_extensions(self):
# super().build_extensions()
# import site
# site_packages_path = site.getsitepackages()[0]
# # Copy libpaddle.so to whl package
# libpaddle_src = site_packages_path+"/paddle/base/libpaddle.so"
# libpaddle_dst = os.path.join(self.build_lib, "paddle2onnx", "libpaddle.so")
# self.copy_file(libpaddle_src, libpaddle_dst)
class CustomBuildExt(build_ext):
def build_extensions(self):
super().build_extensions()
import site
site_packages_path = site.getsitepackages()[0]
# Copy libpaddle.so to whl package
libpaddle_src = site_packages_path+"/paddle/base/libpaddle.so"
libpaddle_dst = os.path.join(self.build_lib, "paddle2onnx", "libpaddle.so")
self.copy_file(libpaddle_src, libpaddle_dst)

cmdclass = {
'cmake_build': cmake_build,
'build_ext': build_ext,
'build_ext': CustomBuildExt,
}

################################################################################
Expand Down

0 comments on commit 268de62

Please sign in to comment.