Blame view

setup.py 2.99 KB
Julien Muchembled committed
1 2 3
"""Distributed, redundant and transactional storage for ZODB
"""

Julien Muchembled committed
4 5
from setuptools import setup, find_packages
import os
Julien Muchembled committed
6

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

Julien Muchembled committed
17
if not os.path.exists('mock.py'):
Julien Muchembled committed
18
    import cStringIO, hashlib, urllib, zipfile
Julien Muchembled committed
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')
Julien Muchembled committed
22
    if hashlib.md5(mock_py).hexdigest() != '79f42f390678e5195d9ce4ae43bd18ec':
Julien Muchembled committed
23 24
        raise EnvironmentError("MD5 checksum mismatch downloading 'mock.py'")
    open('mock.py', 'w').write(mock_py)
Julien Muchembled committed
25

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

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

Julien Muchembled committed
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
try:
    from docutils.core import publish_string
except ImportError:
    pass
else:
    from distutils.dist import DistributionMetadata
    _get_long_description = DistributionMetadata.get_long_description.im_func
    def get_long_description(self):
        r = _get_long_description(self)
        DistributionMetadata.get_long_description = _get_long_description
        publish_string(r, enable_exit_status=True, settings_overrides={
            'exit_status_level': 0})
        return r
    DistributionMetadata.get_long_description = get_long_description

Julien Muchembled committed
55 56
setup(
    name = 'neoppod',
Julien Muchembled committed
57
    version = '1.6',
Julien Muchembled committed
58
    description = __doc__.strip(),
Julien Muchembled committed
59 60 61 62
    author = 'NEOPPOD',
    author_email = 'neo-dev@erp5.org',
    url = 'http://www.neoppod.org/',
    license = 'GPL 2+',
Julien Muchembled committed
63
    platforms = ["any"],
Julien Muchembled committed
64
    classifiers=classifiers.splitlines(),
Julien Muchembled committed
65 66
    long_description = ".. contents::\n\n" + open('README').read()
                     + "\n" + open('CHANGES').read(),
Julien Muchembled committed
67 68
    packages = find_packages(),
    py_modules = ['mock'],
Julien Muchembled committed
69
    entry_points = {
Vincent Pelletier committed
70
        'console_scripts': [
Julien Muchembled committed
71 72
            # XXX: we'd like not to generate scripts for unwanted features
            # (eg. we don't want neotestrunner if nothing depends on tests)
Vincent Pelletier committed
73
            'neoadmin=neo.scripts.neoadmin:main',
Julien Muchembled committed
74
            'neoctl=neo.scripts.neoctl:main',
Julien Muchembled committed
75
            'neolog=neo.scripts.neolog:main',
Julien Muchembled committed
76
            'neomaster=neo.scripts.neomaster:main',
Julien Muchembled committed
77
            'neomigrate=neo.scripts.neomigrate:main',
Julien Muchembled committed
78 79
            'neostorage=neo.scripts.neostorage:main',
            'neotestrunner=neo.scripts.runner:main',
Julien Muchembled committed
80
            'neosimple=neo.scripts.simple:main',
Julien Muchembled committed
81
            'stat_zodb=neo.tests.stat_zodb:main',
Vincent Pelletier committed
82 83
        ],
    },
Julien Muchembled committed
84
    extras_require = extras_require,
Grégory Wisniewski committed
85
    package_data = {
Julien Muchembled committed
86
        'neo.client': [
Grégory Wisniewski committed
87 88 89
            'component.xml',
        ],
    },
Julien Muchembled committed
90
    zip_safe = True,
Julien Muchembled committed
91
)