Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-580

Make runtime dependency on numpy optional

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.9, 5.11.0
    • 5.9
    • Shiboken
    • None
    • 2f4bfa56e7e1263dd160ceaadd06f41614c997d8 (5.9, 21.12.2017, 5.9)

    Description

      With the introduction of array argument support, we used numpy headers for some of the functionality. If PySide picks up the numpy package headers at build time, then at runtime when running a PySide application numpy is also required, otherwise the application would crash.
      Furthermore when using PyInstaller 3.3 to deploy a python app, because of a manual hidden import of numpy inside the PySide2 hook file, PyInstaller will pull in a lot more dependencies into the final app package (whole of numpy, distutils, setuptools, tkinter (god knows why)).

      We should investigate if it's possible to make the numpy dependency cleaner, so that at runtime an app would not crash when numpy package is not present, but only throw an exception if the functionality is used, or work normally if no numpy functionality is used.

      Additionally this would allow us to remove the forced numpy hidden import PyInstaller hook, thus making packages much smaller.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kleint Friedemann Kleint
            alexandru.croitor Alexandru Croitor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes