-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
executable file
·60 lines (49 loc) · 1.62 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/python
# -*- mode: python; coding: utf-8 -*-
import sys
import subprocess
from distutils.core import setup, Extension
glib_headers = subprocess.check_output(
"pkg-config --cflags glib-2.0".split()).decode('utf-8')
glib_headers = glib_headers.strip().split("-I")
glib_headers = [x.strip() for x in glib_headers if x]
glib_libs = subprocess.check_output(
"pkg-config --libs glib-2.0".split()).decode('utf-8')
glib_libs = glib_libs.strip().split("-l")
glib_libs = [x.strip() for x in glib_libs if x]
if sys.version_info.major == 3:
boost_libs = ["boost_python-py34"]
else:
boost_libs = ["boost_python"]
setup(
name = 'gattlib',
version = "0.20150131",
description = "Library to access Bluetooth LE devices",
author = "Oscar Acena",
author_email = "oscar.acena@gmail.com",
url = "https://bitbucket.org/OscarAcena/pygattlib",
use_2to3 = True,
ext_modules = [
Extension(
'gattlib',
['src/gattservices.cpp',
'src/bindings.cpp',
'src/gattlib.cpp',
'src/bluez/lib/uuid.c',
'src/bluez/attrib/gatt.c',
'src/bluez/attrib/gattrib.c',
'src/bluez/attrib/utils.c',
'src/bluez/attrib/att.c',
'src/bluez/src/shared/crypto.c',
'src/bluez/src/log.c',
'src/bluez/btio/btio.c'],
libraries = glib_libs + boost_libs + [
"boost_thread", "bluetooth"
],
include_dirs = glib_headers + [
'src/bluez',
],
define_macros = [('VERSION', '"5.25"')],
)
],
)