954,510 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

using distutils to install a python module

I am trying to use distutils to install a pyhon module. below is an idea of the code I want to use

#!/usr/bin/env python
from distutils.core import setup

setup(name="freevo_cropit",
      version="0.1",
      description="A Freevo plugin for wirting mplayer config files",
      author="me",
      author_email="shane@test.com",
      url="http://test.com",
      py_modules=['cropit.py'])


I have the cropit.py module in the same directoy as my setup.py script. I need to install the cropit.py module to this directory

/usr/lib/python2.4/site-packages/freevo/video/plugins/


how do I specify that in my setup.py?

shanenin
Posting Whiz in Training
217 posts since May 2005
Reputation Points: 10
Solved Threads: 17
 

AFter rereading my post, I am not sure if it is clear. All I want to do is use distutils to create an installer for both one python module, and one python script.

I need the python module installed to the directory

/usr/lib/python2.4/site-packages/freevo/video/plugins


and my python script installed to

/usr/bin
shanenin
Posting Whiz in Training
217 posts since May 2005
Reputation Points: 10
Solved Threads: 17
 

the problem was I was needed to use this

py_modules=['freevo.video.plugins.cropit'])

not

py_modules=['freevo.video.plugins.cropit.py'])
shanenin
Posting Whiz in Training
217 posts since May 2005
Reputation Points: 10
Solved Threads: 17
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You