Changeset 15:8ae771653ffe in mailjam for setup.py


Ignore:
Timestamp:
May 21, 2012, 7:22:27 PM (12 years ago)
Author:
Borja Lopez <borja@…>
Branch:
default
Phase:
public
Message:

Added a postman-mta.conf version to be used in the tests

Added a script bin/postman-mta that will run the MTA client from a shell

Renamed the bin/postman_server script to bin/postman-server

Disabled the tests from tests/mta.py, as they are totally outdated and they
break the tests.

Replaced the old code in mta.Sendmail with a new mta.MTAClient class, which
contains code that actually *works* against a postman server (tests to come!)

Restructured the postman-mta.conf configuration file. The sections have better
names now (server, archive) and the archive section contains parameters which
names that reflect much better what they are used for.

Added a new parameter to the postman-mta.conf file (server.uri) that allows
us to set the uri to where any MTA client will have to connect, in only one
shorter line.

Fixed some typos in postman.config

Updated the setup.py script so the bin/postman-* scripts are installed
properly in the bin/ directory.

Added a function, proper_etc_path(), to the setup.py script so the path where
configuration files have to be installed is correctly set when building a
distribution/source package (still to be tested).

Updated the MANIFEST

File:
1 edited

Legend:

Unmodified
Added
Removed
  • setup.py

    r3 r15  
     1import os
    12from distutils.core import setup
     3
     4def proper_etc_path():
     5    # Yes, I'm ommiting windoze...
     6    BSDs = ['FreeBSD', 'OpenBSD', 'NetBSD', 'DragonFlyBSD']
     7    linux = ['Linux']
     8    osx = ['Darwin']
     9    os_name = os.uname()[0]
     10    if os_name in BSDs:
     11        return '/usr/local/etc/'
     12    if os_name in linux or os_name in osx:
     13        return '/etc/'   
    214
    315setup(
     
    1123    description='Mailing lists management software',
    1224    long_description=open('README').read(),
     25    scripts=['bin/postman-server', 'bin/postman-mta'],
     26    #data_files=[(proper_etc_path()+'postman', ['conf/postman.conf',
     27    #                                           'conf/postman-mta.conf']),
     28    #            ]
    1329)
Note: See TracChangeset for help on using the changeset viewer.