{% set name = "spacy" %}
{% set version = "3.3.1" %}
{% set sha256sum = "7f87dbdb104d851ae6ba5fd3a76a2e14e22e048135903e98baf08571a3aa81c0" %}

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

source:
  fn: {{ name }}-{{ version }}.tar.gz
  url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
  sha256: {{ sha256sum }}

build:
  number: 0
  script: {{ PYTHON }} -m pip install . --no-deps --ignore-installed --no-cache-dir -vvv
  # no s390x support
  skip: True  # [(linux and s390x) or win32]
  entry_points:
    - spacy = spacy.cli:setup_cli

requirements:
  build:
    - {{ compiler('cxx') }}
  host:
    - python
    - cymem >=2.0.2,<2.1.0
    - cython >=0.25,<3.0
    - cython-blis >=0.4.0,<0.8.0
    - murmurhash >=0.28.0,<1.1.0
    - numpy
    - pathy
    - pip
    - preshed >=3.0.2,<3.1.0
    - setuptools
    - thinc >=8.0.14,<8.1.0
    - wheel
  run:
    - python
    # Spacy libraries
    - spacy-legacy >=3.0.9,<3.1.0
    - murmurhash >=0.28.0,<1.1.0
    - cymem >=2.0.2,<2.1.0
    - preshed >=3.0.2,<3.1.0
    - thinc >=8.0.14,<8.1.0
    - cython-blis >=0.4.0,<0.8.0
    - wasabi >=0.9.1,<1.1.0
    - srsly >=2.4.3,<3.0.0
    - catalogue >=2.0.6,<2.1.0
    - spacy-loggers >=1.0.0,<2.0.0
    # Exclude typer with unpinned click
    - typer >=0.3.0,<0.5.0
    # Exclude newer click due to typer issues
    - click <8.1.0
    - pathy >=0.3.5
    # Third-party dependencies
    - tqdm >=4.38.0,<5.0.0
    - {{ pin_compatible('numpy') }}
    - requests >=2.13.0,<3.0.0
    - pydantic >=1.7.4,!=1.8,!=1.8.1
    - jinja2
    - langcodes >=3.2.0,<4.0.0
    # Official Python utilities
    - setuptools
    - packaging >=20.0
    - typing_extensions >=3.7.4.1,<4.2.0  # [py<=37]

test:
  requires:
    #- pip
    - pytest
    - pytest-timeout
    - mock
    - hypothesis
  imports:
    - spacy
  commands:
    # To avoid failure due to pydantic 1.9.0
    #- pip check
    # Skip tests on osx-arm64 for v4.10.0 due to 
    # UnicodeDecodeError: 'utf-8' codec can't decode byte 0xea in position 137: invalid continuation byte
    - python -m pytest --tb=native --pyargs {{ name }}  # [not (osx and arm64)]

about:
  home: https://spacy.io/
  license: MIT
  license_family: MIT
  license_file: LICENSE
  summary: Industrial-strength Natural Language Processing
  description: |
    spaCy is a library for advanced natural language processing in Python and
    Cython.
  doc_url: https://spacy.io
  dev_url: https://github.com/explosion/spaCy

extra:
  recipe-maintainers:
    - rmax
    - honnibal
    - ines
    - adrianeboyd
