{% set name = "Orange3" %}
{% set version = "3.32.0" %}

# on our linux builders there is no X11 installed and therefore import
# test will fail
{% if target_platform != "linux-aarch64" and target_platform != "linux-64"%}
{% set enable_testingui = true %}
{% else %}
{% set enable_testingui = false %}
{% endif %}

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

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

build:
  number: 0
  # trigger: 1
  entry_points:
    - orange-canvas = Orange.canvas.__main__:main
  osx_is_app: true
  script: {{ PYTHON }} -m pip install . -vv
  skip: True  # [linux and (s390x or ppc64le)]

requirements:
  build:
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
  host:
    - cython
    - numpy
    - pip
    - setuptools
    - wheel
    - python
    - recommonmark
    - sphinx >=4.2.0
    - docutils <0.17  # docutils changed html template in 0.17
  run:
    # appnope should be in orange-widget-base
    - appnope  # [osx]
    - anyqt >=0.0.13
    - baycomp >=1.0.2
    - bottleneck >=1.3.2
    - chardet >=3.0.2
    - httpx >=0.21
    - joblib >=0.9.4
    - keyring
    - keyrings.alt
    - matplotlib-base >=2.2.5
    - networkx
    - numpy >=1.17.3
    - openpyxl
    - opentsne >=0.6.1
    - orange-canvas-core >=0.1.24,<0.2a
    - orange-widget-base >=4.16.1
    - pandas >=1.3.0
    - pip >=18.0
    - pygments >=2.8.0
    - pyqt >=5.12,!=5.15.1
    - pyqtgraph >=0.11.1,!=0.12.4
    - pyqtwebengine >=5.12
    - python
    - python-louvain >=0.13
    - pyyaml
    - qtconsole >=4.7.2
    - requests
    - scikit-learn >=1.0.1
    - scipy >=1.3.1
    - serverfiles
    - setuptools >=41.0.0
    # xgboost is optional since user must install libomp (with brew) on macOS for xgboost to work
    # it is not required for xgboost from conda - it is why I am adding a package to the recipe
    - xgboost
    - catboost !=1.0.0  # [not linux or x86_64]
    - xlrd >=0.9.2
    - xlsxwriter
    # python3.7 on conda-forge has build problems due to incompatibility between required
    # setuptools between ipykernel and some other libraries:
    # https://github.com/ipython/ipykernel/pull/900
    - ipykernel !=6.11.0
    - {{ pin_compatible('numpy') }}

{% if enable_testingui %}
test:
  imports:
    - Orange
    - Orange.canvas
  commands:
    # - python -c "import pkg_resources; pkg_resources.require('Orange3')"
    - orange-canvas --help
    - export QT_QPA_PLATFORM=offscreen  # [not win]
    # no testing on windows ... some widget tests take for ever ...
    # so skip them for windows for now too.
    # - python -m unittest -v Orange.tests Orange.widgets.tests  # [win]
  requires:
    - pip
{% endif %}

app:
  entry: orange-canvas
  summary: data visualization and data analysis tool
  icon: icon_48x48.png
about:
  home: http://orange.biolab.si/
  summary: Orange, a component-based data mining framework.
  license: GPL-3.0-or-later
  license_file: LICENSE
  summary: component-based data mining framework
  description: |
    Open source data visualization and data analysis for novice and expert.
    Interactive workflows with a large toolbox.
  doc_url: http://orange.biolab.si/docs/
  dev_url: https://github.com/biolab/orange3

extra:
  recipe-maintainers:
    - lanzagar
    - ales-erjavec
    - markotoplak
    - primozgodec
