old_contents: from setuptools import setup
  from setuptools.command.test import test as TestCommand
  
  class PyTest(TestCommand):
      def finalize_options(self):
          TestCommand.finalize_options(self)
          self.test_suite = True
  
      def run_tests(self):
          import pytest
          import sys
          cmdline = ' -v --cov surt tests/'
          errcode = pytest.main(cmdline)
          sys.exit(errcode)
  
  
  setup(name='surt',
        version='0.3b3',
        author='rajbot',
        author_email='raj@archive.org',
        classifiers=[
          'License :: OSI Approved :: GNU Affero General Public License v3',
        ],
        description='Sort-friendly URI Reordering Transform (SURT) python package.',
        long_description=open('README.rst').read(),
        url='https://github.com/internetarchive/surt',
        zip_safe=True,
        install_requires=[
            'six',
            'tldextract',
        ],
        provides=[ 'surt' ],
        packages=[ 'surt' ],
        scripts=[],
        # Tests
        tests_require=[ 'pytest', 'pytest-cov' ],
        test_suite='',
        cmdclass={'test': PyTest},
       )
  
new_contents: from setuptools import setup
  from setuptools.command.test import test as TestCommand
  
  class PyTest(TestCommand):
      def finalize_options(self):
          TestCommand.finalize_options(self)
          self.test_suite = True
  
      def run_tests(self):
          import pytest
          import sys
          cmdline = ' -v --cov surt tests/'
          errcode = pytest.main(cmdline)
          sys.exit(errcode)
  
  
  setup(name='surt',
        version='0.3b4',
        author='rajbot',
        author_email='raj@archive.org',
        classifiers=[
          'License :: OSI Approved :: GNU Affero General Public License v3',
        ],
        description='Sort-friendly URI Reordering Transform (SURT) python package.',
        long_description=open('README.rst').read(),
        url='https://github.com/internetarchive/surt',
        zip_safe=True,
        install_requires=[
            'six',
            'tldextract',
        ],
        provides=[ 'surt' ],
        packages=[ 'surt' ],
        scripts=[],
        # Tests
        tests_require=[ 'pytest', 'pytest-cov' ],
        test_suite='',
        cmdclass={'test': PyTest},
       )
  
subject: bump version to 0.3b4 to work around pypi strangeness -- https://pypi.python.org/pypi?:action=display&name=surt&version=0.3b3 exists but missing from https://pypi.python.org/simple/surt/