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

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

Moved the python bbftpd extension module source code to it's own file.

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
8# Not all *.c files are compiled into *.o files in bbftpd
9bbftpd_src = [
10    'bbftpd.c',
11    'bbftpd_cd.c',
12    'bbftpd_check.c',
13    'bbftpd_crypt.c',
14    'bbftpd_daemon.c',
15    'bbftpd_list.c',
16    'bbftpd_login.c',
17    'bbftpd_message.c',
18    'bbftpd_mkdir.c',
19    'bbftpd_rm.c',
20    'bbftpd_stat.c',
21    'bbftpd_statfs.c',
22    'bbftpd_readcontrol.c',
23    'bbftpd_retr.c',
24    'bbftpd_signals.c',
25    'bbftpd_socket.c',
26    'bbftpd_store.c',
27    'bbftpd_utils.c',
28    'changetodir.c',
29    'createadir.c',
30    'createreceivesock.c',
31    'readcontrol.c',
32    'sendafile.c',
33    'sendlist.c',
34    'signals_routines.c',
35    'storeafile.c',
36    'bbftpd_private.c',
37    'bbftpd_private_user.c',
38    ]
39
40sources = ['%s/bbftpd/%s' % (bbftpd_home, x) for x in bbftpd_src] + ['./src/python_ext/bbftpd.c']
41
42bbftpd = Extension('bbftpd',
43                   define_macros = [('NDG_AUTH', 1), ('LOCAL_SYSLOG_FACILITY', 1),
44                                    ('_LARGEFILE64_SOURCE', 1),
45                                    ('NDG_PYTHON_EMBED', 1)],
46                   include_dirs = [bbftpd_home+'/includes', bbftpd_home+'/bbftpd'],
47                   libraries = ['crypt', 'crypto'],
48                   sources = sources)
49
50setup(name = 'bbftp-python',
51      version = '0.1',
52      description = 'Embedded bbftp server',
53      author = 'Stephen Pascoe',
54      author_email = 'S.Pascoe@rl.ac.uk',
55      ext_modules = [bbftpd])
56     
Note: See TracBrowser for help on using the repository browser.