content: [build-system]
  requires = [
      # ARROW-248, pin to less than 72.2.
      "setuptools>=70,<72.2",
      "cython>=3.0",
      # Needed for numpy headers.
      "numpy>=2.0",
      # Must be kept in sync with "project.dependencies" below.
      "pyarrow>=21.0,<21.1.0",
  ]
  
  [project]
  name = "pymongoarrow"
  description = "Tools for using NumPy, Pandas, Polars, and PyArrow with MongoDB"
  license = {text = "Apache License, Version 2.0"}
  authors = [{name = "Prashant Mital"}]
  maintainers = [{name = "MongoDB"}, {name = "Inc."}]
  keywords = ["mongo", "mongodb", "pymongo", "arrow", "bson", "numpy", "pandas", "polars"]
  classifiers = [
      "Development Status :: 3 - Alpha",
      "Intended Audience :: Developers",
      "Intended Audience :: Science/Research",
      "License :: OSI Approved :: Apache Software License",
      "Operating System :: MacOS :: MacOS X",
      "Operating System :: POSIX",
      "Programming Language :: Python :: 3",
      "Programming Language :: Python :: 3 :: Only",
      "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",
      "Programming Language :: Python :: Implementation :: CPython",
      "Topic :: Database",
  ]
  readme = "README.md"
  requires-python = ">=3.9"
  dependencies = [
      # Must be kept in sync with "build_sytem.requires" above.
      "pyarrow >=21.0,<21.1",
      "pymongo >=4.4,<5",
      "numpy>=2.0.1",
      "packaging >=23.2",
  ]
  dynamic = ["version"]
  
  [project.urls]
  Homepage = "https://www.mongodb.org"
  Documentation = "https://mongo-arrow.readthedocs.io"
  Source = "https://github.com/mongodb-labs/mongo-arrow/tree/main/bindings/python"
  Tracker = "https://jira.mongodb.org/projects/INTPYTHON/issues"
  
  [project.optional-dependencies]
  test = ["pytz>=2025.2", "pytest>=8.0"]
  test-polars = ["polars>=1.10"]
  test-pandas = ["pandas>=1.3.5,<3"]
  
  [tool.setuptools]
  zip-safe = false
  include-package-data = true
  platforms = ["Linux", "Mac OS X"]
  
  [tool.setuptools.package-data]
  pymongoarrow = ["*.pxd", "*.pyx", "*.pyi", "*.so.*", "*.dylib", "*.dll", "*.pyd"]
  
  [tool.setuptools.packages.find]
  exclude = [
      "test",
      "docs",
  ]
  namespaces = false
  
  [tool.setuptools.dynamic]
  version = {attr = "pymongoarrow.version.__version__"}
  
  [tool.cibuildwheel]
  skip = "pp* *-manylinux_i686 *_ppc64le *_s390x *-musllinux*"
  before-build = "bash ./cibw_before_build.sh"
  build-frontend = "build"
  test-command = "python -c \"from pymongoarrow.lib import libbson_version\""
  # Disable wheel repair, see https://jira.mongodb.org/browse/INTPYTHON-122.
  repair-wheel-command = ""
  
  [tool.cibuildwheel.environment]
  LIBBSON_INSTALL_DIR = "./libbson"
  
  [tool.cibuildwheel.linux]
  archs = "x86_64 aarch64"
  manylinux-x86_64-image = "manylinux_2_28"
  manylinux-aarch64-image = "manylinux_2_28"
  repair-wheel-command = [
      "pip install \"auditwheel>=6,<7\"",
      "auditwheel repair -w {dest_dir} --exclude libarrow* {wheel}"
  ]
  
  [tool.cibuildwheel.macos]
  archs = "x86_64 arm64"
  
  [tool.pytest.ini_options]
  minversion = "7"
  addopts = ["-ra", "--strict-config", "--strict-markers", "--durations=5", "--junitxml=xunit-results/TEST-results.xml"]
  testpaths = ["test"]
  log_cli_level = "INFO"
  faulthandler_timeout = 1500
  xfail_strict = true
  filterwarnings = [
    "error",
    "module:The global interpreter lock:RuntimeWarning", # from pandas
    "module:matching against an empty string will:pytest.PytestWarning", # from pandas
  ]
  
  [tool.ruff]
  line-length = 100
  
  [tool.ruff.lint]
  select = [
    "E", "F", "W", # flake8
    "B",           # flake8-bugbear
    "I",           # isort
    "ARG",         # flake8-unused-arguments
    "C4",          # flake8-comprehensions
    "EM",          # flake8-errmsg
    "ICN",         # flake8-import-conventions
    "G",           # flake8-logging-format
    "PGH",         # pygrep-hooks
    "PIE",         # flake8-pie
    "PL",          # pylint
    "PT",          # flake8-pytest-style
    "PTH",         # flake8-use-pathlib
    "RET",         # flake8-return
    "RUF",         # Ruff-specific
    "S",           # flake8-bandit
    "SIM",         # flake8-simplify
    "T20",         # flake8-print
    "UP",          # pyupgrade
    "YTT",         # flake8-2020
    "EXE",         # flake8-executable
  ]
  ignore = [
    "PLR",        # Design related pylint codes
    "RUF012",     # Mutable class attributes should be annotated with `typing.ClassVar`
  ]
  unfixable = [
  ]
  exclude = [
  ]
  
  [tool.ruff.lint.per-file-ignores]
  "setup.py" = ["PTH", "EM", "B", "S", "E501"]
  "docs/source/conf.py" = ["E501", "S", "PTH"]
  "benchmarks.py" = ["T201", "E501", "C4"]
  "test/*.py" = ["PT", "S", "ARG", "B", "C", "EM", "E501", "RUF005"]
  
  [dependency-groups]
  dev = [
      "asv>=0.6.4",
      "check-manifest>=0.50",
      "packaging>=25.0",
      "pre-commit>=4.2.0",
      "setuptools>=79.0.0",
      "sphinx-autobuild>=2024.10.3",
  ]
  docs = [
    "sphinx>=5.3,<9",
    "sphinx_rtd_theme>=2,<4",
    "sphinxcontrib-shellcheck>=1,<2",
    "furo==2025.9.25"
  ]
  