content: [project]
  name = "msl-loadlib"
  dynamic = ["version"]
  dependencies = []
  description = "Load a library (and access a 32-bit library from 64-bit Python)"
  license = {file = "LICENSE.txt"}
  authors =[
      {name = "Measurement Standards Laboratory of New Zealand", email = "info@measurement.govt.nz"},
  ]
  maintainers = [
      {name = "Joseph Borbely", email = "joseph.borbely@measurement.govt.nz"},
  ]
  requires-python = ">=3.8"
  readme = "README.md"
  classifiers = [
      "Development Status :: 5 - Production/Stable",
      "Intended Audience :: Developers",
      "Intended Audience :: Science/Research",
      "License :: OSI Approved :: MIT License",
      "Operating System :: OS Independent",
      "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",
      "Topic :: Scientific/Engineering",
      "Topic :: Software Development",
  ]
  
  [project.urls]
  Changes = "https://mslnz.github.io/msl-loadlib/latest/release-notes/"
  Documentation = "https://mslnz.github.io/msl-loadlib/latest/"
  Homepage = "https://mslnz.github.io/msl-loadlib/latest/"
  Source = "https://github.com/MSLNZ/msl-loadlib"
  Tracker = "https://github.com/MSLNZ/msl-loadlib/issues"
  
  [project.scripts]
  freeze32 = "msl.loadlib.freeze_server32:_cli"
  
  [project.optional-dependencies]
  all = [
      "comtypes;sys_platform=='win32'",
      "py4j",
      "pythonnet"
  ]
  clr = ["pythonnet"]
  com = ["comtypes"]
  java = ["py4j"]
  
  [dependency-groups]
  doc = [
      "mike>=2.1.3",
      "mkdocs>=1.6.1",
      "mkdocs-material>=9.6.11",
      "mkdocstrings-python>=1.11.1",
  ]
  lint = [
      "ruff>=0.11.0",
  ]
  test = [
      "numpy>=1.24.4",
      "pytest>=8.3.5",
      "pytest-cov>=5.0.0",
  ]
  type = [
      "basedpyright>=1.28.1",
      "mypy>=1.14.1",
  ]
  dev = [
      "comtypes>=1.4.10",
      "hatch>=1.14.0",
      "py4j>=0.10.9.9",
      "pythonnet>=3.0.5",
      {include-group = "doc"},
      {include-group = "lint"},
      {include-group = "test"},
      {include-group = "type"},
  ]
  
  [build-system]
  requires = ["hatchling", "hatch-vcs"]
  build-backend = "hatchling.build"
  
  [tool.hatch.version]
  source = "vcs"
  
  [tool.hatch.build.hooks.vcs]
  version-file = "src/msl/loadlib/_version.py"
  
  [tool.hatch.build.targets.sdist]
  include = ["src"]
  
  [tool.hatch.build.targets.wheel]
  packages = ["src/msl"]
  
  [tool.hatch.build.targets.custom]
  packages = ["src/msl"]
  versions = [
      "linux_i686",
      "linux_x86_64",
      "macos_arm64",
      "macos_x86_64",
      "musl_aarch64",
      "musl_x86_64",
      "win32",
      "win_amd64",
  ]
  
  [tool.pytest.ini_options]
  addopts = [
      "--cov=src",
      "--cov-report=html",
      "--cov-config=pyproject.toml",
      "--verbose",
      "--doctest-modules",
      "--doctest-glob=*.md",
      "--import-mode=importlib",
      "--ignore=hatch_build.py",
      "--ignore=src/msl/examples",
      "--ignore=src/msl/loadlib/_types.py",
      "--ignore=tests/check_pythonw.py",
      "--ignore=tests/check_server32_imports.py",
      "--ignore=tests/bad_servers",
      "--ignore=tests/dotnet_config/legacy_v2_runtime.py",
      "--ignore=tests/server32_comtypes",
      "--ignore=tests/sew_eurodrive",
  ]
  cache_dir = ".cache/pytest"
  consider_namespace_packages = true
  doctest_optionflags = "NORMALIZE_WHITESPACE ALLOW_UNICODE ELLIPSIS"
  
  [tool.coverage.run]
  branch = true
  data_file = ".cache/coverage/.coverage"
  omit = [
      "src/msl/examples/*",
      "*/msl-loadlib-com-wrapper/*",
  ]
  
  [tool.coverage.report]
  exclude_lines = [
    "pragma: no cover",
    "pragma: no branch",
    "if TYPE_CHECKING:",
    "if __name__ == .__main__.:",
  ]
  include_namespace_packages = true
  
  [tool.coverage.html]
  directory = ".cache/coverage"
  title = "MSL-LoadLib coverage report"
  
  [tool.mypy]
  cache_dir = ".cache/mypy"
  platform = "win32"
  strict = true
  strict_bytes = true
  
  # with the environment variable MYPYPATH=src defined, namespace_packages=true and
  # explicit_package_bases=true, the following error goes away
  #   Source file found twice under different module names: "loadlib" and "msl.loadlib"
  # https://mypy.readthedocs.io/en/stable/running_mypy.html#mapping-file-paths-to-modules
  namespace_packages = true
  explicit_package_bases = true
  
  allow_redefinition = false
  allow_untyped_globals = false
  disallow_any_decorated = true
  disallow_any_explicit = false  # true
  disallow_any_expr = false  # true
  disallow_any_unimported = true
  ignore_missing_imports = false
  implicit_optional = false
  local_partial_types = true
  scripts_are_modules = true
  warn_no_return = true
  warn_unreachable = true
  
  [tool.basedpyright]
  failOnWarnings = true
  typeCheckingMode = "recommended"
  useLibraryCodeForTypes = false
  pythonPlatform = "Windows"
  exclude = [
      "**/.*",
      "**/__pycache__",
      "**/_version.py",
  ]
  reportAny = false
  reportExplicitAny = false
  reportImplicitOverride = false
  
  [tool.ruff]
  cache-dir = ".cache/ruff"
  line-length = 120
  exclude = [
      ".cache",
      ".git",
      ".github",
      ".venv",
      "build",
      "dist",
      "venv",
      "src/msl/loadlib/_version.py"
  ]
  namespace-packages = ["src/msl"]
  target-version = "py38"
  
  [tool.ruff.lint.isort]
  known-first-party = ["msl.loadlib"]
  
  [tool.ruff.lint]
  select = ["ALL"]
  ignore = [
      "D203", # one-blank-line-before-class
      "D213", # multi-line-summary-second-line
      "COM812", # missing-trailing-comma
      "ISC001", # single-line-implicit-string-concatenation
      "ANN401", # dynamically typed expressions (typing.Any) are disallowed
  ]
  
  [tool.ruff.lint.per-file-ignores]
  "src/msl/loadlib/freeze_server32.py" = [
      "T201", # allow print()
  ]
  "src/msl/loadlib/load_library.py" = [
      "PTH100", # os-path-abspath
      "PTH111", # os-path-expanduser
      "PTH113", # os-path-isfile
      "PTH118", # os-path-join
      "PTH119", # os-path-basename
      "PTH120", # os-path-dirname
      "PTH122", # os-path-splitext
  ]
  "src/msl/loadlib/start_server32.py" = [
      "T201", # allow print()
  ]
  "tests/check_server32_imports.py" = [
      "F401", # unused-import
      "T201", # allow print()
  ]
  "tests/*.py" = [
      "D100", # Missing docstring in public module
      "D101", # Missing docstring in public class
      "D102", # Missing docstring in public method
      "D103", # Missing docstring in public function
      "D105", # Missing docstring in magic method
      "D107", # Missing docstring in `__init__`
      "S101", # Use of `assert` detected
      "PLR2004", # Magic value used in comparison
      "INP001", # implicit-namespace-package
  ]
  
  [tool.ruff.lint.pydocstyle]
  convention = "google"
  