Django

Code

Ticket #596 (closed: wontfix)

Opened 3 years ago

Last modified 1 year ago

Allow Django to be packaged as a Python egg

Reported by: sil@kryogenix.org Assigned to: nobody
Milestone: Component: Core framework
Version: 0.91 Keywords:
Cc: Triage Stage: Accepted
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 1

Description

This patch allows Django to be packaged as a Python egg file. This means that you can download the Django source and build an egg file with "python setup.py bdist_egg", and that egg contains all of Django and can be dropped onto sys.path and used like other eggs. In particular, this makes it easier to use Django when you don't want to install it into your Python directory (either with "setup.py install" or with a symlink).

This patch incorporates some code from ticket #582.

Attachments

django_as_egg_2.patch (8.9 kB) - added by sil@kryogenix.org on 10/06/05 13:11:05.
Better patch: ignore previous one

Change History

10/06/05 12:34:30 changed by anonymous

  • owner changed from adrian to anonymous.
  • status changed from new to assigned.

10/06/05 12:34:37 changed by adrian

  • owner changed from anonymous to adrian.
  • status changed from assigned to new.

10/06/05 12:34:40 changed by adrian

  • status changed from new to assigned.

10/06/05 13:11:05 changed by sil@kryogenix.org

  • attachment django_as_egg_2.patch added.

Better patch: ignore previous one

10/06/05 13:15:21 changed by sil@kryogenix.org

Changed the patch so that it doesn't break every existing Django project. :-) Using an egg-based Django will require editing of settings/admin.py to make ADMIN_TEMPLATE_PATH be a path that includes the .egg file. Create a new project with an egg-based Django and examine settings/admin.py to see what is meant here.

This patch could do with some testing.

10/16/05 20:40:06 changed by adrian

Stuart (or somebody else) -- When you use Django as an egg, how do you access django-admin.py?

10/16/05 20:43:03 changed by adrian

  • milestone set to Version 1.0.

10/18/05 03:12:10 changed by sil@kryogenix.org

You have to copy django-admin.py out of the egg. I haven't come up with a good solution to this yet :( The TurboGears? people have setuptools *create* their tg-admin.py, which might be an acceptable solution.

10/23/05 00:16:12 changed by danlipsitt@gmail.com

Can this be done with setuptools automatic script creation?

10/24/05 21:01:11 changed by adrian

(In [1010]) Improved autoreloader to ignore files that might be in eggs. Refs #596

10/24/05 21:16:10 changed by adrian

At this point, all we need to do is apply the patches to django/core/servers/basehttp.py and django/core/management.py.

10/25/05 02:30:39 changed by hugo

What still would be open (after the i18n merge) would be handling of the .po/.mo files. Currently they are expected only in the filesystem (either application, project or django-wide), not in eggs. Since I don't have an egged environment for python running, it would be better if somebody who knows eggs could look into that. The problem is that gettext.find() searches for translations and I don't think that it will take eggs into consideration (and the behaviour of gettext.find itself isn't driven by something subclasseable, at least not IIRC).

Maybe the egg patching could wait until after the i18n merge, so that we have some time to check into this and provide a patch?

07/03/06 02:11:29 changed by anonymous

  • severity changed from normal to trivial.
  • component changed from Core framework to Admin interface.
  • priority changed from normal to highest.
  • version set to 0.91.
  • milestone changed from Version 1.0 to Version 0.91.
  • type changed from enhancement to defect.

07/09/06 21:31:39 changed by adrian

  • priority changed from highest to normal.
  • type changed from defect to enhancement.
  • severity changed from trivial to normal.

08/13/06 00:34:10 changed by Gary Wilson <gary.wilson@gmail.com>

  • milestone changed from Version 0.91 to Version 1.0.

0.91 has come and gone.

01/17/07 16:12:17 changed by

  • milestone deleted.

Milestone Version 1.0 deleted

01/17/07 21:40:48 changed by SmileyChris

  • needs_better_patch set to 1.
  • has_patch set to 1.
  • component changed from Admin interface to Core framework.
  • stage changed from Unreviewed to Accepted.

09/16/07 06:32:07 changed by ubernostrum

  • status changed from assigned to closed.
  • resolution set to wontfix.

Django dropped setuptools support (for Django itself) some time ago due to maintenance headaches; marking wontfix because of that.

09/16/07 07:38:12 changed by anonymous

could you specify what caused the maintenance headaches?

09/16/07 07:40:58 changed by jezdez

sorry, the question came from me :)

09/16/07 07:44:16 changed by mtredinnick

Please ask support questions on the mailing list, rather than in Trac. Thanks.


Add/Change #596 (Allow Django to be packaged as a Python egg)




Change Properties
Action