mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-04 19:18:11 +08:00
Added py.test to setup.py
This commit is contained in:
+3127
File diff suppressed because it is too large
Load Diff
@@ -6,6 +6,22 @@ with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
|
|||||||
README = readme.read()
|
README = readme.read()
|
||||||
|
|
||||||
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
|
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
|
||||||
|
from distutils.core import setup, Command
|
||||||
|
# you can also import from setuptools
|
||||||
|
|
||||||
|
class PyTest(Command):
|
||||||
|
user_options = []
|
||||||
|
def initialize_options(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def finalize_options(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
errno = subprocess.call([sys.executable, 'runtests.py'])
|
||||||
|
raise SystemExit(errno)
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='django-q',
|
name='django-q',
|
||||||
@@ -20,6 +36,7 @@ setup(
|
|||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
install_requires=['django>=1.7', 'redis', 'coloredlogs', 'django-picklefield', 'jsonpickle'],
|
install_requires=['django>=1.7', 'redis', 'coloredlogs', 'django-picklefield', 'jsonpickle'],
|
||||||
test_suite='django_q.tests',
|
test_suite='django_q.tests',
|
||||||
|
cmdclass = {'test': PyTest},
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 2 - PreAlpha',
|
'Development Status :: 2 - PreAlpha',
|
||||||
'Environment :: Web Environment',
|
'Environment :: Web Environment',
|
||||||
|
|||||||
Reference in New Issue
Block a user