[CMake] Stopping CPack from compiling python files

Attila Krasznahorkay attila.krasznahorkay at gmail.com
Thu Jan 28 05:33:28 EST 2016


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...

Cheers,
            Attila


More information about the CMake mailing list