Prepend _ to all methods of afs._pts.PTS - afs.pts will descend from
[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 def PyAFSExtension(module):
24     return Extension(module,
25                      ["%s.pyx" % module.replace('.', '/')],
26                      libraries=libraries,
27                      include_dirs=include_dirs,
28                      library_dirs=library_dirs,
29                      define_macros=define_macros)
30
31 setup(
32     name="PyAFS",
33     version="0.0.0",
34     description="PyAFS - Python bindings for AFS",
35     author="Evan Broder",
36     author_email="broder@mit.edu",
37     license="GPL",
38     requires=['Cython'],
39     packages=find_packages(),
40     ext_modules=[
41         PyAFSExtension("afs.afs"),
42         PyAFSExtension("afs._pts"),
43         ],
44     cmdclass= {"build_ext": build_ext}
45 )