setup.py (2130B)
1 # Hack to prevent stupid error on exit of `python setup.py test`. (See 2 # http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html.) 3 try: 4 import multiprocessing # noqa 5 except ImportError: 6 pass 7 from re import sub 8 9 from setuptools import setup, find_packages 10 11 12 def get_long_description(): 13 # Fix display issues on PyPI caused by RST markup 14 readme = open('README.rst').read() 15 16 version_lines = [] 17 with open('docs/versions.rst') as infile: 18 next(infile) 19 for line in infile: 20 line = line.rstrip().replace('.. automodule:: more_itertools', '') 21 version_lines.append(line) 22 version_history = '\n'.join(version_lines) 23 version_history = sub(r':func:`([a-zA-Z0-9._]+)`', r'\1', version_history) 24 25 ret = readme + '\n\n' + version_history 26 return ret 27 28 29 setup( 30 name='more-itertools', 31 version='4.2.0', 32 description='More routines for operating on iterables, beyond itertools', 33 long_description=get_long_description(), 34 author='Erik Rose', 35 author_email='erikrose@grinchcentral.com', 36 license='MIT', 37 packages=find_packages(exclude=['ez_setup']), 38 install_requires=['six>=1.0.0,<2.0.0'], 39 test_suite='more_itertools.tests', 40 url='https://github.com/erikrose/more-itertools', 41 include_package_data=True, 42 classifiers=[ 43 'Development Status :: 5 - Production/Stable', 44 'Intended Audience :: Developers', 45 'Natural Language :: English', 46 'License :: OSI Approved :: MIT License', 47 'Programming Language :: Python :: 2', 48 'Programming Language :: Python :: 2.7', 49 'Programming Language :: Python :: 3', 50 'Programming Language :: Python :: 3.2', 51 'Programming Language :: Python :: 3.3', 52 'Programming Language :: Python :: 3.4', 53 'Programming Language :: Python :: 3.5', 54 'Programming Language :: Python :: 3.6', 55 'Programming Language :: Python :: 3.7', 56 'Topic :: Software Development :: Libraries'], 57 keywords=['itertools', 'iterator', 'iteration', 'filter', 'peek', 58 'peekable', 'collate', 'chunk', 'chunked'], 59 )