code: def main():
      from setuptools import find_packages
      from aksetup_helper import (
          hack_distutils,
          get_config,
          setup,
          check_pybind11,
          check_git_submodules,
          ExtensionUsingNumpy,
          get_pybind_include,
          PybindBuildExtCommand,
      )
  
      check_pybind11()
      check_git_submodules()
  
      hack_distutils()
      conf = get_config(get_config_schema(), warn_about_no_config=False)
  
      extra_defines = {}
  
      extra_defines["PYGPU_PACKAGE"] = "pyopencl"
      extra_defines["PYGPU_PYOPENCL"] = "1"
  
      if conf["CL_TRACE"]:
          extra_defines["PYOPENCL_TRACE"] = 1
  
      if conf["CL_ENABLE_GL"]:
          extra_defines["HAVE_GL"] = 1
  
      if conf["CL_USE_SHIPPED_EXT"]:
          extra_defines["PYOPENCL_USE_SHIPPED_EXT"] = 1
  
      if conf["CL_PRETEND_VERSION"]:
          try:
              major, minor = [
                  int(x) for x in conf["CL_PRETEND_VERSION"].split(".")
              ]
              extra_defines["PYOPENCL_PRETEND_CL_VERSION"] = (
                  0x1000 * major + 0x10 * minor
              )
          except Exception:
              print(
                  "CL_PRETEND_VERSION must be of the form M.N, "
                  "with two integers M and N"
              )
              raise
  
      conf["EXTRA_DEFINES"] = extra_defines
  
      INCLUDE_DIRS = conf["CL_INC_DIR"] + [
          "pybind11/include"
      ]  # noqa: N806
  
      ver_dic = {}
      version_file = open("pyopencl/version.py")
      try:
          version_file_contents = version_file.read()
      finally:
          version_file.close()
  
      exec(
          compile(version_file_contents, "pyopencl/version.py", "exec"),
          ver_dic,
      )
  
      if not exists("pyopencl/compyte/dtypes.py"):
          print(75 * "-")
          print(
              "You are missing important files from the pyopencl distribution."
          )
          print(75 * "-")
          print(
              "You may have downloaded a zip or tar file from Github."
          )
          print(
              "Those do not work, and I am unable to prevent Github from showing"
          )
          print(
              "them. Delete that file, and get an actual release file from the"
          )
          print("Python package index:")
          print()
          print("https://pypi.python.org/pypi/pyopencl")
          sys.exit(1)
  
      setup(
          name="pyopencl",
          # metadata
          version=ver_dic["VERSION_TEXT"],
          description="Python wrapper for OpenCL",
          long_description=open("README.rst").read(),
          author="Andreas Kloeckner",
          author_email="inform@tiker.net",
          license="MIT",
          url="http://mathema.tician.de/software/pyopencl",
          classifiers=[
              "Environment :: Console",
              "Development Status :: 5 - Production/Stable",
              "Intended Audience :: Developers",
              "Intended Audience :: Other Audience",
              "Intended Audience :: Science/Research",
              "License :: OSI Approved :: MIT License",
              "Natural Language :: English",
              "Programming Language :: C++",
              "Programming Language :: Python",
              "Programming Language :: Python :: 3",
              "Topic :: Scientific/Engineering",
              "Topic :: Scientific/Engineering :: Mathematics",
              "Topic :: Scientific/Engineering :: Physics",
          ],
          # build info
          packages=find_packages(),
          ext_modules=[
              ExtensionUsingNumpy(
                  "pyopencl._cl",
                  [
                      "src/wrap_constants.cpp",
                      "src/wrap_cl.cpp",
                      "src/wrap_cl_part_1.cpp",
                      "src/wrap_cl_part_2.cpp",
                      "src/wrap_mempool.cpp",
                      "src/bitlog.cpp",
                  ],
                  include_dirs=INCLUDE_DIRS
                  + [
                      get_pybind_include(),
                  ],
                  library_dirs=conf["CL_LIB_DIR"],
                  libraries=conf["CL_LIBNAME"],
                  define_macros=list(conf["EXTRA_DEFINES"].items()),
                  extra_compile_args=conf["CXXFLAGS"],
                  extra_link_args=conf["LDFLAGS"],
                  language="c++",
              ),
          ],
          python_requires="~=3.8",
          install_requires=[
              "numpy",
              "pytools>=2021.2.7",
              "platformdirs>=2.2.0",
              # "Mako>=0.3.6",
          ],
          extras_require={
              "pocl": ["pocl_binary_distribution>=1.2"],
              "oclgrind": ["oclgrind_binary_distribution>=18.3"],
              "test": ["pytest>=7.0.0", "Mako"],
          },
          include_package_data=True,
          package_data={
              "pyopencl": [
                  "cl/*.cl",
                  "cl/*.h",
                  "cl/pyopencl-random123/*.cl",
                  "cl/pyopencl-random123/*.h",
              ]
          },
          cmdclass={"build_ext": PybindBuildExtCommand},
          zip_safe=False,
      )
  
imports: import os
  import sys
  from os.path import exists
label_desc: Use image node_id 2 for calling a global function with example usage: main() without return types