Skip to content

Commit

Permalink
Remove help messages for legacy setup.py commands
Browse files Browse the repository at this point in the history
The help messages added in 45cdbb1
(Added help messages for removed setup.py commands) have been displayed
for almost five years by now, so they have fulfilled their purpose.
  • Loading branch information
eerovaher committed Dec 31, 2024
1 parent 116bf78 commit e864484
Showing 1 changed file with 2 additions and 60 deletions.
62 changes: 2 additions & 60 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,67 +4,9 @@
# NOTE: The configuration for the package, including the name, version, and
# other information are set in the pyproject.toml file.

import sys
from setuptools import setup

# First provide helpful messages if contributors try and run legacy commands
# for tests or docs.

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 .[test]
pytest
For more information, see:
https://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
You can also build the documentation with Sphinx directly using::
pip install -e .[docs]
cd docs
make html
For more information, see:
https://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)


# Only import these if the above checks are okay
# to avoid masking the real problem with import error.
from setuptools import setup # noqa: E402

from extension_helpers import get_extensions # noqa: E402
from extension_helpers import get_extensions

ext_modules = get_extensions()

Expand Down

0 comments on commit e864484

Please sign in to comment.