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

pkg-config support #47835

Closed
clintonroy mannequin opened this issue Aug 18, 2008 · 21 comments
Closed

pkg-config support #47835

clintonroy mannequin opened this issue Aug 18, 2008 · 21 comments
Labels
build The build process and cross-build type-feature A feature request or enhancement

Comments

@clintonroy
Copy link
Mannequin

clintonroy mannequin commented Aug 18, 2008

BPO 3585
Nosy @loewis, @warsaw, @amauryfa, @pitrou, @clintonroy
Files
  • pkgconfig.diff
  • pkgconfig.diff
  • pkgconfig.diff
  • pkgconfig.diff
  • 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 2009-05-24.20:39:52.417>
    created_at = <Date 2008-08-18.01:03:28.355>
    labels = ['type-feature', 'build']
    title = 'pkg-config support'
    updated_at = <Date 2013-01-16.15:07:05.770>
    user = 'https://github.com/clintonroy'

    bugs.python.org fields:

    activity = <Date 2013-01-16.15:07:05.770>
    actor = 'barry'
    assignee = 'none'
    closed = True
    closed_date = <Date 2009-05-24.20:39:52.417>
    closer = 'pitrou'
    components = ['Build']
    creation = <Date 2008-08-18.01:03:28.355>
    creator = 'ClintonRoy'
    dependencies = []
    files = ['11142', '11152', '11368', '14057']
    hgrepos = []
    issue_num = 3585
    keywords = ['patch', 'needs review']
    message_count = 21.0
    messages = ['71305', '71321', '71396', '72440', '79101', '79114', '82743', '87217', '87230', '88072', '88075', '88266', '88278', '88280', '88517', '88519', '88543', '88544', '88549', '88550', '88554']
    nosy_count = 6.0
    nosy_names = ['loewis', 'barry', 'amaury.forgeotdarc', 'pitrou', 'ClintonRoy', 'sol']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue3585'
    versions = ['Python 2.6']

    @clintonroy
    Copy link
    Mannequin Author

    clintonroy mannequin commented Aug 18, 2008

    This patch adds pkg-config support to the python build, a python.pc file
    is installed in the pkgconfig directory such that autoconf buildsystems
    can trivially link against the python library.

    Diff made against revision 65796

    @clintonroy clintonroy mannequin added build The build process and cross-build type-feature A feature request or enhancement labels Aug 18, 2008
    @amauryfa
    Copy link
    Member

    I cannot discuss about the feature itself, but the patch should
    certainly use some macro ($(VERSION) ?) instead of the hardcoded "2.6".
    Likewise, source files should not contain version number in their names,
    or they cannot be merged between branches.

    @clintonroy
    Copy link
    Mannequin Author

    clintonroy mannequin commented Aug 19, 2008

    Thanks for the comments Amaury, this patch uses ${VERSION} throughout so
    that it can be applied across branches.

    cheers,

    @clintonroy
    Copy link
    Mannequin Author

    clintonroy mannequin commented Sep 4, 2008

    This version sets Libs.private for static compiles.

    Any chance this will make it into the 2.6/3.0 release candidates ?

    cheers,

    @clintonroy
    Copy link
    Mannequin Author

    clintonroy mannequin commented Jan 5, 2009

    Is there anything I can do to move this forward at all?

    cheers,

    @amauryfa
    Copy link
    Member

    amauryfa commented Jan 5, 2009

    The patch looks fine to me. I have however some questions to ask to
    someone more used to pkgconfig:

    • Do all unix-like system support pkg-config?

    • Is $(LIBDIR)/pkgconfig the only choice for installing this file?

    • Shouldn't this file be installed only if the pkg-config utility is
      present, or if the directory $(LIBDIR)/pkgconfig already exists?

    @clintonroy
    Copy link
    Mannequin Author

    clintonroy mannequin commented Feb 26, 2009

    Oh, you meant for me to reply =)

    • Do all unix-like system support pkg-config?

    Yes. It even works on windows.

    • Is $(LIBDIR)/pkgconfig the only choice for installing this file?

    While pkg-config can be told to look in other directories for pc files
    (via modifying the PKGCONFIGPATH env variable) it looks in
    /usr/lib/pkgconfig by default, so that's where pc files should be put by
    default.

    • Shouldn't this file be installed only if the pkg-config utility is
      present, or if the directory $(LIBDIR)/pkgconfig already exists?

    Technically I suppose so, but I've not seen any package actually bother.

    The patches I have made available are very similar to pkg-config
    packages I've seen for many other packages.

    cheers,

    @sol
    Copy link
    Mannequin

    sol mannequin commented May 5, 2009

    > - Shouldn't this file be installed only if the pkg-config utility is
    > present, or if the directory $(LIBDIR)/pkgconfig already exists?

    Technically I suppose so

    That would mean that, if you first install Python and afterwards
    pkg-config, pkg-config would not work for Python, right? I'm not sure if
    that would be desirable.

    @clintonroy
    Copy link
    Mannequin Author

    clintonroy mannequin commented May 5, 2009

    Hi Sol,

    It's just a data file I suppose, Python should not need a dependency on
    pkg-config, and neither should there be a python-pkgconfig package that
    just contains the python.pc file.

    I think the approach to just always install the python.pc file is the
    right one.

    @sol
    Copy link
    Mannequin

    sol mannequin commented May 19, 2009

    I totally agree.

    @pitrou
    Copy link
    Member

    pitrou commented May 19, 2009

    Patch looks good here.

    @pitrou
    Copy link
    Member

    pitrou commented May 24, 2009

    Is there any reason in versioning Misc/python.pc, instead of versioning
    it only on install?

    @clintonroy
    Copy link
    Mannequin Author

    clintonroy mannequin commented May 24, 2009

    Not that I can see, or remember. Revised patch attached. Tyop fixed as well.

    Please note there seem to be some issues with svn head atm,
    pyconfig.h.in and configure would seem to be out of whack with
    configure.in, this patch does not include changes to those generated files.

    @pitrou
    Copy link
    Member

    pitrou commented May 24, 2009

    The patch is committed in trunk (r72898) and py3k (r72899). Thanks!

    @pitrou pitrou closed this as completed May 24, 2009
    @loewis
    Copy link
    Mannequin

    loewis mannequin commented May 29, 2009

    Antoine: Don't use autoconf 2.63 to generate pyconfig.h.in and
    configure. Use 2.61 instead (until it is agreed to switch to a newer
    version).

    @pitrou
    Copy link
    Member

    pitrou commented May 29, 2009

    Antoine: Don't use autoconf 2.63 to generate pyconfig.h.in and
    configure. Use 2.61 instead (until it is agreed to switch to a newer
    version).

    Oops, sorry. Are there any known issues with 2.63?

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented May 29, 2009

    Oops, sorry. Are there any known issues with 2.63?

    Yes: it puts a carriage-return character into configure
    which completely confuses subversion.

    I'm puzzled how you were able to commit the generated
    files; subversion should have reported an error

    svn: File 'configure' has inconsistent newlines
    svn: Inconsistent line ending style

    See

    http://mail.python.org/pipermail/python-dev/2008-November/083781.html

    @pitrou
    Copy link
    Member

    pitrou commented May 29, 2009

    Yes: it puts a carriage-return character into configure
    which completely confuses subversion.

    I'm puzzled how you were able to commit the generated
    files; subversion should have reported an error

    svn: File 'configure' has inconsistent newlines
    svn: Inconsistent line ending style

    I did get that message (and got puzzled by it).
    I worked around it by reading the file in universal newlines mode and
    saving it again.

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented May 29, 2009

    I did get that message (and got puzzled by it).
    I worked around it by reading the file in universal newlines mode and
    saving it again.

    I believe this has broken part of the configure script. There is an
    ac_cr variable that is supposed to hold a sole carriage-return
    character; it now holds a newline character instead. This will break
    the test whether the system autoconf deals with carriage-return
    characters correctly, which probably means that it may decide to use
    awk to do file substitution when it should have been using /bin/sh,
    or vice versa (I haven't fully understood the purpose of this test).

    @pitrou
    Copy link
    Member

    pitrou commented May 29, 2009

    Ouch, unfortunately it seems my distribution doesn't package autoconf
    2.61. Is there any risk in installing it from scratch?

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented May 29, 2009

    Ouch, unfortunately it seems my distribution doesn't package autoconf
    2.61. Is there any risk in installing it from scratch?

    I usually install it into a private location, such as ~/ac261. This is
    absolutely safe.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    build The build process and cross-build type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants