distutils install dir

Discussion in 'Python' started by John Hunter, Feb 17, 2004.

  1. John Hunter

    John Hunter Guest

    What is the best way to get the target install dir from distutils when

    python setup.py install

    is run.

    Eg, on a standard python install to /usr/local I want

    /usr/local/lib/python2.3/site-packages

    and on a standard win32 python installation I want
    c:\\Python23\\Lib\\site-packages

    I also want to handle the case when an alternate prefix is installed.

    To to ask the question another way. I want to add SomeFile.pth to the
    install dir. For various reasons, extra_path is not a good choice for
    me. I just want to copy a file SomeFile.pth to the site-packages dir.
    My workaround is to treat SomeFile.pth as a data_file, and add it to
    the site-packages dir (stored in sitep) with

    data_files = [ (sitep, 'SomeFile.pth') ]


    setup(name="somemod",
    ..snip...
    ext_modules = ext_modules,
    data_files=data_files,
    )

    Thanks,
    John Hunter
    John Hunter, Feb 17, 2004
    #1
    1. Advertising

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. =?Utf-8?B?UnVkeQ==?=

    Sub Dir, Virtual dir, what do I use?

    =?Utf-8?B?UnVkeQ==?=, Jun 12, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    413
    =?Utf-8?B?UnVkeQ==?=
    Jun 12, 2005
  2. timw.google
    Replies:
    1
    Views:
    512
    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,285
    Luis Alberto Zarrabeitia Gomez
    Mar 30, 2009
  4. Matthew Denner
    Replies:
    1
    Views:
    161
  5. Kga Agk
    Replies:
    2
    Views:
    140
    Kga Agk
    Jun 29, 2009
Loading...

Share This Page