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

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

Implemented full client-server handshake. A version message is now
exchanged client->server then server->client. These messages are logged
in debug mode. Message passing is implemented in Python on the server (at the
moment this is only implemented within test/test_embedded.py).

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('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      ext_modules = [bbftpd])
60     
Note: See TracBrowser for help on using the repository browser.