{% set version = "2.13.1" %}
{% set name = "pytensor" %}

package:
  name: {{ name }}
  version: {{ version }}

source:
  url: https://github.com/pymc-devs/{{ name }}/archive/refs/tags/rel-{{ version }}.tar.gz
  sha256: 468eb208e5a9fe62530752a354f48f739442b45811797e084ea432809ca5f99c

build:
  number: 0
  script:
    - python -m pip install . -vv --no-deps --no-build-isolation
  entry_points:
    - pytensor-cache = bin.pytensor_cache:main

requirements:
  build:
    - git  # [not win]
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
  host:
    - python
    - cython
    - pip
    - numpy {{ numpy }}
    - versioneer 0.28
    - tomli
    - setuptools >=48.0.0
    - wheel
  run:
    - python
    - {{ pin_compatible('numpy') }}
    - scipy >=0.14
    - filelock
    - etuples
    - logical-unification
    - miniKanren
    - cons
    - typing_extensions
    - setuptools >=48.0.0

test:
  imports:
    - pytensor
    - pytensor.configdefaults
  requires:
    - pip
    - pytest
    - pre-commit
    - pytest-cov >=2.6.1
    - coverage >=5.1
    - pytest-benchmark
  source_files:
    - tests
  files:
    - check-for-warnings.py
    - allowed-warnings-base.txt
  commands:
    - pytensor-cache help
    - pip check
    - python check-for-warnings.py allowed-warnings-base.txt
    - python -m pytest tests/test_breakpoint.py tests/test_config.py tests/test_gradient.py tests/test_ifelse.py tests/test_raise_op.py tests/test_rop.py tests/test_updates.py
    - python -m pytest tests/test_printing.py  # [osx]

about:
  home: https://github.com/pymc-devs/pytensor
  license: BSD-3-Clause
  license_family: BSD
  license_file: doc/LICENSE.txt
  summary: An optimizing compiler for evaluating mathematical expressions.
  description: |
    PyTensor is a Python library that allows you to define, optimize/rewrite, and evaluate mathematical expressions
    involving multi-dimensional arrays efficiently.
  dev_url: https://github.com/pymc-devs/pytensor/
  doc_url: https://pytensor.readthedocs.io/en/latest/

extra:
  recipe-maintainers:
    - aseyboldt
    - maresb
    - michaelosthege
    - twiecki
  skip-lints:
    - host_section_needs_exact_pinnings
    - python_build_tool_in_run
    - documentation_specifies_language