forked from hzdg/django-enumfields
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
64 lines (53 loc) · 1.68 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
import os
import sys
from setuptools import find_packages, setup
from setuptools.command.test import test as TestCommand
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
README = read('README.rst')
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = ['tests', '-s']
self.test_suite = True
def run_tests(self):
import pytest
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
errno = pytest.main(self.test_args)
sys.exit(errno)
setup(
name='django-enumfields',
version='0.9.0',
author='HZDG',
author_email='webmaster@hzdg.com',
description='Real Python Enums for Django.',
license='MIT',
url='https://github.com/hzdg/django-enumfields',
long_description=README,
packages=find_packages(exclude=['tests*']),
zip_safe=False,
classifiers=[
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Internet :: WWW/HTTP',
],
tests_require=[
'pytest-django',
'Django',
'djangorestframework'
],
extras_require={
":python_version<'3.4'": ['enum34'],
},
cmdclass={'test': PyTest},
)