/home/Yaakov/src/cygport/tests/cygport-0.20.2-1.noarch/src/cygport-0.20.2/cygclass/python.cygclass

Cygport Reference Manual

### TABLE OF CONTENTS

- python.cygclass

- PYTHON
- PYTHON_VERSION
- PYTHON_INCLUDEDIR
- PYTHON_LIB
- PYTHON_SITELIB
- LIBPYTHON
- pythoninto
- dopython
- python_optimize
- python_fix_shebang
- LIBPYPY

## python.cygclass

[ Top ] [ Cygclasses ] [ Cygclasses ]

SYNOPSIS

      inherit python

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

python.cygclass is for the 2.x versions of CPython. For the 3.x versions, see python3.cygclass; for PyPy, see pypy.cygclass.

INHERITED BY

distutils.cygclass, pygtk.cygclass, rox.cygclass

REQUIRES

python

## PYTHON

[ Top ] [ python.cygclass ] [ Definitions ]

DESCRIPTION

Absolute path to the Python interpreter.

## PYTHON_VERSION

[ Top ] [ python.cygclass ] [ Definitions ]

DESCRIPTION

The major.minor version of the current Python interpreter.

## PYTHON_INCLUDEDIR

[ Top ] [ python.cygclass ] [ Definitions ]

DESCRIPTION

Path containing the Python C library headers.

## PYTHON_LIB

[ Top ] [ python.cygclass ] [ Definitions ]

DESCRIPTION

Path containing the Python standard library.

NOTE

Never install third-party extensions into PYTHON_LIB; use PYTHON_SITELIB instead.

## PYTHON_SITELIB

[ Top ] [ python.cygclass ] [ Definitions ]

DESCRIPTION

Installation path for all Python extension modules.

## LIBPYTHON

[ Top ] [ python.cygclass ] [ Definitions ]

DESCRIPTION

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

## pythoninto

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

SYNOPSIS

      pythoninto SUBDIRECTORY

DESCRIPTION

Subdirectory of PYTHON_SITELIB into which dopython should install. This is usually unnecessary.

## dopython

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

SYNOPSIS

      [pythoninto SUBDIRECTORY]
      dopython MODULE1 [MODULE2] ...

DESCRIPTION

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

## python_optimize

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

SYNOPSIS

      python_optimize [DIRECTORY1] [DIRECTORY2] ...

DESCRIPTION

Bytecode-compile all Python modules found in the given directories under $D. If no directories are specified, PYTHON_SITELIB under $D is assumed.

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.

## python_fix_shebang

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

SYNOPSIS

      python_fix_shebang SCRIPT [SCRIPT ...]

DESCRIPTION

Fixes the designated interpreter of SCRIPT to PYTHON. 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.