content: [project]
  name = "changeforest"
  description = "Random Forests for Change Point Detection"
  version = "1.2.1"
  readme = "README.md"
  requires-python = ">=3.8"
  author = "Malte Londschien <malte@londschien.ch>"
  urls = {homepage = "https://github.com/mlondschien/changeforest/"}
  classifiers = [
      "License :: OSI Approved :: BSD License",
      "Programming Language :: Python"
  ]
  
  [build-system]
  requires = ["maturin>=1.0,<2.0"]
  build-backend = "maturin"
  
  [tool.maturin]
  bindings = "pyo3"
  sdist-include = ["LICENSE", "README.md"]
  
  [tool.isort]
  multi_line_output = 3
  include_trailing_comma = true
  ensure_newline_before_comments = true
  line_length = 88
  known_first_party = "changeforest"
  skip_glob = '\.eggs/*,\.git/*,\.venv/*,build/*,dist/*'
  default_section = 'THIRDPARTY'
  
  [tool.cibuildwheel]
  test-requires = "numpy matplotlib pytest"
  test-command = "pytest {project}/changeforest-py/tests"
  
  # macos arm64 wheels can be built on X86_64, but cannot be tested.
  test-skip = "*-macosx_arm64 *-macosx_universal2:arm64"
  
  # pypi builds on macos require compilation of numpy (why?) and are thus super slow
  # fail due to https://github.com/numpy/numpy/issues/15947.
  # What is the difference between cpython and pypi builds?
  # musllinux is sloooow, >1h per build. Why?
  skip = "cp38-* *-musllinux*"
  
  # Add cargobin to PATH. This is otherwise achieved by restarting the shell.
  environment = { PATH="$PATH:$HOME/.cargo/bin" }
  
  [tool.cibuildwheel.linux]
  # Install rust in container before building wheels.
  before-all = "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y && yum install -y openssl-devel"
  
  [[tool.cibuildwheel.overrides]]
  # No yum on musllinux container.
  # What is musllinux?
  select = "*-musllinux*"
  before-all = "apk add openssl-dev && curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y"
  
  [tool.cibuildwheel.macos]
  environment = { PATH="$PATH:$HOME/.cargo/bin", MACOSX_DEPLOYMENT_TARGET="10.12" }