Skip to content

Commit

Permalink
fix install with latest desiutil without DesiTest
Browse files Browse the repository at this point in the history
  • Loading branch information
sbailey committed Jan 29, 2025
1 parent 5df2bfa commit 35bdb77
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion py/desitarget/randoms.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from time import time
import healpy as hp
import fitsio
import photutils
import photutils.aperture
from glob import glob, iglob

from desitarget.gaiamatch import get_gaia_dir
Expand Down
11 changes: 9 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,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 @@ -52,7 +52,7 @@
setup_keywords['use_2to3'] = False
setup_keywords['packages'] = find_packages('py')
setup_keywords['package_dir'] = {'':'py'}
setup_keywords['cmdclass'] = {'version': DesiVersion,'test': DesiTest}
setup_keywords['cmdclass'] = {'version': DesiVersion}
setup_keywords['test_suite']='{name}.test.{name}_test_suite.{name}_test_suite'.format(**setup_keywords)
#
# Autogenerate command-line scripts.
Expand All @@ -70,6 +70,13 @@
'desitarget.mock': [os.path.relpath(_,'py/desitarget/mock') for _ in [os.path.join(_[0],'*') for _ in os.walk('py/desitarget/mock/data')]],
'desitarget.streams.gaia_dr3_parallax_zero_point': ['coefficients/*',],
}

#
# 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 35bdb77

Please sign in to comment.