old_contents: import platform
  import subprocess
  import sys
  from os import getenv, path
  from setuptools import Extension
  from setuptools import setup
  
  
  def poppler_cpp_at_least(version):
      try:
          subprocess.check_call(
              ["pkg-config", "--exists", "poppler-cpp >= {}".format(version)]
          )
      except subprocess.CalledProcessError:
          return False
      except OSError:
          print("WARNING: pkg-config not found--guessing at poppler version.")
          print("         If the build fails, install pkg-config and try again.")
      return True
  
  
  # On some BSDs, poppler is in /usr/local, which is not searched by default
  if platform.system() in ["Darwin", "FreeBSD", "OpenBSD"]:
      include_dirs = ["/usr/local/include"]
      library_dirs = ["/usr/local/lib"]
  elif platform.system() in ['Windows']:
      conda_dir = getenv('CONDA_PREFIX')
      if conda_dir is None:
          print("ERROR: CONDA_PREFIX is not found.")
          print("       Install Anaconda or fix missing CONDA_PREFIX and try again.")
          sys.exit(1)
      anaconda_poppler_include_dir = path.join(conda_dir, 'Library\include')
      anaconda_poppler_library_dir = path.join(conda_dir, 'Library\lib')
      include_dirs = [anaconda_poppler_include_dir]
      library_dirs = [anaconda_poppler_library_dir]
  else:
      include_dirs = None
      library_dirs = None
  
  macros = [("POPPLER_CPP_AT_LEAST_0_30_0", int(poppler_cpp_at_least("0.30.0")))]
  
  # On macOS, some distributions of python build extensions for 10.6 by default,
  # but poppler uses C++11 features that require at least 10.9
  if platform.system() == "Darwin":
      extra_compile_args = ["-Wall", "-mmacosx-version-min=10.9"]
  else:
      extra_compile_args = ["-Wall"]
  
  module = Extension(
      "pdftotext",
      sources=["pdftotext.cpp"],
      libraries=["poppler-cpp"],
      include_dirs=include_dirs,
      library_dirs=library_dirs,
      define_macros=macros,
      extra_compile_args=extra_compile_args,
  )
  
  with open("README.md", "r") as f:
      long_description = f.read()
  
  setup(
      name="pdftotext",
      version="2.1.2",
      author="Jason Alan Palmer",
      author_email="jalanpalmer@gmail.com",
      description="Simple PDF text extraction",
      long_description=long_description,
      long_description_content_type="text/markdown",
      url="https://github.com/jalan/pdftotext",
      license="MIT",
      classifiers=[
          "Programming Language :: Python :: 2",
          "Programming Language :: Python :: 3",
      ],
      ext_modules=[module],
      test_suite="tests",
  )
  
new_contents: import platform
  import subprocess
  import sys
  from os import getenv, path
  from setuptools import Extension
  from setuptools import setup
  
  
  def poppler_cpp_at_least(version):
      try:
          subprocess.check_call(
              ["pkg-config", "--exists", "poppler-cpp >= {}".format(version)]
          )
      except subprocess.CalledProcessError:
          return False
      except OSError:
          print("WARNING: pkg-config not found--guessing at poppler version.")
          print("         If the build fails, install pkg-config and try again.")
      return True
  
  
  # On some BSDs, poppler is in /usr/local, which is not searched by default
  if platform.system() in ["Darwin", "FreeBSD", "OpenBSD"]:
      include_dirs = ["/usr/local/include"]
      library_dirs = ["/usr/local/lib"]
  elif platform.system() in ["Windows"]:
      conda_dir = getenv("CONDA_PREFIX")
      if conda_dir is None:
          print("ERROR: CONDA_PREFIX is not found.")
          print("       Install Anaconda or fix missing CONDA_PREFIX and try again.")
          sys.exit(1)
      anaconda_poppler_include_dir = path.join(conda_dir, "Library\include")
      anaconda_poppler_library_dir = path.join(conda_dir, "Library\lib")
      include_dirs = [anaconda_poppler_include_dir]
      library_dirs = [anaconda_poppler_library_dir]
  else:
      include_dirs = None
      library_dirs = None
  
  macros = [("POPPLER_CPP_AT_LEAST_0_30_0", int(poppler_cpp_at_least("0.30.0")))]
  
  # On macOS, some distributions of python build extensions for 10.6 by default,
  # but poppler uses C++11 features that require at least 10.9
  if platform.system() == "Darwin":
      extra_compile_args = ["-Wall", "-mmacosx-version-min=10.9"]
  else:
      extra_compile_args = ["-Wall"]
  
  module = Extension(
      "pdftotext",
      sources=["pdftotext.cpp"],
      libraries=["poppler-cpp"],
      include_dirs=include_dirs,
      library_dirs=library_dirs,
      define_macros=macros,
      extra_compile_args=extra_compile_args,
  )
  
  with open("README.md", "r") as f:
      long_description = f.read()
  
  setup(
      name="pdftotext",
      version="2.1.2",
      author="Jason Alan Palmer",
      author_email="jalanpalmer@gmail.com",
      description="Simple PDF text extraction",
      long_description=long_description,
      long_description_content_type="text/markdown",
      url="https://github.com/jalan/pdftotext",
      license="MIT",
      classifiers=[
          "Programming Language :: Python :: 2",
          "Programming Language :: Python :: 3",
      ],
      ext_modules=[module],
      test_suite="tests",
  )
  
subject: Apply black formatting