Present Perfect


Picture Gallery
Present Perfect

Python Packaging

Filed under: Hacking,Python — Thomas @ 8:11 pm

8:11 pm

Lots of rpms of python software have the wrong “file path” compiled into their byte-compiled versions. So when you get tracbacks, you see stuff like ‘/usr/src/rpm/BUILD’ or similar in the paths of the installed python file. I’ve run into this for several packages, but was too lazy to look at it.

Today we ran into a similar issue with our server; Johan was doing some magic to transmit code on the fly but it got the path wrong. This is because during a build files get installed in a staging area. It’s this location that gets stored during byte-compiling.

Luckily the fix was easy; I added a –destdir option to a custom py-compile, and then override py_compile which luckily worked out fine.

I should probably push this upstream to automake; any packagers/python hackers who are willing to test this and give me some feedback on it ?

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URL

Sorry, the comment form is closed at this time.