From: Sinacam Date: Mon, 7 Mar 2022 16:17:47 +0000 (+0800) Subject: updated setup.py X-Git-Tag: v244~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f662699190677384cd0e668033c0e9c011a4af99;p=liblinear updated setup.py --- diff --git a/python/setup.py b/python/setup.py index b581e5e..7adde99 100644 --- a/python/setup.py +++ b/python/setup.py @@ -16,7 +16,13 @@ build_ext.get_export_symbols = lambda x, y: [] PACKAGE_DIR = "liblinear" PACKAGE_NAME = "liblinear-official" -VERSION = "2.43.0" +with open('../linear.h') as f: + for l in f: + if l.startswith('#define LIBLINEAR_VERSION '): + num = l[:-1].split(' ')[-1] + VERSION = f'{num[0]}.{num[1:3]}.0' + break + cpp_dir = "cpp-source" # should be consistent with dynamic_lib_name in liblinear/liblinear.py dynamic_lib_name = "clib"