Skip to content
  • Zen Fu's avatar
    [weblate] Improve parsing of extra requirements (tails#17377) · e0243660
    Zen Fu authored
    Extra dependencies are listed in the Pypi JSON with the keyword "extra",
    as such (example taken from https://pypi.org/pypi/celery/json):
    
        "cryptography ; extra == 'auth'",
    
    This means that someone can run `pip install celery[auth]` and will get
    the cryptography package installed.
    
    But this scheme also allows for variations, as the following (from the
    same URL as above):
    
        "couchbase-cffi (<3.0.0) ; (platform_python_implementation == \"PyPy\") and extra == 'couchbase'",
    
    The current implementation of detection of "extra" dependencies does not
    account for the second format, so I'm fixing it in this commit.
    e0243660