summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2023-09-01 16:51:40 +0200
committerJeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com>2023-09-01 17:15:52 +0000
commit36828e8a092bd1d95cebff5e0a3f59bec203ccee (patch)
tree0ab77cd882d5bd6abd250433c8c96d41fb315261
parent0c14a204ae13f7692a5708451b40f87832f7388a (diff)
Setup.py: Fix building with pip
-rwxr-xr-xwrappers/python/setup.py8
1 files changed, 6 insertions, 2 deletions
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(