I'm looking for a way to generate .deb and .rpm packages from my build scripts, containing the resulting products. Since everything is written in Python, I'm wondering if anyone knows of an abstraction layer that would allow me to drive both RPM and Deb construction from the same code?
+2
A:
Distutils in python's standard library has a bdist_rpm command to build rpms and the third-paty stdeb module adds a command for producing debs.
Ned Deily
2009-10-04 22:40:38
+1 -- clearly the right way to do it!
Alex Martelli
2009-10-04 23:40:07
Hey Ned: would you use distutils to package a load of code that was not Python specific though? IE, c++ libraries and applications for example?
jkp
2009-10-05 06:11:02
No, distutils is for packaging Python modules and extension modules. It is intimately tied up with the particular Python installation it is included with. Unless you can package other stuff with a python wrapper around it somehow, distutils would not be the way to go.
Ned Deily
2009-10-05 07:28:11
@Ned: yeah, I thought as much...perhaps my question should have been clearer. This is to serve as a general purpose part of my build system to help package all products.
jkp
2009-10-05 07:29:45