Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def check_version(self):
cversion = self.version()
pyversion = __version__
if cversion != pyversion:
raise GeoDiffLibVersionError("version mismatch (%s C vs %s PY)".format(cversion, pyversion))
def package_libname(self):
# assume that the package is installed through PIP
if platform.system() == 'Windows':
prefix = ""
arch = platform.architecture()[0] # 64bit or 32bit
if "32" in arch:
suffix = "-win32.dll"
else:
suffix = ".dll"
elif platform.system() == 'Darwin':
prefix = "lib"
suffix = ".dylib"
else:
prefix = "lib"
suffix = ".so"
whl_lib = prefix + 'pygeodiff-' + __version__ + '-python' + suffix
dir_path = os.path.dirname(os.path.realpath(__file__))
return os.path.join(dir_path, whl_lib)