Skip to content

pkg-config support #47835

Closed
Closed

Description

@clintonroy
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']

    Activity

    1. clintonroy commented on Aug 18, 2008

      clintonroymannequin
      MannequinAuthor

      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

    2. added
      build
      type-feature
      on Aug 18, 2008
    3. amauryfa commented on Aug 18, 2008

      @amauryfa
      Contributor

      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.

    4. clintonroy commented on Aug 19, 2008

      clintonroymannequin
      MannequinAuthor

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

      cheers,

    5. clintonroy commented on Sep 4, 2008

      clintonroymannequin
      MannequinAuthor

      This version sets Libs.private for static compiles.

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

      cheers,

    6. clintonroy commented on Jan 5, 2009

      clintonroymannequin
      MannequinAuthor

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

      cheers,

    7. amauryfa commented on Jan 5, 2009

      @amauryfa
      Contributor

      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?

    8. clintonroy commented on Feb 26, 2009

      clintonroymannequin
      MannequinAuthor

      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,

    9. sol commented on May 5, 2009

      solmannequin
      Mannequin

      > - 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.

    10. clintonroy commented on May 5, 2009

      clintonroymannequin
      MannequinAuthor

      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.

    11. sol commented on May 19, 2009

      solmannequin
      Mannequin

      I totally agree.

    12. pitrou commented on May 19, 2009

      @pitrou
      Member

      Patch looks good here.

    13. pitrou commented on May 24, 2009

      @pitrou
      Member

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

    14. clintonroy commented on May 24, 2009

      clintonroymannequin
      MannequinAuthor

      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.

    15. pitrou commented on May 24, 2009

      @pitrou
      Member

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

    16. loewis commented on May 29, 2009

      loewismannequin
      Mannequin

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

    17. pitrou commented on May 29, 2009

      @pitrou
      Member

      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?

    18. loewis commented on May 29, 2009

      loewismannequin
      Mannequin

      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

    19. pitrou commented on May 29, 2009

      @pitrou
      Member

      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.

    20. loewis commented on May 29, 2009

      loewismannequin
      Mannequin

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

    21. pitrou commented on May 29, 2009

      @pitrou
      Member

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

    22. loewis commented on May 29, 2009

      loewismannequin
      Mannequin

      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.

    23. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      buildtype-feature

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions