[Pythonmac-SIG] Distutils for research?
Rob Managan
managan at llnl.gov
Tue Dec 13 22:22:34 CET 2005
Bob Ippolito gives a simple example of using setuptools to develop
modules. That got me interested in installing setuptools. I followed
the instructions for a non-admin OSX user and created a
.pydistutils.cfg file to point to the site-packages is use with raw
distutils stuff. Then I tried to use the ex-setup.py file to install
setuptools and I get this error.
Extracting setuptools-0.6a8-py2.4.egg to
/Users/managan/Documents/local/lib/python2.4/site-packages
Installing easy_install script to
/Library/Frameworks/Python.framework/Versions/2.4/bin
error:
/Library/Frameworks/Python.framework/Versions/2.4/bin/easy_install:
Permission denied
Any idea why it is trying to write to
/Library/Frameworks/Python.framework/Versions/2.4/bin ??
I tried various -d -i options but could not get it to work right.
Any suggestions?
At 12:18 PM -0800 12/13/05, Bob Ippolito wrote:
> > It's the only good way to compile extensions, which makes it
>> infinitely useful for extension development as well.
>>
>> However, setuptools is also useful for pure Python development,
>> because setup.py develop goes ahead and checks all your dependencies
>> and adds your working copy to sys.path (ensuring that it doesn't
>> conflict with something already installed). Normally I would
>> manually generate a pth file to add my working copy to sys.path, but
>> creating a minimal setup.py is easier than dealing with any of that.
>> It can also create scripts via entry points, which saves more time.
>>
>> crack:~/src/MyPackage bob$ cd ~
>> crack:~ bob$ mkdir -p src/MyPackage/MyPackage
>> crack:~ bob$ cd src/MyPackage
>> crack:~/src/MyPackage bob$ touch MyPackage/__init__.py
>> crack:~/src/MyPackage bob$ cat - > setup.py
> > #!/usr/bin/env python
>> from setuptools import setup, find_packages
> > setup(name="MyPackage", version="1.0", packages=find_packages())
>> crack:~/src/MyPackage bob$ python setup.py develop
>> running develop
>> running egg_info
>> creating MyPackage.egg-info
>> writing ./MyPackage.egg-info/PKG-INFO
>> writing top-level names to ./MyPackage.egg-info/top_level.txt
>> running build_ext
>> Creating /Library/Frameworks/Python.framework/Versions/2.4/lib/
>> python2.4/site-packages/MyPackage.egg-link (link to .)
>> Adding MyPackage 1.0 to easy-install.pth file
>>
>> Installed /Volumes/Crack/src/MyPackage
>> Processing dependencies for MyPackage==1.0
>> crack:~/src/MyPackage bob$ cd ~
>> crack:~ bob$ python -c "import MyPackage; print MyPackage.__file__"
> > /Volumes/Crack/src/MyPackage/MyPackage/__init__.py
>
--
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
Rob Managan email managan at llnl.gov
LLNL phone: 925-423-0903
P.O. Box 808, L-095 FAX: 925-422-3389
Livermore, CA 94551-0808
More information about the Pythonmac-SIG
mailing list