text: import codecs
  import os
  import sys
  from setuptools import setup, find_packages
  from os import path
  
  here = path.abspath(path.dirname(__file__))
  
  # Get the long description from the README file
  try:
      with open(path.join(here, "README.md"), encoding="utf-8") as f:
          long_description = f.read()
  except IOError:
      long_description = ""
  
  install_requires = ""
  with open("requirements.txt") as fp:
      install_requires += fp.read()
  
  
  def read(rel_path):
      here = os.path.abspath(os.path.dirname(__file__))
      # intentionally *not* adding an encoding option to open, See:
      #   https://github.com/pypa/virtualenv/issues/201#issuecomment-3145690
      with codecs.open(os.path.join(here, rel_path), "r") as fp:
          return fp.read()
  
  
  def get_version(rel_path):
      """Get version from file. Copied from pip: https://github.com/pypa/pip/blob/master/setup.py#L19"""
      for line in read(rel_path).splitlines():
          if line.startswith("__version__"):
              # __version__ = "0.9"
              delim = '"' if '"' in line else "'"
              return line.split(delim)[1]
      else:
          raise RuntimeError("Unable to find version string.")
  
  
  setup(
      name="oso",
      version=get_version("oso/oso.py"),
      description="oso is an open source policy engine for authorization that’s embedded in your application",
      long_description=long_description,
      long_description_content_type="text/markdown",
      author="Oso Security, Inc.",
      classifiers=[
          "Development Status :: 4 - Beta",
          "Programming Language :: Python :: 3.6",
          "License :: OSI Approved :: Apache Software License",
      ],
      packages=find_packages(),
      python_requires=">=3.6",
      setup_requires=["cffi>=1.0.0", "wheel"],
      cffi_modules=["polar/build.py:ffibuilder"],
      install_requires=install_requires,
      # List additional groups of dependencies here (e.g. development
      # dependencies). Users will be able to install these using the "extras"
      # syntax, for example:
      #
      #   $ pip install sampleproject[dev]
      #
      # Similar to `install_requires` above, these must be valid existing
      # projects.
      extras_require={"flask": ["flask", "authlib"], "django": [], "jwt": ["authlib"]},
      # If there are data files included in your packages that need to be
      # installed, specify them here.
      #
      # If using Python 2.6 or earlier, then these have to be included in
      # MANIFEST.in as well.
      # package_data={"polar": ["policies/*.polar", "policies/*.pol"]},  # Optional
      # Although 'package_data' is the preferred approach, in some case you may
      # need to place data files outside of your packages. See:
      # http://docs.python.org/3.4/distutils/setupscript.html#installing-additional-files
      #
      # In this case, 'data_file' will be installed into '<sys.prefix>/my_data'
      # data_files=[('my_data', ['data/data_file'])],  # Optional
      # To provide executable scripts, use entry points in preference to the
      # "scripts" keyword. Entry points provide cross-platform support and allow
      # `pip` to create the appropriate form of executable for the target
      # platform.
      #
      # For example, the following would provide a command called `sample` which
      # executes the function `main` from this package when invoked:
      entry_points={"console_scripts": []},  # Optional
      # List additional URLs that are relevant to your project as a dict.
      #
      # This field corresponds to the "Project-URL" metadata fields:
      # https://packaging.python.org/specifications/core-metadata/#project-url-multiple-use
      #
      # Examples listed include a pattern for specifying where the package tracks
      # issues, where the source is hosted, where to say thanks to the package
      # maintainers, and where to support the project financially. The key is
      # what's used to render the link text on PyPI.
      project_urls={},  # Optional
  )
  