views:

47

answers:

0

As the final step in building a custom python, I need to add a myproject.pth.

Currently I'm doing this in a Makefile:

install:
        rm -f            ../../lib/python2.6/site-packages/myproject.pth
        cp myproject.pth ../../lib/python2.6/site-packages/myproject.pth

but I would like to encapsulate this in a setup.py. Unfortuntately the setup.py docs don't seem to cover this trivial case! Any help appreciated. I tried this but it doesn't work:

from setuptools import setup
setup(
    packages=['mypackage_pth'],
    package_dir={'mypackage_pth': '.'},
    package_data={'mypackage_pth': ['mypackage.pth']},
)