forked from TND/django-files-widget
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
58 lines (53 loc) · 2.07 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
from setuptools import setup, find_packages
import sys, os
version = '0.2.4'
def read(fname):
# file read function copied from sorl.django-documents project
return open(os.path.join(os.path.dirname(__file__), fname)).read()
install_requires = [
'sorl-thumbnail',
]
# PIL or pillow required
# try except code copied from mezzanine project
# https://github.com/stephenmcd/mezzanine/blob/master/setup.py
try:
from PIL import Image, ImageOps
except ImportError:
try:
import Image, ImageFile, ImageOps
except ImportError:
# no way to install pillow/PIL with jython, so exclude this in any case
if not sys.platform.startswith('java'):
install_requires += ["pillow"]
setup(
name='django-files-widget',
version=version,
description="Django AJAX upload widget and model field for multiple files or images, featuring drag & drop uploading, upload progress bar, sortable image gallery",
long_description=read('README.md'),
classifiers=[
# Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX',
'Operating System :: Unix',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Software Development :: Libraries :: Python Modules',
],
keywords='django ajax html5 upload widget files images gallery sorting progress thumbnails multiple m2m imagesfield imagefield filesfield filefield admin forms field',
author='Top Notch Development',
author_email='[email protected]',
url='http://topnotchdevelopment.nl',
license='MIT',
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
include_package_data=True,
zip_safe=True,
install_requires=install_requires,
entry_points="""
# -*- Entry points: -*-
""",
)