potiuk commented on code in PR #39723:
URL: https://github.com/apache/airflow/pull/39723#discussion_r1610460074
##########
hatch_build.py:
##########
@@ -846,6 +846,17 @@ def initialize(self, version: str, build_data: dict[str,
Any]) -> None:
# field in core.metadata until this is possible
self.metadata.core._optional_dependencies = self.optional_dependencies
+ # Add entrypoints dynamically for all provider packages, else they
will not be found by
Review Comment:
Unfortunately, that's the nature of PEP that they are formal specification
that is often result of a long discussion and what is captured there might need
a bit more detailed reading. Enough said that 'packaging` is generally
considered the most cofusing part of Python (and for good reasons I think) -
I've heard that statement multiple times at PyCon.
Actually, I looked in more detail (now after PyCon I am back with a little
Jet-Lag) and I think that even if they are defined in `core.metadata` it's not
really the case. The `entrypoints` do not seem to be part of core-metadata,
they are separate thing.
You can see it for example here:
https://pypi.org/project/apache-airflow/#files -> download .whl file and you
will see METADATA and entry_points.txt - so my suggestion above was actually
wrong (sorry for that).
Instead what you should do, you should wrap this whole section in
hatch_build in (see some of the sections above):
```python
if version != "standard":
```
The `version` there might be either `standard` (when .whl is built) or
`editable` (when you install airflow in editable and we definitely do not want
airflow to produce "plugin" entrypoints that are usually produced by providers
in .whl file - we really only want to have them when airflow is installed in
editable mode.
--
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]