238 | | variant python26 conflicts python32 python31 python27 description {Build with python 2.6 support} { |
239 | | set mypydir ${prefix}/Library/Frameworks/Python.framework/Versions/2.6 |
240 | | configure.args-delete --disable-python |
241 | | configure.args-append --enable-python --with-python-incdir="${mypydir}/Headers" --with-python-libdir="${mypydir}" |
242 | | depends_lib-append port:python26 |
243 | | post-destroot { |
244 | | set mypylibdir ${prefix}/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 |
245 | | set mypysitedir ${mypylibdir}/site-packages/ |
246 | | file mkdir ${destroot}${mypysitedir} |
247 | | foreach pyfile [glob ${destroot}${prefix}/lib/root/*.py*] { move $pyfile ${destroot}${mypysitedir} } |
248 | | ln -sf ${prefix}/lib/root/libPyROOT.so ${destroot}${mypylibdir}/ |
249 | | } |
250 | | } |
| 237 | # ======================================================================================== |
| 238 | # Setup various python variants |
| 239 | # ======================================================================================== |
252 | | variant python27 conflicts python32 python31 python26 description {Build with python 2.7 support} { |
253 | | set mypydir ${prefix}/Library/Frameworks/Python.framework/Versions/2.7 |
254 | | configure.args-delete --disable-python |
255 | | configure.args-append --enable-python \ |
256 | | --with-python-incdir="${mypydir}/Headers" \ |
257 | | --with-python-libdir="${mypydir}" |
258 | | depends_lib-append port:python27 |
259 | | post-destroot { |
260 | | set mypylibdir ${prefix}/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 |
261 | | set mypysitedir ${mypylibdir}/site-packages/ |
262 | | file mkdir ${destroot}${mypysitedir} |
263 | | foreach pyfile [glob ${destroot}${prefix}/lib/root/*.py*] { move $pyfile ${destroot}${mypysitedir} } |
264 | | ln -sf ${prefix}/lib/root/libPyROOT.so ${destroot}${mypylibdir}/ |
| 241 | # List of possible python versions |
| 242 | set python_versions { 2.6 2.7 3.1 3.2 3.3 3.4 } |
| 243 | |
| 244 | # Define the available variants |
| 245 | foreach ver ${python_versions} { |
| 246 | set ver_no_dot [join [split ${ver} "."] ""] |
| 247 | set variant_line {variant python${ver_no_dot} description "Build with python ${ver} support"} |
| 248 | foreach over ${python_versions} { |
| 249 | if { ${ver} == ${over} } { continue } |
| 250 | set over_no_dot [join [split ${over} "."] ""] |
| 251 | append variant_line " conflicts python${over_no_dot}" |
268 | | variant python31 conflicts python32 python27 python26 description {Build with python 3.1 support} { |
269 | | set mypydir ${prefix}/Library/Frameworks/Python.framework/Versions/3.1 |
270 | | configure.args-delete --disable-python |
271 | | configure.args-append --enable-python --with-python-incdir="${mypydir}/Headers" --with-python-libdir="${mypydir}" |
272 | | depends_lib-append port:python31 |
273 | | post-destroot { |
274 | | set mypylibdir ${prefix}/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1 |
275 | | set mypysitedir ${mypylibdir}/site-packages/ |
276 | | file mkdir ${destroot}${mypysitedir} |
277 | | foreach pyfile [glob ${destroot}${prefix}/lib/root/*.py*] { move $pyfile ${destroot}${mypysitedir} } |
278 | | ln -sf ${prefix}/lib/root/libPyROOT.so ${destroot}${mypylibdir}/ |
| 257 | # Is a variant active ? |
| 258 | set active_python_variant "" |
| 259 | foreach ver ${python_versions} { |
| 260 | set ver_no_dot [join [split ${ver} "."] ""] |
| 261 | if {[variant_isset python${ver_no_dot}]} { |
| 262 | set active_python_variant ${ver} |