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

Diff of /eclass/python.eclass

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

Revision 1.99 Revision 1.100
1# Copyright 1999-2010 Gentoo Foundation 1# Copyright 1999-2010 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.99 2010/05/25 19:49:54 arfrever Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.100 2010/05/29 16:39:13 arfrever 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
1921 done < <(find "${path}" "(" -name "*.py[co]" -o -name "*\$py.class" ")" -print0) 1921 done < <(find "${path}" "(" -name "*.py[co]" -o -name "*\$py.class" ")" -print0)
1922 1922
1923 if [[ "${EBUILD_PHASE}" == "postrm" ]]; then 1923 if [[ "${EBUILD_PHASE}" == "postrm" ]]; then
1924 # Delete empty child directories. 1924 # Delete empty child directories.
1925 find "${path}" -type d | sort -r | while read -r dir; do 1925 find "${path}" -type d | sort -r | while read -r dir; do
1926 rmdir "${dir}" 2> /dev/null && echo "${_CYAN}<<< ${dir}${_NORMAL}" 1926 if rmdir "${dir}" 2> /dev/null; then
1927 echo "${_CYAN}<<< ${dir}${_NORMAL}"
1928 fi
1927 done 1929 done
1928 fi 1930 fi
1929 elif [[ "${path}" == *.py ]]; then 1931 elif [[ "${path}" == *.py ]]; then
1930 base_module_name="${path##*/}" 1932 base_module_name="${path##*/}"
1931 base_module_name="${base_module_name%.py}" 1933 base_module_name="${base_module_name%.py}"
1977 fi 1979 fi
1978 1980
1979 # Delete empty parent directories. 1981 # Delete empty parent directories.
1980 dir="${compiled_file%/*}" 1982 dir="${compiled_file%/*}"
1981 while [[ "${dir}" != "${root}" ]]; do 1983 while [[ "${dir}" != "${root}" ]]; do
1982 if rmdir "${compiled_file%/*}" 2> /dev/null; then 1984 if rmdir "${dir}" 2> /dev/null; then
1983 echo "${_CYAN}<<< ${compiled_file%/*}${_NORMAL}" 1985 echo "${_CYAN}<<< ${dir}${_NORMAL}"
1984 else 1986 else
1985 break 1987 break
1986 fi 1988 fi
1987 dir="${dir%/*}" 1989 dir="${dir%/*}"
1988 done 1990 done

Legend:
Removed from v.1.99  
changed lines
  Added in v.1.100

  ViewVC Help
Powered by ViewVC 1.1.20