summaryrefslogtreecommitdiff
path: root/wrappers/python/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'wrappers/python/setup.py')
-rwxr-xr-xwrappers/python/setup.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/wrappers/python/setup.py b/wrappers/python/setup.py
index 1bc565a..8637032 100755
--- a/wrappers/python/setup.py
+++ b/wrappers/python/setup.py
@@ -12,6 +12,7 @@ from wheel.bdist_wheel import bdist_wheel as _bdist_wheel
_libname = "eduvpn_common"
__version__ = "1.1.2"
+
def getlibpath(plat_name: str) -> typing.Union[str, None]:
"""Get library path for plat_name relative to exports/lib/ folder."""
@@ -65,8 +66,15 @@ def getlibpath(plat_name: str) -> typing.Union[str, None]:
processed_os = os_map[plat_os]
return (
- processed_os + "/" + arch_map[plat_arch] + "/" +
- lib_prefixes[processed_os] + _libname + "-" + __version__ + lib_suffixes[processed_os]
+ processed_os
+ + "/"
+ + arch_map[plat_arch]
+ + "/"
+ + lib_prefixes[processed_os]
+ + _libname
+ + "-"
+ + __version__
+ + lib_suffixes[processed_os]
)
@@ -91,7 +99,7 @@ class bdist_wheel(_bdist_wheel):
print("Unknown platform:", self.plat_name)
sys.exit(1)
- print("Building wheel for platform:",self.plat_name)
+ print("Building wheel for platform:", self.plat_name)
# setuptools will only use paths inside the package for package_data, so we copy the library
p = "eduvpn_common/lib"
@@ -100,7 +108,7 @@ class bdist_wheel(_bdist_wheel):
os.makedirs(p)
shutil.copyfile(self.exports_lib_path + "/" + libpath, p+"/"+libpath.split("/")[-1])
_bdist_wheel.run(self)
- shutil.rmtree("eduvpn_common/lib/")
+ shutil.rmtree(p)
setup(