[build-system]
requires = [
    "setuptools >= 75;python_version=='3.8'",
    "setuptools >= 77;python_version>'3.8'",
    "wheel",
    "cffi>=1.15.0",
    "packaging;platform_system=='Windows'",
]
build-backend = "setuptools.build_meta"

[project]
name = "rpy2-rinterface"
description = "Low-level interface from Python to the R."
readme = "README.md"
requires-python = ">=3.8"
license = { text = "GPL-2.0-or-later" }
authors = [{ name = "Laurent Gautier", email = "lgautier@gmail.com" }]
classifiers = [
    "Programming Language :: Python",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.8",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
    "Intended Audience :: Developers",
    "Intended Audience :: Science/Research",
]
dependencies = [
    "cffi>=1.15.1",
    "packaging;platform_system=='Windows'",
    "backports.zoneinfo;python_version<'3.9'"
]
dynamic = ["version"]

[project.optional-dependencies]
doc = ['ipykernel',
       'jupytext',
       'multipledispatch',
       'nbconvert',
       'pygraphviz',
       'sphinx']
test = ["pytest>=8", "coverage", "pytest-cov"]
types = ["mypy", "packaging", "pandas-stubs",
         "types-Pygments", "types-tzlocal"]

all = ["pytest>=8", "coverage", "pytest-cov"]

[project.urls]
Homepage = "https://rpy2.github.io"
Documentation = "https://rpy2.github.io/doc.html"
Source = "https://github.com/rpy2/rpy2"
Tracker = "https://github.com/rpy2/rpy2/issue"

[tool.setuptools]
include-package-data = true

[tool.setuptools.packages.find]
where = ["src"]
include = ["rpy2.*"]
namespaces = true

# zip_safe = false # not supported as of setuptools==62.3.2

[tool.setuptools.dynamic]
version = { attr = "rpy2.rinterface_lib.__version__" }

[tool.setuptools.package-data]
"rpy2.rinterface_lib" = [
     'R_API.h',
     'R_API_eventloop.h',
     'R_API_eventloop.c',
     'RPY2.h',
     '_bufferprotocol.c',
     'py.typed']
"rpy2.rinterface" = [
     'py.typed'
]
"rpy2.situation" = [
     'py.typed'
]

[tool.pytest.ini_options]
minversion = "6.0"
testpaths = ["rpy2/tests"]
