| Name |
Space |
Section |
Version |
Status |
Reviewed |
Author(s) |
| Using Eggs Which Aren't On The Cheeseshop |
Pylons Cookbook |
Home |
1.0 |
Draft |
False |
James Gardner |
Pylons uses the Python eggs format for distributing files and setuptools for defining dependencies. When you install a Pylons application there are two places which are automatically searched to try to meet those dependencies. The first is the Python Cheeseshop at http://python.org/pypi
and the second is the Pylons download page at http://www.pylonshq.com/download
which provides backups in case the cheeseshop should ever fail.
Occasionally you might want to take advantage of Pylons ability to automatically install dependencies but you might not wish to publish those dependencies on the Python Cheeseshop. To cater for this situation you can edit your project's setup.cfg and add an extra URL to the find_links variable.
For example, I have some eggs I like to use at http://www.pythonweb.org/eggs
but I don't feel they are stable enough to add to the cheeseshop. If I want to use them in my project I edit the relevant section of my setup.cfg file so it looks like this:
1
2
3 | [easy_install]
find_links = http://www.pylonshq.com/download/
http://www.pythonweb.org/eggs/
|
I then edit my project's setup.py file to declare the dependencies:
1
2
3
4
5
6 | install_requires=[
"Pylons>=0.9.4.1",
"docutils==0.4",
"web>=0.6",
"SQLAlchemy>=0.3,<=0.4"
],
|
Then when I run this to setup the source tree for development
The Pylons, docutils and SQLAlcehmy dependencies are met from the Cheeseshop and the web>=0.6 dependency is met from the pythonweb.org site.