| 1 | # Copyright 1999-2011 Gentoo Foundation |
1 | # Copyright 1999-2011 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.112 2011/07/04 10:50:28 djc Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.113 2011/07/04 10:59:25 djc 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 |
| … | |
… | |
| 600 | fi |
600 | fi |
| 601 | |
601 | |
| 602 | python_copy_sources |
602 | python_copy_sources |
| 603 | } |
603 | } |
| 604 | |
604 | |
| 605 | for python_default_function in src_configure src_compile src_test src_install; do |
605 | for python_default_function in src_configure src_compile src_test; do |
| 606 | eval "python_${python_default_function}() { |
606 | eval "python_${python_default_function}() { |
| 607 | _python_check_python_pkg_setup_execution |
607 | _python_check_python_pkg_setup_execution |
| 608 | |
608 | |
| 609 | if ! _python_package_supporting_installation_for_multiple_python_abis; then |
609 | if ! _python_package_supporting_installation_for_multiple_python_abis; then |
| 610 | die \"\${FUNCNAME}() cannot be used in ebuilds of packages not supporting installation for multiple Python ABIs\" |
610 | die \"\${FUNCNAME}() cannot be used in ebuilds of packages not supporting installation for multiple Python ABIs\" |
| … | |
… | |
| 612 | |
612 | |
| 613 | python_execute_function -d -s -- \"\$@\" |
613 | python_execute_function -d -s -- \"\$@\" |
| 614 | }" |
614 | }" |
| 615 | done |
615 | done |
| 616 | unset python_default_function |
616 | unset python_default_function |
|
|
617 | |
|
|
618 | python_src_install() { |
|
|
619 | if ! _python_package_supporting_installation_for_multiple_python_abis; then |
|
|
620 | die "${FUNCNAME}() cannot be used in ebuilds of packages not supporting installation for multiple Python ABIs" |
|
|
621 | fi |
|
|
622 | |
|
|
623 | _python_check_python_pkg_setup_execution |
|
|
624 | |
|
|
625 | if has "${EAPI:-0}" 0 1 2 3; then |
|
|
626 | python_execute_function -d -s -- "$@" |
|
|
627 | else |
|
|
628 | python_installation() { |
|
|
629 | emake DESTDIR="${T}/images/${PYTHON_ABI}" install "$@" |
|
|
630 | } |
|
|
631 | python_execute_function -s python_installation "$@" |
|
|
632 | unset python_installation |
|
|
633 | |
|
|
634 | python_merge_intermediate_installation_images "${T}/images" |
|
|
635 | fi |
|
|
636 | } |
| 617 | |
637 | |
| 618 | if [[ -n "${PYTHON_EXPORT_PHASE_FUNCTIONS}" ]]; then |
638 | if [[ -n "${PYTHON_EXPORT_PHASE_FUNCTIONS}" ]]; then |
| 619 | EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install |
639 | EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install |
| 620 | fi |
640 | fi |
| 621 | fi |
641 | fi |