Fix python usage on Windows (#60)

* Polish compilation on Windows

* Fix python usage on Windows
This commit is contained in:
Jason
2022-07-31 16:50:56 +08:00
committed by GitHub
parent 3a2b86f806
commit 8e7b540d3f
3 changed files with 33 additions and 3 deletions

View File

@@ -362,6 +362,16 @@ if sys.argv[1] == "install" or sys.argv[1] == "bdist_wheel":
"fastdeploy/libs/third_libs",
symlinks=True)
if platform.system().lower() == "windows":
release_dir = os.path.join(".setuptools-cmake-build", "Release")
for f in os.listdir(release_dir):
filename = os.path.join(release_dir, f)
if not os.path.isfile(filename):
continue
if filename.endswith(".pyd"):
continue
shutil.copy(filename, "fastdeploy/libs")
if platform.system().lower() == "linux":
rpaths = ["$ORIGIN:$ORIGIN/libs"]
for root, dirs, files in os.walk(