Skip to content

Commit ea3dcdd

Browse files
author
Jorgen Stenarson
committed
Fixes for bugs #357977 and #372568.
1 parent c6f87d0 commit ea3dcdd

File tree

5 files changed

+31
-11
lines changed

5 files changed

+31
-11
lines changed

MANIFEST.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
11
include pyreadline/configuration/pyreadlineconfig.ini
2+
3+
graft doc
4+
exclude doc/\#*
5+
exclude doc/man/*.1
6+
7+
# docs subdirs we want to skip
8+
prune doc/attic
9+
prune doc/build

pyreadline/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Distributed under the terms of the BSD License. The full license is in
77
# the file COPYING, distributed as part of this software.
88
#*****************************************************************************
9-
import unicode_helper, logger, clipboard, lineeditor, modes
9+
import unicode_helper, logger, clipboard, lineeditor, modes, console
1010
from rlmain import *
1111
import rlmain
1212
__all__ = [ 'parse_and_bind',

pyreadline/release.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,13 @@
6161

6262
url = u'http://ipython.scipy.org/moin/PyReadline/Intro'
6363

64-
download_url = u''
64+
download_url = u'https://launchpad.net/pyreadline/+download'
6565

66-
platforms = [u'Windows XP/2000/NT',u'Windows 95/98/ME']
66+
platforms = [u'Windows XP/2000/NT',
67+
u'Windows 95/98/ME']
6768

68-
keywords = [u'readline',u'pyreadline']
69+
keywords = [u'readline',
70+
u'pyreadline']
6971

7072
classifiers = [u'Development Status :: 4 - Beta',
7173
u'Environment :: Console',

pyreadline/unicode_helper.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@
99

1010
try:
1111
pyreadline_codepage = sys.stdout.encoding
12-
except AttributeError: #This error occurs when pdb imports readline and doctest has replaced
13-
#stdout with stdout collector
14-
pyreadline_codepage = u"ascii" #assume ascii codepage
15-
12+
except AttributeError:
13+
# This error occurs when pdb imports readline and doctest has replaced
14+
# stdout with stdout collector. We will assume ascii codepage
15+
pyreadline_codepage = u"ascii"
16+
17+
if pyreadline_codepage is None:
18+
pyreadline_codepage = u"ascii"
1619

1720
def ensure_unicode(text):
1821
u"""helper to ensure that text passed to WriteConsoleW is unicode"""

setup.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@
1919
from distutils.core import setup
2020
execfile('pyreadline/release.py')
2121

22+
try:
23+
import sphinx
24+
from sphinx.setup_command import BuildDoc
25+
cmd_class ={'build_sphinx': BuildDoc}
26+
except ImportError:
27+
cmd_class = None
28+
2229
packages = ['pyreadline','pyreadline.clipboard','pyreadline.configuration',
2330
'pyreadline.console','pyreadline.keysyms','pyreadline.lineeditor',
2431
'pyreadline.modes','pyreadline.test',
@@ -35,13 +42,13 @@
3542
license = license,
3643
classifiers = classifiers,
3744
url = url,
38-
# download_url = download_url,
45+
download_url = download_url,
3946
platforms = platforms,
4047
keywords = keywords,
4148
py_modules = ['readline'],
4249
packages = packages,
4350
package_data = {'pyreadline':['configuration/*']},
44-
data_files = [('share/doc/pyreadline', glob.glob("doc/*")),
45-
]
51+
data_files = [],
52+
cmdclass = cmd_class,
4653
)
4754

0 commit comments

Comments
 (0)