Skip to content

Commit

Permalink
conditional install
Browse files Browse the repository at this point in the history
  • Loading branch information
loriab committed Mar 4, 2019
1 parent 033d45a commit 633a8a6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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()
Expand All @@ -24,9 +29,7 @@
packages=setuptools.find_packages(exclude=['*checkup*']),
include_package_data=True,
package_data={'': [os.path.join('qcelemental', 'data', '*.json')]},
setup_requires=[
'pytest-runner'
],
setup_requires=[] + pytest_runner,
install_requires=[
'numpy',
'pint',
Expand Down

0 comments on commit 633a8a6

Please sign in to comment.