| 1 | # Copyright 1999-2012 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-distutils-ng.eclass,v 1.10 2012/04/03 19:12:46 nelchael Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/python-distutils-ng.eclass,v 1.11 2012/04/03 19:21:45 nelchael Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: python-distutils-ng |
5 | # @ECLASS: python-distutils-ng |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # Python herd <python@gentoo.org> |
7 | # Python herd <python@gentoo.org> |
| 8 | # @AUTHOR: |
8 | # @AUTHOR: |
| … | |
… | |
| 200 | python?_?) |
200 | python?_?) |
| 201 | return 0 ;; |
201 | return 0 ;; |
| 202 | *) |
202 | *) |
| 203 | return 1 ;; |
203 | return 1 ;; |
| 204 | esac |
204 | esac |
|
|
205 | } |
|
|
206 | |
|
|
207 | # @FUNCTION: python-distutils-ng_redoscript |
|
|
208 | # @USAGE: script_file_path [destination_directory] |
|
|
209 | # @DESCRIPTION: |
|
|
210 | # Reinstall script installed already by setup.py. This works by first moving the |
|
|
211 | # script to ${T} directory and later running python-distutils-ng_doscript on it. |
|
|
212 | # script_file_path has to be a full path relative to ${D}. |
|
|
213 | python-distutils-ng_redoscript() { |
|
|
214 | local sbn="$(basename "${1}")" |
|
|
215 | mkdir -p "${T}/_${sbn}/" || die "failed to create directory" |
|
|
216 | mv "${D}/${1}" "${T}/_${sbn}/${sbn}" || die "failed to move file" |
|
|
217 | python-distutils-ng_doscript "${T}/_${sbn}/${sbn}" "${2}" |
| 205 | } |
218 | } |
| 206 | |
219 | |
| 207 | # @FUNCTION: python-distutils-ng_doscript |
220 | # @FUNCTION: python-distutils-ng_doscript |
| 208 | # @USAGE: script_file_name [destination_directory] |
221 | # @USAGE: script_file_name [destination_directory] |
| 209 | # @DESCRIPTION: |
222 | # @DESCRIPTION: |