From 465f9229c824211eb4d9435b941d212051e59902 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Wed, 23 Dec 2009 02:07:11 +0100 Subject: [PATCH] python-module: enable configure and build stages. --HG-- extra : convert_revision : 0f12cbd184a51cae91f580be3e51c285e4de5c7a --- xbps-src/shutils/build_funcs.sh | 17 ++++++++++------- xbps-src/shutils/configure_funcs.sh | 12 +++++++++--- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/xbps-src/shutils/build_funcs.sh b/xbps-src/shutils/build_funcs.sh index 08b47d156f4..5d7d94c32a8 100644 --- a/xbps-src/shutils/build_funcs.sh +++ b/xbps-src/shutils/build_funcs.sh @@ -35,26 +35,29 @@ build_src_phase() # # Skip this phase for: meta-template, only-install, custom-install - # and python-module style builds. + # style builds. # [ "$build_style" = "meta-template" -o \ "$build_style" = "only-install" -o \ - "$build_style" = "custom-install" -o \ - "$build_style" = "python-module" ] && return 0 + "$build_style" = "custom-install" ] && return 0 [ ! -d $wrksrc ] && msg_error "unexistent build directory [$wrksrc]" cd $wrksrc || exit 1 [ -n "$revision" ] && pkg="${pkg}_${revision}" - [ -z "$make_cmd" ] && make_cmd=/usr/bin/make + if [ "$build_style" = "python-module" ]; then + make_cmd="python" + make_build_args="setup.py build" + else + [ -z "$make_cmd" ] && make_cmd=/usr/bin/make + [ -n "$XBPS_MAKEJOBS" -a -z "$disable_parallel_build" ] && \ + makejobs="-j$XBPS_MAKEJOBS" + fi # Run pre_build func. run_func pre_build || msg_error "pre_build stage failed!" - [ -n "$XBPS_MAKEJOBS" -a -z "$disable_parallel_build" ] && \ - makejobs="-j$XBPS_MAKEJOBS" - . $XBPS_SHUTILSDIR/buildvars_funcs.sh set_build_vars diff --git a/xbps-src/shutils/configure_funcs.sh b/xbps-src/shutils/configure_funcs.sh index 1949389636b..1d74c3e0a1a 100644 --- a/xbps-src/shutils/configure_funcs.sh +++ b/xbps-src/shutils/configure_funcs.sh @@ -41,13 +41,12 @@ configure_src_phase() # # Skip this phase for: meta-template, only-install, custom-install, - # gnu_makefile and python-module style builds. + # gnu_makefile style builds. # [ "$build_style" = "meta-template" -o \ "$build_style" = "only-install" -o \ "$build_style" = "custom-install" -o \ - "$build_style" = "gnu_makefile" -o \ - "$build_style" = "python-module" ] && return 0 + "$build_style" = "gnu_makefile" ] && return 0 if [ -n "$revision" ]; then lver="${version}_${revision}" @@ -97,6 +96,13 @@ configure_src_phase() . $XBPS_HELPERSDIR/perl-module.sh perl_module_build $pkgname ;; + python-module) + # + # Packages that are python modules and use setup.py files. + # They are all handled by the helper python-module.sh. + # + python setup.py configure ${configure_args} + ;; *) # # Unknown build_style type won't work :-)