Skip to content

Commit

Permalink
Doc: Use closer.lua script for downloading sources (#18179)
Browse files Browse the repository at this point in the history
- Follows first point of https://infra.apache.org/release-download-pages.html#download-page to use `https://www.apache.org/dyn/closer.lua/PROJECT/VERSION/SOURCE-RELEASE` for mirrors
- Fixes bug as the current version substitution does not work for Hyperlinks (open PR: adamtheturtle/sphinx-substitution-extensions#178)

GitOrigin-RevId: 9d05b32de593d2d553cfc567e092941b3d30a8a7
  • Loading branch information
kaxil authored and Cloud Composer Team committed Jul 10, 2022
1 parent 6476a67 commit 8966e00
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/apache-airflow/installing-from-sources.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ The packages are available at the

The |version| downloads are available at:

* `Apache Airflow |version| sdist package <https://downloads.apache.org/airflow/|version|/apache-airflow-|version|.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/|version|/apache-airflow-|version|.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/|version|/apache-airflow-|version|.tar.gz.sha512>`__)
* `Apache Airflow |version| wheel package <https://downloads.apache.org/airflow/|version|/apache_airflow-|version|-py3-none-any.whl>`_ (`asc <https://downloads.apache.org/airflow/|version|/apache_airflow-|version|-py3-none-any.whl.asc>`__, `sha512 <https://downloads.apache.org/airflow/|version|/apache_airflow-|version|-py3-none-any.whl.sha512>`__)
* `Apache Airflow |version| sources <https://downloads.apache.org/airflow/|version|/apache-airflow-|version|-source.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/|version|/apache-airflow-|version|-source.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/|version|/apache-airflow-|version|-source.tar.gz.sha512>`__)
.. jinja:: official_download_page

* `Sdist package <{{ closer_lua_url }}/apache-airflow-{{ airflow_version }}.tar.gz>`_ (`asc <{{ base_url }}/apache-airflow-{{ airflow_version }}.tar.gz.asc>`__, `sha512 <{{ base_url }}/apache-airflow-{{ airflow_version }}.tar.gz.sha512>`__)
* `Wheel package <{{ closer_lua_url }}/apache_airflow-{{ airflow_version }}-py3-none-any.whl>`_ (`asc <{{ base_url }}/apache_airflow-{{ airflow_version }}-py3-none-any.whl.asc>`__, `sha512 <{{ base_url }}/apache_airflow-{{ airflow_version }}-py3-none-any.whl.sha512>`__)
* `Sources <{{ closer_lua_url }}/apache-airflow-{{ airflow_version }}-source.tar.gz>`_ (`asc <{{ base_url }}/apache_airflow-{{ airflow_version }}-source.tar.gz.asc>`__, `sha512 <{{ base_url }}/apache-airflow-{{ airflow_version }}-source.tar.gz.sha512>`__)

If you want to install from the source code, you can download from the sources link above, it will contain
a ``INSTALL`` file containing details on how you can build and install Airflow.
Expand Down
5 changes: 5 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,11 @@ def _get_rst_filepath_from_path(filepath: str):
'http://apache-airflow-docs.s3-website.eu-central-1.amazonaws.com/docs/apache-airflow/latest/'
)
},
'official_download_page': {
'base_url': f'https://downloads.apache.org/airflow/{PACKAGE_VERSION}',
'closer_lua_url': f'https://www.apache.org/dyn/closer.lua/airflow/{PACKAGE_VERSION}',
'airflow_version': PACKAGE_VERSION,
},
}
elif PACKAGE_NAME.startswith('apache-airflow-providers-'):

Expand Down

0 comments on commit 8966e00

Please sign in to comment.