LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   using distutils to install a python module (https://www.linuxquestions.org/questions/programming-9/using-distutils-to-install-a-python-module-387728/)

shanenin 11-29-2005 07:10 PM

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
Code:

#!/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
Code:

/usr/lib/python2.4/site-packages/freevo/video/plugins/
how do I specify that in my setup.py?

shanenin 11-29-2005 08:06 PM

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
Code:

/usr/lib/python2.4/site-packages/freevo/video/plugins
and my python script installed to
Code:

/usr/bin

shanenin 11-29-2005 09:44 PM

the problem was I was needed to use this
Code:

py_modules=['freevo.video.plugins.cropit'])
not
Code:

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


All times are GMT -5. The time now is 11:32 AM.