content: [project]
  name = "openmeeg"
  description = "Forward problems solver in the field of EEG and MEG."
  dynamic = ["version"]
  maintainers = [{ name="Alexandre Gramfort", email = "alexandre.gramfort@inria.fr" }]
  license = "CECILL-B"
  readme = { file = "README.rst", content-type = "text/x-rst" }
  requires-python = ">=3.10"
  keywords = [
      "neuroscience",
      "neuroimaging",
      "MEG",
      "EEG",
      "ECoG",
      "sEEG",
      "iEEG",
      "brain",
  ]
  classifiers = [
      "Intended Audience :: Science/Research",
      "Intended Audience :: Developers",
      "Programming Language :: Python",
      "Topic :: Software Development",
      "Topic :: Scientific/Engineering",
      "Operating System :: Microsoft :: Windows",
      "Operating System :: POSIX",
      "Operating System :: Unix",
      "Operating System :: MacOS",
      "Programming Language :: Python :: 3",
  ]
  dependencies = [
      "numpy",
  ]
  
  [project.urls]
  Homepage = "http://openmeeg.github.io"
  Download = "http://github.com/openmeeg/openmeeg"
  "Bug Tracker" = "https://github.com/openmeeg/openmeeg/issues"
  Documentation = "https://openmeeg.github.io"
  "Source code" = "https://github.com/openmeeg/openmeeg"
  
  [build-system]
  requires = [
      "setuptools>=68.0.0",
      "setuptools_scm>=6.2",
      "wheel>=0.37.0",
      "numpy>=2.0.0rc1,<3",
      "swig>=4.2",
  ]
  
  [tool.setuptools.packages.find]
  where = ["."]
  include = ["openmeeg*"]
  
  # Keep generated .cpp file for informational and debugging purposes
  [tool.setuptools.package-data]
  openmeeg = ["*.pyi", "*.cpp"]
  
  [tool.setuptools_scm]
  root = "../../"
  local_scheme = "no-local-version"  # to allow TestPyPI uploads
  
  [tool.cibuildwheel]
  # pp310 should in principle work but in practice it doesn't
  skip = ["*-musllinux*"]
  build = ["cp310-*"]  # abi3
  archs = "native"
  before-all = "bash {project}/build_tools/cibw_before_all.sh {project}"
  before-build = "pip install --only-binary=numpy \"numpy>=2,<3\""  # we don't want to build for any platform that NumPy does not provide wheels for
  test-requires = [
      "pytest",
      "threadpoolctl",
  ]
  test-command = "bash {project}/build_tools/cibw_test_command.sh {project}"
  environment-pass = ["CHECK_PORCELAIN", "RUNNER_OS"]  # useful to have RUNNER_OS here for app building
  
  [tool.cibuildwheel.linux]
  repair-wheel-command = [
      "bash build_tools/cibw_repair_wheel_command_linux.sh {dest_dir} {wheel}",
      "pipx run abi3audit --strict --report {wheel}",
  ]
  environment = { RUNNER_OS="Linux", OPENMEEG_LIB="../../install/lib64", OPENMEEG_INCLUDE="../../install/include/OpenMEEG", OPENBLAS_INCLUDE="../../install/include/OpenBLAS", OPENMEEG_USE_SWIG="1" }
  
  [tool.cibuildwheel.macos]
  repair-wheel-command = [
      "bash build_tools/cibw_repair_wheel_command_macos.sh {delocate_archs} {dest_dir} {wheel}",
      "pipx run abi3audit --strict --report {wheel}",
  ]
  environment = { RUNNER_OS="macOS", OPENMEEG_LIB="../../install/lib", OPENMEEG_INCLUDE="../../install/include/OpenMEEG", OPENBLAS_INCLUDE="../../install/include/OpenBLAS", OPENMEEG_USE_SWIG="1", MACOSX_DEPLOYMENT_TARGET="10.15" }
  
  [tool.cibuildwheel.windows]
  repair-wheel-command = [
      "bash build_tools/cibw_repair_wheel_command_windows.sh {dest_dir} {wheel}",
      "pipx run abi3audit --strict --report {wheel}",
  ]
  environment = { RUNNER_OS="Windows", OPENMEEG_LIB="../../install/lib", OPENMEEG_INCLUDE="../../install/include/OpenMEEG", OPENBLAS_INCLUDE="../../install/include/OpenBLAS", OPENMEEG_USE_SWIG="1", SWIG_FLAGS="msvc" }
  
  [tool.ruff]
  select = ["E", "F", "W", "D", "I"]
  exclude = ["__init__.py", "setup.py"]
  ignore = [
      "D100", # Missing docstring in public module
      "D104", # Missing docstring in public package
      "D413", # Missing blank line after last section
  ]
  
  [tool.ruff.pydocstyle]
  convention = "numpy"
  
  [tool.ruff.per-file-ignores]
  "*/tests/*.py" = [
      "D103", # Missing docstring in public function
  ]
  