TABLE OF CONTENTS


python-wheel.cygclass

[ Top ] [ Cygclasses ] [ Cygclasses ]

DESCRIPTION

Wheels are the standard for installing Python libraries and programs. The build is defined by a PEP 518 conformant source tree, or by a top-level setup.cfg or setup.py file, which controls the installation of files and the building of C Python extensions. Many such packages are hosted on the Python Package Index (PyPI).

This cygclass handles the building of wheel-based Python module packages for multiple Python versions simultaneously.

EXAMPLE

    inherit python-wheel
    
    NAME="python-six"
    VERSION=1.10.0
    RELEASE=1
    CATEGORY="Python"
    SUMMARY="Python 2 and 3 compatibility library"
    DESCRIPTION="Six is a Python 2 and 3 compatibility library. It provides
    utility functions for smoothing over the differences between the Python
    versions with the goal of writing Python code that is compatible on both
    Python versions."
    
    ARCH=noarch

INHERITS

python.org.cygclass

REQUIRES

pythonXY, pythonXY-pip (for each X.Y version of Python being built)


PYTHON_WHEEL_VERSIONS

[ Top ] [ python-wheel.cygclass ] [ Variables ]

SYNOPSIS

  PYTHON_WHEEL_VERSIONS="3.5:3.6" # e.g. added to stdlib in 3.7
  inherit python-wheel

DESCRIPTION

A colon-seperated list of version(s) for which this module should be built. Some aliases are also accepted:

This variable must be defined before inheriting python-wheel.cygclass. If undefined, "default" is assumed.

NOTES


PKG_NAMES (python-wheel)

[ Top ] [ python-wheel.cygclass ] [ Overloads ]

DESCRIPTION

For a NAME of python-foo, pythonXY-foo binary packages are created automatically, corresponding to each X.Y version in PYTHON_WHEEL_VERSIONS. Each package also includes its own independent copy of the automatically installed documentation (COPYING, README, etc.). For those packages which install scripts into /usr/bin, these should be added to the respective pythonXY_foo_CONTENTS.


python_wheel_compile

[ Top ] [ python-wheel.cygclass ] [ Compile Functions ]

SYNOPSIS

  python_wheel_compile [OPTIONS]

DESCRIPTION

If a setup.py file is present, runs the setup.py 'bdist_wheel' command, to which any arguments are passed. Otherwise, for a PEP 518 conformant source tree, runs 'pip wheel'.


python_wheel_install

[ Top ] [ python-wheel.cygclass ] [ Install Functions ]

SYNOPSIS

  python_wheel_install [OPTIONS]

DESCRIPTION

Installs the previously built wheel into $D.


dowheel

[ Top ] [ python-wheel.cygclass ] [ Install Functions ]

SYNOPSIS

  dowheel WHEEL [WHEEL] ...

DESCRIPTION

Installs the given Python wheel(s) into $D/usr/share/python-wheels, to allow offline installation in Python virtual environments.


src_compile (python-wheel)

[ Top ] [ python-wheel.cygclass ] [ Overloads ]

DEFINITION

src_compile() {
        lndirs
        cd ${B}
        python_wheel_compile
}

src_install (python-wheel)

[ Top ] [ python-wheel.cygclass ] [ Overloads ]

DEFINITION

src_install() {
        cd ${B}
        python_wheel_install
}