setup.py 2.42 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 12 13 14 15 16
classifiers = """\
Framework :: ZODB
Intended Audience :: Developers
License :: OSI Approved :: GNU General Public License (GPL)
Operating System :: POSIX :: Linux
Programming Language :: Python
Topic :: Database
Topic :: Software Development :: Libraries :: Python Modules
"""

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

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

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