Skip to content

Commit

Permalink
fix install without DesiTest
Browse files Browse the repository at this point in the history
  • Loading branch information
sbailey committed Jan 30, 2025
1 parent f62f53b commit 25dd2e0
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#
# DESI support code.
#
from desiutil.setup import DesiTest, DesiVersion, get_version
from desiutil.setup import DesiVersion, get_version
#
# Begin setup
#
Expand Down Expand Up @@ -56,7 +56,7 @@
# setup_keywords['use_2to3'] = False
setup_keywords['packages'] = find_packages('py')
setup_keywords['package_dir'] = {'':'py'}
setup_keywords['cmdclass'] = {'version': DesiVersion, 'test': DesiTest, 'sdist': DistutilsSdist}
setup_keywords['cmdclass'] = {'version': DesiVersion, 'sdist': DistutilsSdist}
setup_keywords['test_suite']='{name}.test.{name}_test_suite.{name}_test_suite'.format(**setup_keywords)
#
# Autogenerate command-line scripts.
Expand All @@ -74,6 +74,14 @@
'data/*.yaml',
'data/*.dat',],
'desispec.test': ['data/ql/*',]}

#
# Print informative message if user tried "python setup.py test"
#
if "test" in sys.argv:
print("Please run pytest instead")
sys.exit(1)

#
# Run setup command.
#
Expand Down

0 comments on commit 25dd2e0

Please sign in to comment.