Skip to content

Commit

Permalink
Added a setup test command
Browse files Browse the repository at this point in the history
  • Loading branch information
charettes committed Jan 26, 2013
1 parent 29fcf25 commit 87df59a
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,34 @@
#!/usr/bin/env python
import os
import re
from setuptools import setup, find_packages
from setuptools import Command, find_packages, setup
from subprocess import call

from mutant import __version__


MODULE_PATH = os.path.abspath(os.path.dirname(__file__))


class TestCommand(Command):
user_options = []

def initialize_options(self):
pass

def finalize_options(self):
pass

def run(self):
call(['django-admin.py', 'test', '--pythonpath', MODULE_PATH,
'--settings', 'tests.test_sqlite'])


LINK_REQUIREMENT = re.compile(
r'^https://.+#egg=(?P<package>.+)-(?P<version>\d(?:\.\d)*)$'
)


install_requires = ['django>=1.4']
dependency_links = []

Expand All @@ -23,6 +40,7 @@
else:
install_requires.append(requirement)


setup(
name='django-mutant',
version='.'.join(str(v) for v in __version__),
Expand All @@ -46,4 +64,5 @@
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Python Modules'
],
cmdclass={'test': TestCommand}
)

0 comments on commit 87df59a

Please sign in to comment.