Skip to content

Commit

Permalink
Fixes for bugs #357977 and #372568.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorgen Stenarson committed Jul 15, 2010
1 parent c6f87d0 commit ea3dcdd
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 11 deletions.
8 changes: 8 additions & 0 deletions MANIFEST.in
@@ -1 +1,9 @@
include pyreadline/configuration/pyreadlineconfig.ini

graft doc
exclude doc/\#*
exclude doc/man/*.1

# docs subdirs we want to skip
prune doc/attic
prune doc/build
2 changes: 1 addition & 1 deletion pyreadline/__init__.py
Expand Up @@ -6,7 +6,7 @@
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of this software.
#*****************************************************************************
import unicode_helper, logger, clipboard, lineeditor, modes
import unicode_helper, logger, clipboard, lineeditor, modes, console
from rlmain import *
import rlmain
__all__ = [ 'parse_and_bind',
Expand Down
8 changes: 5 additions & 3 deletions pyreadline/release.py
Expand Up @@ -61,11 +61,13 @@

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

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

platforms = [u'Windows XP/2000/NT',u'Windows 95/98/ME']
platforms = [u'Windows XP/2000/NT',
u'Windows 95/98/ME']

keywords = [u'readline',u'pyreadline']
keywords = [u'readline',
u'pyreadline']

classifiers = [u'Development Status :: 4 - Beta',
u'Environment :: Console',
Expand Down
11 changes: 7 additions & 4 deletions pyreadline/unicode_helper.py
Expand Up @@ -9,10 +9,13 @@

try:
pyreadline_codepage = sys.stdout.encoding
except AttributeError: #This error occurs when pdb imports readline and doctest has replaced
#stdout with stdout collector
pyreadline_codepage = u"ascii" #assume ascii codepage

except AttributeError:
# This error occurs when pdb imports readline and doctest has replaced
# stdout with stdout collector. We will assume ascii codepage
pyreadline_codepage = u"ascii"

if pyreadline_codepage is None:
pyreadline_codepage = u"ascii"

def ensure_unicode(text):
u"""helper to ensure that text passed to WriteConsoleW is unicode"""
Expand Down
13 changes: 10 additions & 3 deletions setup.py
Expand Up @@ -19,6 +19,13 @@
from distutils.core import setup
execfile('pyreadline/release.py')

try:
import sphinx
from sphinx.setup_command import BuildDoc
cmd_class ={'build_sphinx': BuildDoc}
except ImportError:
cmd_class = None

packages = ['pyreadline','pyreadline.clipboard','pyreadline.configuration',
'pyreadline.console','pyreadline.keysyms','pyreadline.lineeditor',
'pyreadline.modes','pyreadline.test',
Expand All @@ -35,13 +42,13 @@
license = license,
classifiers = classifiers,
url = url,
# download_url = download_url,
download_url = download_url,
platforms = platforms,
keywords = keywords,
py_modules = ['readline'],
packages = packages,
package_data = {'pyreadline':['configuration/*']},
data_files = [('share/doc/pyreadline', glob.glob("doc/*")),
]
data_files = [],
cmdclass = cmd_class,
)

0 comments on commit ea3dcdd

Please sign in to comment.