# Path: coconut/constants.py
# def fixpath(path):
# def str_to_bool(boolstr, default=False):
# WINDOWS = os.name == "nt"
# PYPY = platform.python_implementation() == "PyPy"
# CPYTHON = platform.python_implementation() == "CPython"
# PY32 = sys.version_info >= (3, 2)
# PY33 = sys.version_info >= (3, 3)
# PY34 = sys.version_info >= (3, 4)
# PY35 = sys.version_info >= (3, 5)
# PY36 = sys.version_info >= (3, 6)
# PY38 = sys.version_info >= (3, 8)
# PY310 = sys.version_info >= (3, 10)
# IPY = (
#     ((PY2 and not PY26) or PY35)
#     and not (PYPY and WINDOWS)
#     # necessary until jupyter-console fixes https://github.com/jupyter/jupyter_console/issues/245
#     and not PY310
# )
# MYPY = (
#     PY34
#     and not WINDOWS
#     and not PYPY
# )
# PURE_PYTHON = str_to_bool(os.environ.get(pure_python_env_var, ""))
# 
# Path: coconut/util.py
# def univ_open(filename, opentype="r+", encoding=None, **kwargs):
#     """Open a file using default_encoding."""
#     if encoding is None:
#         encoding = default_encoding
#     if "b" not in opentype:
#         kwargs["encoding"] = encoding
#     # we use io.open from coconut.root here
#     return open(filename, opentype, **kwargs)
# 
# def get_kernel_data_files(argv):
#     """Given sys.argv, write the custom kernel file and return data_files."""
#     if any(arg.startswith("bdist") for arg in argv):
#         executable = "python"
#     elif any(arg.startswith("install") for arg in argv):
#         executable = sys.executable
#     else:
#         return []
#     install_custom_kernel(executable)
#     return [
#         (
#             icoconut_custom_kernel_install_loc,
#             [icoconut_custom_kernel_file_loc],
#         ),
#     ]
# 
# Path: coconut/requirements.py
# def get_base_req(req, include_extras=True):
# def get_reqs(which):
# def uniqueify(reqs):
# def uniqueify_all(init_reqs, *other_reqs):
# def unique_wrt(reqs, main_reqs):
# def everything_in(req_dict):
# def all_versions(req):
# def newer(new_ver, old_ver, strict=False):
# def pretty_req(req):
# def print_new_versions(strict=False):


import sys
import os.path
import setuptools
from coconut.root import *  # NOQA
from coconut.constants import (
    package_name,
    author,
    author_email,
    description,
    website_url,
    classifiers,
    search_terms,
    script_names,
    license_name,
    exclude_install_dirs,
    pygments_lexers,
)
from coconut.util import (
    univ_open,
    get_kernel_data_files,
)
from coconut.requirements import (
    using_modern_setuptools,
    requirements,
    extras,
)
Description: Installer for the Coconut Programming Language.
"""

# -----------------------------------------------------------------------------------------------------------------------
# IMPORTS:
# -----------------------------------------------------------------------------------------------------------------------

from __future__ import print_function, absolute_import, unicode_literals, division

sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))




# -----------------------------------------------------------------------------------------------------------------------
# SETUP:
# -----------------------------------------------------------------------------------------------------------------------

if not using_modern_setuptools and "bdist_wheel" in sys.argv:
    raise RuntimeError("bdist_wheel not supported for setuptools versions < 18 (run '{python} -m pip install --upgrade setuptools' to fix)".format(python=sys.executable))

with univ_open("README.rst", "r") as readme_file:
    readme = readme_file.read()

setuptools.setup(
    name=package_name,
    version=VERSION,
    description=description,
    long_description=readme,
    url=website_url,

# Path: coconut/constants.py
# def fixpath(path):
# def str_to_bool(boolstr, default=False):
# WINDOWS = os.name == "nt"
# PYPY = platform.python_implementation() == "PyPy"
# CPYTHON = platform.python_implementation() == "CPython"
# PY32 = sys.version_info >= (3, 2)
# PY33 = sys.version_info >= (3, 3)
# PY34 = sys.version_info >= (3, 4)
# PY35 = sys.version_info >= (3, 5)
# PY36 = sys.version_info >= (3, 6)
# PY38 = sys.version_info >= (3, 8)
# PY310 = sys.version_info >= (3, 10)
# IPY = (
#     ((PY2 and not PY26) or PY35)
#     and not (PYPY and WINDOWS)
#     # necessary until jupyter-console fixes https://github.com/jupyter/jupyter_console/issues/245
#     and not PY310
# )
# MYPY = (
#     PY34
#     and not WINDOWS
#     and not PYPY
# )
# PURE_PYTHON = str_to_bool(os.environ.get(pure_python_env_var, ""))
# 
# Path: coconut/util.py
# def univ_open(filename, opentype="r+", encoding=None, **kwargs):
#     """Open a file using default_encoding."""
#     if encoding is None:
#         encoding = default_encoding
#     if "b" not in opentype:
#         kwargs["encoding"] = encoding
#     # we use io.open from coconut.root here
#     return open(filename, opentype, **kwargs)
# 
# def get_kernel_data_files(argv):
#     """Given sys.argv, write the custom kernel file and return data_files."""
#     if any(arg.startswith("bdist") for arg in argv):
#         executable = "python"
#     elif any(arg.startswith("install") for arg in argv):
#         executable = sys.executable
#     else:
#         return []
#     install_custom_kernel(executable)
#     return [
#         (
#             icoconut_custom_kernel_install_loc,
#             [icoconut_custom_kernel_file_loc],
#         ),
#     ]
# 
# Path: coconut/requirements.py
# def get_base_req(req, include_extras=True):
# def get_reqs(which):
# def uniqueify(reqs):
# def uniqueify_all(init_reqs, *other_reqs):
# def unique_wrt(reqs, main_reqs):
# def everything_in(req_dict):
# def all_versions(req):
# def newer(new_ver, old_ver, strict=False):
# def pretty_req(req):
# def print_new_versions(strict=False):


# Path: setup.py
import sys
import os.path
import setuptools
from coconut.root import *  # NOQA
from coconut.constants import (
    package_name,
    author,
    author_email,
    description,
    website_url,
    classifiers,
    search_terms,
    script_names,
    license_name,
    exclude_install_dirs,
    pygments_lexers,
)
from coconut.util import (
    univ_open,
    get_kernel_data_files,
)
from coconut.requirements import (
    using_modern_setuptools,
    requirements,
    extras,
)

Description: Installer for the Coconut Programming Language.
"""

# -----------------------------------------------------------------------------------------------------------------------
# IMPORTS:
# -----------------------------------------------------------------------------------------------------------------------

from __future__ import print_function, absolute_import, unicode_literals, division

sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))




# -----------------------------------------------------------------------------------------------------------------------
# SETUP:
# -----------------------------------------------------------------------------------------------------------------------

if not using_modern_setuptools and "bdist_wheel" in sys.argv:
    raise RuntimeError("bdist_wheel not supported for setuptools versions < 18 (run '{python} -m pip install --upgrade setuptools' to fix)".format(python=sys.executable))

with univ_open("README.rst", "r") as readme_file:
    readme = readme_file.read()

setuptools.setup(
    name=package_name,
    version=VERSION,
    description=description,
    long_description=readme,
    url=website_url,

    author=author,