Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python-config #41685

Closed
tatsujin mannequin opened this issue Mar 12, 2005 · 9 comments
Closed

python-config #41685

tatsujin mannequin opened this issue Mar 12, 2005 · 9 comments
Labels
stdlib Python modules in the Lib dir

Comments

@tatsujin
Copy link
Mannequin

tatsujin mannequin commented Mar 12, 2005

BPO 1161914
Nosy @loewis, @birkenfeld
Files
  • python-config: python-config script for building embedding application.
  • python-config: new version, python only
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2006-04-15.08:14:53.000>
    created_at = <Date 2005-03-12.10:44:15.000>
    labels = ['library']
    title = 'python-config'
    updated_at = <Date 2006-04-15.08:14:53.000>
    user = 'https://bugs.python.org/tatsujin'

    bugs.python.org fields:

    activity = <Date 2006-04-15.08:14:53.000>
    actor = 'loewis'
    assignee = 'none'
    closed = True
    closed_date = None
    closer = None
    components = ['Distutils']
    creation = <Date 2005-03-12.10:44:15.000>
    creator = 'tatsujin'
    dependencies = []
    files = ['6539', '6540']
    hgrepos = []
    issue_num = 1161914
    keywords = ['patch']
    message_count = 9.0
    messages = ['47936', '47937', '47938', '47939', '47940', '47941', '47942', '47943', '47944']
    nosy_count = 4.0
    nosy_names = ['loewis', 'georg.brandl', 'mdehoon', 'tatsujin']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1161914'
    versions = []

    @tatsujin
    Copy link
    Mannequin Author

    tatsujin mannequin commented Mar 12, 2005

    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.

    @tatsujin tatsujin mannequin closed this as completed Mar 12, 2005
    @tatsujin tatsujin mannequin added the stdlib Python modules in the Lib dir label Mar 12, 2005
    @tatsujin tatsujin mannequin closed this as completed Mar 12, 2005
    @tatsujin tatsujin mannequin added the stdlib Python modules in the Lib dir label Mar 12, 2005
    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Mar 13, 2005

    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?

    @tatsujin
    Copy link
    Mannequin Author

    tatsujin mannequin commented Mar 14, 2005

    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"
    ?

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Mar 14, 2005

    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.

    @mdehoon
    Copy link
    Mannequin

    mdehoon mannequin commented Jun 10, 2005

    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'
    1. 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).

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

    @tatsujin
    Copy link
    Mannequin Author

    tatsujin mannequin commented Jun 11, 2005

    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.

    @birkenfeld
    Copy link
    Member

    birkenfeld commented Mar 31, 2006

    Logged In: YES
    user_id=849994

    Uploading a python-only version. This should conform more
    with pkg-config, though every *-config program on my box has
    other options.

    @tatsujin
    Copy link
    Mannequin Author

    tatsujin mannequin commented Mar 31, 2006

    Logged In: YES
    user_id=195710

    Excellent work! Looks nice.

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Apr 15, 2006

    Logged In: YES
    user_id=21627

    I took gbrandl's python-config, added a build process, and
    committed this patch as bpo-45417. Thanks to all contributors!

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant