Git Product home page Git Product logo

Comments (9)

echoix avatar echoix commented on July 18, 2024 1

Haha, @nvuillam was writing when I was writing too. The first missing dependency mentioned in your trace (qmake) could be installed with https://pkgs.alpinelinux.org/package/edge/community/x86_64/qt6-qtbase-dev as mentioned (for qt5) in the SO post I linked to.

from megalinter.

InvincibleRMC avatar InvincibleRMC commented on July 18, 2024 1

Ok finally got it working by using a third party stub package. Since my question has been answered I will close this issue.

from megalinter.

Jayllyz avatar Jayllyz commented on July 18, 2024

Try : pip install PyQt6
MegaLinter doc about pre-commands : https://megalinter.io/latest/config-precommands/

from megalinter.

InvincibleRMC avatar InvincibleRMC commented on July 18, 2024

It fails with the following error.

Collecting PyQt6
Downloading PyQt6-6.6.1.tar.gz (1.0 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.0/1.0 MB 16.5 MB/s eta 0:00:00
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [26 lines of output]
    pyproject.toml: line 7: using '[tool.sip.metadata]' to specify the project metadata is deprecated and will be removed in SIP v7.0.0, use '[project]' instead
    Traceback (most recent call last):
      File "/venvs/mypy/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
        main()
      File "/venvs/mypy/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
        json_out['return_val'] = hook(**hook_input['kwargs'])
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/venvs/mypy/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 152, in prepare_metadata_for_build_wheel
        whl_basename = backend.build_wheel(metadata_directory, config_settings)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/tmp/pip-build-env-aomu3j8c/overlay/lib/python3.12/site-packages/sipbuild/api.py", line 46, in build_wheel
        project = AbstractProject.bootstrap('wheel',
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/tmp/pip-build-env-aomu3j8c/overlay/lib/python3.12/site-packages/sipbuild/abstract_project.py", line 92, in bootstrap
        project.setup(pyproject, tool, tool_description)
      File "/tmp/pip-build-env-aomu3j8c/overlay/lib/python3.12/site-packages/sipbuild/project.py", line 587, in setup
        self.apply_user_defaults(tool)
      File "/tmp/pip-install-zatrlroh/pyqt6_5ece6f0ab94d4d61badd84a252fe12f2/project.py", line 66, in apply_user_defaults
        super().apply_user_defaults(tool)
      File "/tmp/pip-build-env-aomu3j8c/overlay/lib/python3.12/site-packages/pyqtbuild/project.py", line 70, in apply_user_defaults
        super().apply_user_defaults(tool)
      File "/tmp/pip-build-env-aomu3j8c/overlay/lib/python3.12/site-packages/sipbuild/project.py", line 237, in apply_user_defaults
        self.builder.apply_user_defaults(tool)
      File "/tmp/pip-build-env-aomu3j8c/overlay/lib/python3.12/site-packages/pyqtbuild/builder.py", line 69, in apply_user_defaults
        raise PyProjectOptionException('qmake',
    sipbuild.pyproject.PyProjectOptionException
    [end of output]

from megalinter.

nvuillam avatar nvuillam commented on July 18, 2024

@InvincibleRMC apt-get is not available because megalinter is based on alpine linux

Available packages are available at https://pkgs.alpinelinux.org/packages

About your pip error, maybe it requires so dependencies to be previously installed ?

from megalinter.

echoix avatar echoix commented on July 18, 2024

Megalinter is using an Alpine-based image. Alpine uses the apk (alpine package keeper) package manager. Apt, used with apt install or apt-get install is used with Debian-based distros like Ubuntu.

Does using a python package bundled by the OS work for you use case?

I think on alpine it is
https://pkgs.alpinelinux.org/package/v3.19/community/x86_64/py3-qt6

But installing from source might be impossible for you

Here, for pyqt5 https://stackoverflow.com/questions/76266695/cant-install-pyqt5-using-pip-on-alpine-docker, the user wasn't able to compile with 32 GB RAM, it ended up OOM (out of memory).

from megalinter.

echoix avatar echoix commented on July 18, 2024

For your use case, I see it is for mypy, would a stub-only package be enough?

from megalinter.

InvincibleRMC avatar InvincibleRMC commented on July 18, 2024

Yeah a stub file would be fine.

from megalinter.

InvincibleRMC avatar InvincibleRMC commented on July 18, 2024

Thanks everyone for letting me know that is running Alpine Linux not sure how I missed that.

from megalinter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.