From 00cd52204646f283cfaf413e67755cd9f0acfff0 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Sat, 12 Feb 2022 07:33:42 +0300 Subject: Provide custom class to run tests --- setup.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index a4e95d1..9396f59 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,12 @@ #!/usr/bin/env python """Basic setup script for gn3""" from setuptools import setup # type: ignore +from setup_commands import RunTests +def long_description(): + """Retrieve long description from the README file.""" + with open('README.md', encoding="utf-8") as readme: + return readme.read() setup(author='Bonface M. K.', author_email='me@bonfacemunyoki.com', @@ -23,7 +28,7 @@ setup(author='Bonface M. K.', "flask-cors==3.0.9" ], license='GPLV3', - long_description=open('README.md').read(), + long_description=long_description(), long_description_content_type='text/markdown', name='gn3', packages=[ @@ -35,8 +40,7 @@ setup(author='Bonface M. K.', ], url='https://github.com/genenetwork/genenetwork3', version='0.1', - # ---- TESTING ---- # - setup_requires=['pytest-runner'], - tests_require=["pytest", "hypothesis"] - # ---- END: TESTING ---- # - ) + tests_require=["pytest", "hypothesis"], + cmdclass={ + "run_tests": RunTests ## testing + }) -- cgit v1.2.3