Skip to content

extras_require doesn't work unless extras are all-lowercase #4617

@nedbat

Description

@nedbat
  • Pip version: 9.0.1
  • Python version: 3.5
  • Operating system: Mac

Description:

I tried to install django-rest-swagger[reST]==0.3.10, and it fails to install docutils:

$ pip install 'django-rest-swagger[reST]==0.3.10'
Collecting django-rest-swagger[reST]==0.3.10
  Using cached django_rest_swagger-0.3.10-py2.py3-none-any.whl
  Ignoring docutils: markers 'extra == "reST"' don't match your environment
Requirement already satisfied: PyYAML>=3.10 in /usr/local/virtualenvs/tmp-7024ad2664bea019/lib/python3.5/site-packages (from django-rest-swagger[rest]==0.3.10)
Requirement already satisfied: Django>=1.8 in /usr/local/virtualenvs/tmp-7024ad2664bea019/lib/python3.5/site-packages (from django-rest-swagger[rest]==0.3.10)
Requirement already satisfied: djangorestframework>=2.3.8 in /usr/local/virtualenvs/tmp-7024ad2664bea019/lib/python3.5/site-packages (from django-rest-swagger[rest]==0.3.10)
Requirement already satisfied: pytz in /usr/local/virtualenvs/tmp-7024ad2664bea019/lib/python3.5/site-packages (from Django>=1.8->django-rest-swagger[rest]==0.3.10)
Installing collected packages: django-rest-swagger
Successfully installed django-rest-swagger-0.3.10

django-rest-swagger has this in their setup.py:

extras_require = {
    'reST': ['docutils>=0.8'],
}

Stepping through the code, eventually "reST" is compared to "rest", and the error is produced.
Seems like extras_require keys have to be lowercase in order to work. No variation of "rest", "REST", "reST", etc, on the command line makes it succeed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: extrasHandling optional dependenciestype: bugA confirmed bug or unintended behavior

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions