After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 661511 - Python/Django Project Wizard: Missing Components/Programs: django-admin
Python/Django Project Wizard: Missing Components/Programs: django-admin
Status: RESOLVED FIXED
Product: anjuta
Classification: Applications
Component: plugins: project-wizard
3.2.x
Other Linux
: Normal normal
: ---
Assigned To: Sébastien Granjoux
Anjuta maintainers
Depends on:
Blocks:
 
 
Reported: 2011-10-12 00:43 UTC by Shanto
Modified: 2011-10-14 19:20 UTC
See Also:
GNOME target: ---
GNOME version: 3.1/3.2


Attachments
Screenshot of the error message. (60.46 KB, image/png)
2011-10-12 00:43 UTC, Shanto
Details

Description Shanto 2011-10-12 00:43:10 UTC
Created attachment 198829 [details]
Screenshot of the error message.

On distributions having the "django-admin" installed as "*/bin/django-admin.py" (as in Django's original layout), the new project wizard stops on the second step with a warning that "django-admin" program is missing.

Related Bug: 533758
Comment 1 Sébastien Granjoux 2011-10-12 05:41:48 UTC
The project wizard is looking for django-admin.py using the GLib function g_find_program_in_path, so it should work whatever is the directory used if the  path is configured correctly. Could you check this?

If it is not in the path, how could we know where it is?
Comment 2 Shanto 2011-10-12 07:25:13 UTC
It is /usr/bin/django-admin.py, however, I think, this particular error message is originating from "<required-program>django-admin</required-program>" at http://git.gnome.org/browse/anjuta/tree/plugins/project-wizard/templates/django.wiz.in#n7
Comment 3 Sébastien Granjoux 2011-10-12 16:26:51 UTC
(In reply to comment #2)
> however, I think, this particular error message
> is originating from "<required-program>django-admin</required-program>" at
> http://git.gnome.org/browse/anjuta/tree/plugins/project-wizard/templates/django.wiz.in#n7

Yes, it's due to that line.

I haven't read the bug #533758 before so now I understand better this issue. I don't know what is the best way to fix it.

1. Just replace django-admin by django-admin.py:
It will break it on all debian based distributions.

2. Just remove the line:
The user will get a more obscure error message if django is not installed. But it will work with both django-admin and django-admin.py because it has been fixed in bug #533758. It's the easiest possibility.

3. Improve the project wizard to allow alternative:
We can use the content of required-program as a list of programs separated by white spaces. It's not that difficult to implement but it's not very obvious to use.

Do you have some better proposals?
Comment 4 Naba Kumar 2011-10-12 18:35:15 UTC
Option 1 is not so nice since we will get similar bugs from debian users.

Option 3 is naturaly the best choice and allows future ORing of requirements. However, having a seperate xml tag to group them would make more sense than simple space separated list. Such as: 

<requires-or>
   <...>
   <...>
</requires-or>

This is more involved to implement, of course.

*But* from purely practical point of view, this is just about the only case so far identified needing such feature. So, my opinion is to go with option 2 for now and not bother checking it. This is so old issue that django project should have sorted out now. Iam sure aware of it. But since they didn't, there is not much reason to workaround it too much in anjuta.

If ever we come across another case requiring this, I would consider implementing option 3.
Comment 5 Sébastien Granjoux 2011-10-14 19:20:00 UTC
I think too that a space separated list is a bit too primitive for a xml file. So I have committed the option 2. Thanks for your bug report.