Add a PTEntry class corresponding to the ptcheckentry struct, and
[invirt/packages/python-afs.git] / setup.py
1 #!/usr/bin/python
2
3 from setuptools import setup, find_packages
4 from distutils.extension import Extension
5 from Cython.Distutils import build_ext
6 import sys
7 import os
8
9 for root in ['/Library/OpenAFS/Tools',
10              '/usr/local',
11              '/usr/afsws',
12              '/usr']:
13     if os.path.exists('%s/include/afs/afs.h' % root):
14         break
15
16 include_dirs = [os.path.join(os.path.dirname(__file__), 'afs'),
17                 '%s/include' % root]
18 library_dirs = ['%s/lib' % root,
19                 '%s/lib/afs' % root]
20 libraries = ['afsauthent', 'afsrpc', 'afsutil', 'resolv']
21 define_macros = [('AFS_PTHREAD_ENV', None)]
22
23 setup(
24     name="PyAFS",
25     version="0.0.0",
26     description="PyAFS - Python bindings for AFS",
27     author="Evan Broder",
28     author_email="broder@mit.edu",
29     license="GPL",
30     requires=['Cython'],
31     packages=find_packages(),
32     ext_modules=[
33         Extension("afs._pts",
34                   ["afs/_pts.pyx"],
35                   libraries=libraries,
36                   include_dirs=include_dirs,
37                   library_dirs=library_dirs,
38                   define_macros=define_macros)
39         ],
40     cmdclass= {"build_ext": build_ext}
41 )