{% set version = "5.15.7" %}
{% set sip_version = "12.11.0" %}
{% set webengine_version = "5.15.4" %}
{% set charts_version = "5.15.5" %}


package:
  name: pyqt-split
  version: {{ version }}

source:
  - url: https://pypi.io/packages/source/P/PyQt{{ version[0] }}/PyQt{{ version[0] }}-{{ version }}.tar.gz
    sha256: 755121a52b3a08cb07275c10ebb96576d36e320e572591db16cfdbc558101594
    folder: pyqt

  - url: https://pypi.io/packages/source/P/PyQt5-sip/PyQt5_sip-{{ sip_version }}.tar.gz
    sha256: b4710fd85b57edef716cc55fae45bfd5bfac6fc7ba91036f1dcc3f331ca0eb39
    folder: pyqt_sip

  - url: https://pypi.io/packages/source/P/PyQtWebEngine/PyQtWebEngine-{{ webengine_version }}.tar.gz
    sha256: cedc28f54165f4b8067652145aec7f732a17eadf6736835852868cf76119cc19
    folder: pyqt_webengine

  - url: https://pypi.io/packages/source/P/PyQtChart/PyQtChart-{{ charts_version }}.tar.gz
    sha256: e2cd55a8a72cef99bc0126f3b1daa914eb5f21e20a70127b6985299f1dc50107
    folder: pyqt_charts

build:
  number: 3

outputs:
  - name: pyqt5-sip
    version: {{ sip_version }}
    script: build-pyqt-sip.sh  # [not win]
    script: bld-pyqt-sip.bat  # [win]
    requirements:
      build:
        - {{ compiler('c') }}
        - {{ compiler('cxx') }}
        - python                                 # [build_platform != target_platform]
        - cross-python_{{ target_platform }}     # [build_platform != target_platform]
      host:
        - python
        - setuptools
        - wheel
        - pip
      run:
        - python
        - sip
        - packaging
        - toml
    test:
      imports:
        - PyQt5.sip

  - name: pyqt
    version: {{ version }}
    script: build-pyqt.sh  # [not win]
    script: bld-pyqt.bat  # [win]
    build:
      run_exports:
        - {{ pin_subpackage('pyqt', max_pin='x.x') }}
    requirements:
      run_constrained:   # [osx and x86_64]
        - __osx >={{ MACOSX_DEPLOYMENT_TARGET|default("10.14") }}  # [osx and x86_64]
      build:
        - {{ compiler('c') }}
        - {{ compiler('cxx') }}
        - {{ cdt('xorg-x11-proto-devel') }}  # [linux]
        - {{ cdt('libx11-devel') }}          # [linux]
        - {{ cdt('libxext') }}               # [linux]
        - {{ cdt('libxext-devel') }}         # [linux]
        - {{ cdt('libxrender-devel') }}      # [linux]
        - {{ cdt('mesa-libgl-devel') }}      # [linux]
        - {{ cdt('mesa-libegl') }}           # [linux]
        - {{ cdt('mesa-libegl-devel') }}     # [linux]
        - {{ cdt('mesa-dri-drivers') }}      # [linux]
        - {{ cdt('libxau-devel') }}          # [linux]
        - {{ cdt('alsa-lib-devel') }}        # [linux]
        - {{ cdt('gtk2-devel') }}            # [linux]
        - {{ cdt('gtkmm24-devel') }}         # [linux]
        - {{ cdt('libdrm-devel') }}          # [linux]
        - {{ cdt('libxcomposite-devel') }}   # [linux]
        - {{ cdt('libxcursor-devel') }}      # [linux]
        - {{ cdt('libxi-devel') }}           # [linux]
        - {{ cdt('libxrandr-devel') }}       # [linux]
        - {{ cdt('pciutils-devel') }}        # [linux]
        - {{ cdt('libxscrnsaver-devel') }}   # [linux]
        - {{ cdt('libxtst-devel') }}         # [linux]
        - {{ cdt('libselinux') }}            # [linux]
        - {{ cdt('libselinux-devel') }}      # [linux]
        - {{ cdt('libxdamage') }}            # [linux]
        - {{ cdt('libxdamage-devel') }}      # [linux]
        - {{ cdt('libxfixes') }}             # [linux]
        - {{ cdt('libxfixes-devel') }}       # [linux]
        - {{ cdt('libxxf86vm') }}            # [linux]
        - {{ cdt('libxxf86vm-devel') }}      # [linux]
        - {{ cdt('libsm-devel') }}           # [linux]
        - {{ cdt('libice-devel') }}          # [linux]
        - {{ cdt('libxcb') }}                # [linux]
        - {{ cdt('libxcb-devel') }}          # [linux]
        - {{ cdt('expat-devel') }}           # [linux]
        - {{ cdt('pcre') }}                  # [linux]
        - {{ cdt('libglvnd-glx') }}          # [linux]
        - {{ cdt('libglvnd-egl') }}          # [linux]
        - {{ cdt('libxkbcommon-devel') }}    # [linux]
        - {{ cdt('xcb-util-devel') }}        # [linux]
        - {{ cdt('xcb-util-image-devel') }}  # [linux]
        - {{ cdt('xcb-util-keysyms-devel') }}     # [linux]
        - {{ cdt('xcb-util-renderutil-devel') }}  # [linux]
        - {{ cdt('xcb-util-wm-devel') }}          # [linux]
        - jom                                # [win]
        - python                                 # [build_platform != target_platform]
        - cross-python_{{ target_platform }}     # [build_platform != target_platform]
        - pyqt-builder                           # [build_platform != target_platform]
        - sip                                    # [build_platform != target_platform]
        - make
      host:
        - python
        - pip
        - sip                                    # [build_platform == target_platform]
        - toml
        - pyqt-builder                           # [build_platform == target_platform]
        - packaging
        - qt-main
        - {{ cdt('mesa-libgl-devel') }}          # [linux]
        - {{ cdt('mesa-libegl-devel') }}         # [linux]
      run:
        - python
        - {{ pin_subpackage('pyqt5-sip', exact=True) }}
    test:
      files:
        - pyqt_test.py
      imports:
        - PyQt5
        - PyQt5.sip
        - PyQt5.QtCore
        - PyQt5.QtGui
        - PyQt5.QtHelp
        - PyQt5.QtMultimedia
        - PyQt5.QtMultimediaWidgets
        - PyQt5.QtNetwork
        - PyQt5.QtOpenGL
        - PyQt5.QtPrintSupport
        - PyQt5.QtQml
        - PyQt5.QtQuick
        - PyQt5.QtSvg
        - PyQt5.QtTest
        - PyQt5.QtWebChannel
        - PyQt5.QtWebSockets
        - PyQt5.QtWidgets
        - PyQt5.QtXml
        - PyQt5.QtXmlPatterns
      commands:
        - DISPLAY=localhost:1.0 xvfb-run -a bash -c 'python pyqt_test.py'  # [linux and build_platform == target_platform]
        - pyuic5 --version  # [not win]

  - name: pyqtwebengine
    version: {{ version }}
    script: build-pyqtwebengine.sh  # [not win]
    script: bld-pyqtwebengine.bat  # [win]
    build:
      skip: True  # [ppc64le]
      run_exports:
        - {{ pin_subpackage('pyqtwebengine', max_pin='x.x') }}
    requirements:
      run_constrained:   # [osx and x86_64]
        - __osx >={{ MACOSX_DEPLOYMENT_TARGET|default("10.14") }}  # [osx and x86_64]
      build:
        - {{ compiler('c') }}
        - {{ compiler('cxx') }}
        - {{ cdt('xorg-x11-proto-devel') }}  # [linux]
        - {{ cdt('libx11-devel') }}          # [linux]
        - {{ cdt('libxext') }}               # [linux]
        - {{ cdt('libxext-devel') }}         # [linux]
        - {{ cdt('libxrender-devel') }}      # [linux]
        - {{ cdt('mesa-libgl-devel') }}      # [linux]
        - {{ cdt('mesa-libegl') }}           # [linux]
        - {{ cdt('mesa-libegl-devel') }}     # [linux]
        - {{ cdt('mesa-dri-drivers') }}      # [linux]
        - {{ cdt('libxau-devel') }}          # [linux]
        - {{ cdt('alsa-lib-devel') }}        # [linux]
        - {{ cdt('gtk2-devel') }}            # [linux]
        - {{ cdt('gtkmm24-devel') }}         # [linux]
        - {{ cdt('libdrm-devel') }}          # [linux]
        - {{ cdt('libxcomposite-devel') }}   # [linux]
        - {{ cdt('libxcursor-devel') }}      # [linux]
        - {{ cdt('libxi-devel') }}           # [linux]
        - {{ cdt('libxrandr-devel') }}       # [linux]
        - {{ cdt('pciutils-devel') }}        # [linux]
        - {{ cdt('libxscrnsaver-devel') }}   # [linux]
        - {{ cdt('libxtst-devel') }}         # [linux]
        - {{ cdt('libselinux') }}            # [linux]
        - {{ cdt('libselinux-devel') }}      # [linux]
        - {{ cdt('libxdamage') }}            # [linux]
        - {{ cdt('libxdamage-devel') }}      # [linux]
        - {{ cdt('libxfixes') }}             # [linux]
        - {{ cdt('libxfixes-devel') }}       # [linux]
        - {{ cdt('libxxf86vm') }}            # [linux]
        - {{ cdt('libxxf86vm-devel') }}      # [linux]
        - {{ cdt('libsm-devel') }}           # [linux]
        - {{ cdt('libice-devel') }}          # [linux]
        - {{ cdt('libxcb') }}                # [linux]
        - {{ cdt('libxcb-devel') }}          # [linux]
        - {{ cdt('expat-devel') }}           # [linux]
        - {{ cdt('pcre') }}                  # [linux]
        - {{ cdt('libglvnd-glx') }}          # [linux]
        - {{ cdt('libglvnd-egl') }}          # [linux]
        - {{ cdt('libxkbcommon-devel') }}    # [linux]
        - {{ cdt('xcb-util-devel') }}        # [linux]
        - {{ cdt('xcb-util-image-devel') }}  # [linux]
        - {{ cdt('xcb-util-keysyms-devel') }}     # [linux]
        - {{ cdt('xcb-util-renderutil-devel') }}  # [linux]
        - {{ cdt('xcb-util-wm-devel') }}          # [linux]
        - jom                                    # [win]
        - python                                 # [build_platform != target_platform]
        - cross-python_{{ target_platform }}     # [build_platform != target_platform]
        - pyqt-builder                           # [build_platform != target_platform]
        - sip                                    # [build_platform != target_platform]
        - make
      host:
        - python
        - pip
        - sip                                    # [build_platform == target_platform]
        - toml
        - pyqt-builder                           # [build_platform == target_platform]
        - packaging
        - pyqt
        - qt-main
        - qt-webengine
        - {{ cdt('mesa-libgl-devel') }}          # [linux]
        - {{ cdt('mesa-libegl-devel') }}         # [linux]
      run:
        - python
        - {{ pin_subpackage('pyqt', max_pin='x.x') }}
    test:
      imports:
        - PyQt5.QtWebEngine
        - PyQt5.QtWebEngineCore
        - PyQt5.QtWebEngineWidgets

  - name: pyqtchart
    version: {{ version }}
    script: build-pyqtcharts.sh  # [not win]
    script: bld-pyqtcharts.bat  # [win]
    build:
      run_exports:
        - {{ pin_subpackage('pyqtchart', max_pin='x.x') }}
    requirements:
      run_constrained:   # [osx and x86_64]
        - __osx >={{ MACOSX_DEPLOYMENT_TARGET|default("10.14") }}  # [osx and x86_64]
      build:
        - {{ compiler('c') }}
        - {{ compiler('cxx') }}
        - {{ cdt('xorg-x11-proto-devel') }}  # [linux]
        - {{ cdt('libx11-devel') }}          # [linux]
        - {{ cdt('libxext') }}               # [linux]
        - {{ cdt('libxext-devel') }}         # [linux]
        - {{ cdt('libxrender-devel') }}      # [linux]
        - {{ cdt('mesa-libgl-devel') }}      # [linux]
        - {{ cdt('mesa-libegl') }}           # [linux]
        - {{ cdt('mesa-libegl-devel') }}     # [linux]
        - {{ cdt('mesa-dri-drivers') }}      # [linux]
        - {{ cdt('libxau-devel') }}          # [linux]
        - {{ cdt('alsa-lib-devel') }}        # [linux]
        - {{ cdt('gtk2-devel') }}            # [linux]
        - {{ cdt('gtkmm24-devel') }}         # [linux]
        - {{ cdt('libdrm-devel') }}          # [linux]
        - {{ cdt('libxcomposite-devel') }}   # [linux]
        - {{ cdt('libxcursor-devel') }}      # [linux]
        - {{ cdt('libxi-devel') }}           # [linux]
        - {{ cdt('libxrandr-devel') }}       # [linux]
        - {{ cdt('pciutils-devel') }}        # [linux]
        - {{ cdt('libxscrnsaver-devel') }}   # [linux]
        - {{ cdt('libxtst-devel') }}         # [linux]
        - {{ cdt('libselinux') }}            # [linux]
        - {{ cdt('libselinux-devel') }}      # [linux]
        - {{ cdt('libxdamage') }}            # [linux]
        - {{ cdt('libxdamage-devel') }}      # [linux]
        - {{ cdt('libxfixes') }}             # [linux]
        - {{ cdt('libxfixes-devel') }}       # [linux]
        - {{ cdt('libxxf86vm') }}            # [linux]
        - {{ cdt('libxxf86vm-devel') }}      # [linux]
        - {{ cdt('libsm-devel') }}           # [linux]
        - {{ cdt('libice-devel') }}          # [linux]
        - {{ cdt('libxcb') }}                # [linux]
        - {{ cdt('libxcb-devel') }}          # [linux]
        - {{ cdt('expat-devel') }}           # [linux]
        - {{ cdt('pcre') }}                  # [linux]
        - {{ cdt('libglvnd-glx') }}          # [linux]
        - {{ cdt('libglvnd-egl') }}          # [linux]
        - {{ cdt('libxkbcommon-devel') }}    # [linux]
        - {{ cdt('xcb-util-devel') }}        # [linux]
        - {{ cdt('xcb-util-image-devel') }}  # [linux]
        - {{ cdt('xcb-util-keysyms-devel') }}     # [linux]
        - {{ cdt('xcb-util-renderutil-devel') }}  # [linux]
        - {{ cdt('xcb-util-wm-devel') }}          # [linux]
        - jom                                    # [win]
        - python                                 # [build_platform != target_platform]
        - cross-python_{{ target_platform }}     # [build_platform != target_platform]
        - pyqt-builder                           # [build_platform != target_platform]
        - sip                                    # [build_platform != target_platform]
        - make
      host:
        - python
        - pip
        - sip                                    # [build_platform == target_platform]
        - toml
        - pyqt-builder                           # [build_platform == target_platform]
        - packaging
        - qt-main
        - pyqt
        - {{ cdt('mesa-libgl-devel') }}          # [linux]
        - {{ cdt('mesa-libegl-devel') }}         # [linux]
      run:
        - python
        - {{ pin_subpackage('pyqt', max_pin='x.x') }}
    test:
      imports:
        - PyQt5.QtChart

about:
  home: https://www.riverbankcomputing.com/software/pyqt/
  license: GPL-3.0-only
  license_family: GPL
  license_file: pyqt/LICENSE
  summary: Python bindings for the Qt cross platform application toolkit
  # The remaining entries in this section are optional, but recommended.
  description: |
    PyQt5 is a comprehensive set of Python bindings for Qt v5.
    It is implemented as more than 35 extension modules and enables Python
    to be used as an alternative application development language to C++ on
    all supported platforms including iOS and Android.
  doc_url: https://www.riverbankcomputing.com/static/Docs/PyQt5/
  dev_url: https://www.riverbankcomputing.com/mailman/listinfo/pyqt/

extra:
  recipe-maintainers:
    - andfoy
    - ccordoba12
    - mingwandroid
    - gillins
    - msarahan
    - ocefpaf
    - jschueller
  feedstock-name: pyqt
