Added initial support for new_node, update and remove callbacks from PurpleBlistUiOps.
[python-purple] / setup.py
1 #!/usr/bin/env python
2 import sys
3 import os
4 from glob import glob
5
6 from setuptools import setup, find_packages, Extension
7 from distutils.sysconfig import get_python_inc
8 from Cython.Distutils import build_ext
9
10 from subprocess import Popen, PIPE
11
12 cflags = Popen(['pkg-config', '--cflags', 'purple'], stdout=PIPE).communicate()[0].split()
13 ldflags = Popen(['pkg-config', '--libs', 'purple'], stdout=PIPE).communicate()[0].split()
14
15 class pypurple_build_ext(build_ext):
16     def finalize_options(self):
17         build_ext.finalize_options(self)
18         self.include_dirs.insert(0, 'libpurple')
19         self.pyrex_include_dirs.extend(self.include_dirs)
20
21 setup(
22     name = 'python-pypurple',
23     version = '0.1',
24     author ='Bruno Abinader',
25     author_email='bruno.abinader@openbossa.org',
26     cmdclass = {'build_ext': pypurple_build_ext},
27     ext_modules=[Extension('purple',
28         sources=['c_purple.c','purple.pyx'],
29         depends=glob('libpurple/*.pxd'),
30         extra_compile_args=cflags,
31         extra_link_args=ldflags)])