From ce6e9804ad7d44194b267ba01b9eb3e491d6c61e Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Fri, 20 Apr 2018 10:17:58 +0300 Subject: [PATCH] Added tests_require keyword to setup() --- setup.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 1081b5aa..422524bd 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ from src.version import softwareVersion EXTRAS_REQUIRE = { 'gir': ['pygobject'], 'notify2': ['notify2'], - 'pyopencl': ['pyopencl'], + 'opencl': ['pyopencl', 'numpy'], 'prctl': ['python_prctl'], # Named threads 'qrcode': ['qrcode'], 'sound;platform_system=="Windows"': ['winsound'], @@ -22,7 +22,7 @@ EXTRAS_REQUIRE = { 'curses', # src/depends.py 'python2-pythondialog', # src/depends.py 'm2r', # fab build_docs - ], + ] } @@ -50,6 +50,9 @@ if __name__ == "__main__": with open(os.path.join(here, 'README.md')) as f: README = f.read() + with open(os.path.join(here, 'requirements.txt'), 'r') as f: + requirements = list(f.readlines()) + bitmsghash = Extension( 'pybitmessage.bitmsghash.bitmsghash', sources=['src/bitmsghash/bitmsghash.cpp'], @@ -80,7 +83,8 @@ if __name__ == "__main__": import umsgpack installRequires.append("umsgpack") except ImportError: - packages += ['pybitmessage.fallback', 'pybitmessage.fallback.umsgpack'] + packages += [ + 'pybitmessage.fallback', 'pybitmessage.fallback.umsgpack'] dist = setup( name='pybitmessage', @@ -96,6 +100,7 @@ if __name__ == "__main__": # TODO: add keywords #keywords='', install_requires=installRequires, + tests_require=requirements, extras_require=EXTRAS_REQUIRE, classifiers=[ "License :: OSI Approved :: MIT License"