Bug 1029236 - Update django-admin.py to reflect python3 rather than ssytem python (version 2)
Update django-admin.py to reflect python3 rather than ssytem python (version 2)
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: python-django (Show other bugs)
19
noarch Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Matthias Runge
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-11 18:42 EST by Matt Wilmott
Modified: 2013-11-21 05:07 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-21 05:07:30 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Matt Wilmott 2013-11-11 18:42:23 EST
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 05:07:30 EST
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.