Currently the operator allows to set requirement as list that needs to be hard coded.
It would be nice if airflow can support reading from file directly (something similar to how operators read sql file)
tests/decorators/test_python_virtualenv.py
"""Tests that the python callable is invoked on task run."""
        @task.virtualenv()
        def f():
            pass
        with self.dag:
            ret = f()
        ret.operator.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE)
    def test_no_system_site_packages(self):
        @task.virtualenv(system_site_packages=False, python_version=PYTHON_VERSION, use_dill=True)
        def f():
            try:
                import funcsigs  
            except ImportError:
                return True
            raise Exception
        with self.dag:
            ret = f()
        ret.operator.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE)
    def test_system_site_packages(self):
        @task.virtualenv(
            system_site_packages=False,
            requirements=['funcsigs'],
            python_version=PYTHON_VERSION,
            use_dill=True,
        )
        def f():