Generating a pkg config file with distutils

Discussion in 'Python' started by Tycho Andersen, Mar 28, 2012.

  1. Hi all,

    I'm distributing a package which for various legacy reasons needs to
    generate a pkgconfig file from a template (adding version numbers,
    prefixes, etc.) and install the file in the right place
    ($PREFIX/lib/pkgconfig/foo.pc in most cases).

    Currently, I have a rather nasty hack to implement all this, but
    presumably there's a better way to do it. If I could even get the
    installation part (e.g. using the right MANIFEST.in incantations),
    that would be wonderful. Reading the MANIFEST.in docs [1], it's not
    obvious that you can control the install locations of these files
    (i.e., .pc files must be installed to the above location to be
    correctly detected by other packages).

    Is what I want to do possible, or should I continue using my nasty
    hack?

    TIA!

    Tycho

    [1]: http://docs.python.org/distutils/sourcedist.html#commands
     
    Tycho Andersen, Mar 28, 2012
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mrstephengross
    Replies:
    0
    Views:
    420
    mrstephengross
    Mar 10, 2006
  2. timw.google
    Replies:
    1
    Views:
    744
    Serge Orlov
    May 11, 2006
  3. Luis Alberto Zarrabeitia Gomez

    distutils, No module named numpy.distutils.fcompiler.conv_template

    Luis Alberto Zarrabeitia Gomez, Mar 30, 2009, in forum: Python
    Replies:
    0
    Views:
    1,529
    Luis Alberto Zarrabeitia Gomez
    Mar 30, 2009
  4. ryles
    Replies:
    3
    Views:
    805
    Piet van Oostrum
    Jul 26, 2009
  5. Johny

    pkg-config and Windows

    Johny, Mar 17, 2010, in forum: Python
    Replies:
    0
    Views:
    941
    Johny
    Mar 17, 2010
  6. Johny

    What is pkg-config for ?

    Johny, Mar 19, 2010, in forum: Python
    Replies:
    2
    Views:
    367
    Lawrence D'Oliveiro
    Mar 22, 2010
  7. aspineux
    Replies:
    1
    Views:
    478
    alain.spineux
    Feb 15, 2011
  8. Tycho Andersen

    Generating a .pc file using distutils

    Tycho Andersen, Jan 23, 2012, in forum: Python
    Replies:
    0
    Views:
    180
    Tycho Andersen
    Jan 23, 2012
Loading...