diff --git a/setup.cfg b/setup.cfg index bd211cf9..a91e5570 100644 --- a/setup.cfg +++ b/setup.cfg @@ -27,3 +27,6 @@ style = pep440 versionfile_source = qcelemental/_version.py versionfile_build = qcelemental/_version.py tag_prefix = '' + +[aliases] +test=pytest diff --git a/setup.py b/setup.py index 87f2c9b6..6d611b59 100644 --- a/setup.py +++ b/setup.py @@ -1,10 +1,15 @@ import os +import sys import setuptools import versioneer short_description = "QCElemental is a resource module for quantum chemistry containing physical" "constants and periodic table data from NIST and molecule handlers." +# from https://github.com/pytest-dev/pytest-runner#conditional-requirement +needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv) +pytest_runner = ['pytest-runner'] if needs_pytest else [] + try: with open("README.md", "r") as handle: long_description = handle.read() @@ -24,6 +29,7 @@ packages=setuptools.find_packages(exclude=['*checkup*']), include_package_data=True, package_data={'': [os.path.join('qcelemental', 'data', '*.json')]}, + setup_requires=[] + pytest_runner, install_requires=[ 'numpy', 'pint',