Bug 1029236 - Update django-admin.py to reflect python3 rather than ssytem python (version 2)
Summary: Update django-admin.py to reflect python3 rather than ssytem python (version 2)
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: python-django
Version: 19
Hardware: noarch
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Matthias Runge
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-11 23:42 UTC by Matt Wilmott
Modified: 2013-11-21 10:07 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-21 10:07:30 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Matt Wilmott 2013-11-11 23:42:23 UTC
Description of problem:
/usr/lib/python3.3/site-packages/django/bin/django-admin.py has the following interpreter defined '#!/usr/bin/env python' however on Fedora 19 the default Python version is 2 therefore it fails to execute as django libraries cannot be found

Version-Release number of selected component (if applicable): 
Fedora release 19 (Schrödinger’s Cat)
python3-django-1.5.4-1.fc19.noarch

How reproducible:
Always

Steps to Reproduce:
1. Run /usr/lib/python3.3/site-packages/django/bin/django-admin.py


Actual results:
$ /usr/lib/python3.3/site-packages/django/bin/django-admin.py
Traceback (most recent call last):
  File "/usr/lib/python3.3/site-packages/django/bin/django-admin.py", line 2, in <module>
    from django.core import management
ImportError: No module named django.core


Expected results:

$ /usr/lib/python3.3/site-packages/django/bin/django-admin.py
Usage: django-admin.py subcommand [options] [args]

Options:
  -v VERBOSITY, --verbosity=VERBOSITY
                        Verbosity level; 0=minimal output, 1=normal output,
                        2=verbose output, 3=very verbose output
  --settings=SETTINGS   The Python path to a settings module, e.g.
                        "myproject.settings.main". If this isn't provided, the
                        DJANGO_SETTINGS_MODULE environment variable will be
                        used.
...


Additional info:
If the script is updated to reflect '#!/usr/bin/env python3' it works as expected.

Also can
ln -s /usr/lib/python3.3/site-packages/django/bin/django-admin.py /usr/bin/django-admin.py
be added to the rpm script so its immediately available on the path?

Comment 1 Matthias Runge 2013-11-21 10:07:30 UTC
the script is not meant to be called directly, please use python3-django-admin instead, which works as expected.


Note You need to log in before you can comment on or make changes to this bug.