-
Notifications
You must be signed in to change notification settings - Fork 20
/
setup.py
66 lines (52 loc) · 1.61 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
#!/usr/bin/env python
from setuptools import setup, find_packages, Command
import os
import sys
class BaseCommand(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
class TestCommand(BaseCommand):
description = "run self-tests"
def run(self):
os.chdir('testproject')
ret = os.system('python manage.py test testapp')
if ret != 0:
sys.exit(-1)
class CoverageCommand(BaseCommand):
description = "run self-tests and report coverage (requires coverage.py)"
def run(self):
os.chdir('testproject')
ret = os.system('coverage run --source=casper manage.py test testapp')
if ret != 0:
sys.exit(-1)
os.system('coverage html')
setup(
name='django-casper',
version='0.0.4',
author='Senko Rasic',
author_email='[email protected]',
maintainer='Nik Nyby',
maintainer_email='[email protected]',
description='CasperJS test integration for Django',
license='MIT',
url='https://github.com/dobarkod/django-casper',
classifiers=[
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Framework :: Django",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Topic :: Software Development :: Libraries :: Python Modules",
],
packages=find_packages(),
install_requires=['Django>=1.7'],
setup_requires=['coverage'],
cmdclass={
'test': TestCommand,
'coverage': CoverageCommand
}
)