Annotation of /trunk/include/pypi.sminc
Parent Directory
|
Revision Log
Revision 21032 -
(hide annotations)
(download)
Thu Mar 6 08:49:48 2014 UTC (10 years, 2 months ago) by niro
File size: 1204 byte(s)
Thu Mar 6 08:49:48 2014 UTC (10 years, 2 months ago) by niro
File size: 1204 byte(s)
-honor multilib
1 | niro | 20726 | # $Id$ |
2 | # Pypi functions | ||
3 | |||
4 | # needs python | ||
5 | sminclude python | ||
6 | |||
7 | : ${PYPI_MODULE="${PNAME}"} | ||
8 | niro | 20731 | : ${PYPI_ARCHIVE="gz"} |
9 | niro | 20726 | |
10 | # some sane defaults | ||
11 | : ${PCAT="dev-python"} | ||
12 | # always lower letters | ||
13 | : ${HOMEPAGE="http://pypi.python.org/pypi/${PYPI_MODULE}"} | ||
14 | niro | 20731 | |
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 | niro | 20726 | : ${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 | niro | 20742 | UP2DATE="updatecmd_pypi ${PYPI_MODULE} ${PYPI_ARCHIVE}" |
32 | niro | 20726 | |
33 | pypi_src_prepare() | ||
34 | { | ||
35 | python_src_prepare || die | ||
36 | } | ||
37 | |||
38 | pypi_src_compile() | ||
39 | { | ||
40 | local configure_opts="$@" | ||
41 | python_src_compile ${configure_opts} || die | ||
42 | } | ||
43 | |||
44 | niro | 21032 | pypi_multilib_src_compile() |
45 | niro | 20726 | { |
46 | niro | 21032 | local configure_opts="$@" |
47 | python_multilib_src_compile ${configure_opts} || die | ||
48 | niro | 20726 | } |
49 | |||
50 | niro | 21032 | pypi_multilib_src_install() |
51 | { | ||
52 | python_multilib_src_install || die | ||
53 | } | ||
54 | |||
55 | export_inherits pypi src_prepare | ||
56 | if [[ ${MULTILIB_BUILD} = true ]] | ||
57 | then | ||
58 | export_inherits pypi_multilib src_compile src_install | ||
59 | else | ||
60 | export_inherits pypi src_compile src_install | ||
61 | fi |