[Patches] [ python-Patches-1161914 ] python-config

SourceForge.net noreply at sourceforge.net
Sat Jun 11 15:15:57 CEST 2005


Patches item #1161914, was opened at 2005-03-12 11:44
Message generated for change (Comment added) made by tatsujin
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1161914&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Distutils and setup.py
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Andre Jonsson (tatsujin)
Assigned to: Nobody/Anonymous (nobody)
Summary: python-config

Initial Comment:
I'm not sure this is the correct place to do this, but I found the need 
for a python-config (similar to sdl-config, etc.) when building an 
C++ application that embeds python.

It accepts two arguments --cflags and --static-libs:

# ./python-config --cflags --static-libs 
-I/usr/include/python2.4
/usr/lib/python2.4/config/libpython2.4.a

I guess it could be expanded to do more, but it was all I needed.


----------------------------------------------------------------------

>Comment By: Andre Jonsson (tatsujin)
Date: 2005-06-11 15:15

Message:
Logged In: YES 
user_id=195710

1. php? Anyway, I see that the 'lib' attribute actually isn't an official one. Bad 
call from my part.
2. Yes, I'm ashamed to have commited such atrocities. :-)
3. Ah, I see. Didn't know about that one.

That said, as loewis stated previously this script should probably follow the 
pkg-config standard anyhow. I haven't gotten around to do anything further in 
this matter, unfortunately.

----------------------------------------------------------------------

Comment By: Michiel de Hoon (mdehoon)
Date: 2005-06-10 17:03

Message:
Logged In: YES 
user_id=488897

Three comments:

1) When running this script, I got the following error on
Unix and Cygwin:

$ python-config.php --cflags --static-libs
-I/usr/local/include/python2.4
Traceback (most recent call last):
  File "<string>", line 1, in ?
AttributeError: 'module' object has no attribute 'lib'

2) Since we are Pythoneers, why write this script as a
shell-script instead of a Python script? (sh may not even be
available on Windows).

3) Isn't it easier / more reliable to get this information
via distutils? See section 5.6 of "Extending and Embedding
the Python Interpreter".

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2005-03-14 20:14

Message:
Logged In: YES 
user_id=21627

It appears that the *-config programs (e.g. gtk-config, ...)
share command line options; this seems to be part of the
"pkg-config" system. I think we need to understand what
precisely the standard for these utilities is, and conform
to it.

----------------------------------------------------------------------

Comment By: Andre Jonsson (tatsujin)
Date: 2005-03-14 09:43

Message:
Logged In: YES 
user_id=195710

Ok. I'll make an attempt. What do you mean by "what 
specific options are expected from a *-config program" 
?


----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2005-03-13 23:47

Message:
Logged In: YES 
user_id=21627

This is the right place if you want this to be included in
the standard Python distribution. If you just want to share
it with others, the Python cookbook is a better place:

http://aspn.activestate.com/ASPN/Python/Cookbook/

In the current form, this is not acceptable, as it is
incomplete (e.g. there is no integration into the Python
build process, and we need to know what specific options are
expected from a *-config program, and implement them). Are
you willing to complete this?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1161914&group_id=5470


More information about the Patches mailing list