Different moc output path on windows/mac for sip-build?
Patrick Stinson
patrickkidd at gmail.com
Fri Oct 9 23:59:41 BST 2020
For what it’s worth, here is the solution I devised:
if sys.platform == 'win32':
aux_sources = [
"../../../pkdiagram/vedana/build/_vedana/release/moc_qaesencryption.cpp",
]
else:
aux_sources = [
"../../../pkdiagram/vedana/build/_vedana/moc_qaesencryption.cpp",
]
class VedanaComponent(Component):
""" The vedana module component. """
must_install_from_source = False
preinstalls = ['Python', 'PyQt', 'Qt', 'SIP']
provides = {
'_vedana': ExtensionModule(
deps='PyQt:PyQt5.QtCore',
source=[
"../../../pkdiagram/vedana/_vedana.cpp",
"../../../pkdiagram/vedana/qaesencryption.cpp",
"../../../pkdiagram/vedana/encryption.cpp",
"../../../pkdiagram/vedana/build/_vedana/sip_vedanacmodule.cpp",
] + aux_sources,
defines=[ "PK_DEBUG_BUILD=0" ]
)
}
> On Oct 9, 2020, at 11:24 AM, Patrick Stinson <patrickkidd at gmail.com> wrote:
>
> I am looking forward to the switch to cmake, though of course behavior like this may stay the same regardless. I ported my app from qmake to cmake and the build system is so much cleaner that there is no comparison.
>
>> On Oct 9, 2020, at 11:22 AM, Patrick Stinson <patrickkidd at gmail.com> wrote:
>>
>> Oh that’s right.
>>
>> I’ll see if I can get my component to add its source paths differently for windows.
>>
>>> On Oct 9, 2020, at 12:13 AM, Phil Thompson <phil at riverbankcomputing.com> wrote:
>>>
>>> On 09/10/2020 00:38, Patrick Stinson wrote:
>>>> Sip-build puts moc_* sources into different paths on windows and Mac,
>>>> which causes problems when trying to write an extension and associated
>>>> component plugin that work together.
>>>> Windows:
>>>> <build-dir>/<module name>/<release|debug>/moc_*
>>>> Mac:
>>>> <build-dir>/<module name>/moc_*
>>>> How to fix this? This doesn’t seem right.
>>>
>>> It's standard qmake behaviour.
>>>
>>> Phil
>>
>
More information about the PyQt
mailing list