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

Diff of /eclass/python.eclass

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

Revision 1.83 Revision 1.84
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.83 2010/01/10 17:03:08 arfrever Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.84 2010/01/11 16:07:23 arfrever Exp $
4 4
5# @ECLASS: python.eclass 5# @ECLASS: python.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# python@gentoo.org 7# python@gentoo.org
8# @BLURB: A utility eclass that should be inherited by anything that deals with Python or Python modules. 8# @BLURB: A utility eclass that should be inherited by anything that deals with Python or Python modules.
184 if [[ -n "${ABI}" && "${ABI}" != "${DEFAULT_ABI}" && "${DEFAULT_ABI}" != "default" ]]; then 184 if [[ -n "${ABI}" && "${ABI}" != "${DEFAULT_ABI}" && "${DEFAULT_ABI}" != "default" ]]; then
185 echo -n "-${ABI}" 185 echo -n "-${ABI}"
186 fi 186 fi
187} 187}
188 188
189_python_implementation() {
190 if [[ "${CATEGORY}/${PN}" == "dev-lang/python" ]]; then
191 return 0
192 else
193 return 1
194 fi
195}
196
189# @FUNCTION: python_set_active_version 197# @FUNCTION: python_set_active_version
190# @USAGE: <Python_ABI|2|3> 198# @USAGE: <Python_ABI|2|3>
191# @DESCRIPTION: 199# @DESCRIPTION:
192# Set active version of Python. 200# Set active version of Python.
193python_set_active_version() { 201python_set_active_version() {
194 if [[ "$#" -ne "1" ]]; then 202 if [[ "$#" -ne "1" ]]; then
195 die "${FUNCNAME}() requires 1 argument" 203 die "${FUNCNAME}() requires 1 argument"
196 fi 204 fi
197 205
198 if [[ "$1" =~ ^[[:digit:]]+\.[[:digit:]]+$ ]]; then 206 if [[ "$1" =~ ^[[:digit:]]+\.[[:digit:]]+$ ]]; then
199 if ! has_version "dev-lang/python:$1"; then 207 if ! _python_implementation && ! has_version "dev-lang/python:$1"; then
200 die "${FUNCNAME}(): 'dev-lang/python:$1' isn't installed" 208 die "${FUNCNAME}(): 'dev-lang/python:$1' is not installed"
201 fi 209 fi
202 export EPYTHON="$(PYTHON "$1")" 210 export EPYTHON="$(PYTHON "$1")"
203 elif [[ "$1" == "2" ]]; then 211 elif [[ "$1" == "2" ]]; then
204 if ! has_version "=dev-lang/python-2*"; then 212 if ! _python_implementation && ! has_version "=dev-lang/python-2*"; then
205 die "${FUNCNAME}(): '=dev-lang/python-2*' isn't installed" 213 die "${FUNCNAME}(): '=dev-lang/python-2*' is not installed"
206 fi 214 fi
207 export EPYTHON="$(PYTHON -2)" 215 export EPYTHON="$(PYTHON -2)"
208 elif [[ "$1" == "3" ]]; then 216 elif [[ "$1" == "3" ]]; then
209 if ! has_version "=dev-lang/python-3*"; then 217 if ! _python_implementation && ! has_version "=dev-lang/python-3*"; then
210 die "${FUNCNAME}(): '=dev-lang/python-3*' isn't installed" 218 die "${FUNCNAME}(): '=dev-lang/python-3*' is not installed"
211 fi 219 fi
212 export EPYTHON="$(PYTHON -3)" 220 export EPYTHON="$(PYTHON -3)"
213 else 221 else
214 die "${FUNCNAME}(): Unrecognized argument '$1'" 222 die "${FUNCNAME}(): Unrecognized argument '$1'"
215 fi 223 fi
216 224
217 # PYTHON_ABI variable is intended to be used only in ebuilds/eclasses, 225 # PYTHON_ABI variable is intended to be used only in ebuilds/eclasses,
218 # so it doesn't need to be exported to subprocesses. 226 # so it does not need to be exported to subprocesses.
219 PYTHON_ABI="${EPYTHON#python}" 227 PYTHON_ABI="${EPYTHON#python}"
220 PYTHON_ABI="${PYTHON_ABI%%-*}" 228 PYTHON_ABI="${PYTHON_ABI%%-*}"
221} 229}
222 230
223unset PYTHON_ABIS 231unset PYTHON_ABIS
279 done 287 done
280 [[ "${support_ABI}" == "1" ]] && export PYTHON_ABIS+="${PYTHON_ABIS:+ }${PYTHON_ABI}" 288 [[ "${support_ABI}" == "1" ]] && export PYTHON_ABIS+="${PYTHON_ABIS:+ }${PYTHON_ABI}"
281 done 289 done
282 290
283 if [[ -z "${PYTHON_ABIS//[${IFS}]/}" ]]; then 291 if [[ -z "${PYTHON_ABIS//[${IFS}]/}" ]]; then
284 die "USE_PYTHON variable doesn't enable any version of Python supported by ${CATEGORY}/${PF}" 292 die "USE_PYTHON variable does not enable any version of Python supported by ${CATEGORY}/${PF}"
285 fi 293 fi
286 294
287 if [[ "${python2_enabled}" == "0" ]]; then 295 if [[ "${python2_enabled}" == "0" ]]; then
288 ewarn "USE_PYTHON variable doesn't enable any version of Python 2. This configuration is unsupported." 296 ewarn "USE_PYTHON variable does not enable any version of Python 2. This configuration is unsupported."
289 fi 297 fi
290 if [[ "${python3_enabled}" == "0" ]]; then 298 if [[ "${python3_enabled}" == "0" ]]; then
291 ewarn "USE_PYTHON variable doesn't enable any version of Python 3. This configuration is unsupported." 299 ewarn "USE_PYTHON variable does not enable any version of Python 3. This configuration is unsupported."
292 fi 300 fi
293 else 301 else
294 local python_version python2_version= python3_version= support_python_major_version 302 local python_version python2_version= python3_version= support_python_major_version
295 303
296 python_version="$(/usr/bin/python -c 'from sys import version_info; print(".".join([str(x) for x in version_info[:2]]))')" 304 python_version="$(/usr/bin/python -c 'from sys import version_info; print(".".join([str(x) for x in version_info[:2]]))')"
297 305
298 if has_version "=dev-lang/python-2*"; then 306 if has_version "=dev-lang/python-2*"; then
299 if [[ "$(readlink /usr/bin/python2)" != "python2."* ]]; then 307 if [[ "$(readlink /usr/bin/python2)" != "python2."* ]]; then
300 die "'/usr/bin/python2' isn't valid symlink" 308 die "'/usr/bin/python2' is not valid symlink"
301 fi 309 fi
302 310
303 python2_version="$(/usr/bin/python2 -c 'from sys import version_info; print(".".join([str(x) for x in version_info[:2]]))')" 311 python2_version="$(/usr/bin/python2 -c 'from sys import version_info; print(".".join([str(x) for x in version_info[:2]]))')"
304 312
305 for PYTHON_ABI in ${python2_supported_versions}; do 313 for PYTHON_ABI in ${python2_supported_versions}; do
312 [[ "${support_python_major_version}" == "1" ]] && break 320 [[ "${support_python_major_version}" == "1" ]] && break
313 done 321 done
314 if [[ "${support_python_major_version}" == "1" ]]; then 322 if [[ "${support_python_major_version}" == "1" ]]; then
315 for restricted_ABI in ${RESTRICT_PYTHON_ABIS}; do 323 for restricted_ABI in ${RESTRICT_PYTHON_ABIS}; do
316 if [[ "${python2_version}" == ${restricted_ABI} ]]; then 324 if [[ "${python2_version}" == ${restricted_ABI} ]]; then
317 die "Active version of Python 2 isn't supported by ${CATEGORY}/${PF}" 325 die "Active version of Python 2 is not supported by ${CATEGORY}/${PF}"
318 fi 326 fi
319 done 327 done
320 else 328 else
321 python2_version="" 329 python2_version=""
322 fi 330 fi
323 fi 331 fi
324 332
325 if has_version "=dev-lang/python-3*"; then 333 if has_version "=dev-lang/python-3*"; then
326 if [[ "$(readlink /usr/bin/python3)" != "python3."* ]]; then 334 if [[ "$(readlink /usr/bin/python3)" != "python3."* ]]; then
327 die "'/usr/bin/python3' isn't valid symlink" 335 die "'/usr/bin/python3' is not valid symlink"
328 fi 336 fi
329 337
330 python3_version="$(/usr/bin/python3 -c 'from sys import version_info; print(".".join([str(x) for x in version_info[:2]]))')" 338 python3_version="$(/usr/bin/python3 -c 'from sys import version_info; print(".".join([str(x) for x in version_info[:2]]))')"
331 339
332 for PYTHON_ABI in ${python3_supported_versions}; do 340 for PYTHON_ABI in ${python3_supported_versions}; do
339 [[ "${support_python_major_version}" == "1" ]] && break 347 [[ "${support_python_major_version}" == "1" ]] && break
340 done 348 done
341 if [[ "${support_python_major_version}" == "1" ]]; then 349 if [[ "${support_python_major_version}" == "1" ]]; then
342 for restricted_ABI in ${RESTRICT_PYTHON_ABIS}; do 350 for restricted_ABI in ${RESTRICT_PYTHON_ABIS}; do
343 if [[ "${python3_version}" == ${restricted_ABI} ]]; then 351 if [[ "${python3_version}" == ${restricted_ABI} ]]; then
344 die "Active version of Python 3 isn't supported by ${CATEGORY}/${PF}" 352 die "Active version of Python 3 is not supported by ${CATEGORY}/${PF}"
345 fi 353 fi
346 done 354 done
347 else 355 else
348 python3_version="" 356 python3_version=""
349 fi 357 fi
364 PYTHON_ABIS="${PYTHON_ABIS# }" 372 PYTHON_ABIS="${PYTHON_ABIS# }"
365 export PYTHON_ABIS="${PYTHON_ABIS% }" 373 export PYTHON_ABIS="${PYTHON_ABIS% }"
366 fi 374 fi
367 fi 375 fi
368 376
369 if [[ "$(declare -p PYTHON_ABIS_SANITY_CHECKS 2> /dev/null)" != "declare -- PYTHON_ABIS_SANITY_CHECKS="* ]]; then 377 if ! _python_implementation && [[ "$(declare -p PYTHON_ABIS_SANITY_CHECKS 2> /dev/null)" != "declare -- PYTHON_ABIS_SANITY_CHECKS="* ]]; then
370 local PYTHON_ABI 378 local PYTHON_ABI
371 for PYTHON_ABI in ${PYTHON_ABIS}; do 379 for PYTHON_ABI in ${PYTHON_ABIS}; do
372 # Ensure that appropriate version of Python is installed. 380 # Ensure that appropriate version of Python is installed.
373 if ! has_version "dev-lang/python:${PYTHON_ABI}"; then 381 if ! has_version "dev-lang/python:${PYTHON_ABI}"; then
374 die "dev-lang/python:${PYTHON_ABI} isn't installed" 382 die "dev-lang/python:${PYTHON_ABI} is not installed"
375 fi 383 fi
376 384
377 # Ensure that EPYTHON variable is respected. 385 # Ensure that EPYTHON variable is respected.
378 if [[ "$(EPYTHON="$(PYTHON)" python -c 'from sys import version_info; print(".".join([str(x) for x in version_info[:2]]))')" != "${PYTHON_ABI}" ]]; then 386 if [[ "$(EPYTHON="$(PYTHON)" python -c 'from sys import version_info; print(".".join([str(x) for x in version_info[:2]]))')" != "${PYTHON_ABI}" ]]; then
379 eerror "python: '$(type -p python)'" 387 eerror "python: '$(type -p python)'"
380 eerror "ABI: '${ABI}'" 388 eerror "ABI: '${ABI}'"
381 eerror "DEFAULT_ABI: '${DEFAULT_ABI}'" 389 eerror "DEFAULT_ABI: '${DEFAULT_ABI}'"
382 eerror "EPYTHON: '$(PYTHON)'" 390 eerror "EPYTHON: '$(PYTHON)'"
383 eerror "PYTHON_ABI: '${PYTHON_ABI}'" 391 eerror "PYTHON_ABI: '${PYTHON_ABI}'"
384 eerror "Version of enabled Python: '$(EPYTHON="$(PYTHON)" python -c 'from sys import version_info; print(".".join([str(x) for x in version_info[:2]]))')'" 392 eerror "Version of enabled Python: '$(EPYTHON="$(PYTHON)" python -c 'from sys import version_info; print(".".join([str(x) for x in version_info[:2]]))')'"
385 die "'python' doesn't respect EPYTHON variable" 393 die "'python' does not respect EPYTHON variable"
386 fi 394 fi
387 done 395 done
388 PYTHON_ABIS_SANITY_CHECKS="1" 396 PYTHON_ABIS_SANITY_CHECKS="1"
389 fi 397 fi
390} 398}
443 local dir="$1" 451 local dir="$1"
444 452
445 [[ -z "${PYTHON_ABI}" ]] && die "PYTHON_ABI variable not set" 453 [[ -z "${PYTHON_ABI}" ]] && die "PYTHON_ABI variable not set"
446 [[ -z "${dir}" ]] && dir="build" 454 [[ -z "${dir}" ]] && dir="build"
447 455
448 # Don't delete preexistent directories. 456 # Do not delete preexistent directories.
449 rm -f "${dir}" || die "Deletion of '${dir}' failed" 457 rm -f "${dir}" || die "Deletion of '${dir}' failed"
450 ln -s "${dir}-${PYTHON_ABI}" "${dir}" || die "Creation of '${dir}' directory symlink failed" 458 ln -s "${dir}-${PYTHON_ABI}" "${dir}" || die "Creation of '${dir}' directory symlink failed"
451} 459}
452 460
453# @FUNCTION: python_execute_function 461# @FUNCTION: python_execute_function
507 fi 515 fi
508 function="$1" 516 function="$1"
509 shift 517 shift
510 518
511 if [[ -z "$(type -t "${function}")" ]]; then 519 if [[ -z "$(type -t "${function}")" ]]; then
512 die "${FUNCNAME}(): '${function}' function isn't defined" 520 die "${FUNCNAME}(): '${function}' function is not defined"
513 fi 521 fi
514 else 522 else
515 if [[ "$#" -ne "0" ]]; then 523 if [[ "$#" -ne "0" ]]; then
516 die "${FUNCNAME}(): '--default-function' option and function name cannot be specified simultaneously" 524 die "${FUNCNAME}(): '--default-function' option and function name cannot be specified simultaneously"
517 fi 525 fi
638 else 646 else
639 die "${failure_message}" 647 die "${failure_message}"
640 fi 648 fi
641 fi 649 fi
642 650
643 # Ensure that directory stack hasn't been decreased. 651 # Ensure that directory stack has not been decreased.
644 if [[ "$(dirs -p | wc -l)" -lt "${previous_directory_stack_length}" ]]; then 652 if [[ "$(dirs -p | wc -l)" -lt "${previous_directory_stack_length}" ]]; then
645 die "Directory stack decreased illegally" 653 die "Directory stack decreased illegally"
646 fi 654 fi
647 655
648 # Avoid side effects of earlier returning from the specified function. 656 # Avoid side effects of earlier returning from the specified function.
649 while [[ "$(dirs -p | wc -l)" -gt "${previous_directory_stack_length}" ]]; do 657 while [[ "$(dirs -p | wc -l)" -gt "${previous_directory_stack_length}" ]]; do
650 popd > /dev/null || die "popd failed" 658 popd > /dev/null || die "popd failed"
651 done 659 done
652 660
653 # Ensure that the bottom part of directory stack hasn't been changed. Restore 661 # Ensure that the bottom part of directory stack has not been changed. Restore
654 # previous directory (from before running of the specified function) before 662 # previous directory (from before running of the specified function) before
655 # comparison of directory stacks to avoid mismatch of directory stacks after 663 # comparison of directory stacks to avoid mismatch of directory stacks after
656 # potential using of 'cd' to change current directory. Restoration of previous 664 # potential using of 'cd' to change current directory. Restoration of previous
657 # directory allows to safely use 'cd' to change current directory in the 665 # directory allows to safely use 'cd' to change current directory in the
658 # specified function without changing it back to original directory. 666 # specified function without changing it back to original directory.
712 python_version="$1" 720 python_version="$1"
713 shift 721 shift
714 722
715 for argument in "$@"; do 723 for argument in "$@"; do
716 if [[ ! -e "${argument}" ]]; then 724 if [[ ! -e "${argument}" ]]; then
717 die "${FUNCNAME}(): '${argument}' doesn't exist" 725 die "${FUNCNAME}(): '${argument}' does not exist"
718 elif [[ -f "${argument}" ]]; then 726 elif [[ -f "${argument}" ]]; then
719 files+=("${argument}") 727 files+=("${argument}")
720 elif [[ -d "${argument}" ]]; then 728 elif [[ -d "${argument}" ]]; then
721 if [[ "${recursive}" == "1" ]]; then 729 if [[ "${recursive}" == "1" ]]; then
722 if [[ "${only_executables}" == "1" ]]; then 730 if [[ "${only_executables}" == "1" ]]; then
723 files+=($(find "${argument}" -perm /111 -type f)) 731 files+=($(find "${argument}" -perm /111 -type f))
724 else 732 else
725 files+=($(find "${argument}" -type f)) 733 files+=($(find "${argument}" -type f))
726 fi 734 fi
727 else 735 else
728 die "${FUNCNAME}(): '${argument}' isn't a regular file" 736 die "${FUNCNAME}(): '${argument}' is not a regular file"
729 fi 737 fi
730 else 738 else
731 die "${FUNCNAME}(): '${argument}' isn't a regular file or a directory" 739 die "${FUNCNAME}(): '${argument}' is not a regular file or a directory"
732 fi 740 fi
733 done 741 done
734 742
735 for file in "${files[@]}"; do 743 for file in "${files[@]}"; do
736 file="${file#./}" 744 file="${file#./}"
1008fi 1016fi
1009 1017
1010# @FUNCTION: python_disable_pyc 1018# @FUNCTION: python_disable_pyc
1011# @DESCRIPTION: 1019# @DESCRIPTION:
1012# Tell Python not to automatically recompile modules to .pyc/.pyo 1020# Tell Python not to automatically recompile modules to .pyc/.pyo
1013# even if the timestamps/version stamps don't match. This is done 1021# even if the timestamps/version stamps do not match. This is done
1014# to protect sandbox. 1022# to protect sandbox.
1015python_disable_pyc() { 1023python_disable_pyc() {
1016 export PYTHONDONTWRITEBYTECODE="1" 1024 export PYTHONDONTWRITEBYTECODE="1"
1017} 1025}
1018 1026
1025} 1033}
1026 1034
1027# @FUNCTION: python_need_rebuild 1035# @FUNCTION: python_need_rebuild
1028# @DESCRIPTION: Run without arguments, specifies that the package should be 1036# @DESCRIPTION: Run without arguments, specifies that the package should be
1029# rebuilt after a python upgrade. 1037# rebuilt after a python upgrade.
1038# Do not use this function in ebuilds of packages supporting installation
1039# for multiple versions of Python.
1030python_need_rebuild() { 1040python_need_rebuild() {
1031 export PYTHON_NEED_REBUILD="$(PYTHON -A --ABI)" 1041 export PYTHON_NEED_REBUILD="$(PYTHON -A --ABI)"
1032} 1042}
1033 1043
1034# @FUNCTION: python_get_includedir 1044# @FUNCTION: python_get_includedir
1163 ;; 1173 ;;
1164 -*) 1174 -*)
1165 ewarn "${FUNCNAME}: Ignoring compile option $1" 1175 ewarn "${FUNCNAME}: Ignoring compile option $1"
1166 ;; 1176 ;;
1167 *) 1177 *)
1168 if [[ "$1" =~ ^/usr/lib(32|64)?/python[[:digit:]]+\.[[:digit:]]+ ]]; then 1178 if ! _python_implementation && [[ "$1" =~ ^/usr/lib(32|64)?/python[[:digit:]]+\.[[:digit:]]+ ]]; then
1169 die "${FUNCNAME} doesn't support absolute paths of directories/files in site-packages directories" 1179 die "${FUNCNAME} does not support absolute paths of directories/files in site-packages directories"
1170 elif [[ "$1" =~ ^/ ]]; then 1180 elif [[ "$1" =~ ^/ ]]; then
1171 if [[ -d "${root}/$1" ]]; then 1181 if [[ -d "${root}/$1" ]]; then
1172 other_dirs+=("${root}/$1") 1182 other_dirs+=("${root}/$1")
1173 elif [[ -f "${root}/$1" ]]; then 1183 elif [[ -f "${root}/$1" ]]; then
1174 other_files+=("${root}/$1") 1184 other_files+=("${root}/$1")
1175 elif [[ -e "${root}/$1" ]]; then 1185 elif [[ -e "${root}/$1" ]]; then
1176 ewarn "'${root}/$1' is not a file or a directory!" 1186 ewarn "'${root}/$1' is not a file or a directory!"
1177 else 1187 else
1178 ewarn "'${root}/$1' doesn't exist!" 1188 ewarn "'${root}/$1' does not exist!"
1179 fi 1189 fi
1180 else 1190 else
1181 for PYTHON_ABI in ${PYTHON_ABIS-${PYTHON_ABI-$(PYTHON -A --ABI)}}; do 1191 for PYTHON_ABI in ${PYTHON_ABIS-${PYTHON_ABI-$(PYTHON -A --ABI)}}; do
1182 if [[ -d "${root}$(python_get_sitedir)/$1" ]]; then 1192 if [[ -d "${root}$(python_get_sitedir)/$1" ]]; then
1183 site_packages_dirs+=("$1") 1193 site_packages_dirs+=("$1")
1186 site_packages_files+=("$1") 1196 site_packages_files+=("$1")
1187 break 1197 break
1188 elif [[ -e "${root}$(python_get_sitedir)/$1" ]]; then 1198 elif [[ -e "${root}$(python_get_sitedir)/$1" ]]; then
1189 ewarn "'$1' is not a file or a directory!" 1199 ewarn "'$1' is not a file or a directory!"
1190 else 1200 else
1191 ewarn "'$1' doesn't exist!" 1201 ewarn "'$1' does not exist!"
1192 fi 1202 fi
1193 done 1203 done
1194 fi 1204 fi
1195 ;; 1205 ;;
1196 esac 1206 esac
1221 eend "${return_code}" 1231 eend "${return_code}"
1222 fi 1232 fi
1223 unset site_packages_absolute_dirs site_packages_absolute_files 1233 unset site_packages_absolute_dirs site_packages_absolute_files
1224 done 1234 done
1225 1235
1226 # Don't use PYTHON_ABI in next calls to python_get_libdir(). 1236 # Do not use PYTHON_ABI in next calls to python_get_libdir().
1227 unset PYTHON_ABI 1237 unset PYTHON_ABI
1228 1238
1229 if ((${#other_dirs[@]})) || ((${#other_files[@]})); then 1239 if ((${#other_dirs[@]})) || ((${#other_files[@]})); then
1230 return_code="0" 1240 return_code="0"
1231 ebegin "Compilation and optimization of Python modules placed outside of site-packages directories for Python $(PYTHON -A --ABI)" 1241 ebegin "Compilation and optimization of Python modules placed outside of site-packages directories for Python $(PYTHON -A --ABI)"
1265 # Files are passed to python_mod_compile which is ROOT-aware 1275 # Files are passed to python_mod_compile which is ROOT-aware
1266 myfiles+=("$1") 1276 myfiles+=("$1")
1267 elif [[ -e "${myroot}/$1" ]]; then 1277 elif [[ -e "${myroot}/$1" ]]; then
1268 ewarn "${myroot}/$1 is not a file or directory!" 1278 ewarn "${myroot}/$1 is not a file or directory!"
1269 else 1279 else
1270 ewarn "${myroot}/$1 doesn't exist!" 1280 ewarn "${myroot}/$1 does not exist!"
1271 fi 1281 fi
1272 ;; 1282 ;;
1273 esac 1283 esac
1274 shift 1284 shift
1275 done 1285 done
1312 root="${ROOT%/}" 1322 root="${ROOT%/}"
1313 1323
1314 if (($#)); then 1324 if (($#)); then
1315 if ! has "${EAPI:-0}" 0 1 2 || [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then 1325 if ! has "${EAPI:-0}" 0 1 2 || [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then
1316 while (($#)); do 1326 while (($#)); do
1317 if [[ "$1" =~ ^/usr/lib(32|64)?/python[[:digit:]]+\.[[:digit:]]+ ]]; then 1327 if ! _python_implementation && [[ "$1" =~ ^/usr/lib(32|64)?/python[[:digit:]]+\.[[:digit:]]+ ]]; then
1318 die "${FUNCNAME} doesn't support absolute paths of directories/files in site-packages directories" 1328 die "${FUNCNAME} does not support absolute paths of directories/files in site-packages directories"
1319 elif [[ "$1" =~ ^/ ]]; then 1329 elif [[ "$1" =~ ^/ ]]; then
1320 SEARCH_PATH+=("${root}/${1#/}") 1330 SEARCH_PATH+=("${root}/${1#/}")
1321 else 1331 else
1322 for PYTHON_ABI in ${PYTHON_ABIS-${PYTHON_ABI-$(PYTHON -A --ABI)}}; do 1332 for PYTHON_ABI in ${PYTHON_ABIS-${PYTHON_ABI-$(PYTHON -A --ABI)}}; do
1323 SEARCH_PATH+=("${root}$(python_get_sitedir)/$1") 1333 SEARCH_PATH+=("${root}$(python_get_sitedir)/$1")

Legend:
Removed from v.1.83  
changed lines
  Added in v.1.84

  ViewVC Help
Powered by ViewVC 1.1.20