Skip to content
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

Possibly incorrect default value for pyqt_sip_dir #34

Closed
parekhnish opened this issue Jan 18, 2020 · 1 comment
Closed

Possibly incorrect default value for pyqt_sip_dir #34

parekhnish opened this issue Jan 18, 2020 · 1 comment

Comments

@parekhnish
Copy link

parekhnish commented Jan 18, 2020

(Environment instructions at the end of this post)

When performing setup.py build_ext without any additional options, the script uses this code to determine pyqt_sip_dir:

python-poppler-qt5/setup.py

Lines 205 to 211 in 22e0f8b

def __find_pyqt_sip_dir(self):
if self.pyqtconfig:
return self.pyqtconfig.pyqt_sip_dir
import sipconfig
return os.path.join(sipconfig.Configuration().default_sip_dir, 'PyQt5')

For my version of PyQt5 == 5.14.1, the if self.pyqtconfig check failed, so the code got the directory from sipconfig. Thus, the value of the directory was set to:

pyqt_sip_dir = "/path/to/virtualenv/share/sip/PyQt5"

which caused an error in the build process:

sip: Unable to find file "QtCore/QtCoremod.sip" 

I figured this was because pyqt_sip_dir was possibly incorrect; manually checking that path revealed there was no such folder! Instead, I had to supply manually a path, with the cmdline argument:

--pyqt-sip-dir==/path/to/virtualenv/lib/python3.7/site-packages/PyQt5/bindings

, and this was the only change needed for setup.py build to successfully build the library.

I wonder if this is an issue with the install for sip itself, installation of PyQt5, or if the way pyqt_sip_dir is set;
Is it possible to change the default from the sipconfig way to this /lib/python/... way?


My Environment:

Using pipenv:

mitya57 added a commit to mitya57/python-poppler-qt5 that referenced this issue Sep 27, 2020
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.
wbsoft pushed a commit that referenced this issue Dec 25, 2020
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 #38, #34.
@wbsoft
Copy link
Collaborator

wbsoft commented Dec 25, 2020

Fixed by merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants