Opened 18 years ago

Closed 18 years ago

#3829 closed (fixed)

Windows setup failed

Reported by: gjgaughan@… Owned by: Adrian Holovaty
Component: Tools Version: 0.96
Severity: Keywords:
Cc: dev@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I could be doing something daft, but I had to change the following line in setup.py:

package = dirpath[len_root_dir:].lstrip('/').replace('/', '.')

to:

package = dirpath[len_root_dir:].lstrip('
').replace('
', '.')

to make it install under Windows.

Attachments (1)

3829.diff (545 bytes ) - added by Gary Wilson <gary.wilson@…> 18 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 by Simon G. <dev@…>, 18 years ago

Cc: dev@… added
Component: UncategorizedTools
Owner: changed from Jacob to Adrian Holovaty

Hmm. That does look like we're assuming a *nix enviroment. Can someone else who runs windows confirm this?

comment:2 by gjgaughan@…, 18 years ago

If it is a problem, this would be better (assuming os.path is imported):

package = dirpath[len_root_dir:].lstrip(os.path.sep).replace(os.path.sep, '.')

comment:3 by gjgaughan@…, 18 years ago

Or better:

package = dirpath[len_root_dir:].lstrip(os.path.sep).replace(os.path.sep, os.path.curdir)

by Gary Wilson <gary.wilson@…>, 18 years ago

Attachment: 3829.diff added

comment:4 by Gary Wilson <gary.wilson@…>, 18 years ago

Has patch: set
Patch needs improvement: set
Triage Stage: UnreviewedAccepted

Just noticed that this line also uses lstrip() which isn't available in Python 2.3, is it?

comment:5 by Malcolm Tredinnick, 18 years ago

Gary, lstrip and rstrip are both in 2.3.

comment:6 by Gary Wilson <gary.wilson@…>, 18 years ago

Patch needs improvement: unset

Cool, I was confusing with rsplit. I don't have access to a windows machine, would someone who does like to test the patch?

comment:7 by Malcolm Tredinnick, 18 years ago

Resolution: fixed
Status: newclosed

This was fixed in a different way in [4912].

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