How to build packages for various Python versions in opencsw

for 'plain' python packages mgar will build the python modules for all known python versions automaticly. Simply use

CATEGORIES = python
in the gar recipe.

But how it is for packages which deliver python bindings like NET-SNMP or gobject?

asked: 2014-12-04 by: cgrzemba


cgrzemba answers:

In the case you can not use CATEGORIES = python you have to add to the recipe:

EXTRA_MODULATORS += PYTHON_VERSION
MODULATIONS_PYTHON_VERSION = 2.6 2.7
# We need 64 bit just once as it is without python anyway
SKIP_MODULATIONS += isa-sparcv9-python_version-2.7
SKIP_MODULATIONS += isa-amd64-python_version-2.7
PYTHON = $(bindir)/python$(PYTHON_VERSION)
MERGE_SCRIPTS_isa-default-python_version-2.6 += copy-all
MERGE_SCRIPTS_isa-default-python_version-2.7 += copy-all
MERGE_SCRIPTS_isa-default64-python_version-2.6 += copy-relocated-only
MERGE_DIRS_isa-default64-python_version-2.6 += $(libdir)