At 09:07 AM 9/15/2006 -0700, Venkat Bommakanti wrote:
>Hi folks,
>
>On i686 Linux, I would like to place my python
>modules as:
>    <base_dir>/src/py-modules/*.py
>and use the cmd from <base_dire>:
>    ...base_dir]$  python   src/py-modules/setup.py
>                   install  --prefix=<base_dir>/usr

FYI, this is not possible.  The distutils simply will not work correctly 
unless you run "setup.py" in the directory where it is located.

You can have the modules in 'src/py-modules' if you like, but setup.py 
would have to reside in base_dir.


>so the .py files and the corresponding compiled .pyc
>files are at:
>    <base_dir>/usr/lib/python2.4/site-packacges/*.py[c]
>
>Its unclear from the documentation, how I could
>specify the location of the *.py files, ie:
>    <base_dir>/src/py-modules/
>in the installation command:
>    ...base_dir]$  python   src/py-modules/setup.py
>                   install  --prefix=<base_dir>/usr
>
>I can specify the destination of the module/compiled
>files, but how do I specify the the path to the .py
>files. I get the "file not found error".

Add this to your setup() call:

    package_dir={'':'src/py-modules'}

And the setup.py will be able to find the modules.  You *must*, however, 
move setup.py to your base_dir, as it will not work otherwise; there are 
too many places in the distutils where the current directory is assumed to 
be the same as the setup.py directory.

_______________________________________________
Distutils-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to