[Python-modules-team] Bug#755595: Fails to build with Django 1.7
Raphael Hertzog
hertzog at debian.org
Thu Aug 7 19:44:15 UTC 2014
Control: tag -1 confirmed
The package fails to build with Django 1.7:
debian/rules override_dh_auto_test
make[1]: Entering directory '/«PKGBUILDDIR»'
set -e; \
for python in python2.7; do \
PYTHONPATH="." $python runtests.py; \
done
Traceback (most recent call last):
File "runtests.py", line 52, in <module>
main()
File "runtests.py", line 47, in main
failures = test_runner.run_tests(['classytags'])
File "/usr/lib/python2.7/dist-packages/django/test/runner.py", line 146, in run_tests
suite = self.build_suite(test_labels, extra_tests)
File "/usr/lib/python2.7/dist-packages/django/test/simple.py", line 241, in build_suite
app_config = apps.get_app_config(label)
File "/usr/lib/python2.7/dist-packages/django/apps/registry.py", line 146, in get_app_config
self.check_apps_ready()
File "/usr/lib/python2.7/dist-packages/django/apps/registry.py", line 124, in check_apps_ready
raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
make[1]: *** [override_dh_auto_test] Error 1
You need to add something like this in your test script:
import django
if hasattr(django, 'setup'):
django.setup()
Cheers,
--
Raphaël Hertzog ◈ Debian Developer
Discover the Debian Administrator's Handbook:
→ http://debian-handbook.info/get/
More information about the Python-modules-team
mailing list