Skip to content

Commit

Permalink
remove DesiTest
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverba137 committed Jan 15, 2025
1 parent 3b6a44b commit 71aa306
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 5 deletions.
4 changes: 3 additions & 1 deletion doc/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ fiberassign change log
5.7.3 (unreleased)
------------------

* No changes yet.
* Remove ``DesiTest`` from setup.py and warn about other deprecated features (PR `#466`_).

.. _`#466`: https://github.com/desihub/fiberassign/pull/466

5.7.2 (2023-10-04)
------------------
Expand Down
52 changes: 48 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#
# DESI support code.
#
from desiutil.setup import DesiTest, DesiVersion, get_version
from desiutil.setup import get_version
#
# Begin setup
#
Expand Down Expand Up @@ -77,8 +77,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'] = {'sdist': DistutilsSdist}
test_suite_name = \
'{name}.test.{name}_test_suite.{name}_test_suite'.format(**setup_keywords)
setup_keywords['test_suite'] = test_suite_name
Expand Down Expand Up @@ -226,11 +225,56 @@ def build_extensions(self):
setup_keywords['ext_modules'] = ext_modules
setup_keywords['cmdclass']['build_ext'] = BuildExt
setup_keywords['cmdclass']['clean'] = RealClean

#
# Add internal data directories
#
setup_keywords['package_data'] = {'fiberassign': ['data/*',],}

#
# Warning about old features.
#
VERSION_HELP = """
Note: Generating version strings is no longer done using 'python setup.py version'. Instead
you will need to run:
desi_update_version [-t TAG] desiutil
which is part of the desiutil package. If you don't already have desiutil installed, you can install it with:
pip install desiutil
"""

TEST_HELP = """
Note: running tests is no longer done using 'python setup.py test'. Instead
you will need to run:
pytest
If you don't already have pytest installed, you can install it with:
pip install pytest
"""

DOCS_HELP = """
Note: building the documentation is no longer done using
'python setup.py {0}'. Instead you will need to run:
sphinx-build -W --keep-going -b html doc doc/_build/html
If you don't already have Sphinx installed, you can install it with:
pip install Sphinx
"""

message = {'test': TEST_HELP,
'version': VERSION_HELP,
'build_docs': DOCS_HELP.format('build_docs'),
'build_sphinx': DOCS_HELP.format('build_sphinx'), }

for m in message:
if m in sys.argv:
print(message[m])
sys.exit(1)

#
# Run setup command.
Expand Down

0 comments on commit 71aa306

Please sign in to comment.