Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cmake/sip_configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ def get_sip_dir_flags(config):
# sipconfig.Configuration does not have a pyqt_sip_dir or pyqt_sip_flags AttributeError
sip_flags = QtCore.PYQT_CONFIGURATION['sip_flags']

# Archlinux installs sip files here by default
default_sip_dir = os.path.join(sipconfig._pkg_config['default_mod_dir'], 'PyQt5', 'bindings')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I launched an archlinux container and confirmed this is the right location.

>>> sipconfig._pkg_config['default_mod_dir']
'/usr/lib/python3.9/site-packages'
>>> sipconfig._pkg_config['default_sip_dir']
'/usr/share/sip'

It does seem strange since default_sip_dir seems like it should be the right spot.

default_sip_dir

The name of the base directory where the .sip files for SIP generated modules should be installed by default. A sub-directory with the same name as the module should be created and its .sip files should be installed in the sub-directory. The .sip files only need to be installed if you might want to build other bindings based on them.

Is it possible this is an archlinux specific packaging bug? Maybe introduced here? If so, I would be happy to merge this addition so long as the comment says it's a workaround for packaging on archlinux.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx for looking into this! Yeah I'll update the comment to be more reflective of the situation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed the comment and commit to mention the change is due to archlinux specifics.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is nothing archlinux specific here. You are looking at the sip 4 install dir, this change is for sip >= 5 (latest version is 6.x)

if os.path.exists(default_sip_dir):
return default_sip_dir, sip_flags

# sip4 installs here by default
default_sip_dir = os.path.join(sipconfig._pkg_config['default_sip_dir'], 'PyQt5')
if os.path.exists(default_sip_dir):
return default_sip_dir, sip_flags
Expand Down