source: mailjam/setup.py@ 33:8efa7a7802d4

Last change on this file since 33:8efa7a7802d4 was 33:8efa7a7802d4, checked in by Borja Lopez <borja@…>, 12 years ago

Added a new configuration parameter to the xmlrpc_server section of
mailman.conf, access_log, that sets the path to the log file where
incoming requests will be logged (web server style)

Enabled requests logging in the call to SimpleXMLRPCServer

Set current version to 0.1.1, as we have everything we wanted for 0.1.0
plus some bug fixes.

File size: 1.8 KB
Line 
1import os
2from distutils.core import setup
3
4# Yes, I'm ommiting windoze...
5BSDs = ['FreeBSD', 'OpenBSD', 'NetBSD', 'DragonFlyBSD']
6linux = ['Linux']
7osx = ['Darwin']
8
9def proper_etc_path():
10 """
11 Try to set the proper path for configuration files, depending
12 on the operating system.
13
14 FIXME: I'm not sure this would work fine, as this will be executed
15 when running python setup.py sdist, not when installing from the
16 source package.
17 """
18 os_name = os.uname()[0]
19 if os_name in BSDs:
20 return '/usr/local/etc/'
21 if os_name in linux or os_name in osx:
22 return '/etc/'
23 return ''
24
25def proper_rc_path():
26 """
27 Similar to proper_etc_path(), returns the path where startup scripts
28 should be placed
29 """
30 os_name = os.uname()[0]
31 etc_path = proper_etc_path()
32 if os_name in 'BSDs':
33 return etc_path+'rc.d'
34 if os_name in linux:
35 return etc_path+'init.d'
36 if os_name in osx:
37 # FIXME: not sure about where startup scripts should be placed in
38 # "stock" osx (no macports, no homebrew, etc)
39 return etc_path
40 return ''
41
42setup(
43 name='mailjam',
44 version='0.1.1',
45 author='Francisco de Borja Lopez Rio',
46 author_email='borja@codigo23.net',
47 packages=['mailjam'],
48 url='https://bitbucket.org/codigo23/mailjam',
49 license='BSD licence, see LICENSE',
50 description='Mailing lists management software',
51 long_description=open('README').read(),
52 scripts=['bin/mailjam-server', 'bin/mailjam-mta', 'bin/mailjam-cli'],
53 data_files=[(proper_etc_path()+'mailjam', ['conf/mailjam.conf',
54 'conf/mailjam-mta.conf',
55 'conf/mailjam-cli.conf']),
56 (proper_rc_path(), ['bin/rc.d/mailjam'])]
57)
Note: See TracBrowser for help on using the repository browser.