Updated hack to avoid recursive loops.
[python-purple] / setup_dist.py
1 #!/usr/bin/env python
2
3 from distutils.core import setup
4 from distutils.extension import Extension
5
6 from subprocess import Popen, PIPE
7
8 cflags = Popen(['pkg-config', '--cflags', 'purple'], stdout=PIPE).communicate()[0].split()
9 ldflags = Popen(['pkg-config', '--libs', 'purple'], stdout=PIPE).communicate()[0].split()
10
11 purplemodule = Extension('purple',
12                          sources=['c_purple.c','purple.c'],
13                          extra_compile_args=cflags,
14                          extra_link_args=ldflags)
15
16 long_description = "\
17 Python bindings for libpurple, a multi-protocol instant messaging library."
18
19 setup(name = 'python-purple',
20       version = '0.1',
21       author ='Bruno Abinader',
22       author_email = 'bruno.abinader@openbossa.org',
23       description = 'Python bindings for Purple',
24       long_description = long_description,
25       ext_modules = [purplemodule],
26       )