diff --git a/docs/source/conf.py b/docs/source/conf.py index bc27f2a..b922983 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -96,6 +96,9 @@ # The full version, including alpha/beta/rc tags. release = cmweather.__version__ +if '+' in version: + version += 'dev' + # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # language = None @@ -143,7 +146,13 @@ # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -# html_theme_options = {} +html_theme_options = { + 'switcher': { + 'json_url': 'https://raw.githubusercontent.com/mgrover1/cmweather/add-version-switcher/docs/source/_static/pst-versions.json', + 'version_match': 'dev' if 'dev' in version else f'v{version}', + } +} +print('dev' if 'dev' in version else f'v{version}') # Add any paths that contain custom themes here, relative to this directory. # html_theme_path = [] diff --git a/setup.py b/setup.py index 01b2047..ed63443 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ ], description='A library of useful colormaps when visualizing weather and climate data, with numerous color vision deficiency friendly options', install_requires=requirements, - setup_requires='setuptools_scm', + setup_requires=['setuptools', 'wheel', 'setuptools_scm'], license='MIT license', long_description=long_description, include_package_data=True,