Opened 3 years ago

Closed 3 years ago

#21827 closed Bug (fixed)

Regression in 1.7: django-admin misses .py suffix

Reported by: Florian Apolloner Owned by: nobody
Component: Uncategorized Version: master
Severity: Release blocker Keywords:
Cc: Florian Apolloner Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

https://github.com/django/django/pull/2116 moved django-admin.py to django-admin, we should either update the docs or change setup.py to:

diff --git a/setup.py b/setup.py
index 2818037..e65155d 100644
--- a/setup.py
+++ b/setup.py
@@ -44,7 +44,7 @@ setup(
     packages=find_packages(exclude=EXCLUDE_FROM_PACKAGES),
     include_package_data=True,
     entry_points={'console_scripts': [
-        'django-admin = django.core.management:execute_from_command_line',
+        'django-admin.py = django.core.management:execute_from_command_line',
     ]},
     zip_safe=False,
     classifiers=[

This works on linux and should also work on windows (should ;)). Technically I'd like django-admin more, but it's somewhat backwards incompatible.

Change History (8)

comment:1 Changed 3 years ago by Aymeric Augustin

I don't think we can change it outright. Keep it as is or implement a deprecation path.

comment:2 Changed 3 years ago by Florian Apolloner

My change only fixes it for linux, windows will install it as django-admin.exe -- damn :/

comment:3 Changed 3 years ago by anonymous

Summary: Doc update for django-admin vs django-admin.pyRegression in 1.7: django-admin misses .py suffix

comment:4 Changed 3 years ago by Aymeric Augustin

If we can't find a solution by 1.7 beta we'll have to revert that commit.

comment:5 Changed 3 years ago by Florian Apolloner <florian@…>

In 151dae2bea1dad9fa8f24ea8adcf58dbb1820aa8:

Changed django-admin back to django-admin.py. Refs #21827

comment:6 Changed 3 years ago by Florian Apolloner

Worst case, I'll disable entrypoints for windows again and restore the old solution there…

comment:7 Changed 3 years ago by Florian Apolloner

I had an older pip version locally and am currently blocked by: https://github.com/pypa/pip/issues/1485 -- but it seems that a normal install produces django-admin.py.exe whereas only the wheel produces django-admin.exe. I'll figure out if that is a bug in pip and see that it gets fixed there (if I get my env running again)

comment:8 Changed 3 years ago by Florian Apolloner <florian@…>

Resolution: fixed
Status: newclosed

In 088cb711fe8c8bfb6af04ac7ef094817802c4256:

Fixed #21827 -- Install django-admin and django-admin.py

We need to figure out how to deprecate django-admin.py, but for now this
should do the trick.

Note: See TracTickets for help on using tickets.
Back to Top