/[gentoo-x86]/eclass/python.eclass
Gentoo

Diff of /eclass/python.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.143 Revision 1.144
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2012 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.143 2011/12/19 01:29:57 robbat2 Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.144 2012/01/01 05:02:27 floppym Exp $
4 4
5# @ECLASS: python.eclass 5# @ECLASS: python.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Gentoo Python Project <python@gentoo.org> 7# Gentoo Python Project <python@gentoo.org>
8# @BLURB: Eclass for Python packages 8# @BLURB: Eclass for Python packages
9# @DESCRIPTION: 9# @DESCRIPTION:
10# The python eclass contains miscellaneous, useful functions for Python packages. 10# The python eclass contains miscellaneous, useful functions for Python packages.
11 11
12# Must call inherit before EXPORT_FUNCTIONS to avoid QA warning.
13if [[ -z "${_PYTHON_ECLASS_INHERITED}" ]]; then
12inherit multilib 14 inherit multilib
15fi
16
17# Export pkg_setup every time to avoid issues with eclass inheritance order.
18if ! has "${EAPI:-0}" 0 1 2 3 || { has "${EAPI:-0}" 2 3 && [[ -n "${PYTHON_USE_WITH}" || -n "${PYTHON_USE_WITH_OR}" ]]; }; then
19 EXPORT_FUNCTIONS pkg_setup
20fi
21
22# Avoid processing this eclass more than once.
23if [[ -z "${_PYTHON_ECLASS_INHERITED}" ]]; then
24_PYTHON_ECLASS_INHERITED="1"
13 25
14if ! has "${EAPI:-0}" 0 1 2 3 4; then 26if ! has "${EAPI:-0}" 0 1 2 3 4; then
15 die "API of python.eclass in EAPI=\"${EAPI}\" not established" 27 die "API of python.eclass in EAPI=\"${EAPI}\" not established"
16fi 28fi
17 29
460 unset -f python_pkg_setup_check_USE_flags 472 unset -f python_pkg_setup_check_USE_flags
461 fi 473 fi
462 474
463 PYTHON_PKG_SETUP_EXECUTED="1" 475 PYTHON_PKG_SETUP_EXECUTED="1"
464} 476}
465
466if ! has "${EAPI:-0}" 0 1 2 3 || { has "${EAPI:-0}" 2 3 && [[ -n "${PYTHON_USE_WITH}" || -n "${PYTHON_USE_WITH_OR}" ]]; }; then
467 EXPORT_FUNCTIONS pkg_setup
468fi
469 477
470_PYTHON_SHEBANG_BASE_PART_REGEX='^#![[:space:]]*([^[:space:]]*/usr/bin/env[[:space:]]+)?([^[:space:]]*/)?(jython|pypy-c|python)' 478_PYTHON_SHEBANG_BASE_PART_REGEX='^#![[:space:]]*([^[:space:]]*/usr/bin/env[[:space:]]+)?([^[:space:]]*/)?(jython|pypy-c|python)'
471 479
472# @FUNCTION: python_convert_shebangs 480# @FUNCTION: python_convert_shebangs
473# @USAGE: [-q|--quiet] [-r|--recursive] [-x|--only-executables] [--] <Python_ABI|Python_version> <file|directory> [files|directories] 481# @USAGE: [-q|--quiet] [-r|--recursive] [-x|--only-executables] [--] <Python_ABI|Python_version> <file|directory> [files|directories]
3112} 3120}
3113 3121
3114# ================================================================================================ 3122# ================================================================================================
3115# ===================================== DEPRECATED FUNCTIONS ===================================== 3123# ===================================== DEPRECATED FUNCTIONS =====================================
3116# ================================================================================================ 3124# ================================================================================================
3125
3126fi # _PYTHON_ECLASS_INHERITED

Legend:
Removed from v.1.143  
changed lines
  Added in v.1.144

  ViewVC Help
Powered by ViewVC 1.1.20