-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathsetup.py
executable file
·87 lines (74 loc) · 2.89 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/usr/bin/env python
# setup
# Setup script for django-generic-json-views
#
# Author: Benjamin Bengfort <[email protected]>
# Created: Thu Feb 12 12:31:28 2015 -0500
#
# Copyright (C) 2014 Bengfort.com
# For license information, see LICENSE.txt
#
# ID: setup.py [] [email protected] $
"""
Setup script for django-generic-json-views
"""
##########################################################################
## Imports
##########################################################################
try:
from setuptools import setup
from setuptools import find_packages
except ImportError:
raise ImportError("Could not import \"setuptools\"."
"Please install the setuptools package.")
##########################################################################
## Package Information
##########################################################################
version = __import__('json_views').__version__
## Discover the packages
packages = find_packages(where=".", exclude=("tests", "docs", "venv"))
## Load the requirements
requires = []
with open('requirements.txt', 'r') as reqfile:
for line in reqfile:
line = line.strip()
if line and not line.startswith("#"):
requires.append(line)
## Define the classifiers
classifiers = (
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP',
)
## Define the keywords
keywords = ('django', 'json', 'views', 'generic', 'class library')
## Define the description
long_description = "These are simple generic class-based views for rendering JSON without the muss and fuss of Django Rest Framework or similar (although, if you're doing an API, then that library is far better than this one! Documentation can be found at Read the Docs: http://django-generic-json-views.readthedocs.org/en/latest/"
## Define the configuration
config = {
"name": "django-generic-json-views",
"version": version,
"url": 'https://github.com/bbengfort/django-generic-json-views',
"download_url": "https://github.com/bbengfort/django-generic-json-views/tarball/v0.7",
"license": 'Apache',
"description": 'Class based generic views that render JSON data.',
"long_description": long_description,
"author": 'Benjamin Bengfort',
"author_email": '[email protected]',
"maintainer": 'Benjamin Bengfort',
"maintainer_email": '[email protected]',
"packages": packages,
"install_requires": requires,
"classifiers": classifiers,
"keywords": keywords,
"zip_safe": True,
"scripts": [],
}
##########################################################################
## Run setup script
##########################################################################
if __name__ == '__main__':
setup(**config)