old_contents: #!/usr/bin/env python
  # Generated by jaraco.develop (https://bitbucket.org/jaraco/jaraco.develop)
  import io
  
  import setuptools
  
  with io.open('README.txt', encoding='utf-8') as readme:
  	long_description = readme.read()
  with io.open('CHANGES.txt', encoding='utf-8') as changes:
  	long_description += '\n\n' + changes.read()
  
  setup_params = dict(
  	name='jaraco.itertools',
  	use_hg_version=True,
  	author="Jason R. Coombs",
  	author_email="jaraco@jaraco.com",
  	description="jaraco.itertools",
  	long_description=long_description,
  	url="https://bitbucket.org/jaraco/jaraco.itertools",
  	packages=setuptools.find_packages(),
  	install_requires=[
  		'six',
  		'more_itertools',
  		'inflect',
  	],
  	setup_requires=[
  		'hgtools',
  		'pytest-runner',
  		'sphinx',
  	],
  	tests_require=[
  		'pytest',
  	],
  	license='MIT',
  	classifiers=[
  		"Development Status :: 5 - Production/Stable",
  		"Intended Audience :: Developers",
  		"License :: OSI Approved :: MIT License",
  		"Programming Language :: Python :: 2.7",
  		"Programming Language :: Python :: 3",
  	],
  )
  if __name__ == '__main__':
  	setuptools.setup(**setup_params)
  
new_contents: #!/usr/bin/env python
  # Generated by jaraco.develop (https://bitbucket.org/jaraco/jaraco.develop)
  import io
  import sys
  
  import setuptools
  
  with io.open('README.txt', encoding='utf-8') as readme:
  	long_description = readme.read()
  with io.open('CHANGES.txt', encoding='utf-8') as changes:
  	long_description += '\n\n' + changes.read()
  
  needs_pytest = {'pytest', 'test'}.intersection(sys.argv)
  pytest_runner = ['pytest_runner'] if needs_pytest else []
  needs_sphinx = {'release', 'build_sphinx', 'upload_docs'}.intersection(sys.argv)
  sphinx = ['sphinx'] if needs_sphinx else []
  
  setup_params = dict(
  	name='jaraco.itertools',
  	use_hg_version=True,
  	author="Jason R. Coombs",
  	author_email="jaraco@jaraco.com",
  	description="jaraco.itertools",
  	long_description=long_description,
  	url="https://bitbucket.org/jaraco/jaraco.itertools",
  	packages=setuptools.find_packages(),
  	install_requires=[
  		'six',
  		'more_itertools',
  		'inflect',
  	],
  	setup_requires=[
  		'hgtools',
  	] + pytest_runner + sphinx,
  	tests_require=[
  		'pytest',
  	],
  	license='MIT',
  	classifiers=[
  		"Development Status :: 5 - Production/Stable",
  		"Intended Audience :: Developers",
  		"License :: OSI Approved :: MIT License",
  		"Programming Language :: Python :: 2.7",
  		"Programming Language :: Python :: 3",
  	],
  )
  if __name__ == '__main__':
  	setuptools.setup(**setup_params)
  
subject: Make pytest_runner and sphinx optionally required.