Django

Code

Ticket #4128 (closed: duplicate)

Opened 3 years ago

Last modified 3 years ago

Django 0.96 installation problem in Windows XP.

Reported by: zoltan.jose@googlemail.com Assigned to: adrian
Milestone: Component: Tools
Version: 0.96 Keywords: Install problem, Django 0.96, Windows XP
Cc: Triage Stage: Accepted
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description (Last modified by mtredinnick)

Hello good folks,

A short description - Django 0.96 does not install on Windows XP. The command "setup.py install" ( or "setup.py build" ) does not work... it gives the following error output:

running install
running build
running build_py
error: package directory '\django' does not exist

I hacked around a bit and found the problem in the setup.py file. The original relevant portion is:

# Compile the list of packages available, because distutils doesn't have
# an easy way to do this.
packages, data_files = [], []
root_dir = os.path.dirname(__file__)
len_root_dir = len(root_dir)
django_dir = os.path.join(root_dir, 'django')

I reckoned that the "root directory" was not being recognised properly... so I made the following change:

# Compile the list of packages available, because distutils doesn't have
# an easy way to do this.
packages, data_files = [], []
root_dir = "C:\\Django-0.96\\Django-0.96\\"     (NOTE: I manually added the 'root' directory pertinent to my system)
len_root_dir = len(root_dir)
django_dir = os.path.join(root_dir, 'django')

The above worked like magic without any hassles. So what's up guys, is this a bug or what? BTW, I had the latest installer tool : setuptools-0.6c5-py2.5.exe installed in my system.

Thanks and Regards,

Timmy Jose (a.k.a z0ltan)

Attachments

Change History

04/23/07 06:02:15 changed by mtredinnick

  • description changed.
  • needs_better_patch changed.
  • component changed from Admin interface to Tools.
  • needs_tests changed.
  • needs_docs changed.
  • stage changed from Unreviewed to Accepted.

(Fixed up wiki-formatting in summary.)

Can you print out what the value of __file__ is when you run setup.py? Just put in a print statement before the line that sets root_dir. I'm trying to work out if __file__ is not set correctly or if os.path.dirname() is returning the wrong thing.

04/23/07 06:03:26 changed by mtredinnick

  • description changed.

04/23/07 07:20:52 changed by Simon G. <dev@simon.net.nz>

Duplicate of #4082 and #3245. I've closed those others as this looks like it has more info.

04/23/07 10:38:49 changed by Gary Wilson <gary.wilson@gmail.com>

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

Closing this since #3245 was re-opened and Malcolm has mentioned there that this was probably fixed as of [4912]. If someone can confirm this, please comment on #3245 and resolve that ticket as fixed.


Add/Change #4128 (Django 0.96 installation problem in Windows XP.)




Change Properties
Action