setup.py 2.44 KB
Newer Older
1 2 3
"""Distributed, redundant and transactional storage for ZODB
"""

4 5
from setuptools import setup, find_packages
import os
6

7 8 9 10 11
classifiers = """\
Framework :: ZODB
Intended Audience :: Developers
License :: OSI Approved :: GNU General Public License (GPL)
Operating System :: POSIX :: Linux
12
Programming Language :: Python :: 2.7
13 14 15 16
Topic :: Database
Topic :: Software Development :: Libraries :: Python Modules
"""

17
if not os.path.exists('mock.py'):
18
    import cStringIO, hashlib, urllib, zipfile
19 20 21
    mock_py = zipfile.ZipFile(cStringIO.StringIO(urllib.urlopen(
        'http://downloads.sf.net/sourceforge/python-mock/pythonmock-0.1.0.zip'
        ).read())).read('mock.py')
22
    if hashlib.md5(mock_py).hexdigest() != '79f42f390678e5195d9ce4ae43bd18ec':
23 24
        raise EnvironmentError("MD5 checksum mismatch downloading 'mock.py'")
    open('mock.py', 'w').write(mock_py)
25

26 27
zodb_require = ['ZODB3>=3.10', 'ZODB3<3.11dev']

28
extras_require = {
29
    'admin': [],
30
    'client': zodb_require,
31 32
    'ctl': [],
    'master': [],
33
    'storage-sqlite': [],
34
    'storage-mysqldb': ['MySQL-python'],
35
    'storage-importer': zodb_require,
36
}
37
extras_require['tests'] = ['zope.testing', 'psutil>=2',
38 39 40 41
    'neoppod[%s]' % ', '.join(extras_require)]

setup(
    name = 'neoppod',
Julien Muchembled's avatar
Julien Muchembled committed
42
    version = '1.2',
43
    description = __doc__.strip(),
44 45 46 47
    author = 'NEOPPOD',
    author_email = 'neo-dev@erp5.org',
    url = 'http://www.neoppod.org/',
    license = 'GPL 2+',
48
    platforms = ["any"],
49
    classifiers=classifiers.splitlines(),
Julien Muchembled's avatar
Julien Muchembled committed
50 51
    long_description = ".. contents::\n\n" + open('README').read()
                     + "\n" + open('CHANGES').read(),
52 53
    packages = find_packages(),
    py_modules = ['mock'],
54
    entry_points = {
Vincent Pelletier's avatar
Vincent Pelletier committed
55
        'console_scripts': [
56 57
            # XXX: we'd like not to generate scripts for unwanted features
            # (eg. we don't want neotestrunner if nothing depends on tests)
Vincent Pelletier's avatar
Vincent Pelletier committed
58
            'neoadmin=neo.scripts.neoadmin:main',
59
            'neoctl=neo.scripts.neoctl:main',
60
            'neolog=neo.scripts.neolog:main',
61
            'neomaster=neo.scripts.neomaster:main',
62
            'neomigrate=neo.scripts.neomigrate:main',
63 64
            'neostorage=neo.scripts.neostorage:main',
            'neotestrunner=neo.scripts.runner:main',
65
            'neosimple=neo.scripts.simple:main',
66
            'stat_zodb=neo.tests.stat_zodb:main',
Vincent Pelletier's avatar
Vincent Pelletier committed
67 68
        ],
    },
69
    extras_require = extras_require,
70
    package_data = {
71
        'neo.client': [
72 73 74
            'component.xml',
        ],
    },
75
    zip_safe = True,
76
)