To build Python packages, use the python_package
class. This class works for packages that are built on some variation of
setup.py build setup.py install --prefix=<install_dir>
The minimal build class for a Python package abc is:
class abc_package(python_package): def init(self): super(abc_package, self).init()
There are two basic ways of customizing the build class: setting properties, and defining helper methods.
The first is to set one of the following properties (shown with default values) to something different in the init method:
ldflags = 'LDFLAGS=-L%s/lib' % self.absolute_python_dir self.build_command = '%s %s setup.py build --verbose' % (ldflags, self.python) self.build_options = '' self.install_command = '%s %s setup.py install --prefix=%s' % (ldflags, self.python, self.absolute_install_dir) self.install_options = ''
If you need to perform other actions in the build,, then you can override the following method.. By default this method is defined to do nothing.
def after_extract(self): pass