-
Notifications
You must be signed in to change notification settings - Fork 32
Add support for building with SIP v5 #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I did not delete setup.py/setup.cfg files, they can be still used to build with SIP v4. However installations from PyPI should now work fine. Fixes frescobaldi#38, frescobaldi#34.
👏 👏 👏 |
I should mention how to test this:
Please also use |
One question: I was trying to pip install your branch (
I'm on Python 3.8.1. I don't fully understand the packaging toolchain that's happening here, so maybe actually this is not unexpected and until the version is built and deployed on PyPi we won't be able to use it? |
I found this comment: iterative/dvc#1995 (comment)
|
It is failing the installation in my case with the following message: λ pip install git+https://github.com/mitya57/python-poppler-qt5.git@sip5
Collecting git+https://github.com/mitya57/python-poppler-qt5.git@sip5
Cloning https://github.com/mitya57/python-poppler-qt5.git (to revision sip5) to c:\temp\pip-req-build-41qxyiy1
Running command git clone -q https://github.com/mitya57/python-poppler-qt5.git 'C:\Temp\pip-req-build-41qxyiy1'
Running command git checkout -b sip5 --track origin/sip5
Branch 'sip5' set up to track remote branch 'sip5' from 'origin'.
Switched to a new branch 'sip5'
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\me\AppData\Local\Continuum\anaconda3\python.exe' 'C:\Users\me\AppData\Locmeal\Continuum\anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Temp\tmpf8mi44_u'
cwd: C:\Temp\pip-req-build-41qxyiy1
Complete output (33 lines):
Querying qmake about your Qt installation...
C:\Users\me\Documents\instalado\winbuilds\bin\qmake.exe -query
Traceback (most recent call last):
File "C:\Users\me\AppData\Local\Continuum\anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 103, in prepare_metadata_for_build_wheel
hook = backend.prepare_metadata_for_build_wheel
AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\me\AppData\Local\Continuum\anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 257, in <module>
main()
File "C:\Users\me\AppData\Local\Continuum\anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 240, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\me\AppData\Local\Continuum\anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 108, in prepare_metadata_for_build_wheel
config_settings)
File "C:\Users\me\AppData\Local\Continuum\anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 136, in _get_wheel_metadata_from_wheel
whl_basename = backend.build_wheel(metadata_directory, config_settings)
File "C:\Temp\pip-build-env-bcpea7cl\overlay\Lib\site-packages\sipbuild\api.py", line 51, in build_wheel
project = AbstractProject.bootstrap('pep517')
File "C:\Temp\pip-build-env-bcpea7cl\overlay\Lib\site-packages\sipbuild\abstract_project.py", line 82, in bootstrap
project.setup(pyproject, tool, tool_description)
File "C:\Temp\pip-build-env-bcpea7cl\overlay\Lib\site-packages\sipbuild\project.py", line 479, in setup
self.apply_user_defaults(tool)
File "C:\Temp\pip-build-env-bcpea7cl\overlay\Lib\site-packages\pyqtbuild\project.py", line 89, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:\Temp\pip-build-env-bcpea7cl\overlay\Lib\site-packages\sipbuild\project.py", line 225, in apply_user_defaults
self.builder.apply_user_defaults(tool)
File "C:\Temp\pip-build-env-bcpea7cl\overlay\Lib\site-packages\pyqtbuild\builder.py", line 77, in apply_user_defaults
self._get_qt_configuration()
File "C:\Temp\pip-build-env-bcpea7cl\overlay\Lib\site-packages\pyqtbuild\builder.py", line 452, in _get_qt_configuration
"v{0}".format(self.qt_version_str))
sipbuild.exceptions.UserException
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\me\AppData\Local\Continuum\anaconda3\python.exe' 'C:\Users\me\AppData\Local\Continuum\anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Temp\tmpf8mi44_u' Check the logs for full command output. Any suggestion is very welcomed. |
Hi @mantielero! Such errors can happen when your pip version is old. Can you please run Also, does the command |
Hey @mitya57, thanks for the enum tip! I uninstalled it and got another error :) Collecting git+https://github.com/mitya57/python-poppler-qt5.git@sip5
Cloning https://github.com/mitya57/python-poppler-qt5.git (to revision sip5) to /tmp/pip-req-build-ys5yxiwh
ERROR: Error [Errno 2] No such file or directory: 'git' while executing command git clone -q https://github.com/mitya57/python-poppler-qt5.git /tmp/pip-req-build-ys5yxiwh
ERROR: Cannot find command 'git' - do you have 'git' installed and in your PATH?
WARNING: You are using pip version 20.2.2; however, version 20.2.3 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
root@7e204eddac1e:/app# apt-get update
Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:2 http://deb.debian.org/debian buster InRelease [121 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
Get:4 http://security.debian.org/debian-security buster/updates/main amd64 Packages [234 kB]
Get:5 http://deb.debian.org/debian buster/main amd64 Packages [7906 kB]
Get:6 http://deb.debian.org/debian buster-updates/main amd64 Packages [7868 B]
Fetched 8387 kB in 5s (1686 kB/s)
Reading package lists... Done
root@7e204eddac1e:/app# apt-get install git
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
git-man less libbsd0 libcurl3-gnutls libedit2 liberror-perl libnghttp2-14 libpcre2-8-0 libpsl5 librtmp1 libssh2-1 libx11-6
libx11-data libxau6 libxcb1 libxdmcp6 libxext6 libxmuu1 openssh-client publicsuffix xauth
Suggested packages:
git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-cvs git-mediawiki git-svn keychain libpam-ssh
monkeysphere ssh-askpass
The following NEW packages will be installed:
git git-man less libbsd0 libcurl3-gnutls libedit2 liberror-perl libnghttp2-14 libpcre2-8-0 libpsl5 librtmp1 libssh2-1 libx11-6
libx11-data libxau6 libxcb1 libxdmcp6 libxext6 libxmuu1 openssh-client publicsuffix xauth
0 upgraded, 22 newly installed, 0 to remove and 18 not upgraded.
Need to get 10.7 MB of archives.
After this operation, 48.7 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://deb.debian.org/debian buster/main amd64 less amd64 487-0.1+b1 [129 kB]
Get:2 http://deb.debian.org/debian buster/main amd64 libbsd0 amd64 0.9.1-2 [99.5 kB]
Get:3 http://deb.debian.org/debian buster/main amd64 libedit2 amd64 3.1-20181209-1 [94.0 kB]
Get:4 http://deb.debian.org/debian buster/main amd64 openssh-client amd64 1:7.9p1-10+deb10u2 [782 kB]
Get:5 http://deb.debian.org/debian buster/main amd64 libnghttp2-14 amd64 1.36.0-2+deb10u1 [85.0 kB]
Get:6 http://deb.debian.org/debian buster/main amd64 libpsl5 amd64 0.20.2-2 [53.7 kB]
Get:7 http://deb.debian.org/debian buster/main amd64 librtmp1 amd64 2.4+20151223.gitfa8646d.1-2 [60.5 kB]
Get:8 http://deb.debian.org/debian buster/main amd64 libssh2-1 amd64 1.8.0-2.1 [140 kB]
Get:9 http://deb.debian.org/debian buster/main amd64 libcurl3-gnutls amd64 7.64.0-4+deb10u1 [330 kB]
Get:10 http://deb.debian.org/debian buster/main amd64 libpcre2-8-0 amd64 10.32-5 [213 kB]
Get:11 http://deb.debian.org/debian buster/main amd64 liberror-perl all 0.17027-2 [30.9 kB]
Get:12 http://deb.debian.org/debian buster/main amd64 git-man all 1:2.20.1-2+deb10u3 [1620 kB]
Get:13 http://deb.debian.org/debian buster/main amd64 git amd64 1:2.20.1-2+deb10u3 [5633 kB]
Get:14 http://deb.debian.org/debian buster/main amd64 libxau6 amd64 1:1.0.8-1+b2 [19.9 kB]
Get:15 http://deb.debian.org/debian buster/main amd64 libxdmcp6 amd64 1:1.1.2-3 [26.3 kB]
Get:16 http://deb.debian.org/debian buster/main amd64 libxcb1 amd64 1.13.1-2 [137 kB]
Get:17 http://deb.debian.org/debian buster/main amd64 libx11-data all 2:1.6.7-1+deb10u1 [294 kB]
Get:18 http://deb.debian.org/debian buster/main amd64 libx11-6 amd64 2:1.6.7-1+deb10u1 [757 kB]
Get:19 http://deb.debian.org/debian buster/main amd64 libxext6 amd64 2:1.3.3-1+b2 [52.5 kB]
Get:20 http://deb.debian.org/debian buster/main amd64 libxmuu1 amd64 2:1.1.2-2+b3 [23.9 kB]
Get:21 http://deb.debian.org/debian buster/main amd64 publicsuffix all 20190415.1030-1 [116 kB]
Get:22 http://deb.debian.org/debian buster/main amd64 xauth amd64 1:1.0.10-1 [40.3 kB]
Fetched 10.7 MB in 5s (2180 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package less.
(Reading database ... 12759 files and directories currently installed.)
Preparing to unpack .../00-less_487-0.1+b1_amd64.deb ...
Unpacking less (487-0.1+b1) ...
Selecting previously unselected package libbsd0:amd64.
Preparing to unpack .../01-libbsd0_0.9.1-2_amd64.deb ...
Unpacking libbsd0:amd64 (0.9.1-2) ...
Selecting previously unselected package libedit2:amd64.
Preparing to unpack .../02-libedit2_3.1-20181209-1_amd64.deb ...
Unpacking libedit2:amd64 (3.1-20181209-1) ...
Selecting previously unselected package openssh-client.
Preparing to unpack .../03-openssh-client_1%3a7.9p1-10+deb10u2_amd64.deb ...
Unpacking openssh-client (1:7.9p1-10+deb10u2) ...
Selecting previously unselected package libnghttp2-14:amd64.
Preparing to unpack .../04-libnghttp2-14_1.36.0-2+deb10u1_amd64.deb ...
Unpacking libnghttp2-14:amd64 (1.36.0-2+deb10u1) ...
Selecting previously unselected package libpsl5:amd64.
Preparing to unpack .../05-libpsl5_0.20.2-2_amd64.deb ...
Unpacking libpsl5:amd64 (0.20.2-2) ...
Selecting previously unselected package librtmp1:amd64.
Preparing to unpack .../06-librtmp1_2.4+20151223.gitfa8646d.1-2_amd64.deb ...
Unpacking librtmp1:amd64 (2.4+20151223.gitfa8646d.1-2) ...
Selecting previously unselected package libssh2-1:amd64.
Preparing to unpack .../07-libssh2-1_1.8.0-2.1_amd64.deb ...
Unpacking libssh2-1:amd64 (1.8.0-2.1) ...
Selecting previously unselected package libcurl3-gnutls:amd64.
Preparing to unpack .../08-libcurl3-gnutls_7.64.0-4+deb10u1_amd64.deb ...
Unpacking libcurl3-gnutls:amd64 (7.64.0-4+deb10u1) ...
Selecting previously unselected package libpcre2-8-0:amd64.
Preparing to unpack .../09-libpcre2-8-0_10.32-5_amd64.deb ...
Unpacking libpcre2-8-0:amd64 (10.32-5) ...
Selecting previously unselected package liberror-perl.
Preparing to unpack .../10-liberror-perl_0.17027-2_all.deb ...
Unpacking liberror-perl (0.17027-2) ...
Selecting previously unselected package git-man.
Preparing to unpack .../11-git-man_1%3a2.20.1-2+deb10u3_all.deb ...
Unpacking git-man (1:2.20.1-2+deb10u3) ...
Selecting previously unselected package git.
Preparing to unpack .../12-git_1%3a2.20.1-2+deb10u3_amd64.deb ...
Unpacking git (1:2.20.1-2+deb10u3) ...
Selecting previously unselected package libxau6:amd64.
Preparing to unpack .../13-libxau6_1%3a1.0.8-1+b2_amd64.deb ...
Unpacking libxau6:amd64 (1:1.0.8-1+b2) ...
Selecting previously unselected package libxdmcp6:amd64.
Preparing to unpack .../14-libxdmcp6_1%3a1.1.2-3_amd64.deb ...
Unpacking libxdmcp6:amd64 (1:1.1.2-3) ...
Selecting previously unselected package libxcb1:amd64.
Preparing to unpack .../15-libxcb1_1.13.1-2_amd64.deb ...
Unpacking libxcb1:amd64 (1.13.1-2) ...
Selecting previously unselected package libx11-data.
Preparing to unpack .../16-libx11-data_2%3a1.6.7-1+deb10u1_all.deb ...
Unpacking libx11-data (2:1.6.7-1+deb10u1) ...
Selecting previously unselected package libx11-6:amd64.
Preparing to unpack .../17-libx11-6_2%3a1.6.7-1+deb10u1_amd64.deb ...
Unpacking libx11-6:amd64 (2:1.6.7-1+deb10u1) ...
Selecting previously unselected package libxext6:amd64.
Preparing to unpack .../18-libxext6_2%3a1.3.3-1+b2_amd64.deb ...
Unpacking libxext6:amd64 (2:1.3.3-1+b2) ...
Selecting previously unselected package libxmuu1:amd64.
Preparing to unpack .../19-libxmuu1_2%3a1.1.2-2+b3_amd64.deb ...
Unpacking libxmuu1:amd64 (2:1.1.2-2+b3) ...
Selecting previously unselected package publicsuffix.
Preparing to unpack .../20-publicsuffix_20190415.1030-1_all.deb ...
Unpacking publicsuffix (20190415.1030-1) ...
Selecting previously unselected package xauth.
Preparing to unpack .../21-xauth_1%3a1.0.10-1_amd64.deb ...
Unpacking xauth (1:1.0.10-1) ...
Setting up libxau6:amd64 (1:1.0.8-1+b2) ...
Setting up libpsl5:amd64 (0.20.2-2) ...
Setting up libnghttp2-14:amd64 (1.36.0-2+deb10u1) ...
Setting up less (487-0.1+b1) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
Setting up liberror-perl (0.17027-2) ...
Setting up libx11-data (2:1.6.7-1+deb10u1) ...
Setting up librtmp1:amd64 (2.4+20151223.gitfa8646d.1-2) ...
Setting up libpcre2-8-0:amd64 (10.32-5) ...
Setting up git-man (1:2.20.1-2+deb10u3) ...
Setting up libssh2-1:amd64 (1.8.0-2.1) ...
Setting up libbsd0:amd64 (0.9.1-2) ...
Setting up publicsuffix (20190415.1030-1) ...
Setting up libxdmcp6:amd64 (1:1.1.2-3) ...
Setting up libxcb1:amd64 (1.13.1-2) ...
Setting up libedit2:amd64 (3.1-20181209-1) ...
Setting up libcurl3-gnutls:amd64 (7.64.0-4+deb10u1) ...
Setting up git (1:2.20.1-2+deb10u3) ...
Setting up libx11-6:amd64 (2:1.6.7-1+deb10u1) ...
Setting up libxmuu1:amd64 (2:1.1.2-2+b3) ...
Setting up openssh-client (1:7.9p1-10+deb10u2) ...
Setting up libxext6:amd64 (2:1.3.3-1+b2) ...
Setting up xauth (1:1.0.10-1) ...
Processing triggers for libc-bin (2.28-10) ...
root@7e204eddac1e:/app# pip install git+https://github.com/mitya57/python-poppler-qt5.git@sip5
Collecting git+https://github.com/mitya57/python-poppler-qt5.git@sip5
Cloning https://github.com/mitya57/python-poppler-qt5.git (to revision sip5) to /tmp/pip-req-build-x84ev2ha
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python /usr/local/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-j7say3f6/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'sip >=5' PyQt-builder PyQt5
cwd: None
Complete output (42 lines):
Traceback (most recent call last):
File "/usr/local/lib/python3.8/runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.8/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.8/site-packages/pip/__main__.py", line 26, in <module>
sys.exit(_main())
File "/usr/local/lib/python3.8/site-packages/pip/_internal/cli/main.py", line 73, in main
command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
File "/usr/local/lib/python3.8/site-packages/pip/_internal/commands/__init__.py", line 104, in create_command
module = importlib.import_module(module_path)
File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/local/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 17, in <module>
from pip._internal.cli.req_command import RequirementCommand, with_cleanup
File "/usr/local/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 16, in <module>
from pip._internal.index.collector import LinkCollector
File "/usr/local/lib/python3.8/site-packages/pip/_internal/index/collector.py", line 14, in <module>
from pip._vendor import html5lib, requests
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/requests/__init__.py", line 125, in <module>
from . import utils
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/requests/utils.py", line 25, in <module>
from . import certs
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/requests/certs.py", line 15, in <module>
from pip._vendor.certifi import where
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/certifi/__init__.py", line 1, in <module>
from .core import contents, where
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/certifi/core.py", line 12, in <module>
from importlib.resources import path as get_path, read_text
File "/usr/local/lib/python3.8/importlib/resources.py", line 11, in <module>
from typing import Iterable, Iterator, Optional, Set, Union # noqa: F401
File "/usr/local/lib/python3.8/site-packages/typing.py", line 1347, in <module>
class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
File "/usr/local/lib/python3.8/site-packages/typing.py", line 1003, in __new__
self._abc_registry = extra._abc_registry
AttributeError: type object 'Callable' has no attribute '_abc_registry'
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python /usr/local/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-j7say3f6/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'sip >=5' PyQt-builder PyQt5 Check the logs for full command output.
WARNING: You are using pip version 20.2.2; however, version 20.2.3 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command. |
@tadeoos It is strange that you have In general, running |
The output is: λ .\Documents\instalado\winbuilds\bin\qmake.exe -query
QT_SYSROOT:
QT_INSTALL_PREFIX:C:/Users/me/Documents/instalado/winbuilds
QT_INSTALL_ARCHDATA:C:/Users/me/Documents/instalado/winbuilds
QT_INSTALL_DATA:C:/Users/me/Documents/instalado/winbuilds
QT_INSTALL_DOCS:C:/Users/me/Documents/instalado/winbuilds/doc
QT_INSTALL_HEADERS:C:/Users/me/Documents/instalado/winbuilds/include/qt5
QT_INSTALL_LIBS:C:/Users/me/Documents/instalado/winbuilds/lib
QT_INSTALL_LIBEXECS:C:/Users/me/Documents/instalado/winbuilds/bin
QT_INSTALL_BINS:C:/Users/me/Documents/instalado/winbuilds/bin
QT_INSTALL_TESTS:C:/Users/me/Documents/instalado/winbuilds/tests
QT_INSTALL_PLUGINS:C:/Users/me/Documents/instalado/winbuilds/plugins
QT_INSTALL_IMPORTS:C:/Users/me/Documents/instalado/winbuilds/imports
QT_INSTALL_QML:C:/Users/me/Documents/instalado/winbuilds/qml
QT_INSTALL_TRANSLATIONS:C:/Users/me/Documents/instalado/winbuilds/translations
QT_INSTALL_CONFIGURATION:
QT_INSTALL_EXAMPLES:C:/Users/me/Documents/instalado/winbuilds/examples
QT_INSTALL_DEMOS:C:/Users/me/Documents/instalado/winbuilds/examples
QT_HOST_PREFIX:C:/Users/me/Documents/instalado/winbuilds
QT_HOST_DATA:C:/Users/me/Documents/instalado/winbuilds
QT_HOST_BINS:C:/Users/me/Documents/instalado/winbuilds/bin
QT_HOST_LIBS:C:/Users/me/Documents/instalado/winbuilds/lib
QMAKE_SPEC:linux-g++
QMAKE_XSPEC:win32-g++
QMAKE_VERSION:3.0
QT_VERSION:5.3.1 The |
Unistalled typing (I'm doing all this in my project's Docker container, and I got some legacy libraries in my requirements...) and I got around to qmake error as well: Collecting git+https://github.com/mitya57/python-poppler-qt5.git@sip5
Cloning https://github.com/mitya57/python-poppler-qt5.git (to revision sip5) to /tmp/pip-req-build-ib16e1ro
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python /usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpoq9uny3d
cwd: /tmp/pip-req-build-ib16e1ro
Complete output (29 lines):
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 126, in prepare_metadata_for_build_wheel
hook = backend.prepare_metadata_for_build_wheel
AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
main()
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 130, in prepare_metadata_for_build_wheel
return _get_wheel_metadata_from_wheel(backend, metadata_directory,
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 159, in _get_wheel_metadata_from_wheel
whl_basename = backend.build_wheel(metadata_directory, config_settings)
File "/tmp/pip-build-env-41gbd0zu/overlay/lib/python3.8/site-packages/sipbuild/api.py", line 51, in build_wheel
project = AbstractProject.bootstrap('pep517')
File "/tmp/pip-build-env-41gbd0zu/overlay/lib/python3.8/site-packages/sipbuild/abstract_project.py", line 82, in bootstrap
project.setup(pyproject, tool, tool_description)
File "/tmp/pip-build-env-41gbd0zu/overlay/lib/python3.8/site-packages/sipbuild/project.py", line 479, in setup
self.apply_user_defaults(tool)
File "/tmp/pip-build-env-41gbd0zu/overlay/lib/python3.8/site-packages/pyqtbuild/project.py", line 89, in apply_user_defaults
super().apply_user_defaults(tool)
File "/tmp/pip-build-env-41gbd0zu/overlay/lib/python3.8/site-packages/sipbuild/project.py", line 225, in apply_user_defaults
self.builder.apply_user_defaults(tool)
File "/tmp/pip-build-env-41gbd0zu/overlay/lib/python3.8/site-packages/pyqtbuild/builder.py", line 68, in apply_user_defaults
raise PyProjectOptionException('qmake',
sipbuild.pyproject.PyProjectOptionException
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python /usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpoq9uny3d Check the logs for full command output. |
@tadeoos Line 68 of Please either make sure qmake is in |
pyqt-builder requires Qt 5.6 or later. 5.3.1 is a really old version (it was released in 2014). |
@mitya57 thanks a lot for your support and quick responses! I run Collecting git+https://github.com/mitya57/python-poppler-qt5.git@sip5
Cloning https://github.com/mitya57/python-poppler-qt5.git (to revision sip5) to /tmp/pip-req-build-0qjdxtxv
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python /usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp_k1a469v
cwd: /tmp/pip-req-build-0qjdxtxv
Complete output (41 lines):
Querying qmake about your Qt installation...
/usr/bin/qmake -query
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 126, in prepare_metadata_for_build_wheel
hook = backend.prepare_metadata_for_build_wheel
AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
main()
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 130, in prepare_metadata_for_build_wheel
return _get_wheel_metadata_from_wheel(backend, metadata_directory,
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 159, in _get_wheel_metadata_from_wheel
whl_basename = backend.build_wheel(metadata_directory, config_settings)
File "/tmp/pip-build-env-25gjul45/overlay/lib/python3.8/site-packages/sipbuild/api.py", line 51, in build_wheel
project = AbstractProject.bootstrap('pep517')
File "/tmp/pip-build-env-25gjul45/overlay/lib/python3.8/site-packages/sipbuild/abstract_project.py", line 82, in bootstrap
project.setup(pyproject, tool, tool_description)
File "/tmp/pip-build-env-25gjul45/overlay/lib/python3.8/site-packages/sipbuild/project.py", line 479, in setup
self.apply_user_defaults(tool)
File "/tmp/pip-build-env-25gjul45/overlay/lib/python3.8/site-packages/pyqtbuild/project.py", line 89, in apply_user_defaults
super().apply_user_defaults(tool)
File "/tmp/pip-build-env-25gjul45/overlay/lib/python3.8/site-packages/sipbuild/project.py", line 228, in apply_user_defaults
bindings.apply_user_defaults(tool)
File "project.py", line 50, in apply_user_defaults
cflags = self.run_pkg_config('--cflags-only-I').split()
File "project.py", line 43, in run_pkg_config
output = subprocess.check_output(
File "/usr/local/lib/python3.8/subprocess.py", line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/local/lib/python3.8/subprocess.py", line 489, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/local/lib/python3.8/subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/local/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'pkg-config'
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python /usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp_k1a469v Check the logs for full command output.
WARNING: You are using pip version 20.2.2; however, version 20.2.3 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command. |
@tadeoos Please install |
Done, I also installed libpoppler: Collecting git+https://github.com/mitya57/python-poppler-qt5.git@sip5
Cloning https://github.com/mitya57/python-poppler-qt5.git (to revision sip5) to /tmp/pip-req-build-y7ox272y
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python /usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpd9qrd1qo
cwd: /tmp/pip-req-build-y7ox272y
Complete output (41 lines):
Querying qmake about your Qt installation...
/usr/bin/qmake -query
Package poppler-qt5 was not found in the pkg-config search path.
Perhaps you should add the directory containing `poppler-qt5.pc'
to the PKG_CONFIG_PATH environment variable
No package 'poppler-qt5' found
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 126, in prepare_metadata_for_build_wheel
hook = backend.prepare_metadata_for_build_wheel
AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
main()
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 130, in prepare_metadata_for_build_wheel
return _get_wheel_metadata_from_wheel(backend, metadata_directory,
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 159, in _get_wheel_metadata_from_wheel
whl_basename = backend.build_wheel(metadata_directory, config_settings)
File "/tmp/pip-build-env-3gffepvg/overlay/lib/python3.8/site-packages/sipbuild/api.py", line 51, in build_wheel
project = AbstractProject.bootstrap('pep517')
File "/tmp/pip-build-env-3gffepvg/overlay/lib/python3.8/site-packages/sipbuild/abstract_project.py", line 82, in bootstrap
project.setup(pyproject, tool, tool_description)
File "/tmp/pip-build-env-3gffepvg/overlay/lib/python3.8/site-packages/sipbuild/project.py", line 479, in setup
self.apply_user_defaults(tool)
File "/tmp/pip-build-env-3gffepvg/overlay/lib/python3.8/site-packages/pyqtbuild/project.py", line 89, in apply_user_defaults
super().apply_user_defaults(tool)
File "/tmp/pip-build-env-3gffepvg/overlay/lib/python3.8/site-packages/sipbuild/project.py", line 228, in apply_user_defaults
bindings.apply_user_defaults(tool)
File "project.py", line 50, in apply_user_defaults
cflags = self.run_pkg_config('--cflags-only-I').split()
File "project.py", line 43, in run_pkg_config
output = subprocess.check_output(
File "/usr/local/lib/python3.8/subprocess.py", line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/local/lib/python3.8/subprocess.py", line 512, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['pkg-config', '--cflags-only-I', 'poppler-qt5']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python /usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpd9qrd1qo Check the logs for full command output.
WARNING: You are using pip version 20.2.2; however, version 20.2.3 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command. |
@tadeoos To summarize from our previous discussion, these are the required packages on Debian/Ubuntu:
|
Whoa! @mitya57 installation succeded :) But I have troubles importing in console: >>> import popplerqt5
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.15' not found (required by /usr/local/lib/python3.8/site-packages/PyQt5/QtCore.abi3.so)
>>> |
@tadeoos This is probably because you have different Qt versions installed from distro and from PyQt5 wheel, and the distro version takes priority. Try exporting |
@mitya57 I have installed msys2 and installed Qt from it. I keep on getting a similar error when I try to install: λ pip install git+https://github.com/mitya57/python-poppler-qt5.git@sip5
Collecting git+https://github.com/mitya57/python-poppler-qt5.git@sip5
Cloning https://github.com/mitya57/python-poppler-qt5.git (to revision sip5) to c:\temp\pip-req-build-ohnlqsyu
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\me\appdata\local\continuum\anaconda3\python.exe' 'c:\users\me\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Temp\tmpm2f9uduc'
cwd: C:\Temp\pip-req-build-ohnlqsyu
Complete output (41 lines):
Querying qmake about your Qt installation...
C:\Users\me\AppData\Local\msys64\mingw64\bin\qmake.exe -query
Traceback (most recent call last):
File "c:\users\me\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 126, in prepare_metadata_for_build_wheel
hook = backend.prepare_metadata_for_build_wheel
AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\me\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 280, in <module>
main()
File "c:\users\me\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "c:\users\me\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 131, in prepare_metadata_for_build_wheel
config_settings)
File "c:\users\me\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 159, in _get_wheel_metadata_from_wheel
whl_basename = backend.build_wheel(metadata_directory, config_settings)
File "C:\Temp\pip-build-env-vpohs93s\overlay\Lib\site-packages\sipbuild\api.py", line 51, in build_wheel
project = AbstractProject.bootstrap('pep517')
File "C:\Temp\pip-build-env-vpohs93s\overlay\Lib\site-packages\sipbuild\abstract_project.py", line 82, in bootstrap
project.setup(pyproject, tool, tool_description)
File "C:\Temp\pip-build-env-vpohs93s\overlay\Lib\site-packages\sipbuild\project.py", line 479, in setup
self.apply_user_defaults(tool)
File "C:\Temp\pip-build-env-vpohs93s\overlay\Lib\site-packages\pyqtbuild\project.py", line 89, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:\Temp\pip-build-env-vpohs93s\overlay\Lib\site-packages\sipbuild\project.py", line 228, in apply_user_defaults
bindings.apply_user_defaults(tool)
File "project.py", line 50, in apply_user_defaults
cflags = self.run_pkg_config('--cflags-only-I').split()
File "project.py", line 45, in run_pkg_config
text=True)
File "c:\users\me\appdata\local\continuum\anaconda3\lib\subprocess.py", line 395, in check_output
**kwargs).stdout
File "c:\users\me\appdata\local\continuum\anaconda3\lib\subprocess.py", line 472, in run
with Popen(*popenargs, **kwargs) as process:
File "c:\users\me\appdata\local\continuum\anaconda3\lib\subprocess.py", line 775, in __init__
restore_signals, start_new_session)
File "c:\users\me\appdata\local\continuum\anaconda3\lib\subprocess.py", line 1178, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] El sistema no puede encontrar el archivo especificado
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\me\appdata\local\continuum\anaconda3\python.exe' 'c:\users\me\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Temp\tmpm2f9uduc' Check the logs for full command output. On the other hand: λ qmake -query
QT_SYSROOT:
QT_INSTALL_PREFIX:C:/Users/me/AppData/Local/msys64/mingw64
QT_INSTALL_ARCHDATA:C:/Users/me/AppData/Local/msys64/mingw64/share/qt5
QT_INSTALL_DATA:C:/Users/me/AppData/Local/msys64/mingw64/share/qt5
QT_INSTALL_DOCS:C:/Users/me/AppData/Local/msys64/mingw64/share/qt5/doc
QT_INSTALL_HEADERS:C:/Users/me/AppData/Local/msys64/mingw64/include
QT_INSTALL_LIBS:C:/Users/me/AppData/Local/msys64/mingw64/lib
QT_INSTALL_LIBEXECS:C:/Users/me/AppData/Local/msys64/mingw64/share/qt5/bin
QT_INSTALL_BINS:C:/Users/me/AppData/Local/msys64/mingw64/bin
QT_INSTALL_TESTS:C:/Users/me/AppData/Local/msys64/mingw64/share/qt5/tests
QT_INSTALL_PLUGINS:C:/Users/me/AppData/Local/msys64/mingw64/share/qt5/plugins
QT_INSTALL_IMPORTS:C:/Users/me/AppData/Local/msys64/mingw64/share/qt5/imports
QT_INSTALL_QML:C:/Users/me/AppData/Local/msys64/mingw64/share/qt5/qml
QT_INSTALL_TRANSLATIONS:C:/Users/me/AppData/Local/msys64/mingw64/share/qt5/translations
QT_INSTALL_CONFIGURATION:
QT_INSTALL_EXAMPLES:C:/Users/me/AppData/Local/msys64/mingw64/share/qt5/examples
QT_INSTALL_DEMOS:C:/Users/me/AppData/Local/msys64/mingw64/share/qt5/examples
QT_HOST_PREFIX:C:/Users/me/AppData/Local/msys64/mingw64
QT_HOST_DATA:C:/Users/me/AppData/Local/msys64/mingw64/share/qt5
QT_HOST_BINS:C:/Users/me/AppData/Local/msys64/mingw64/bin
QT_HOST_LIBS:C:/Users/me/AppData/Local/msys64/mingw64/lib
QMAKE_SPEC:win32-g++
QMAKE_XSPEC:win32-g++
QMAKE_VERSION:3.1
QT_VERSION:5.15.0 Any clue? |
@mantielero Now it looks like it cannot find pkg-config executable. |
Sorry to be bothering you with all this messages (I am hobbyist programmer) and thanks a lot for your quick responses. Well, so far I have installed in msys2: pacman -S mingw-w64-x86_64-qt5
pacman -S mingw-w64-x86_64-pkg-config
The new issue is: λ pip install git+https://github.com/mitya57/python-poppler-qt5.git@sip5
Collecting git+https://github.com/mitya57/python-poppler-qt5.git@sip5
Cloning https://github.com/mitya57/python-poppler-qt5.git (to revision sip5) to c:\temp\pip-req-build-nus_zqya
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\me\appdata\local\continuum\anaconda3\python.exe' 'c:\users\me\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Temp\tmpsit8jc3x'
cwd: C:\Temp\pip-req-build-nus_zqya
Complete output (41 lines):
Querying qmake about your Qt installation...
C:\Users\me\AppData\Local\msys64\mingw64\bin\qmake.exe -query
Package poppler-qt5 was not found in the pkg-config search path.
Perhaps you should add the directory containing `poppler-qt5.pc'
to the PKG_CONFIG_PATH environment variable
No package 'poppler-qt5' found
Traceback (most recent call last):
File "c:\users\me\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 126, in prepare_metadata_for_build_wheel
hook = backend.prepare_metadata_for_build_wheel
AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\me\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 280, in <module>
main()
File "c:\users\me\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "c:\users\me\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 131, in prepare_metadata_for_build_wheel
config_settings)
File "c:\users\me\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 159, in _get_wheel_metadata_from_wheel
whl_basename = backend.build_wheel(metadata_directory, config_settings)
File "C:\Temp\pip-build-env-pryvrhmz\overlay\Lib\site-packages\sipbuild\api.py", line 51, in build_wheel
project = AbstractProject.bootstrap('pep517')
File "C:\Temp\pip-build-env-pryvrhmz\overlay\Lib\site-packages\sipbuild\abstract_project.py", line 82, in bootstrap
project.setup(pyproject, tool, tool_description)
File "C:\Temp\pip-build-env-pryvrhmz\overlay\Lib\site-packages\sipbuild\project.py", line 479, in setup
self.apply_user_defaults(tool)
File "C:\Temp\pip-build-env-pryvrhmz\overlay\Lib\site-packages\pyqtbuild\project.py", line 89, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:\Temp\pip-build-env-pryvrhmz\overlay\Lib\site-packages\sipbuild\project.py", line 228, in apply_user_defaults
bindings.apply_user_defaults(tool)
File "project.py", line 50, in apply_user_defaults
cflags = self.run_pkg_config('--cflags-only-I').split()
File "project.py", line 45, in run_pkg_config
text=True)
File "c:\users\me\appdata\local\continuum\anaconda3\lib\subprocess.py", line 395, in check_output
**kwargs).stdout
File "c:\users\me\appdata\local\continuum\anaconda3\lib\subprocess.py", line 487, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['pkg-config', '--cflags-only-I', 'poppler-qt5']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\me\appdata\local\continuum\anaconda3\python.exe' 'c:\users\me\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Temp\tmpsit8jc3x' Check the logs for full command output. It looks like |
I see that msys2 use Arch's pacman. |
So far I have installed: pacman -S mingw-w64-x86_64-qt5
pacman -S mingw-w64-x86_64-pkg-config
pacman -S mingw-w64-x86_64-poppler
pacman -S mingw-w64-x86_64-gcc
pacman -S mingw-w64-x86_64-make The lasest error I am getting is: ERROR: Command errored out with exit status 1:
command: 'c:\users\me\appdata\local\continuum\anaconda3\python.exe' 'c:\users\me\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Temp\tmpz44w6exy'
cwd: C:\Temp\pip-req-build-7q1y_hxt
Complete output (5627 lines):
Querying qmake about your Qt installation...
C:\Users\me\AppData\Local\msys64\mingw64\bin\qmake.exe -query
These bindings will be built: Poppler-Qt5.
Generating the Poppler-Qt5 bindings...
Generating the .pro file for the popplerqt5 module...
Generating the top-level .pro file...
Generating the Makefiles...
C:\Users\me\AppData\Local\msys64\mingw64\bin\qmake.exe -recursive python-poppler-qt5.pro
Info: creating stash file C:\Temp\tmpgovhjnv_\.qmake.stash
Reading C:/Temp/tmpgovhjnv_/popplerqt5/popplerqt5.pro
Compiling the project...
mingw32-make
cd popplerqt5/ && ( test -e Makefile || C:/Users/me/AppData/Local/msys64/mingw64/bin/qmake.exe -o Makefile C:/Temp/tmpgovhjnv_/popplerqt5/popplerqt5.pro ) && mingw32-make -f Makefile
mingw32-make[1]: Entering directory 'C:/Temp/tmpgovhjnv_/popplerqt5'
C:/Users/me/AppData/Local/msys64/mingw64/bin/mingw32-make.exe -f Makefile.Release
mingw32-make[2]: Entering directory 'C:/Temp/tmpgovhjnv_/popplerqt5'
g++ -c -fno-keep-inline-dllexport -mstackrealign -O2 -fno-exceptions -Wall -Wextra -Wextra -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_XML_LIB -DQT_CORE_LIB -I. -I. -I.. -I../../../Users/me/AppData/Local/msys64/mingw64/include/poppler/qt5 -I../../../Users/me/AppData/Local/msys64/mingw64/include/poppler -Ic:/users/me/appdata/local/continuum/anaconda3/include -I../../../Users/me/AppData/Local/msys64/mingw64/include/QtGui -I../../../Users/me/AppData/Local/msys64/mingw64/include/QtXml -I../../../Users/me/AppData/Local/msys64/mingw64/include/QtCore -Irelease -I/include -I../../../Users/me/AppData/Local/msys64/mingw64/share/qt5/mkspecs/win32-g++ -o release/sippopplerqt5cmodule.o sippopplerqt5cmodule.cpp
In file included from C:/Users/me/AppData/Local/msys64/mingw64/include/poppler/qt5/poppler-qt5.h:43,
from C:/Temp/pip-req-build-7q1y_hxt/poppler-qt5.sip:19,
from sippopplerqt5cmodule.cpp:7:
C:/Users/me/AppData/Local/msys64/mingw64/include/poppler/qt5/poppler-annotation.h:540:5: warning: 'template<class T> class QLinkedList' is deprecated: Use std::list instead [-Wdeprecated-declarations]
540 | QLinkedList<QPointF> linePoints() const;
| ^~~~~~~~~~~
In file included from C:/Users/me/AppData/Local/msys64/mingw64/include/QtCore/qvarlengtharray.h:43,
from C:/Users/me/AppData/Local/msys64/mingw64/include/QtCore/qmetatype.h:48,
from C:/Users/me/AppData/Local/msys64/mingw64/include/QtCore/QMetaType:1,
from sipAPIpopplerqt5.h:12,
from sippopplerqt5cmodule.cpp:7:
C:/Users/me/AppData/Local/msys64/mingw64/include/QtCore/qcontainerfwd.h:51:26: note: declared here
51 | template <class T> class QLinkedList;
| ^~~~~~~~~~~
.... followed by hundreds of lines |
@mantielero The fragment you pasted doesn't have any errors, only warnings. Please find the lines with actual errors or attach the full log. Looks like it at least started compiling, which is a progress anyway :) |
This is the file It looks like the relevant part is at the end: C:/Users/me/AppData/Local/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: release/sippopplerqt5QSet0100PopplerDocumentRenderBackend.o:sippopplerqt5QSet0100PopplerDocumentRenderBackend.cpp:(.text+0x449): undefined reference to `__imp_PyLong_FromLong'
_in_process.py: 'mingw32-make' failed returning 2
C:/Users/me/AppData/Local/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: release/sippopplerqt5QSet0100PopplerDocumentRenderBackend.o:sippopplerqt5QSet0100PopplerDocumentRenderBackend.cpp:(.text+0x457): undefined reference to `__imp_PyList_SetItem'
collect2.exe: error: ld returned 1 exit status
mingw32-make[2]: *** [Makefile.Release:311: release/popplerqt5.dll] Error 1
mingw32-make[2]: Leaving directory 'C:/Temp/tmp9s_0812u/popplerqt5'
mingw32-make[1]: *** [Makefile:45: release] Error 2
mingw32-make[1]: Leaving directory 'C:/Temp/tmp9s_0812u/popplerqt5'
mingw32-make: *** [Makefile:50: sub-popplerqt5-make_first-ordered] Error 2
Traceback (most recent call last):
File "c:\users\me\appdata\local\continuum\anaconda3\lib\weakref.py", line 648, in _exitfunc
f()
File "c:\users\me\appdata\local\continuum\anaconda3\lib\weakref.py", line 572, in __call__
return info.func(*info.args, **(info.kwargs or {}))
File "c:\users\me\appdata\local\continuum\anaconda3\lib\tempfile.py", line 795, in _cleanup
_shutil.rmtree(name)
File "c:\users\me\appdata\local\continuum\anaconda3\lib\shutil.py", line 516, in rmtree
return _rmtree_unsafe(path, onerror)
File "c:\users\me\appdata\local\continuum\anaconda3\lib\shutil.py", line 404, in _rmtree_unsafe
onerror(os.rmdir, path, sys.exc_info())
File "c:\users\me\appdata\local\continuum\anaconda3\lib\shutil.py", line 402, in _rmtree_unsafe
os.rmdir(path)
PermissionError: [WinError 32] El proceso no tiene acceso al archivo porque est� siendo utilizado por otro proceso: 'C:\\Temp\\tmp9s_0812u'
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\me\appdata\local\continuum\anaconda3\python.exe' 'c:\users\me\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Temp\tmpdy98a193' Check the logs for full command output. The sentence in Spanish says:
|
@mantielero At the end is an error that happens during cleanup. The really relevant errors are from linker:
and so on. I don't use Windows, so I can only guess here. https://docs.python.org/3/extending/windows.html#using-dlls-in-practice says that “when creating DLLs in Windows, you must pass https://stackoverflow.com/q/2842469 and https://stackoverflow.com/q/34894094 describe a similar problem, and some answers there suggest passing Also I heard that it's better to use the same toolchain that Python itself was built with. What compiler does Anaconda use? If it's MSVC, that may be the reason for such errors because you use MinGW. Maybe you can install python-devel from MSYS2 instead of Anaconda? Can you build any Python extension with your toolchain? Can you try building, for example, PyQtChart — will it have the same problem? |
Ok the first problem was that the custom path for qmake was provided in quotes. Quotes removed, qmake.exe found, However, still no luck:
pkg-config? Is something else missing? |
One thing noteworthy: You have |
Lines 42 to 46 in 85adedd
So the call
|
Hi, so far thanks a lot for your help.. I wasn't aware that I have to have a working poppler-qt5 windows library. Nevertheless, after a 6h journey, I have finally installed pkg-config, compiled the latest poppler 21.04 including poppler-qt5, and fed PKG_CONFIG_PATH with the respective poppler.pc and poppler-qt5.pc files. I used mingw810 as shipped with Qt and also use the qmake for mingw810 as shipped with qt:
I have also already converted successfully a pdf to ppm using pdftoppm.exe. However, now we have a weird error. I say weird, because it apparently detects the lib and qmake and tries to built the pro files for compilation, but it somehow cannot access it. the error is very long, but I attach it anyway fully. Checked with the --no-clean option:
|
Here is another idea: Instead of pip, you could try to use |
Thanks.
Indeed, there is no such file in the root level directory. However, a directory 'build' has been created, which contains:
However, I cannot find any new files.. |
pyqt-builder (which is used by sip-build) should enter that directory before calling https://riverbankcomputing.com/hg/PyQt-builder/file/1.9.1/pyqtbuild/builder.py#l245 Again I have no idea why it fails, but I show you which code to debug.
You called qmake which only generates the Makefiles, but doesn't actually build the project. To build it on Windows, you now need to call nmake or mingw32-make (sip-build would call it if it didn't fail earlier). |
Yes, just figured that out. It currently compiles in the build directory with mingw32-make. So I will dig deeper into PyQt Builder and let you know. |
Hi, so, the problem with not changing the directory was rather stupid. sipbuild uses a subprocess in project.py, which implements the shell=True variable, thereby calling cmd under Windows. I have a shell script in the Autorun variable of cmd, which sends me to H: for convenience reasons. So whenever sip-build entered the subroutine, it got redirected to h: and could not find the pro file. I have now removed the redirection and sip-build finds the pro file. But! It doesn't link. Any suggestion? I use the 64bit toolchain. Maybe not a good idea? From here: https://stackoverflow.com/questions/18717996/python-x64-c-library-compiled-with-mingw-x64-on-windows7-py-initmodule4 I got the advise to add -DMS_WIN64, but I would not know how to do it in pip/sip-build/qmake...
|
Yes, that is the correct path to Python.h. As we start from a temporary directory, which is in %AppDataLocal% and the Python module is also located in this special directory, the path is correct. Why it is in relative form, I actually don't know. In the meantime I have recompiled with -DMS_WIN64, but with no luck. |
For reference, you answered to a question of mine which I deleted, because it was stupid. I don't think the errors look like 32-bit vs 64-bit errors. The linker does not find any (impl) Python symbols, not just the 64bit ones as in the SO issue. Extra arguments to qmake are passed with |
Maybe also try this:
|
Well - the documentation is totally unclear to me. Where would I add this option?
Update: Ok, I managed to link popplerqt5.dll successfully (at least no error and the file is created). What did I do? I had to create a python39.a library file and put it under python39/libs as described here: https://stackoverflow.com/questions/40533566/undefined-reference-to-imp-pyexc-typeerror-with-mingw Further, I had to add -lpython39 at the end of the g++ linker line. However, I do not know how to accomplish that with sip-build / pip install. Can you help me out once more? Update2: Ok, I managed to build with sip-build using: sip-build --qmake-settings "QMAKE_LIBS += -lpython39" However, how to include that into pip? pip still fails with the compilation.... Update3: Forked the repo and added 'python39' to the list of libraries for Windows - no change. |
For me Also that option can be added to
That is good news. For now you can install the project using |
You are now statically linking python. I am not sure if you want to do this.
It is added automatically. But you have to call sip-build from the toplevel source dir (where the pyproject.toml is sitting), not from build:
|
https://www.riverbankcomputing.com/static/Docs/PyQt-builder/pyproject_toml.html |
Thanks for your replies. I am unsure whether I want to link statically, but it is the only thing working so far. Just to let you know that the --link-full-dll option did not result in success. I am currently rebuilding in 64bit mode (had switched to 32bit mode in the mean time, what resulted in a dll load fail upon importing the module). Hopefully, with the 64bit build I am able to load the module (my python is also 64bit). I will keep you posted. Update: I don't know what to say.. I am normally a Linux guy. Can it be so freakin hard to install a simple python module in Windows? I managed to install the pip module with said hack (e.g. adding -lpython39 to poppler-qt5.pc), but now I am running in very weird problems. First of all I understood that the pyd module was missing dlls. So I tried to set the paths for Qt libs and the poppler libs. No luck. Then I stumbled over this here: https://stackoverflow.com/questions/214852/python-module-dlls WTF? Why is now the PATH environment neglected when searching for DLLs on Windows starting from python 3.8 (I am using 3.9)? So I copied the required dlls to the site-packages path, what seems to be utterly wrong. Then, the popplerqt5 module loaded, but QtCore started to complain. This all seems to be sooo messed up. Is poppler-qt5 actually compatible with python3.8 and later?
The next directory hold the poppler and openjpeg libs
Still no luck, introducing the dir with the Qt MinGW libs
Update2: So it looks like python and pyqt5 use dlls compiled with MSVC. So I am currently downloading MSVC and will try to build using it. |
FINALLY. After compilation of everything in MSVC 2019 and copying the following dlls to site-packages: openjp2.dll and importing PyQt5-Something (initiating the add_dll_path for this package) the module loads in python. I still have to test it though, any pointer to a short test script? |
Totally agree 🤣 Did you try to adjust your
https://github.com/frescobaldi/python-poppler-qt5/tree/master/demo |
So far thanks for all your help, but something is still not ok. It seems that pyqt5 and poppler-qt5 have a problem being run side by side. When I run the demo file, I get the following error: Stripping it down to:
works. Any idea what that message might want to tell us? Btw. when having the error, the module still reads and exports the PDF. So it works, but afterwards, the crash happens. |
Without a python or c++ debugger trace we can't say. Here is a (wild) guess: You don't have multiple python, Qt5, and PyQt5 libraries in your paths anymore, do you? #41 (comment) Make sure you us a a PyQt5 compiled without |
Ok, I had poppler-qt5.dll built in Debug mode. It is now built in release mode. AND IT WORKS! :) Thank you so much for your help! |
@mitya57, have you tried building python-poppler-qt5 with sip v6? |
@swt2c I have just tried to run |
Here is a buildlog of python-poppler-qt5 using sip-6.1.0 for three different major Python versions: poppler-qt5-sip6_log.txt |
Thanks @mitya57 & @bnavigator , I found my issue - unrelated to sip6. |
I did not delete
setup.py
andsetup.cfg
files, because they can be still used to build with SIP v4. However installations via pip should now use the new SIP v5 build system (and work fine).Fixes #38, #34.