[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] libxenstat: fixed Makefile for building python-bindings



On Wed, Mar 04, 2020 at 06:29:39PM +0100, Jonas Licht wrote:
> Am 04.03.20 um 11:31 schrieb Wei Liu:
> > Hi Jonas
> Hi Wei
> > Thanks for this patch.
> >
> > On Mon, Mar 02, 2020 at 06:53:38PM +0100, jonas.licht@xxxxxxxxxxxxxxxxx 
> > wrote:
> >> Fixes the libxenstat Makefile to determine the correct paths
> >> of python includes when building python-bindings.
> >> Also replaces the -lxenstat linking to correct object files
> >> and use the libdir variable for installing.
> >>
> >> Signed-off-by: Jonas Licht <jonas.licht@xxxxxxxxxxxxxxxxx>
> >> ---
> >>  tools/xenstat/libxenstat/Makefile | 11 +++++------
> >>  1 file changed, 5 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/tools/xenstat/libxenstat/Makefile
> >> b/tools/xenstat/libxenstat/Makefile
> >> index 03cb212e3b..4a02d2e563 100644
> >> --- a/tools/xenstat/libxenstat/Makefile
> >> +++ b/tools/xenstat/libxenstat/Makefile
> >> @@ -114,18 +114,17 @@ $(BINDINGS): $(SHLIB) $(SHLIB_LINKS) src/xenstat.h
> >>  SWIG_FLAGS=-module xenstat -Isrc
> >>
> >>  # Python bindings
> >> -PYTHON_VERSION=$(PYTHON:python%=%)
> >> -PYTHON_FLAGS=-I/usr/include/python$(PYTHON_VERSION)
> >> -lpython$(PYTHON_VERSION)
> >> +PYTHON_FLAGS=`$(PYTHON) -c 'import distutils.sysconfig; print("-I" +
> > A better approach would be to use python-config here.
> I'm not quite sure if I can require the python-config tool is installed.
> As I see it's not checked by the configure.

python-config is installed as part of python-dev on Debian, as well as
Redhat/CentOS.

The configure script does check if python development package is
installed.

> I've seen some configure scripts, which has an extra fallback when
> python-config is missing.
> I was inspired by the m4/python_devel.m4 script too.

In any case, I think this patch is already an improvement over what is
in tree.

Acked-by: Wei Liu <wl@xxxxxxx>

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.