uranusjr commented on code in PR #33017:
URL: https://github.com/apache/airflow/pull/33017#discussion_r1288143931
##########
airflow/utils/python_virtualenv.py:
##########
@@ -76,11 +88,18 @@ def prepare_virtualenv(
See virtualenv documentation for more information.
:param requirements: List of additional python packages.
:param requirements_file_path: Path to the ``requirements.txt`` file.
+ :param pip_install_options: a list of pip install options when installing
requirements
+ See 'pip install -h' for available options
+ :param index_urls: an optional list of index urls to load Python packages
from.
+ If not provided the system pip conf will be used to source packages
from.
:return: Path to a binary file with Python in a virtual environment.
"""
if pip_install_options is None:
pip_install_options = []
+ if index_urls is not None:
+ _generate_pip_conf(Path(venv_directory) / "pip.conf", index_urls)
Review Comment:
Any reason a config file is preferred over passing everytrhing in the pip
command below?
##########
airflow/utils/python_virtualenv.py:
##########
@@ -76,11 +88,18 @@ def prepare_virtualenv(
See virtualenv documentation for more information.
:param requirements: List of additional python packages.
:param requirements_file_path: Path to the ``requirements.txt`` file.
+ :param pip_install_options: a list of pip install options when installing
requirements
+ See 'pip install -h' for available options
+ :param index_urls: an optional list of index urls to load Python packages
from.
+ If not provided the system pip conf will be used to source packages
from.
:return: Path to a binary file with Python in a virtual environment.
"""
if pip_install_options is None:
pip_install_options = []
+ if index_urls is not None:
+ _generate_pip_conf(Path(venv_directory) / "pip.conf", index_urls)
Review Comment:
Any reason a config file is preferred over passing everything in the pip
command below?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]