text: import tarfile
  from fnmatch import fnmatch
  from os.path import dirname, abspath, join
  from distutils.core import setup
  
  try:
      from urllib import urlretrieve
  except:
      from urllib.request import urlretrieve
  
  import sys
  if sys.version_info[0] < 3:
      print("This module can only be used with Python 3.")
      sys.exit(1)
  
  __version__ = '1.2.0'
  boilerpipe_version = '1.2.0'
  DATAPATH = join(abspath(dirname((__file__))), 'src/boilerpipe/data')
  
  
  def install_jars(datapath):
      tgz_name = 'boilerpipe-1.2.0-bin.tar.gz'
      tar = tarfile.open(tgz_name, mode='r:gz')
      for tarinfo in tar.getmembers():
          if not fnmatch(tarinfo.name, '*.jar'):
              continue
          tar.extract(tarinfo, datapath)
  
  
  install_jars(datapath=DATAPATH)
  
  
  setup(
      name='boilerpipe',
      version=__version__,
      packages=['boilerpipe', 'boilerpipe.extract'],
      package_dir={'': 'src'},
      package_data={
          'boilerpipe': [
              'data/boilerpipe-{version}/boilerpipe-{version}.jar'.format(version=boilerpipe_version),
              'data/boilerpipe-{version}/lib/*.jar'.format(version=boilerpipe_version),
          ],
      },
      # install_requires=[
      #     'JPype1-py3',
      #     'charade',
      # ],
      # author='NA',
      # author_email='NA',
      # maintainer='NA',
      # maintainer_email='NA',
      url='https://pypi.org/project/boilerpipe-py3/',
      keywords='boilerpipe',
      license='Apache 2.0',
  
      description='Python interface to Boilerpipe, Boilerplate Removal and Fulltext Extraction from HTML pages with '
                  'Python 3 support '
  )
  