forked from vitillo/python-yampl
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
22 lines (20 loc) · 735 Bytes
/
setup.py
File metadata and controls
22 lines (20 loc) · 735 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import subprocess
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
yampl_include = subprocess.check_output(["pkg-config", "yampl", "--cflags"]).decode("utf-8")[2:-2]
yampl_libs = subprocess.check_output(["pkg-config", "yampl", "--libs"]).decode("utf-8")[:-2]
yampl_include_2 = yampl_include.replace("/include/yampl","/include")
setup(
name = "yampl",
version = "1.0",
ext_modules=[
Extension("yampl",
sources=["yampl.pyx"],
libraries=["yampl"],
include_dirs=[yampl_include,yampl_include_2],
extra_link_args=[yampl_libs],
language="c++"),
],
cmdclass = {"build_ext": build_ext},
)