How to disable brp-python-bytecompile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I'm trying to build an rpm from a python application for a client to
run on both RHEL4 and RHEL5.

rpmbuild has the rather nasty habit of runing
/usr/lib/rpm/brp-python-byteompile, which goes through all the files
to be installed by the rpm, and compiling any .py files it finds into
.pyo files.

The first problem is that, while the resulting rpm claims to be
noarch, I can't find anything from the Python folks promising that
.pyo (and .pyc) files are architecture-dependent, so this would seem
to be an error even in the general case, but that's not really my
problem.

My issues is that the resulting .pyo are just so much wasted space.
They don't work on one of the two platforms we're going to deploy to,
because the two pythons are different (2.3 vs. 2.4), and use different
versions of the byte code.

That this all happens after the install scripts run means I can't use
the rpm build process to clean up after it. The best I've been able to
do is use a post-install script to delete the garbage files it
installs - which means the rpm carries them around, we install them,
and then delete them, which is just ugly, and seems error-prone as
well.

Ideally, there's a knob somewhere I can twist to disable
brp-python-bytecompile at rpm build time, and I can then fix the
install scripts to byte-compile the things I need.

Failing that, is there someplace I can hook a script in to clean these
files up *before* the rpm gets built from them, but after
brp-python-bytecompile runs?

      thanks,
      <mike
-- 
Mike Meyer <mwm@xxxxxxxxx>		http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux