Updated notify_cbs.pxd.
[python-purple] / setup.py
1 #!/usr/bin/env python
2
3 import sys
4 import os
5
6 from ez_setup import use_setuptools
7 use_setuptools('0.6c8')
8
9
10 from setuptools import setup, find_packages, Extension
11 from distutils.sysconfig import get_python_inc
12 from glob import glob
13
14 from Cython.Distutils import build_ext
15
16 from subprocess import Popen, PIPE
17
18 cflags = Popen(['pkg-config', '--cflags', 'purple'], stdout=PIPE).communicate()[0].split()
19 ldflags = Popen(['pkg-config', '--libs', 'purple'], stdout=PIPE).communicate()[0].split()
20
21 purplemodule = Extension('purple',
22                          sources=['c_purple.c','purple.pyx'],
23                          depends=glob('libpurple/*.pxd'),
24                          extra_compile_args=cflags,
25                          extra_link_args=ldflags)
26
27 long_description = """\
28 Python bindings for Purple, a multi-protocol instant messaging library.
29 """
30
31 class pypurple_build_ext(build_ext):
32     def finalize_options(self):
33         build_ext.finalize_options(self)
34         self.include_dirs.insert(0, 'libpurple')
35         self.pyrex_include_dirs.extend(self.include_dirs)
36
37 setup(name = 'python-purple',
38       version = '0.1',
39       author ='Bruno Abinader',
40       author_email = 'bruno.abinader@openbossa.org',
41       description = 'Python bindings for Purple',
42       long_description = long_description,
43       packages = find_packages(),
44       ext_modules = [purplemodule],
45       zip_safe=False,
46       cmdclass = {'build_ext': pypurple_build_ext},
47       )