Skip to content

Commit

Permalink
Merge pull request #323 from desihub/nodesitest
Browse files Browse the repository at this point in the history
remove DesiTest usage; drops setup.py test support
  • Loading branch information
sbailey authored Feb 11, 2025
2 parents 98e0b4f + b2abd40 commit e08f3ea
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#
import glob
import os
import sys
#
# setuptools' sdist command ignores MANIFEST.in
#
Expand All @@ -20,9 +21,8 @@
#
setup_keywords['cmdclass'] = {'sdist': DistutilsSdist}
try:
from desiutil.setup import DesiTest, DesiVersion, get_version
from desiutil.setup import DesiVersion, get_version
setup_keywords['cmdclass']['version'] = DesiVersion
setup_keywords['cmdclass']['test'] = DesiTest
except ImportError:
def get_version(productname):
"""Get the value of ``__version__`` without having to import the module.
Expand Down Expand Up @@ -94,6 +94,12 @@ def get_version(productname):
if 'RR_TEMPLATE_DIR' not in os.environ:
setup_keywords['package_data'] = {'redrock': ['templates/*.fits']}
#
# Check for old `python setup.py test` invocation
#
if "test" in sys.argv:
print("Please run pytest instead")
sys.exit(1)
#
# Run setup command.
#
setup(**setup_keywords)

0 comments on commit e08f3ea

Please sign in to comment.