Django

Code

Ticket #6562 (closed: fixed)

Opened 10 months ago

Last modified 9 months ago

easy_install missing templates/media dir of admin

Reported by: zodman Assigned to: nobody
Milestone: Component: Tools
Version: SVN Keywords: install easy_install template dir
Cc: Triage Stage: Accepted
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

im install the r7095 of django. with easy_install like a python egg

And i see:

the templates/ and/or media/ dir of django/contrib/admin/, django/contrib/databrowser, django/contrib/formtools/, django/contrib/comments/ is not is copy to the Django-0.97_pre-py2.4.egg/ dir

Attachments

6562.diff (0.9 kB) - added by Karen Tracey <kmtracey@gmail.com> on 02/21/08 11:22:49.

Change History

02/21/08 11:22:16 changed by Karen Tracey <kmtracey@gmail.com>

  • needs_better_patch changed.
  • component changed from Uncategorized to Tools.
  • needs_tests changed.
  • needs_docs changed.
  • has_patch set to 1.
  • stage changed from Unreviewed to Accepted.

Root cause is probably the same as the missing templates/media (really all data files) often reported on Windows installs. I'll attach a patched setup.py that fixes the problem. Per advice on how to fix it from Malcolm, new setup.py chdir's into the location of setup.py and then builds all file paths relative to that root. I tested the fix on:

Windows XP, using both the 'python setup.py install' and 'setup.py install' variants, both when current directory was and was not the location of setup.py, all with Python 2.5.1.

Linux (Ubuntu Gutsy), again both with and without the current directory being the location of setup.py, using both Python 2.5.1 and Python 2.4.4. On Linux I also verified an easy_install of a tarball containing the patched setup.py works and includes the data files in the installation.

Sorry, don't have any Macs to test on but so far as I know it should work there as well.

02/21/08 11:22:49 changed by Karen Tracey <kmtracey@gmail.com>

  • attachment 6562.diff added.

02/21/08 14:50:08 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to fixed.

(In [7139]) Changed setup.py to work no matter where it is called from. We were previously using file, which isn't consistent on Windows. Some awesome debugging (and patch) here from Karen Tracey. Fixed #6562.


Add/Change #6562 (easy_install missing templates/media dir of admin)




Change Properties
Action