Opened 16 years ago

Closed 16 years ago

#6672 closed (fixed)

Correct setup.py under Windows (not bug, not request, but commit)

Reported by: temoto Owned by: nobody
Component: Uncategorized Version: 0.96
Severity: Keywords: setup.py
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I'm sorry for incorrect place to report such thing.

Documentation says under Windows one should just copy django directory tree to site-packages and it will work.

If i try to run setup.py install, i get directory "\django" access error. That can be corrected if i increment root_len by one. Script uses correct "django" with no leading backslash path then and it installs perfectly.

So all we have to change is these lines in setup.py:

root_dir = os.path.dirname(__file__)
len_root_dir = len(root_dir)
django_dir = os.path.join(root_dir, 'django')

to:

root_dir = os.path.dirname(__file__)
len_root_dir = len(root_dir)
if os.name == "nt": len_root_dir++
django_dir = os.path.join(root_dir, 'django')

I'm sorry not to attach a diff. I'm sure you want to change style or something.

Change History (1)

comment:1 by Malcolm Tredinnick, 16 years ago

Resolution: fixed
Status: newclosed

The setup.py in 0.96 has a number of problems on Windows. Try grabbing the version from subversion (just the setup.py file) and see if that solves your problems. We've made a number of fixes to it.

You can download the latest file from here (use the "plain text" link at the bottom).

Please reopen the ticket with details of what went wrong if that doesn't solve your problem, but it will certainly be better than the version in 0.96.

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