Bug 783627 - Blindly assume there's ${PYTHONVERS}-config command
Summary: Blindly assume there's ${PYTHONVERS}-config command
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: newt
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Lichvar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-21 07:12 UTC by yegle
Modified: 2013-03-20 14:46 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-20 14:46:52 UTC
Type: ---


Attachments (Terms of Use)

Description yegle 2012-01-21 07:12:31 UTC
During configure, newt will blindly assume there's ${PYTHONVERS}-config command without testing.

version: newt-0.52.14

In Makefile.in, about line 79:

_snackmodule.so:   snackmodule.c $(LIBNEWTSH)                                                                                 
    [ -n "$(PYTHONVERS)" ] && for ver in $(PYTHONVERS) ; do \
            mkdir -p $$ver ;\
            PCFLAGS=`$$ver-config --cflags`; \
            PIFLAGS=`$$ver-config --includes`; \
            PLDFLAGS=`$$ver-config --ldflags`; \
            PLFLAGS=`$$ver-config --libs`; \
            $(CC) $(CPPFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snackmodule.o snackmodule.c ;\
            $(CC) --shared $$PLDFLAGS $$PLFLAGS $(LDFLAGS) -o $$ver/_snackmodule.so $$ver/snackmodule.o -L.  -lnewt $(LIBS);\
    done || :
    touch $@

The Python version recognized by the configure script is `python2.7`, but there's only `python-config-2.7` command in my system (Gentoo Linux), no `python2.7-config` available.

In this situation, I suggest we should test if `python2.7-config` exists. If not, we should provide a warning information and use `python-config` instead.

Comment 1 Miroslav Lichvar 2013-03-20 14:46:52 UTC
Thanks for the report.

This should be now fixed in git, it looks for python-config if $ver-config is not found.

http://git.fedorahosted.org/cgit/newt.git/commit/?id=2da168987a799b2eb141e3b53afe542b26db6e8c


Note You need to log in before you can comment on or make changes to this bug.