Fixing bdist_rpm for python packages.

Ok, this is a quicky i found here.

I use bdist_rpm when building python modules, because I like them to be neatly installed as rpms, but it normally breaks, puking over not packaged pyo files.

Just put this:

———–8<————–8<—–
[install]
optimize=1
———-8<————–8<—–

in the project’s setup.cfg, or perhaps better yet, in ~/.pydistutils.cfg or
in $prefix/lib/python2.x/distutils/distutils.cfg. This will then always
set –optimize=1 when install is invoked.

This way bdist_rpm will not break (hopefully). Or at least not on pyo files.

Tried it with the Skype4Py package, it worked like a charm.

This entry was posted in tech.

One comment on “Fixing bdist_rpm for python packages.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s