[CMake] Stopping CPack from compiling python files

Eric Noulard eric.noulard at gmail.com
Thu Jan 28 07:43:56 EST 2016


2016-01-28 11:33 GMT+01:00 Attila Krasznahorkay <
attila.krasznahorkay at gmail.com>:

> Dear All,
>
> This should be a simple question, but somehow I don't seem to find an
> answer to it with Google.
>
> Our projects have a lot of python files in them. Many of which are not
> simple python files. They are files that need our software to interpret
> them. So CPack should just leave them alone.
>
> But CPack is trying to do something "smart". Which I'd like to turn off.
> Since in all of our rpmbuild.err files I see lines like:
>
> + /usr/lib/rpm/check-buildroot
> + /usr/lib/rpm/redhat/brp-compress
> + /usr/lib/rpm/redhat/brp-strip /usr/bin/strip
> + /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
> + /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip
> /usr/bin/objdump
> + /usr/lib/rpm/brp-python-bytecompile
> + /usr/lib/rpm/redhat/brp-python-hardlink
> + /usr/lib/rpm/redhat/brp-java-repack-jars
> warning: Installed (but unpackaged) file(s) found:
> ...
>
>  /usr/AtlasCore/21.0.0/InstallArea/x86_64-slc6-gcc49-opt/jobOptions/AthAnalysisBaseComps/SuppressLogging.pyc
>
>  /usr/AtlasCore/21.0.0/InstallArea/x86_64-slc6-gcc49-opt/jobOptions/AthAnalysisBaseComps/SuppressLogging.pyo
> ...
>
> (And in some projects the RPM building actually fails, seemingly because
> of problems with compiling some of these files.)
>
> I guess it's the "brp-python-bytecompile" command that's responsible for
> doing this. Is there an easy way that I can tell CPackRPM to forget about
> this step? I would really like to avoid writing a custom spec file if I
> can...
>

This kind of "automatic" scripts calls are due to your system specific RPM
setup.
Have a look at:

https://lists.fedoraproject.org/pipermail/devel/2010-April/135366.html
https://www.redhat.com/archives/rpm-list/2007-November/msg00020.html

you can try:
$ rpm --showrc

in order to see default RPM macros values on your particular system,
in particular seek for "__os_install_post".

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.
-- 
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160128/0b7cf479/attachment-0001.html>


More information about the CMake mailing list