{% set name = "gensim" %}
{% set version = "4.3.0" %}
{% set sha256 = "14f5f46425249ad415f40e6a87cf6b8e19a8649a1805e725947243495b600977" %}

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

source:
  url: https://github.com/RaRe-Technologies/{{ name }}/archive/refs/tags/{{ version }}.tar.gz
  sha256: {{ sha256 }}

build:
  number: 1 
  # gensim and pyemd currently aren't available on s390x
  skip: true  # [py<38 or s390x]
  script: {{ PYTHON }} -m pip install --no-deps . -vv

requirements:
  build:
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
  host:
    - python
    - pip
    - cython 0.29.32
    # NUMPY_STR = 'numpy >= 1.18.5' - only 1.19 available across archs
    - numpy 1.19 # [(not (osx and arm64)) and py<310]
    - numpy      # [(osx and arm64) or py>=310]
    - setuptools <65
    - wheel
  run:
    - python
    - {{ pin_compatible('numpy') }}
    - scipy >=1.7.0
    - smart_open >=1.8.1
    # fuzzytm is actually not used. See: https://github.com/RaRe-Technologies/gensim/issues/3423
    #- fuzzytm 

test:
  imports:
    - gensim
    - gensim.corpora
    - gensim.models
    - gensim.parsing
    - gensim.scripts
    - gensim.similarities
    - gensim.test
    - gensim.topic_coherence
  requires:
    - pip
  commands:
    # pip check fails because of fuzzytm
    - pip check || true  # [not win]
    - pip check || cmd /K "exit /b 0"  # [win]


about:
  home: https://github.com/RaRe-Technologies/gensim
  license: LGPL-2.1-only
  license_family: LGPL
  license_file: COPYING
  summary: Topic Modelling for Humans
  description: |
    Gensim is a Python library for topic modelling, document indexing
    and similarity retrieval with large corpora.
    Target audience is the natural language processing (NLP)
    and information retrieval (IR) community.
  doc_url: https://radimrehurek.com/gensim/
  dev_url: https://github.com/RaRe-Technologies/gensim

extra:
  recipe-maintainers:
    - souravsingh
    - mpenkov
