Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BLD: remove build_sphinx support from setup.py #13519

Merged
merged 1 commit into from Feb 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 2 additions & 20 deletions setup.py
Expand Up @@ -144,22 +144,6 @@ def write_version_py(filename='scipy/version.py'):
a.close()


try:
from sphinx.setup_command import BuildDoc
HAVE_SPHINX = True
except Exception:
HAVE_SPHINX = False

if HAVE_SPHINX:
class ScipyBuildDoc(BuildDoc):
"""Run in-place build before Sphinx doc build"""
def run(self):
ret = subprocess.call([sys.executable, sys.argv[0], 'build_ext', '-i'])
if ret != 0:
raise RuntimeError("Building Scipy failed!")
BuildDoc.run(self)


def check_submodules():
""" verify that the submodules are checked out and clean
use `git submodule update --init`; on failure
Expand Down Expand Up @@ -381,8 +365,7 @@ def parse_setuppy_commands():
# below and not standalone. Hence they're not added to good_commands.
good_commands = ('develop', 'sdist', 'build', 'build_ext', 'build_py',
'build_clib', 'build_scripts', 'bdist_wheel', 'bdist_rpm',
'bdist_wininst', 'bdist_msi', 'bdist_mpkg',
'build_sphinx')
'bdist_wininst', 'bdist_msi', 'bdist_mpkg')

for command in good_commands:
if command in args:
Expand Down Expand Up @@ -453,6 +436,7 @@ def parse_setuppy_commands():
bdist_dumb="`setup.py bdist_dumb` is not supported",
bdist="`setup.py bdist` is not supported",
flake8="`setup.py flake8` is not supported, use flake8 standalone",
build_sphinx="`setup.py build_sphinx` is not supported, see doc/README.md",
)
bad_commands['nosetests'] = bad_commands['test']
for command in ('upload_docs', 'easy_install', 'bdist', 'bdist_dumb',
Expand Down Expand Up @@ -534,8 +518,6 @@ def setup_package():
write_version_py()

cmdclass = {'sdist': sdist_checked}
if HAVE_SPHINX:
cmdclass['build_sphinx'] = ScipyBuildDoc

metadata = dict(
name='scipy',
Expand Down