Your message dated Thu, 30 Jun 2011 22:50:20 +0200
with message-id <20110630205019.gc30...@rivendell.home.ouaza.com>
and subject line Re: Bug#632217: python-django: empty __init__.py files not
packaged, modules can't be imported
has caused the Debian Bug report #632217,
regarding python-django: empty __init__.py files not packaged, modules can't be
imported
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
632217: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632217
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: python-django
Version: 1.3-2
Severity: grave
Justification: renders package unusable
The python-django package omits all __init__.py files that are 0-sized.
The django upstream sources contain a lot of such files. These missing
files lead to many django modules not being available, because python
expects module directories to contain a __init__.py file.
How to reproduce:
python -c 'import django.core'
Expected result:
No error
Actual result:
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named core
Solution:
Package even 0-sized files.
NB: python-openid has the same problem in extesions/draft. Problem also
presents for squeeze package versions.
-- System Information:
Debian Release: 6.0.2
APT prefers stable
APT policy: (500, 'stable'), (300, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-238.12.1.el5.028stab091.1 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages python-django depends on:
ii python 2.6.6-3+squeeze6 interactive high-level object-orie
ii python-support 1.0.10 automated rebuilding support for P
Versions of packages python-django recommends:
ii libjs-jquery 1.4.2-2 JavaScript library for dynamic web
Versions of packages python-django suggests:
ii python-flup 1.0.2-1 Implements Python Web Server Gatew
pn python-mysqldb <none> (no description available)
pn python-psycopg <none> (no description available)
pn python-psycopg2 <none> (no description available)
ii python-sqlite 1.0.1-7+b1 python interface to SQLite 2
pn python-yaml <none> (no description available)
-- no debconf information
--- End Message ---
--- Begin Message ---
Hi,
On Thu, 30 Jun 2011, Simon Schubert wrote:
> The python-django package omits all __init__.py files that are 0-sized.
> The django upstream sources contain a lot of such files. These missing
> files lead to many django modules not being available, because python
> expects module directories to contain a __init__.py file.
Yes, this is on purpose, they are removed by python-support at build time and
they are recreated by python-support at install time.
See /usr/share/python-support/private/movemodules:
if sourcefile.endswith("/__init__.py") and not
os.path.getsize(sourcefile):
# Remove namespace packages, they will be added automatically
# by update-python-modules.
# This will avoid file conflicts at the dpkg level.
os.remove(sourcefile)
> How to reproduce:
>
> python -c 'import django.core'
Works here.
> Actual result:
>
> Traceback (most recent call last):
> File "<string>", line 1, in <module>
> ImportError: No module named core
You might want to rerun "update-python-modules -f". I don't know what's
wrong on your system but it's not the fault of python-django. Have you
misconfigured your python path to look up in /usr/share/pyshared
by mistake?
Cheers,
--
Raphaël Hertzog ◈ Debian Developer
Follow my Debian News ▶ http://RaphaelHertzog.com (English)
▶ http://RaphaelHertzog.fr (Français)
--- End Message ---