TABLE OF CONTENTS


python2.cygclass

[ Top ] [ Cygclasses ] [ Cygclasses ]

SYNOPSIS

  inherit python2

DESCRIPTION

Python is a general-purpose, interpreted programming language used in a wide variety of software. It comes with a large standard library, and is easily extendible with modules written in Python and/or C/C++. Programs can also embed a Python interpreter for use with their own extensions.

This cygclass provides definitions and some install helpers which can be used by any Python-based package. Python modules and programs are built in a number of ways, so this cygclass does not provide any build functions. The two most common build systems for Python packages are Distutils and autotools.

NOTE

python2.cygclass is for the 2.x versions of CPython. For the 3.x versions, see python3.cygclass.

INHERITED BY

python-wheel.cygclass, python2-distutils.cygclass, pygtk.cygclass

REQUIRES

python2


PYTHON2

[ Top ] [ python2.cygclass ] [ Definitions ]

DESCRIPTION

Absolute path to the Python interpreter.


PYTHON2_VERSION

[ Top ] [ python2.cygclass ] [ Definitions ]

DESCRIPTION

The major.minor version of the current Python interpreter.


PYTHON2_INCLUDEDIR

[ Top ] [ python2.cygclass ] [ Definitions ]

DESCRIPTION

Path containing the Python C library headers.


PYTHON2_LIB

[ Top ] [ python2.cygclass ] [ Definitions ]

DESCRIPTION

Path containing the Python standard library.

NOTE

Never install third-party extensions into PYTHON2_LIB; use PYTHON2_SITELIB instead.


PYTHON2_SITELIB

[ Top ] [ python2.cygclass ] [ Definitions ]

DESCRIPTION

Installation path for all Python extension modules.


LIBPYTHON2

[ Top ] [ python2.cygclass ] [ Definitions ]

DESCRIPTION

Link flags for the Python C library. This definition must be properly quoted.


python2into

[ Top ] [ python2.cygclass ] [ Install Functions ]

SYNOPSIS

  python2into SUBDIRECTORY

DESCRIPTION

Subdirectory of PYTHON2_SITELIB into which dopython2 should install. This is usually unnecessary.


dopython2

[ Top ] [ python2.cygclass ] [ Install Functions ]

SYNOPSIS

  [python2into SUBDIRECTORY]
  dopython2 MODULE1 [MODULE2] ...

DESCRIPTION

Installs the given Python module(s) (.py or .dll) into PYTHON2_SITELIB under $D, or a subdirectory thereof if python2into was previously called.


python2_optimize

[ Top ] [ python2.cygclass ] [ Install Functions ]

SYNOPSIS

  python2_optimize DIRECTORY [DIRECTORY] ...

DESCRIPTION

Bytecode-compile all Python modules found in the given directories under $D.

NOTE

Python modules installed with distutils_install are automatically compiled, as are those installed by automake-based packages *if* they have been declared as _PYTHON files (in which case a py-compile script will be present in $S). Some automake-based packages mistakenly declare these as _DATA instead, in which case either the Makefile.am must be patched or this function called after cyginstall.


python2_fix_shebang

[ Top ] [ python2.cygclass ] [ Install Functions ]

SYNOPSIS

  python2_fix_shebang SCRIPT [SCRIPT ...]

DESCRIPTION

Fixes the designated interpreter of SCRIPT to PYTHON2. This would be necessary if the original uses an incorrect path (e.g. /usr/local/bin) or an incorrectly versioned binary. SCRIPT need not be prefixed by $D.