packaging.python.org icon indicating copy to clipboard operation
packaging.python.org copied to clipboard

Request for clarification on 'extra' marker in Requires-Dist

Open astrofrog opened this issue 1 year ago • 2 comments

I have been reading the core metadata specification in the packaging guide and would like to request a clarification on the following section:

https://packaging.python.org/en/latest/specifications/core-metadata/#provides-extra-multiple-use

and specifically the following example:

Provides-Extra: pdf
Requires-Dist: reportlab; extra == 'pdf'

It seems like extra behaves somewhat like an environment marker, but I wanted to check whether == is the only valid supported comparison? Or could one in principle do:

Provides-Extra: pdf
Requires-Dist: reportlab; extra != 'pdf'

If someone can clarify whether this is also legal, I can try and propose a change for the spec to add a clarification.

astrofrog avatar Jun 23 '23 08:06 astrofrog

This discussion thread "The ‘extra’ environment marker and its operators" is likely related, and probably some other threads about extras as well.


https://packaging.python.org/en/latest/specifications/core-metadata/#project-url-multiple-use

Wrong link. Well it seems like it is the correct page, but the wrong anchor.

sinoroc avatar Jun 23 '23 09:06 sinoroc

Thanks! Oops sorry about the wrong link, fixed

astrofrog avatar Jun 23 '23 09:06 astrofrog