You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to write a PEP 621 consumer, and I'm having trouble with the optional-dependencies item. The issue is that I could potentially need to combine markers, and I don't see a particularly reliable way of doing so. Consider:
To construct Requires-Dist from this, I need to add a dependency pywin32; os_name == 'nt' and extra == 'test'.
The best way I can see of doing this is
req=Requirement(req_str)
ifreq.markerisNone:
req.marker=Marker(f"extra == '{extra_name}'")
else:
req.marker=Marker(f"({req.marker}) and extra == '{extra_name}'")
requires_dist.append(str(req))
Is that the best way of doing this? It would be extremely useful in this situation if markers supported & and | operations, to avoid the error-prone conversion to and from strings.
The text was updated successfully, but these errors were encountered:
I'm trying to write a PEP 621 consumer, and I'm having trouble with the
optional-dependencies
item. The issue is that I could potentially need to combine markers, and I don't see a particularly reliable way of doing so. Consider:To construct
Requires-Dist
from this, I need to add a dependencypywin32; os_name == 'nt' and extra == 'test'
.The best way I can see of doing this is
Is that the best way of doing this? It would be extremely useful in this situation if markers supported
&
and|
operations, to avoid the error-prone conversion to and from strings.The text was updated successfully, but these errors were encountered: