text: import os
  import re
  import codecs
  from setuptools import setup, find_packages
  
  
  def read(*parts):
      filename = os.path.join(os.path.dirname(__file__), *parts)
      with codecs.open(filename, encoding='utf-8') as fp:
          return fp.read()
  
  
  def find_version(*file_paths):
      version_file = read(*file_paths)
      version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
                                version_file, re.M)
      if version_match:
          return version_match.group(1)
      raise RuntimeError("Unable to find version string.")
  
  
  # Provided as an attribute, so you can append to these instead
  # of replicating them:
  standard_exclude = ('*.py', '*.pyc', '*$py.class', '*~', '.*', '*.bak')
  standard_exclude_directories = ('.*', 'CVS', '_darcs', './build',
                                  './dist', 'EGG-INFO', '*.egg-info')
  
  
  setup(
      name="localflavor",
      version=find_version("localflavor", "__init__.py"),
      url='https://github.com/anka-sirota/localflavor',
      license='BSD',
      description="Country-specific validation helpers, ported from Django Localflavor",
      long_description=read('README.rst'),
      author='Anna Sirota',
      author_email='dev.local@gmail.com',
      packages=find_packages(exclude=['tests', 'tests.*']),
      install_requires=[
          'six>=1.11.0',
      ],
      classifiers=[
          'Development Status :: 5 - Production/Stable',
          'Environment :: Web Environment',
          'Intended Audience :: Developers',
          'License :: OSI Approved :: BSD License',
          'Operating System :: OS Independent',
          'Programming Language :: Python :: 3.6',
          'Topic :: Internet :: WWW/HTTP',
      ],
  )
  