Skip to content

Commit

Permalink
Always install sphinx_airflow_theme from pypi (#16594)
Browse files Browse the repository at this point in the history
We don't need a way to specify _in_ setup.py that this should be
installed from a GitHub release -- it's never needed by users, and if
you are developing the theme you can install the custom version
yourself.

(The variable name is confusing too -- it wasn't pulling from git, but
from a published release on GitHub.)

Removing this just means one less thing to update.

(cherry picked from commit 129fc61)
  • Loading branch information
ashb committed Jun 22, 2021
1 parent 67d5b7a commit e39dd46
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions setup.py
Expand Up @@ -176,22 +176,6 @@ def write_version(filename: str = os.path.join(*[my_dir, "airflow", "git_version
file.write(text)


def get_sphinx_theme_version() -> str:
"""
Return sphinx theme version. If USE_THEME_FROM_GIT env variable is set, the theme is used from
GitHub to allow dynamically update it during development. However for regular PIP release
you cannot use @ package specification, so the latest available released theme package from
PIP is used.
:return: Version of sphinx theme to use.
"""
if os.environ.get('USE_THEME_FROM_GIT'):
return (
"@ https://github.com/apache/airflow-site/releases/download/0.0.4/"
+ "sphinx_airflow_theme-0.0.4-py3-none-any.whl"
)
return ''


# 'Start dependencies group' and 'Start dependencies group' are mark for ./scripts/ci/check_order_setup.py
# If you change this mark you should also change ./scripts/ci/check_order_setup.py
# Start dependencies group
Expand Down Expand Up @@ -258,7 +242,7 @@ def get_sphinx_theme_version() -> str:
doc = [
# Sphinx is limited to < 3.5.0 because of https://github.com/sphinx-doc/sphinx/issues/8880
'sphinx>=2.1.2, <3.5.0',
f'sphinx-airflow-theme{get_sphinx_theme_version()}',
'sphinx-airflow-theme',
'sphinx-argparse>=0.1.13',
'sphinx-autoapi==1.0.0',
'sphinx-copybutton',
Expand Down

0 comments on commit e39dd46

Please sign in to comment.