diff options
author | Zooko O'Whielacronx <zooko@zooko.com> | 2012-09-06 16:38:03 -0600 |
---|---|---|
committer | Zooko O'Whielacronx <zooko@zooko.com> | 2012-09-06 16:38:03 -0600 |
commit | f789ed951b49b33e7cc49d16fdc8b398f7ec7223 (patch) | |
tree | 68297646de08b1b4badf33cad7ab7f783d53a864 | |
parent | c4fc30a8b21d73bd3fa5cf9572d494709f4de7b0 (diff) |
if UnicodeEncodeError, then just squash the long description with repr()
-rw-r--r-- | setup.py | 66 |
1 files changed, 36 insertions, 30 deletions
@@ -427,33 +427,39 @@ class Bench(Command): bench_algs.bench(MAXTIME=1.0) commands["bench"] = Bench -setup(name=PKG, - version=version, - description='Python wrappers for a few algorithms from the Crypto++ library', - long_description=readmetext, - author='Zooko Wilcox-O\'Hearn', - author_email='zooko@zooko.com', - url='https://tahoe-lafs.org/trac/' + PKG, - license='GNU GPL', # see README.rst for details -- there is also an alternative licence - packages=["pycryptopp", - "pycryptopp.cipher", - "pycryptopp.hash", - "pycryptopp.publickey", - "pycryptopp.publickey.ed25519", - "pycryptopp.test", - ], - include_package_data=True, - exclude_package_data={ - '': [ '*.cpp', '*.hpp', ] - }, - data_files=data_files, - package_dir={"pycryptopp": "src/pycryptopp"}, - setup_requires=setup_requires, - install_requires=install_requires, - dependency_links=dependency_links, - classifiers=trove_classifiers, - ext_modules=ext_modules, - test_suite=PKG+".test", - zip_safe=False, # I prefer unzipped for easier access. - cmdclass=commands, - ) +def _setup(longdescription): + setup(name=PKG, + version=version, + description='Python wrappers for a few algorithms from the Crypto++ library', + long_description=longdescription, + author='Zooko Wilcox-O\'Hearn', + author_email='zooko@zooko.com', + url='https://tahoe-lafs.org/trac/' + PKG, + license='GNU GPL', # see README.rst for details -- there is also an alternative licence + packages=["pycryptopp", + "pycryptopp.cipher", + "pycryptopp.hash", + "pycryptopp.publickey", + "pycryptopp.publickey.ed25519", + "pycryptopp.test", + ], + include_package_data=True, + exclude_package_data={ + '': [ '*.cpp', '*.hpp', ] + }, + data_files=data_files, + package_dir={"pycryptopp": "src/pycryptopp"}, + setup_requires=setup_requires, + install_requires=install_requires, + dependency_links=dependency_links, + classifiers=trove_classifiers, + ext_modules=ext_modules, + test_suite=PKG+".test", + zip_safe=False, # I prefer unzipped for easier access. + cmdclass=commands, + ) + +try: + _setup(readmetext) +except UnicodeEncodeError: + _setup(repr(readmetext)) |