potiuk commented on a change in pull request #13439:
URL: https://github.com/apache/airflow/pull/13439#discussion_r551392671



##########
File path: setup.py
##########
@@ -150,13 +162,22 @@ def write_version(filename: str = os.path.join(*[my_dir, 
"airflow", "git_version
         file.write(text)
 
 
-if os.environ.get('USE_THEME_FROM_GIT'):
-    _SPHINX_AIRFLOW_THEME_URL = (
-        "@ https://github.com/apache/airflow-site/releases/download/0.0.4/";
-        "sphinx_airflow_theme-0.0.4-py3-none-any.whl"
-    )
-else:
-    _SPHINX_AIRFLOW_THEME_URL = ''
+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 tp 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: the
+    """
+    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"
+        )
+    else:
+        return ''

Review comment:
       True.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to