TABLE OF CONTENTS
distutils-multi.cygclass
[ Top ] [ Cygclasses ] [ Cygclasses ]
SYNOPSIS
inherit distutils-multi
DESCRIPTION
This cygclass provides a shortcut for building a module for both Python2 and Python3 from one source package. While not required, this saves the time involved with maintaining separate builds for each, and also saves bandwidth by avoiding the duplicate source tarball.
Sources built in this fashion should be divided into two binary packages, one for each Python version, as so:
PKG_NAMES="python-foo python3-foo" python_foo_CONTENTS="usr/bin/ ${PYTHON_SITELIB#/} usr/share/doc/" python3_foo_CONTENTS=${PYTHON3_SITELIB#/}
NOTES
- Some modules include scripts which are installed into /usr/bin. With very few exceptions, these scripts are unversioned; this cygclass installs in such a way that they will use the Python2 interpreter, and therefore should be packaged with the 2.x module.
- Not all Python module sources are compatible with 2.x and 3.x simultaneously. Those that are not may have a separate source tarball for each version, which should be treated as completely separate packages.
INHERITS
python-distutils.cygclass, python3-distutils.cygclass.
src_compile (distutils-multi)
[ Top ] [ distutils-multi.cygclass ] [ Overloads ]
DESCRIPTION
Creates separate build trees for each version of Python and runs the distutils build steps for each.
src_install (distutils-multi)
[ Top ] [ distutils-multi.cygclass ] [ Overloads ]
DESCRIPTION
Runs the distutils install steps for each version of Python. The distro default version of Python (currently 2.x) is run last so that unversioned scripts use the default version.