Update action steps
[slib.git] / setup.py
blob57bc53f2faf892ac504057067984a4051baaa698
1 from setuptools import setup, Extension
2 from Cython.Build import cythonize
4 version = None
5 for line in open("include/slib/general.h").readlines():
6 if line.find("SBLLIB_VERSION") != -1:
7 version = line.split()[-1]
8 elif line.find("SBLLIB_MINOR") != -1:
9 version += "." + line.split()[-1]
10 elif line.find("SBLLIB_PATCHLEVEL") != -1:
11 version += "." + line.split()[-1]
12 break
14 ext_modules = [
15 Extension(
16 "sbl",
17 sources = ["sbl.pyx"],
18 libraries = ["sbl", "m"]
22 setup(
23 name="sbl",
24 version=version,
25 ext_modules=cythonize(
26 ext_modules,
27 language_level = 3