mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Robert Schwebel <r.schwebel@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Robert Schwebel <r.schwebel@pengutronix.de>
Subject: [ptxdist] [PATCH 1/4] python-django: install __init__.py for locales
Date: Thu, 17 Sep 2015 07:54:29 +0200	[thread overview]
Message-ID: <1442469269-1419-1-git-send-email-r.schwebel@pengutronix.de> (raw)

Without this patch, 'manage.py collectstatic' breaks with Django 1.8:

Traceback (most recent call last):
File "/usr/bin/manage-ptxweb.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
utility.execute()
File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 330, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 390, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 433, in execute
saved_locale = translation.get_language()
File "/usr/lib/python2.7/site-packages/django/utils/translation/__init__.py", line 173, in get_language
return _trans.get_language()
File "/usr/lib/python2.7/site-packages/django/utils/translation/__init__.py", line 57, in __getattr__
from django.utils.translation import trans_real as trans
File "/usr/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 14, in <module>
from django.conf.locale import LANG_INFO
ImportError: No module named locale

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
---
 rules/python-django.make | 1 +
 1 file changed, 1 insertion(+)

diff --git a/rules/python-django.make b/rules/python-django.make
index ae5946e..17df0c3 100644
--- a/rules/python-django.make
+++ b/rules/python-django.make
@@ -54,6 +54,7 @@ $(STATEDIR)/python-django.targetinstall:
 	done
 
 #	# locales
+	$(call install_copy, python-django, 0, 0, 0644, -, $(PYTHON_DJANGO_PYTHON_PATH)/conf/locale/__init__.py)
 	@cd "$(PYTHON_DJANGO_PKGDIR)$(PYTHON_DJANGO_PYTHON_PATH)" && \
 	find -type d -name locale -printf '%P\n' | while read localedir; do \
 		for locale in $(call remove_quotes, $(PTXCONF_PYTHON_DJANGO_LOCALES)); do \
-- 
2.1.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

                 reply	other threads:[~2015-09-17  5:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1442469269-1419-1-git-send-email-r.schwebel@pengutronix.de \
    --to=r.schwebel@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox