-
Notifications
You must be signed in to change notification settings - Fork 28
/
setup.py
64 lines (50 loc) · 1.58 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
#!/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('%s manage.py test testapp' % sys.executable)
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')
r = os.system('coverage run --source=restless manage.py test testapp')
if r != 0:
sys.exit(-1)
os.system('coverage html')
setup(
name='DjangoRestless',
version='0.0.10',
author='Senko Rasic',
author_email='[email protected]',
description='A RESTful framework for Django',
license='MIT',
url='https://github.com/dobarkod/django-restless',
classifiers=[
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Framework :: Django",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Topic :: Software Development :: Libraries :: Python Modules",
],
packages=find_packages(),
install_requires=['Django>=1.5', 'six>=1.3.0'],
cmdclass={
'test': TestCommand,
'coverage': CoverageCommand
}
)