source: TI05-delivery/trunk/components/client/setup.py @ 1541

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

Major directory structure reorganisation.

The python source tree is now divided into 3 components: common,
server and client. Each component has it's own setup.py.

Do "python setup.py bdist_egg" to create 3 eggs for each component.

Some things in the distribution are now out of sync (e.g. documentation) but
the test cases work (I havn't tried the remote test cases).

Line 
1import sys, os
2dist_home = '../..'
3sys.path.append(dist_home)
4
5# Get the version from ./VERSION
6version = open(os.path.join(dist_home, 'VERSION')).read()
7
8import ez_setup
9ez_setup.use_setuptools()
10
11from setuptools import setup, Extension
12
13dist_home = '../..'
14bbftpd_home = os.path.join(dist_home, 'src/bbftp-server-3.2.0')
15bbftpc_home = os.path.join(dist_home, 'src/bbftp-client-3.2.0')
16# Get the version from ./VERSION
17version = open(os.path.join(dist_home, 'VERSION')).read()
18
19
20
21bbftpc_src = [ 
22    'bbftp_cd.c',
23    'bbftp_get.c',
24    'bbftp_lcd.c',
25    'bbftp_list.c',
26    'bbftp_mget.c',
27    'bbftp_mkdir.c',
28    'bbftp_mput.c',
29    'bbftp_put.c',
30    'bbftp_rm.c',
31    'bbftp_stat.c',
32    'bbftp_statfs.c',
33    'bbftp_dir.c',
34    'bbftp_retr.c',
35    'bbftp_setremotecos.c',
36    'bbftp_setremoteumask.c',
37    'bbftp_store.c',
38    'bbftp_socket.c',
39    'bbftp_utils.c',
40    'connecttoserver.c',
41    'getdatasock.c',
42    'readmessage.c',
43    'sendproto.c',
44    'treatcommand.c',
45    'bbftp_turl.c',
46    'writemessage.c',
47    'setsignals.c',
48    'bbftp_private.c',
49    'bbftp_private_user.c',
50    'ndg_client.c'
51    ]
52
53client_sources = ['%s/bbftpc/%s' % (bbftpc_home, x) for x in bbftpc_src] + ['./ext/bbftpc.c', 
54                                                                            './ext/util.c',
55                                                                            './ext/bbftpc_main.c']
56
57#-------------------------------------------------------------------------------------------
58
59bbftpc = Extension('ndg.delivery.client.bbftpc',
60                   define_macros = [('NDG_AUTH', 1), ('LOCAL_SYSLOG_FACILITY', 1),
61                                    ('_LARGEFILE64_SOURCE', 1),
62                                    ('_FILE_OFFSET_BITS', 64),
63                                    ('NDG_PYTHON_EMBED', 1),
64                                    ('NDG_DELIVERY_VERSION', version)],
65                   include_dirs = [bbftpc_home+'/includes', bbftpc_home+'/bbftpc'],
66                   libraries = ['crypt', 'crypto'],
67                   extra_compile_args = ["-O1", "-Wno-strict-prototypes"],
68                   sources = client_sources)
69
70     
71setup(name = 'ndg_delivery_client',
72      version = version,
73      description = 'Embedded bbftp client',
74      author = 'Stephen Pascoe',
75      author_email = 'S.Pascoe@rl.ac.uk',
76
77      zip_safe = True,
78      install_requires = ['setuptools'],
79      package_requires = ['ndg_delivery_common'],
80
81      packages = ['ndg', 'ndg.delivery', 'ndg.delivery.client'],
82      namespace_packages = ['ndg', 'ndg.delivery'],
83      package_dir = {'': 'lib'},
84      ext_modules = [bbftpc],
85      )
Note: See TracBrowser for help on using the repository browser.