[Python-modules-team] Bug#755639: Fails to build with Django 1.7
Raphael Hertzog
hertzog at debian.org
Thu Aug 7 21:04:43 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»'
PYBUILD_SYSTEM=custom \
PYBUILD_TEST_ARGS="cd {build_dir}; {interpreter} {dir}/runtests_sqlite.py" dh_auto_test
I: pybuild base:170: cd /«PKGBUILDDIR»/.pybuild/pythonX.Y_2.7/build; python2.7 /«PKGBUILDDIR»/runtests_sqlite.py
Traceback (most recent call last):
File "/«PKGBUILDDIR»/runtests_sqlite.py", line 36, in <module>
runtests(*args, **options.__dict__)
File "/«PKGBUILDDIR»/runtests.py", line 40, in runtests
failures = test_runner.run_tests(test_args)
File "/usr/lib/python2.7/dist-packages/django_nose/runner.py", line 200, in run_tests
nosetests uuidfield --verbosity=1
Creating test database for alias 'default'...
result = self.run_suite(nose_argv)
File "/usr/lib/python2.7/dist-packages/django_nose/runner.py", line 147, in run_suite
addplugins=plugins_to_add)
File "/usr/lib/python2.7/dist-packages/nose/core.py", line 121, in __init__
**extra_args)
File "/usr/lib/python2.7/unittest/main.py", line 95, in __init__
self.runTests()
File "/usr/lib/python2.7/dist-packages/nose/core.py", line 207, in runTests
result = self.testRunner.run(self.test)
File "/usr/lib/python2.7/dist-packages/nose/core.py", line 50, in run
wrapper = self.config.plugins.prepareTest(test)
File "/usr/lib/python2.7/dist-packages/nose/plugins/manager.py", line 99, in __call__
return self.call(*arg, **kw)
File "/usr/lib/python2.7/dist-packages/nose/plugins/manager.py", line 167, in simple
result = meth(*arg, **kw)
File "/usr/lib/python2.7/dist-packages/django_nose/plugin.py", line 75, in prepareTest
self.old_names = self.runner.setup_databases()
File "/usr/lib/python2.7/dist-packages/django_nose/runner.py", line 383, in setup_databases
return super(NoseTestSuiteRunner, self).setup_databases()
File "/usr/lib/python2.7/dist-packages/django/test/runner.py", line 109, in setup_databases
return setup_databases(self.verbosity, self.interactive, **kwargs)
File "/usr/lib/python2.7/dist-packages/django/test/runner.py", line 299, in setup_databases
serialize=connection.settings_dict.get("TEST_SERIALIZE", True),
File "/usr/lib/python2.7/dist-packages/django/db/backends/creation.py", line 374, in create_test_db
test_flush=True,
File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 93, in call_command
app_name = get_commands()[name]
File "/usr/lib/python2.7/dist-packages/django/utils/lru_cache.py", line 101, in wrapper
result = user_function(*args, **kwds)
File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 73, in get_commands
for app_config in reversed(list(apps.get_app_configs())):
File "/usr/lib/python2.7/dist-packages/django/apps/registry.py", line 137, in get_app_configs
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.
E: pybuild pybuild:256: test: plugin custom failed with: exit code=1: cd /«PKGBUILDDIR»/.pybuild/pythonX.Y_2.7/build; python2.7 /«PKGBUILDDIR»/runtests_sqlite.py
dh_auto_test: pybuild --test -i python{version} -p 2.7 --dir . returned exit code 13
make[1]: *** [override_dh_auto_test] Error 13
To get past this error you need to add this to 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