setup.py 2.37 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 13
Programming Language :: Python :: 2.6
Programming Language :: Python :: 2.7
14 15 16 17
Topic :: Database
Topic :: Software Development :: Libraries :: Python Modules
"""

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

27
extras_require = {
28
    'admin': [],
29
    'client': ['ZODB3'], # ZODB3 >= 3.10
30 31
    'ctl': [],
    'master': [],
32 33 34 35 36 37 38 39
    'storage-btree': ['ZODB3'],
    'storage-mysqldb': ['MySQL-python'],
}
extras_require['tests'] = ['zope.testing', 'psutil',
    'neoppod[%s]' % ', '.join(extras_require)]

setup(
    name = 'neoppod',
40
    version = '1.0-dev',
41
    description = __doc__.strip(),
42 43 44 45
    author = 'NEOPPOD',
    author_email = 'neo-dev@erp5.org',
    url = 'http://www.neoppod.org/',
    license = 'GPL 2+',
46
    platforms = ["any"],
47
    classifiers=classifiers.splitlines(),
Julien Muchembled's avatar
Julien Muchembled committed
48 49
    long_description = ".. contents::\n\n" + open('README').read()
                     + "\n" + open('CHANGES').read(),
50 51
    packages = find_packages(),
    py_modules = ['mock'],
52
    entry_points = {
Vincent Pelletier's avatar
Vincent Pelletier committed
53
        'console_scripts': [
54 55
            # 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
56
            'neoadmin=neo.scripts.neoadmin:main',
57 58
            'neoctl=neo.scripts.neoctl:main',
            'neomaster=neo.scripts.neomaster:main',
59
            'neomigrate=neo.scripts.neomigrate:main',
60 61
            'neostorage=neo.scripts.neostorage:main',
            'neotestrunner=neo.scripts.runner:main',
62
            'neosimple=neo.scripts.simple:main',
63
            'stat_zodb=neo.tests.stat_zodb:main',
Vincent Pelletier's avatar
Vincent Pelletier committed
64 65
        ],
    },
66
    extras_require = extras_require,
67
    package_data = {
68
        'neo.client': [
69 70 71
            'component.xml',
        ],
    },
72
    zip_safe = True,
73
)