-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added helpful messages to setup.py for people who try and run the tes…
…ts with the setup.py commands
- Loading branch information
Showing
1 changed file
with
44 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,51 @@ | ||
#!/usr/bin/env python | ||
# Licensed under a 3-clause BSD style license - see LICENSE.rst | ||
|
||
import os | ||
import sys | ||
from setuptools import setup | ||
|
||
# NOTE: The configuration for the package, including the name, version, and | ||
# other information are set in the setup.cfg file. Here we mainly set up | ||
# setup_requires and install_requires since these are determined | ||
# programmatically. | ||
TEST_HELP = """ | ||
Note: running tests is no longer done using 'python setup.py test'. Instead | ||
you will need to run: | ||
tox -e test | ||
If you don't already have tox installed, you can install it with: | ||
pip install tox | ||
If you only want to run part of the test suite, you can also use pytest | ||
directly with:: | ||
pip install -e . | ||
pytest | ||
For more information, see: | ||
http://docs.astropy.org/en/latest/development/testguide.html#running-tests | ||
""" | ||
|
||
if 'test' in sys.argv: | ||
print(TEST_HELP) | ||
sys.exit(1) | ||
|
||
DOCS_HELP = """ | ||
Note: building the documentation is no longer done using | ||
'python setup.py build_docs'. Instead you will need to run: | ||
tox -e build_docs | ||
If you don't already have tox installed, you can install it with: | ||
pip install tox | ||
For more information, see: | ||
http://docs.astropy.org/en/latest/install.html#builddocs | ||
""" | ||
|
||
if 'build_docs' in sys.argv or 'build_sphinx' in sys.argv: | ||
print(DOCS_HELP) | ||
sys.exit(1) | ||
|
||
setup(use_scm_version={'write_to': os.path.join('spectral_cube', 'version.py')}) |