From 36828e8a092bd1d95cebff5e0a3f59bec203ccee Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Fri, 1 Sep 2023 16:51:40 +0200 Subject: Setup.py: Fix building with pip --- wrappers/python/setup.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'wrappers/python') diff --git a/wrappers/python/setup.py b/wrappers/python/setup.py index 5487c71..ee595fe 100755 --- a/wrappers/python/setup.py +++ b/wrappers/python/setup.py @@ -94,9 +94,13 @@ class bdist_wheel(_bdist_wheel): print("Building wheel for platform:",self.plat_name) # setuptools will only use paths inside the package for package_data, so we copy the library - tmp_lib = shutil.copy(self.exports_lib_path + "/" + libpath, "eduvpn_common/lib/") + p = "eduvpn_common/lib" + if os.path.isdir(p): + shutil.rmtree(p) + os.makedirs(p) + shutil.copyfile(self.exports_lib_path + "/" + libpath, p+"/"+libpath.split("/")[-1]) _bdist_wheel.run(self) - os.remove(tmp_lib) + shutil.rmtree("eduvpn_common/lib/") setup( -- cgit v1.2.3