Cygport Reference Manual

### TABLE OF CONTENTS

- python3.cygclass

- PYTHON3
- PYTHON3_CONFIG
- PYTHON3_VERSION
- PYTHON3_PKGVERSION
- PYTHON3_ABIFLAGS
- PYTHON3_INCLUDEDIR
- PYTHON3_LIB
- PYTHON3_SITELIB
- LIBPYTHON3
- python3into
- dopython3
- python3_optimize
- python3_fix_shebang

## python3.cygclass

[ Top ] [ Cygclasses ] [ Cygclasses ]

SYNOPSIS

      inherit python3

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.

The new 3.x versions of Python are incompatible with the widely used 2.x versions, so they are designed to be installed in parallel as separate interpreters.

This cygclass provides definitions and some install helpers which can be used by any Python3-based package. Python3 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 Python3 packages are Distutils and autotools.

NOTE

python3.cygclass is for the 3.x versions of Python; for the 2.x versions, see python2.cygclass.

INHERITED BY

python-wheel.cygclass

REQUIRES

python3

## PYTHON3

[ Top ] [ python3.cygclass ] [ Definitions ]

DESCRIPTION

Absolute path to the Python3 interpreter.

## PYTHON3_CONFIG

[ Top ] [ python3.cygclass ] [ Definitions ]

DESCRIPTION

Absolute path to the Python3 config script.

## PYTHON3_VERSION

[ Top ] [ python3.cygclass ] [ Definitions ]

DESCRIPTION

The major.minor version of the current Python3 interpreter.

## PYTHON3_PKGVERSION

[ Top ] [ python3.cygclass ] [ Definitions ]

DESCRIPTION

The $major$minor version (without a dot) for use in package names.

## PYTHON3_ABIFLAGS

[ Top ] [ python3.cygclass ] [ Definitions ]

DESCRIPTION

The ABI flags of the current Python3 interpreter, as used in the names of the interpreter, config script and subdir, shared library, and includedir.

## PYTHON3_INCLUDEDIR

[ Top ] [ python3.cygclass ] [ Definitions ]

DESCRIPTION

Path containing the Python3 C library headers.

## PYTHON3_LIB

[ Top ] [ python3.cygclass ] [ Definitions ]

DESCRIPTION

Path containing the Python3 standard library.

NOTE

Never install third-party extensions into PYTHON3_LIB; use PYTHON3_SITELIB instead.

## PYTHON3_SITELIB

[ Top ] [ python3.cygclass ] [ Definitions ]

DESCRIPTION

Installation path for all Python3 extension modules.

## LIBPYTHON3

[ Top ] [ python3.cygclass ] [ Definitions ]

DESCRIPTION

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

## python3into

[ Top ] [ python3.cygclass ] [ Install Functions ]

SYNOPSIS

      python3into SUBDIRECTORY

DESCRIPTION

Subdirectory of PYTHON3_SITELIB into which dopython3 should install. This is usually unnecessary.

## dopython3

[ Top ] [ python3.cygclass ] [ Install Functions ]

SYNOPSIS

      [python3into SUBDIRECTORY]
      dopython3 MODULE1 [MODULE2] ...

DESCRIPTION

Installs the given Python3 module(s) (.py or .dll) into PYTHON3_SITELIB under $D, or a subdirectory thereof if python3into was previously called.

## python3_optimize

[ Top ] [ python3.cygclass ] [ Install Functions ]

SYNOPSIS

      python3_optimize DIRECTORY [DIRECTORY] ...

DESCRIPTION

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

## python3_fix_shebang

[ Top ] [ python3.cygclass ] [ Install Functions ]

SYNOPSIS

      python3_fix_shebang SCRIPT [SCRIPT ...]

DESCRIPTION

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