from setuptools import setup

exec(open('sfs/_version.py').read())

setup(
    name="SoundFieldSynthesis",
    version=__version__,
    packages=['sfs'],

    author="SFS Toolbox Developers",
    author_email="sfstoolbox@gmail.com",
    description="Sound Field Synthesis Toolbox",
    long_description=open('README.rst').read(),
    license="MIT",
    keywords="audio SFS WFS Ambisonics".split(),
    url="http://github.com/sfstoolbox",
    download_url="http://github.com/sfstoolbox/sfs-python/releases",
    platforms='any',
    classifiers=[
        "Development Status :: 3 - Alpha",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Programming Language :: Python :: 3",
        "Topic :: Scientific/Engineering",
    ],
)

@@ -1,8 +1,19 @@
+import sys%0A
 from set
@@ -33,16 +33,650 @@
 t setup%0A
+from setuptools.command.test import test as TestCommand%0A%0A%0A# See http://pytest.org/latest/goodpractises.html%0Aclass PyTest(TestCommand):%0A    user_options = %5B('pytest-args=', 'a', %22Arguments to pass to py.test%22)%5D%0A%0A    def initialize_options(self):%0A        TestCommand.initialize_options(self)%0A        self.pytest_args = %5B%5D%0A%0A    def finalize_options(self):%0A        TestCommand.finalize_options(self)%0A        self.test_args = %5B%5D%0A        self.test_suite = True%0A%0A    def run_tests(self):%0A        # import here, cause outside the eggs aren't loaded%0A        import pytest%0A        errno = pytest.main(self.pytest_args)%0A        sys.exit(errno)%0A%0A
 %0Aexec(op
@@ -1420,10 +1420,71 @@
 %0A    %5D,%0A
+    tests_require=%5B'pytest'%5D,%0A    cmdclass=%7B'test': PyTest%7D,%0A
 )%0A

Integrate tests with setup.py