potiuk commented on a change in pull request #12512:
URL: https://github.com/apache/airflow/pull/12512#discussion_r528757584
##########
File path: dev/provider_packages/get_provider_info_TEMPLATE.py.jinja2
##########
@@ -0,0 +1,13 @@
+import yaml
+
+try:
+ import importlib.resources as importlib_resources
+except ImportError:
+ # Try backported to PY<37 `importlib_resources`.
+ import importlib_resources
+
+
+def get_provider_info():
+ return yaml.safe_load("""
+{{ PROVIDER_INFO }}
+""")
Review comment:
> Actually: bigger question: Do we ship and install the provider.yaml
with the dist, or do we just use this function.
>
> Not shipping it (if all the info is contained in here anyway) might be a
nice/easy way to distinguish source vs installed provider.
Not shipping - absolutely. I did not intend it (it was there in the first
version but when I switched to entry_points I removed it precisely for this
reason - being able to distinguish "package" vs. "local source".
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]