3 ms·
where is the install .[dev] format/syntax defined ? I was trying to find what was possible and how to make sense of it in setup.cfg tools I found one men
by agumonkey 4y ago
where is the
install .[dev]
format/syntax defined ? I was trying to find what was possible and how to make sense of it in setup.cfg tools
I found one mention in the docs but no more.
- woodruffw 4y agoIt’s a pip-ism; as far as I know, it’s not defined in any PEP. It should be in their documentation, however.
- agumonkey 4y agogonna dig deeper there then, thanks
- baq 4y agoyou may have done pip install jupyter[notebook] this is the same thing, just for . (current directory) and dev variant.
- woodruffw 4y agoYep. The key difference is that the former is specified in PEP 508, while `.` and its variants are a convenience feature that pip (and maybe some other tools) provide.
- agumonkey 4y agoyeah but I'm missing data on how variant interacts with various requirements defined in setup.cfg (testing dependencies for instance)
- nprescott 4y agoPEP-508[0] explains the grammar for "extras": > Optional components of a distribution may be specified using the extras field: identifier_end = letterOrDigit | (('-' | '_' | '.' )* letterOrDigit) identifier = letterOrDigit identifier_end* name = identifier extras_list = identifier (wsp* ',' wsp* identifier)* extras = '[' wsp* extras_list? wsp* ']' as well as explaining their behavior, albeit briefly: > Extras union in the dependencies they define with the dependencies of the distribution they are attached to. The resolution on . is explained by the pip documentation[1]: > pip looks for packages in a number of places: on PyPI (if not disabled via --no-index), in the local filesystem, and in any additional repositories specified via --find-links or --index-url. There is no ordering in the locations that are searched. Rather they are all checked, and the “best” match for the requirements (in terms of version number - see PEP 440 for details) is selected. [0]: https://peps.python.org/pep-0508/#grammar https://peps.python.org/pep-0508/#grammar [1]: https://pip.pypa.io/en/stable/cli/pip_install/#finding-packages https://pip.pypa.io/en/stable/cli/pip_install/#finding-packa...