Magellan Linux

Diff of /trunk/include/pypi.sminc

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

revision 29665 by niro, Tue Aug 29 12:33:04 2017 UTC revision 29776 by niro, Wed Oct 11 09:52:54 2017 UTC
# Line 1  Line 1 
1  # $Id$  # $Id$
2  # Pypi functions  # Pypi functions
3    
4    # default to build modules for multiple python versions (atm python2 and python3)
5    : ${PYPI_MULTIPLE_PYTHON_VERSIONS=1}
6    
7  # needs python  # needs python
8  sminclude python  sminclude python
9    
# Line 19  esac Line 22  esac
22    
23  : ${SRCDIR="${BUILDDIR}/${PYPI_MODULE}-${PVER}"}  : ${SRCDIR="${BUILDDIR}/${PYPI_MODULE}-${PVER}"}
24    
25  DEPEND="${DEPEND}  
26   >= dev-lang/python-2.7"  if [[ ${PYPI_MULTIPLE_PYTHON_VERSIONS} = 1 ]]
27    then
28     sminclude python2 python3
29     SPLIT_PACKAGES="python2-${PNAME} python3-${PNAME}"
30    
31     eval "split_info_python2-${PNAME}()
32     {
33     DEPEND=\"\${DEPEND}
34     >= dev-lang/python2-2.7\"
35     }"
36    
37     eval "split_info_python3-${PNAME}()
38     {
39     DEPEND=\"\${DEPEND}
40     >= dev-lang/python3-3.6\"
41     }"
42    
43    else
44     DEPEND="${DEPEND}
45     >= dev-lang/python-2.7"
46    fi
47    
48  SRC_URI=(  SRC_URI=(
49   ${SRC_URI[*]}   ${SRC_URI[*]}
# Line 33  UP2DATE="updatecmd_pypi ${PYPI_MODULE} $ Line 56  UP2DATE="updatecmd_pypi ${PYPI_MODULE} $
56    
57  pypi_src_prepare()  pypi_src_prepare()
58  {  {
59   python_src_prepare || die   if [[ ${PYPI_MULTIPLE_PYTHON_VERSIONS} = 1 ]]
60     then
61     python2_src_prepare || die
62     python3_src_prepare || die
63     else
64     python_src_prepare || die
65     fi
66  }  }
67    
68  pypi_src_compile()  pypi_src_compile()
69  {  {
70   local configure_opts="$@"   local configure_opts="$@"
71   python_src_compile ${configure_opts} || die  
72     if [[ ${PYPI_MULTIPLE_PYTHON_VERSIONS} = 1 ]]
73     then
74     python2_src_compile ${configure_opts} || die
75     python3_src_compile ${configure_opts} || die
76     else
77     python_src_compile ${configure_opts} || die
78     fi
79  }  }
80    
81  pypi_src_install()  pypi_src_install()
82  {  {
83   python_src_install || die   if [[ ${PYPI_MULTIPLE_PYTHON_VERSIONS} = 1 ]]
84     then
85     python2_src_install || die
86     python3_src_install || die
87     else
88     python_src_install || die
89     fi
90  }  }
91    
92  pypi_multilib_src_compile()  pypi_multilib_src_compile()
93  {  {
94   local configure_opts="$@"   local configure_opts="$@"
95   python_multilib_src_compile ${configure_opts} || die   python_multilib_src_compile ${configure_opts} || die
96    
97    }
98    
99    pypi_multilib_python2_src_compile()
100    {
101     local configure_opts="$@"
102    
103     if [[ ${PYPI_MULTIPLE_PYTHON_VERSIONS} = 1 ]]
104     then
105     python2_multilib_src_compile ${configure_opts} || die
106     python3_multilib_src_compile ${configure_opts} || die
107     else
108     python_multilib_src_compile ${configure_opts} || die
109     fi
110  }  }
111    
112  pypi_multilib_src_install()  pypi_multilib_src_install()
# Line 58  pypi_multilib_src_install() Line 114  pypi_multilib_src_install()
114   python_multilib_src_install || die   python_multilib_src_install || die
115  }  }
116    
117    eval "pypi_multilib_src_compile-python2-${PNAME}()
118    {
119     python2_multilib_src_install || die
120    }"
121    
122    eval "pypi_multilib_src_compile-python3-${PNAME}()
123    {
124     python3_multilib_src_install || die
125    }"
126    
127  export_inherits pypi src_prepare  export_inherits pypi src_prepare
128  if [[ ${MULTILIB_BUILD} = true ]]  if [[ ${MULTILIB_BUILD} = true ]]
129  then  then
130   export_inherits pypi_multilib src_compile src_install   if [[ ${PYPI_MULTIPLE_PYTHON_VERSIONS} = 1 ]]
131     then
132     export_inherits pypi_multilib src_compile src_install_python2-${PNAME} src_install_python3-${PNAME}
133     else
134     export_inherits pypi_multilib src_compile src_install
135     fi
136  else  else
137   export_inherits pypi src_compile src_install   export_inherits pypi src_compile src_install
138  fi  fi

Legend:
Removed from v.29665  
changed lines
  Added in v.29776