forked from hmvp/python-tdbus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·44 lines (37 loc) · 1.38 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
#!/usr/bin/env python
# This file is part of python-tdbus. Python-tdbus is free software
# available under the terms of the MIT license. See the file "LICENSE" that
# was provided together with this source file for the licensing terms.
#
# Copyright (c) 2012 the python-tdbus authors. See the file "AUTHORS" for a
# complete list.
import subprocess
from setuptools import setup, Extension
version_info = {
'name': 'python-tdbus',
'version': '0.9',
'description': 'A Python interface to D-BUS',
'author': 'Geert Jansen, Hmvp',
'author_email': 'geertj@gmail.com, hiram.van.paassen@mastervolt.com',
'url': 'https://github.com/geertj/python-tdbus',
'license': 'MIT',
'classifiers': [
'Development Status :: 4 - Beta',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7'
],
}
def pkgconfig(*args):
"""Run pkg-config."""
output = subprocess.check_output(['pkg-config'] + list(args), universal_newlines=True)
return output.strip().split() + ['-O0']
setup(
package_dir={ '': 'lib' },
packages=['tdbus'],
ext_modules=[Extension('tdbus._tdbus', ['lib/tdbus/_tdbus.c'],
extra_compile_args=pkgconfig('--cflags', 'dbus-1'),
extra_link_args=pkgconfig('--libs', 'dbus-1'))],
**version_info
)