#28905: Overhaul extra_requires to include more optional dependencies
-------------------------------------+-------------------------------------
Reporter: Jaap Roes | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: | Version: master
Uncategorized | Keywords: setup optional
Severity: Normal | dependencies packages requirements
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Django has a number of optional features that require the installation of
additional Python packages.
Right now it's possible to `pip install Django[bcrypt,argon2]` to install
Django and the optional packages (at the correct minimum version) required
for bcrypt/argon2 support.
However this is not possible for other optional features, like
database/cache backend, gis, certain image related features etc.
I've created a pull request adding the optional dependencies found in the
test requirements (initially only psycopg2 for postgresql, but after a
comment from pope1ni I followed their suggestion to include more). It
changes the set of extra_requires to:
{{{
{
'admindocs': ['docutils'],
'argon2': ['argon2_cffi>=16.1.0'],
'bcrypt': ['bcrypt'],
'gis': [
'geoip2',
'numpy'
],
'geoip': ['geoip2'],
'jinja2': ['Jinja2>=2.9.2'],
'memcached': ['python3-memcached'],
'numpy': ['numpy'],
'mysql': ['mysqlclient>=1.3.7'],
'oracle': ['Oracle'],
'images': ['Pillow'],
'postgresql': ['psycopg2>=2.5.4'],
'pylibmc': ['pylibmc; sys.platform != "win32"'],
'sqlparse': ['sqlparse'],
'selenium': ['selenium'],
'test-parallel': ['tblib'],
'yaml': ['PyYAML'],
}
}}}
So end users can do things like:
{{{
$ pip install Django[mysql,sqlparse,images,memcached]
$ pip install Django[postgresql,gis]
$ pip install Django[selenium,test-parallel]
}}}
Not only would this make it much easier to install a particular
combination of Django and optional dependencies correctly, it also makes
some of the optional features/dependencies a little bit more discoverable.
This might not the full set of optional dependencies, or the right
grouping/naming, so a review is more than welcome.
Besides adding this to `setup.py`, additional changes to the
documentation, test instructions and scripts, code warnings etc. will
probably be necessary.
--
Ticket URL: <https://code.djangoproject.com/ticket/28905>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/048.647f7eb6ef607beb1e77219c2f3ddbca%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.