-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make pytest default test runner in setup.py. Fix install_requires.
Now it's possible to run the tests by: python setup.py test
- Loading branch information
Showing
1 changed file
with
42 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,45 @@ | ||
#!/usr/bin/env python | ||
import sys | ||
|
||
from distutils.core import setup | ||
from setuptools import setup | ||
from setuptools.command.test import test as TestCommand | ||
|
||
setup(name='dissect', | ||
version='0.1.0', | ||
description='COMPOSES DISSECT TOOLKIT', | ||
author='Georgiana Dinu, The Nghia Pham, Marco Baroni', | ||
author_email='[email protected],[email protected]', | ||
url='http://http://clic.cimec.unitn.it/composes/toolkit/', | ||
requires=['numpy','scipy','sparsesvd'], | ||
package_dir={'':'src'}, | ||
packages=['composes','composes.composition','composes.matrix','composes.semantic_space', | ||
'composes.exception','composes.similarity','composes.transformation','composes.utils', | ||
'composes.transformation.dim_reduction','composes.transformation.feature_selection', | ||
'composes.transformation.scaling'], | ||
) | ||
|
||
class PyTest(TestCommand): | ||
def finalize_options(self): | ||
TestCommand.finalize_options(self) | ||
self.test_args = 'src/unitest' | ||
self.test_suite = True | ||
|
||
def run_tests(self): | ||
#import here, cause outside the eggs aren't loaded | ||
import pytest | ||
errno = pytest.main(self.test_args) | ||
sys.exit(errno) | ||
|
||
|
||
setup( | ||
name='dissect', | ||
version='0.1.0', | ||
description='COMPOSES DISSECT TOOLKIT', | ||
author='Georgiana Dinu, The Nghia Pham, Marco Baroni', | ||
author_email='[email protected],[email protected]', | ||
url='http://http://clic.cimec.unitn.it/composes/toolkit/', | ||
install_requires=['numpy', 'scipy', 'sparsesvd'], | ||
tests_require=['pytest'], | ||
cmdclass={'test': PyTest}, | ||
package_dir={'': 'src'}, | ||
packages=[ | ||
'composes', | ||
'composes.composition', | ||
'composes.matrix', | ||
'composes.semantic_space', | ||
'composes.exception', | ||
'composes.similarity', | ||
'composes.transformation', | ||
'composes.utils', | ||
'composes.transformation.dim_reduction', | ||
'composes.transformation.feature_selection', | ||
'composes.transformation.scaling', | ||
], | ||
) |