{% set version = "5.6.0" %}

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

source:
  fn:   PyQt5_gpl-5.6.zip  # [win]
  url:  http://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.6/PyQt5_gpl-5.6.zip  # [win]
  sha1: 63a03d0f6e7f6e2e9dc90311020fbb2a2edc8cf0  # [win]
  fn:   PyQt5_gpl-5.6.tar.gz  # [not win]
  url:  http://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.6/PyQt5_gpl-5.6.tar.gz  # [not win]
  sha1: 8920e4094470ff93f79e257c37c46f5cd0bff7ab  # [not win]
  patches:
    - 0001-Make-warnings-non-fatal.patch

build:
  number: 6

requirements:
  build:
    # We may want to find and add a Python dbus library?
    # pkg-config --cflags-only-I --libs dbus-1
    # The Python dbus module doesn't seem to be installed.
    - {{ compiler('cxx') }}
    - {{ compiler('c') }}
    - {{ cdt('xorg-x11-proto-devel') }}  # [linux]
    - {{ cdt('libx11-devel') }}          # [linux]
    - {{ cdt('libxext-devel') }}         # [linux]
    - {{ cdt('libxrender-devel') }}      # [linux]
    - {{ cdt('mesa-libgl-devel') }}      # [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-devel') }}      # [linux]
    - {{ cdt('libxdamage') }}            # [linux]
    - {{ cdt('libxfixes') }}             # [linux]
    - {{ cdt('libxxf86vm') }}            # [linux]
    - dbus  # [not win]
    - pkg-config  # [not win]
    - jom  # [win]
  host:
    - python
    - sip 4.18.*
    - qt 5.6.*
  run:
    - python
    - sip 4.18.*
    - qt 5.6.*

test:
  files:
    - pyqt_test.py
  imports:
    - PyQt5.QtCore
    - PyQt5.QtWebKitWidgets  # [linux or win]
    - PyQt5.QtWebEngineWidgets  # [osx]
  commands:
    - DISPLAY=localhost:1.0 xvfb-run -a bash -c 'python pyqt_test.py'  # [linux]
    - conda inspect linkages -p $PREFIX pyqt  # [not win]
    - conda inspect objects -p $PREFIX pyqt  # [osx]

about:
  home: http://www.riverbankcomputing.co.uk/software/pyqt
  license: Commercial, GPL-2.0, GPL-3.0
  license_family: GPL
  license_file: LICENSE
  summary: 'Python binding of the cross-platform GUI toolkit Qt.'
  description: |
    "PyQt is a set of Python v2 and v3 bindings for The Qt Company's Qt
    application framework and runs on all platforms supported by Qt including
    Windows, MacOS/X and Linux. PyQt5 supports Qt v5. PyQt4 supports Qt v4 and
    will build against Qt v5. The bindings are implemented as a set of Python
    modules and contain over 1,000 classes."
  doc_url: https://www.riverbankcomputing.com/software/pyqt/
  dev_url: https://github.com/pyqt

extra:
  recipe-maintainers:
    - ccordoba12
    - mingwandroid
    - gillins
    - msarahan
    - ocefpaf
