uranusjr commented on code in PR #33017:
URL: https://github.com/apache/airflow/pull/33017#discussion_r1289670360


##########
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:
   Sounds reasonable, thanks. I wonder if this would conflict with custom 
virtualenv creators/seeders, but I guess those things are pretty seldom used 
(too seldom if you ask me) so we can deal with them when they pop up.



-- 
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]

Reply via email to