Contents of /branches/R11-unstable/include/pypi.sminc
Parent Directory | Revision Log
Revision 24893 -
(show annotations)
(download)
Tue Nov 25 02:21:44 2014 UTC (9 years, 11 months ago) by niro
File size: 1276 byte(s)
Tue Nov 25 02:21:44 2014 UTC (9 years, 11 months ago) by niro
File size: 1276 byte(s)
-release R11-unstable
1 | # $Id$ |
2 | # Pypi functions |
3 | |
4 | # needs python |
5 | sminclude python |
6 | |
7 | : ${PYPI_MODULE="${PNAME}"} |
8 | : ${PYPI_ARCHIVE="gz"} |
9 | |
10 | # some sane defaults |
11 | : ${PCAT="dev-python"} |
12 | # always lower letters |
13 | : ${HOMEPAGE="http://pypi.python.org/pypi/${PYPI_MODULE}"} |
14 | |
15 | case ${PYPI_ARCHIVE} in |
16 | gz|bz2) : ${SRCFILE="${PYPI_MODULE}-${PVER}.tar.${PYPI_ARCHIVE}"} ;; |
17 | *) : ${SRCFILE="${PYPI_MODULE}-${PVER}.${PYPI_ARCHIVE}"} ;; |
18 | esac |
19 | |
20 | : ${SRCDIR="${BUILDDIR}/${PYPI_MODULE}-${PVER}"} |
21 | |
22 | DEPEND="${DEPEND} |
23 | >= dev-lang/python-2.7" |
24 | |
25 | SRC_URI=( |
26 | ${SRC_URI[*]} |
27 | https://pypi.python.org/packages/source/${PYPI_MODULE:0:1}/${PYPI_MODULE}/${SRCFILE} |
28 | mirror://${PNAME}/${SRCFILE} |
29 | ) |
30 | |
31 | UP2SUBSTITUTE=".asc" |
32 | UP2DATE="updatecmd_pypi ${PYPI_MODULE} ${PYPI_ARCHIVE}" |
33 | |
34 | pypi_src_prepare() |
35 | { |
36 | python_src_prepare || die |
37 | } |
38 | |
39 | pypi_src_compile() |
40 | { |
41 | local configure_opts="$@" |
42 | python_src_compile ${configure_opts} || die |
43 | } |
44 | |
45 | pypi_src_install() |
46 | { |
47 | python_src_install || die |
48 | } |
49 | |
50 | pypi_multilib_src_compile() |
51 | { |
52 | local configure_opts="$@" |
53 | python_multilib_src_compile ${configure_opts} || die |
54 | } |
55 | |
56 | pypi_multilib_src_install() |
57 | { |
58 | python_multilib_src_install || die |
59 | } |
60 | |
61 | export_inherits pypi src_prepare |
62 | if [[ ${MULTILIB_BUILD} = true ]] |
63 | then |
64 | export_inherits pypi_multilib src_compile src_install |
65 | else |
66 | export_inherits pypi src_compile src_install |
67 | fi |