wscript 1.1 KB

1234567891011121314151617181920212223242526272829
  1. #! /usr/bin/env python
  2. # encoding: utf-8#
  3. # Federico Pellegrin, 2016 (fedepell)
  4. """
  5. Python QT5 helper tools example:
  6. converts QT5 Designer tools files (UI and QRC) into python files with
  7. the appropriate tools (pyqt5 and pyside2 searched) and manages their
  8. python compilation and installation using standard python waf Tool
  9. """
  10. def options(opt):
  11. # Load also python to demonstrate mixed calls
  12. opt.load('python pyqt5')
  13. def configure(conf):
  14. # Load also python to demonstrate mixed calls
  15. conf.load('python pyqt5')
  16. conf.check_python_version((2,7,4))
  17. def build(bld):
  18. # Demostrates mixed usage of py and pyqt5 module, and tests also install_path and install_from
  19. # (since generated files go into build it has to be reset inside the pyqt5 tool)
  20. bld(features="py pyqt5", source="src/sample.py src/firstgui.ui", install_path="${PREFIX}/play/", install_from="src/")
  21. # Simple usage on a resource file. If a file referenced inside the resource changes it will be rebuilt
  22. # as the qrc XML is parsed and dependencies are calculated
  23. bld(features="pyqt5", source="sampleRes.qrc")