source: TI05-delivery/trunk/setup.py @ 1133

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI05-delivery/trunk/setup.py@1144
Revision 1133, 1.7 KB checked in by spascoe, 14 years ago (diff)

The python delivery package is born. See the delivery.server module for
the server API. This module imports delivery.bbftpd which does the python/C
binding.

The delivery package is being documented using epydoc comments
(epydoc.sourceforge.net). Although the latest version of doxygen will do
python it isn't installed on glue and epydoc is more mature.

Line 
1"""Built bbftp embedded in python.
2"""
3
4from distutils.core import setup, Extension
5
6bbftpd_home = './src/bbftp-server-3.2.0'
7# Get the version from ./VERSION
8version = open('./VERSION').read()
9
10
11# Not all *.c files are compiled into *.o files in bbftpd
12bbftpd_src = [
13    'bbftpd.c',
14    'bbftpd_cd.c',
15    'bbftpd_check.c',
16    'bbftpd_crypt.c',
17    'bbftpd_daemon.c',
18    'bbftpd_list.c',
19    'bbftpd_login.c',
20    'bbftpd_message.c',
21    'bbftpd_mkdir.c',
22    'bbftpd_rm.c',
23    'bbftpd_stat.c',
24    'bbftpd_statfs.c',
25    'bbftpd_readcontrol.c',
26    'bbftpd_retr.c',
27    'bbftpd_signals.c',
28    'bbftpd_socket.c',
29    'bbftpd_store.c',
30    'bbftpd_utils.c',
31    'changetodir.c',
32    'createadir.c',
33    'createreceivesock.c',
34    'readcontrol.c',
35    'sendafile.c',
36    'sendlist.c',
37    'signals_routines.c',
38    'storeafile.c',
39    'bbftpd_private.c',
40    'bbftpd_private_user.c',
41    ]
42
43sources = ['%s/bbftpd/%s' % (bbftpd_home, x) for x in bbftpd_src] + ['./src/python_ext/bbftpd.c']
44
45bbftpd = Extension('delivery.bbftpd',
46                   define_macros = [('NDG_AUTH', 1), ('LOCAL_SYSLOG_FACILITY', 1),
47                                    ('_LARGEFILE64_SOURCE', 1),
48                                    ('NDG_PYTHON_EMBED', 1),
49                                    ('NDG_DELIVERY_VERSION', '"%s"' % version)],
50                   include_dirs = [bbftpd_home+'/includes', bbftpd_home+'/bbftpd'],
51                   libraries = ['crypt', 'crypto'],
52                   sources = sources)
53
54setup(name = 'bbftp-python',
55      version = version,
56      description = 'Embedded bbftp server',
57      author = 'Stephen Pascoe',
58      author_email = 'S.Pascoe@rl.ac.uk',
59      package_dir = {'': 'lib/python'},
60      packages = ['delivery'],
61      ext_modules = [bbftpd])
62     
Note: See TracBrowser for help on using the repository browser.