Merge lp:~gcrosswhite/leo-editor/ran-setup-through-2to3 into lp:leo-editor/old-trunk

Proposed by Gregory Crosswhite
Status: Needs review
Proposed branch: lp:~gcrosswhite/leo-editor/ran-setup-through-2to3
Merge into: lp:leo-editor/old-trunk
Diff against target: 33 lines (+4/-4)
1 file modified
setup.py (+4/-4)
To merge this branch: bzr merge lp:~gcrosswhite/leo-editor/ran-setup-through-2to3
Reviewer Review Type Date Requested Status
The Leo editor team Pending
Review via email: mp+63760@code.launchpad.net

Description of the change

I ran setup.py through 2to3 to get it working with Python 3. I checked that it still works with python2.5 and python2.6, so I would recommend accepting this patch since it makes Leo installable out-of-the-box with Python 3 without breaking backwards compatability.

To post a comment you must log in.

Unmerged revisions

4297. By Gregory Crosswhite

Ran setup.py through 2to3 to make it compatible with Python 3.

I also checked it with python2.5 and python2.6 and it works just fine,
so this change does not seem to break backwards compatability at all.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'setup.py'
2--- setup.py 2010-05-25 19:40:43 +0000
3+++ setup.py 2011-06-07 20:19:51 +0000
4@@ -42,7 +42,7 @@
5 # Tell distutils to put the data_files in platform-specific installation
6 # locations. See here for an explanation:
7 # http://groups.google.com/group/comp.lang.python/browse_thread/thread/35ec7b2fed36eaec/2105ee4d9e8042cb
8-for scheme in INSTALL_SCHEMES.values():
9+for scheme in list(INSTALL_SCHEMES.values()):
10 scheme['data'] = scheme['purelib']
11 #@+node:ville.20090213233714.2:@url http://groups.google.com/group/comp.lang.python/browse_thread/thread/35ec7b2fed36eaec/2105ee4d9e8042cb
12 #@-node:ville.20090213233714.2:@url http://groups.google.com/group/comp.lang.python/browse_thread/thread/35ec7b2fed36eaec/2105ee4d9e8042cb
13@@ -71,9 +71,9 @@
14 data_files.append([dirpath, [os.path.join(dirpath, f) for f in filenames]])
15
16 import pprint
17-print "data files"
18+print("data files")
19 pprint.pprint(data_files)
20-print "packages (pre-cleanup)"
21+print("packages (pre-cleanup)")
22 pprint.pprint(packages)
23
24 #cleanup unwanted packages
25@@ -81,7 +81,7 @@
26 # extensions should be provided through repos (packaging)
27 packages = [pa for pa in packages if not pa.startswith('leo.extensions')]
28
29-print "packages (post-cleanup)"
30+print("packages (post-cleanup)")
31 pprint.pprint(packages)
32
33 #cleanup unwanted data files

Subscribers

People subscribed via source and target branches

to status/vote changes: