setup.py 1.85 KB
Newer Older
Laurent Bachelier's avatar
Laurent Bachelier committed
1 2 3 4 5 6 7
#!/usr/bin/env python

from setuptools import setup, find_packages
from glob import glob
from sys import version_info

assert version_info >= (2, 6)
Romain Bignon's avatar
Romain Bignon committed
8
DATA_DIR = 'share/assnet'
9

10
try:
11
    import Image
12 13
except ImportError:
    PIL = 'Pillow'
14
else:
15 16
    # detect Pillow-only feature, or weird Debian stuff
    if hasattr(Image, 'alpha_composite') or 'PILcompat' in Image.__file__:
17
        PIL = 'Pillow'
18 19
    else:
        PIL = 'PIL'
20

21
REQUIREMENTS = [PIL, 'mako', 'webob', 'paste', 'PyRSS2Gen', 'python-dateutil']
Laurent Bachelier's avatar
Laurent Bachelier committed
22 23 24
if version_info < (2, 7):
    REQUIREMENTS.append('argparse')

25 26
setup(
    name="assnet",
Laurent Bachelier's avatar
Laurent Bachelier committed
27
    version='0.1',
Laurent Bachelier's avatar
Laurent Bachelier committed
28
    description='The Asocial Sharing Network project is a web application useful for sharing files (with support for photos galleries, videos, etc.) or organizing events with your friends, removing the obligation of using Facebook or other centralized social networks. It is configurable and administrable by geeks, yet easy to use by their mothers.',
29
    long_description=open('README.rst').read(),
Laurent Bachelier's avatar
Laurent Bachelier committed
30 31
    author='Laurent Bachelier',
    author_email='laurent@bachelier.name',
Romain Bignon's avatar
Romain Bignon committed
32
    url='http://assnet.org/',
Laurent Bachelier's avatar
Laurent Bachelier committed
33 34 35 36 37 38 39 40 41 42 43 44
    license='GNU AGPL 3',
    classifiers=[
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'License :: OSI Approved :: GNU Affero General Public License v3',
        'Programming Language :: JavaScript',
        'Programming Language :: Python',
        'Topic :: Internet :: WWW/HTTP',
    ],

    zip_safe=False,
    packages=find_packages(),
Romain Bignon's avatar
Romain Bignon committed
45
    scripts=['bin/asn', 'bin/assnet-serve'],
Laurent Bachelier's avatar
Laurent Bachelier committed
46
    data_files=[
Laurent Bachelier's avatar
Laurent Bachelier committed
47 48 49 50 51
        ('%s/assets' % DATA_DIR,    glob('data/assets/*')),
        ('%s/templates' % DATA_DIR, glob('data/templates/*')),
        ('%s/scripts' % DATA_DIR,   glob('data/scripts/*')),
    ],
    install_requires=REQUIREMENTS,
Laurent Bachelier's avatar
Laurent Bachelier committed
52 53
    test_suite='nose.collector',
    tests_require=['nose>=1.0', 'webtest'],
Laurent Bachelier's avatar
Laurent Bachelier committed
54
)