You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2018/08/07 14:20:32 UTC

[GitHub] kaxil closed pull request #3703: [AIRFLOW-2857] Fix broken RTD env

kaxil closed pull request #3703: [AIRFLOW-2857] Fix broken RTD env 
URL: https://github.com/apache/incubator-airflow/pull/3703
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.readthedocs.yml b/.readthedocs.yml
index 643548c03e..c6a4da8d69 100644
--- a/.readthedocs.yml
+++ b/.readthedocs.yml
@@ -6,9 +6,9 @@
 # to you under the Apache License, Version 2.0 (the
 # "License"); you may not use this file except in compliance
 # with the License.  You may obtain a copy of the License at
-# 
+#
 #   http://www.apache.org/licenses/LICENSE-2.0
-# 
+#
 # Unless required by applicable law or agreed to in writing,
 # software distributed under the License is distributed on an
 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -22,4 +22,4 @@ python:
         - doc
         - docker
         - gcp_api
-        - emr 
+        - emr
diff --git a/setup.py b/setup.py
index d84c981ccb..f350ff5b6f 100644
--- a/setup.py
+++ b/setup.py
@@ -37,6 +37,14 @@
 
 # See LEGAL-362
 def verify_gpl_dependency():
+    # The Read the Docs build environment [1] does a pip install of Airflow which cannot
+    # be overridden with custom environment variables, so we detect the READTHEDOCS env
+    # var they provide to set the env var that avoids the GPL dependency on install when
+    # building the docs site.
+    # [1]: http://docs.readthedocs.io/en/latest/builds.html#build-environment
+    if os.getenv("READTHEDOCS") == "True":
+        os.environ["SLUGIFY_USES_TEXT_UNIDECODE"] = "yes"
+
     if (not os.getenv("AIRFLOW_GPL_UNIDECODE")
             and not os.getenv("SLUGIFY_USES_TEXT_UNIDECODE") == "yes"):
         raise RuntimeError("By default one of Airflow's dependencies installs a GPL "
@@ -161,6 +169,7 @@ def write_version(filename=os.path.join(*['airflow',
 databricks = ['requests>=2.5.1, <3']
 datadog = ['datadog>=0.14.0']
 doc = [
+    'mock',
     'sphinx>=1.2.3',
     'sphinx-argparse>=0.1.13',
     'sphinx-rtd-theme>=0.1.6',


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services