From e361ec863961982e01f3d7f5842245dac88a05fd Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Wed, 12 Apr 2023 22:48:02 +0200 Subject: Format: Run gofumpt (Go) + black (py) --- wrappers/python/setup.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'wrappers/python/setup.py') 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( -- cgit v1.2.3