{% set name = "meson" %}
{% set version = "1.3.1" %}

package:
  name: {{ name|lower }}
  version: {{ version }}

source:
  url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/meson-{{ version }}.tar.gz
  sha256: 6020568bdede1643d4fb41e28215be38eff5d52da28ac7d125457c59e0032ad7
  # See conda-forge/glib-feedstock#40 for documentation regarding the RPATH patch
  patches:
    - 0001-Only-fix-RPATH-if-install_rpath-is-not-empty.patch

build:
  number: 0
  script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation
  skip: True  # [py<37]
  entry_points:
    - meson = mesonbuild.mesonmain:main

requirements:
  build:
    - patch     # [not win]
    - m2-patch  # [win]
  host:
    - python
    - setuptools >=42
    - pip
    - wheel
  run:
    - python
    - ninja >=1.8.2

test:
  imports:
    - mesonbuild
  requires:
    - pip
  commands:
    - pip check
    - meson -h
    - meson -v
    - meson --internal delsuffix . nomatchqqq  # test reexecution (GitHub issue #11)

about:
  home: https://mesonbuild.com
  license: Apache-2.0
  license_family: Apache
  license_file: COPYING
  summary: The Meson Build System
  description: |
    Meson is an open source build system meant to be both extremely fast, and, even more importantly, as user friendly as possible.
    The main design point of Meson is that every moment a developer spends writing or debugging build definitions is a second wasted.
    So is every second spent waiting for the build system to actually start compiling code.
  doc_url: https://mesonbuild.com
  dev_url: https://github.com/mesonbuild/meson

extra:
  skip-lints:
    - python_build_tool_in_run  # meson is build tool that uses pip, wheel, setuptools
    - build_tools_must_be_in_build  # meson is a build tool that can use ninja
    - missing_imports_or_run_test_py  # meson does not install the meson module (done by meson-python)
  recipe-maintainers:
    - dirmeier
    - pkgw
    - SoapZA
    - wolfv
    - tschoonj
    - rgommers
    - h-vetinari
