[CMake] Stopping CPack from compiling python files

Attila Krasznahorkay attila.krasznahorkay at gmail.com
Fri Jan 29 09:12:41 EST 2016


Thanks for the suggestions! I'll give it a try.

Cheers,
            Attila

> On 28 Jan 2016, at 14:07, Domen Vrankar <domen.vrankar at gmail.com> wrote:
> 
>> Not sure how we can disable such script call from CPackRPM unless adding the
>> extra feature to call
>> rpm/rpmbuild wiht appropriate option. May be you can try to fill the
>> CPACK_RPM_SPEC_MORE_DEFINE variable
>> with appropriate macro redefining "__os_install_post".
>> 
>> This would be more like a hack than a solution.
> 
> As far as I can tell from links such as
> https://www.redhat.com/archives/rpm-list/2007-November/msg00020.html
> and
> http://www.math-linux.com/linux/rpm/article/how-to-turn-off-avoid-brp-python-bytecompile-script-in-a-spec-file
> there is no non hack solution for this so even if we'd put it in
> CPackRPM it would be a hackish workaround.
> 
> Content from the second link might be the right candidate for
> CPACK_RPM_SPEC_MORE_DEFINE (haven't tested it).
> 
> set(CPACK_RPM_SPEC_MORE_DEFINE "%global __os_install_post %(echo
> '%{__os_install_post}' | sed -e
> 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')")
> 
> Regards,
> Domen



More information about the CMake mailing list