diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2023-04-12 22:48:02 +0200 |
|---|---|---|
| committer | Jeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com> | 2023-09-25 09:43:37 +0200 |
| commit | e361ec863961982e01f3d7f5842245dac88a05fd (patch) | |
| tree | ce5a92cc598d62c9a3c950d5c7bc742405943f64 /wrappers/python/setup.py | |
| parent | 1e54063813efb6e822df36ad39d7f889a7f2e38b (diff) | |
Format: Run gofumpt (Go) + black (py)
Diffstat (limited to 'wrappers/python/setup.py')
| -rwxr-xr-x | wrappers/python/setup.py | 16 |
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( |
