In Django 1.8, django.contrib.formtools
has been separated into a new package called django-formtools
. When upgrading a project to the new Django version, changing the imports is enough. However for my package, I support all Django versions currently supported by Django. So now there's a conditional requirement when installing my package.
- Django >= 1.8, with django-formtools
- Django <= 1.7.99 without django-formtools
How to achieve this, with setuptools, and also remain compatible with wheel packaging?
Without the wheel requirement, the currently installed version of Django could be derived; and then install_requires
could be dynamically adapted. However when installing using wheels, setup.py
is not called (if I'm correct).