forked from jazzband/django-analytical
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
108 lines (87 loc) · 2.71 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
import os
try:
from setuptools import setup, Command
except ImportError:
from distutils.core import setup, Command
os.environ['DJANGO_SETTINGS_MODULE'] = 'analytical.tests.settings'
cmdclass = {}
try:
from sphinx.setup_command import BuildDoc
cmdclass['build_sphinx'] = BuildDoc
except ImportError:
pass
try:
from sphinx_pypi_upload import UploadDoc
cmdclass['upload_sphinx'] = UploadDoc
except ImportError:
pass
class TestCommand(Command):
description = "run package tests"
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
from analytical.tests.utils import run_tests
run_tests()
cmdclass['test'] = TestCommand
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
try:
import django
os.environ.setdefault(
"DJANGO_SETTINGS_MODULE",
"analytical.tests.settings"
)
django.setup()
except ImportError:
print(
"Could not import django. "
"This is fine, unless you intend to run unit tests."
)
import analytical
setup(
name='django-analytical',
version=analytical.__version__,
license=analytical.__license__,
description='Analytics service integration for Django projects',
long_description=read('README.rst'),
author=analytical.__author__,
author_email=analytical.__email__,
packages=[
'analytical',
'analytical.templatetags',
'analytical.tests',
'analytical.tests.templatetags',
],
keywords=['django', 'analytics'],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Framework :: Django',
'Framework :: Django :: 1.7',
'Framework :: Django :: 1.8',
'Framework :: Django :: 1.9',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Software Development :: Libraries :: Python Modules',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
platforms=['any'],
url='https://github.com/jcassee/django-analytical',
download_url='https://github.com/jcassee/django-analytical/archive/master.zip',
cmdclass=cmdclass,
install_requires=[
'Django>=1.7.0',
],
)