-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
executable file
·62 lines (51 loc) · 1.81 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
59
60
61
62
from setuptools import setup, find_packages
import os
APP_NAME = 'django_flickr_gallery'
def get_version(version=None):
"Returns a PEP 386-compliant version number from VERSION."
version = version or __import__(APP_NAME).__version__
assert version[3] in ('alpha', 'beta', 'rc', 'final')
# Now build the two parts of the version number:
# main = X.Y[.Z]
# sub = .devN - for pre-alpha releases
# | {a|b|c}N - for alpha, beta and rc releases
main = '.'.join(str(x) for x in version[:3])
sub = ''
if version[3] != 'final':
mapping = {'alpha': 'a', 'beta': 'b', 'rc': 'c'}
sub = mapping[version[3]] + '.dev' + str(version[4])
return str(main + sub)
VERSION = get_version()
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
README = readme.read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='django-flickr-gallery',
version=VERSION,
packages=find_packages(),
url='http://github.com/arkanister/django-flickr-gallery',
license='BSD',
author='Arkanister',
author_email='arkanister.dev@gmail.com',
description='Django Gallery with flickr integration',
keywords='django flickr gallery flickr-gallery',
long_description=README,
install_requires=[
"Django >= 1.7",
"django-ckeditor >= 5.0.2",
"flickrapi",
"pytz",
],
classifiers=[
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Framework :: Django',
'Topic :: Multimedia :: Graphics'
],
include_package_data=True,
zip_safe=False
)