forked from hzdg/django-enumfields
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
59 lines (49 loc) · 1.44 KB
/
setup.py
File metadata and controls
59 lines (49 loc) · 1.44 KB
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
#!/usr/bin/env python
import os
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import sys
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)
install_requires = ['six']
try:
import enum
except ImportError:
install_requires.append('enum34')
setup(
name='django-enumfields',
version='0.8.2',
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',
'Topic :: Internet :: WWW/HTTP',
],
install_requires=install_requires,
tests_require=[
'pytest-django',
'Django',
],
cmdclass={'test': PyTest},
)