Magellan Linux

Diff of /trunk/include/python.sminc

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

revision 29773 by niro, Wed Oct 11 09:27:47 2017 UTC revision 33281 by niro, Wed Oct 23 11:27:48 2019 UTC
# Line 8  then Line 8  then
8   SDEPEND="${SDEPEND}   SDEPEND="${SDEPEND}
9   >= dev-lang/python-2.7"   >= dev-lang/python-2.7"
10  fi  fi
11  if [[ -z ${MAGE_PYTHON_BUILD_VERSIONS} ]]  
12  then  # call meson include in the smage2, to prevent unnecessary dependencies
13   MAGE_PYTHON_BUILD_VERSIONS="single"  #sminclude meson
 fi  
14    
15  # get the major.minor current installed python version  # get the major.minor current installed python version
16  # -> ex 2.4  # -> ex 2.4
# Line 19  mget-python-version() Line 18  mget-python-version()
18  {  {
19   local pyver   local pyver
20  # pyver="$(${MAGE_PYTHON_EXEC} -V 2>&1 | cut -d' ' -f2 | cut -d. -f1-2)"  # pyver="$(${MAGE_PYTHON_EXEC} -V 2>&1 | cut -d' ' -f2 | cut -d. -f1-2)"
21   pyver=$(${MAGE_PYTHON_EXEC} -c "import sys ; (print sys.version[:3])")   pyver=$(${MAGE_PYTHON_EXEC} -c "import sys ; print (sys.version[:3])")
22   [[ -z ${pyver} ]] && return 1   [[ -z ${pyver} ]] && return 1
23   echo "${pyver}"   echo "${pyver}"
24   return 0   return 0
# Line 74  python_docompile() Line 73  python_docompile()
73   then   then
74   ${MAGE_PYTHON_EXEC} waf configure --prefix=/usr --libdir=/usr/$(mlibdir) $@ || die   ${MAGE_PYTHON_EXEC} waf configure --prefix=/usr --libdir=/usr/$(mlibdir) $@ || die
75   ${MAGE_PYTHON_EXEC} waf build $@ || die   ${MAGE_PYTHON_EXEC} waf build $@ || die
76     elif [[ -e meson.build ]]
77     then
78     # never run multilib builds here, multilib will be enabled by python_multilib_src_compile
79     # this honors the logic of other build methods (python, waf, autotools)
80     MULTILIB_BUILD=false meson_configure -D python=${MAGE_PYTHON_EXEC} || die
81     MULTILIB_BUILD=false mninja || die
82   elif [[ -e configure ]]   elif [[ -e configure ]]
83   then   then
84   mconfigure $@ || die   if [[ ${MULTILIB_BUILD} = true ]] && [[ ! -z $(typeset -f oldmconfigure) ]]  && [[ ! -z $(typeset -f oldmmake) ]]
85   mmake || die   then
86     oldmconfigure $@ || die
87     oldmmake || die
88     else
89     mconfigure $@ || die
90     mmake || die
91     fi
92   elif [[ -e install.py ]]   elif [[ -e install.py ]]
93   then   then
94   echo "install.py found - nothing to compile here."   echo "install.py found - nothing to compile here."
# Line 94  python_doinstall() Line 105  python_doinstall()
105   elif [[ -e waf ]]   elif [[ -e waf ]]
106   then   then
107   ${MAGE_PYTHON_EXEC} waf install --destdir=${BINDIR} $@ || die   ${MAGE_PYTHON_EXEC} waf install --destdir=${BINDIR} $@ || die
108     elif [[ -e meson.build ]]
109     then
110     # never run multilib builds here, multilib will be enabled by python_multilib_src_compile
111     # this honors the logic of other build methods (python, waf, autotools)
112     MULTILIB=false DESTDIR=${BINDIR} mninja install || die
113   elif [[ -e install.py ]]   elif [[ -e install.py ]]
114   then   then
115   ${MAGE_PYTHON_EXEC} install.py --prefix=/usr --files-only --destdir=${BINDIR} $@ || die   ${MAGE_PYTHON_EXEC} install.py --prefix=/usr --files-only --destdir=${BINDIR} $@ || die
116   else   else
117   mmake DESTDIR=${BINDIR} install || die   if [[ ${MULTILIB_BUILD} = true ]] && [[ ! -z $(typeset -f oldmconfigure) ]]  && [[ ! -z $(typeset -f oldmmake) ]]
118     then
119     oldmmake DESTDIR=${BINDIR} install || die
120     else
121     mmake DESTDIR=${BINDIR} install || die
122     fi
123   fi   fi
124  }  }
125    
126  python_src_compile()  python_src_compile()
127  {  {
128   cd ${SRCDIR}   cd ${SRCDIR}
129   python_docompile || die   python_docompile $@ || die
130  }  }
131    
132  python_multilib_src_compile()  python_multilib_src_compile()
# Line 117  python_multilib_src_compile() Line 138  python_multilib_src_compile()
138   do   do
139   SRCDIR="${saved_SRCDIR}-${abi}/${SRCSUBDIR}"   SRCDIR="${saved_SRCDIR}-${abi}/${SRCSUBDIR}"
140   cd ${SRCDIR}   cd ${SRCDIR}
141   abi-${abi} python_docompile || die   abi-${abi} python_docompile $@ || die
142   done   done
143   SRCDIR="${saved_SRCDIR}"   SRCDIR="${saved_SRCDIR}"
144  }  }
# Line 130  python_src_check() Line 151  python_src_check()
151  python_src_install()  python_src_install()
152  {  {
153   cd ${SRCDIR}   cd ${SRCDIR}
154   python_doinstall || die   python_doinstall $@ || die
155    
156   local i   local i
157   for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \   for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \
# Line 152  python_multilib_src_install() Line 173  python_multilib_src_install()
173   do   do
174   SRCDIR="${saved_SRCDIR}-${abi}/${SRCSUBDIR}"   SRCDIR="${saved_SRCDIR}-${abi}/${SRCSUBDIR}"
175   cd ${SRCDIR}   cd ${SRCDIR}
176   abi-${abi} python_doinstall || die   abi-${abi} python_doinstall $@ || die
177    
178   local i   local i
179   for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \   for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \

Legend:
Removed from v.29773  
changed lines
  Added in v.33281