[CentralOH] easy_install find_links

Mark Erbaugh mark at microenh.com
Tue Jun 14 03:19:55 CEST 2011

On Jun 13, 2011, at 8:55 PM, Mark Erbaugh wrote:

> I'm still working on the procedures for setting up a repeatable development environment.
> I'm trying to combine the instructions in Chapter 4 of "Foundations of Agile Python Development" by Jeff Younker with virtualenv, which he doesn't discuss.
> I've created a setup.py file that properly downloads and installs needed library files (in my case, reportlab 2.5 and webpy 0.3), but I'm running into a problem getting setup to look for local copies of these files.
> I've downloaded the appropriate files to a directory named thirdparty at the same level as setup.py and setup.cfg.  I've added find_links=thirdparty to the [easy_install] section of setup.cfg, but when I run python setup.py develop, it still looks to pypi and reads the installers from the web. At least that's what I think is going on - in the output I see:
>> Reading http://pypi.python.org/simple/web.py/
>> Reading http://webpy.org/
> But if I install the packages manually with easy_install --find_links thirdparty 'reportlab==2.5' it happily installs from my local directory.
> FWIW, I'm also installing a library that only exists locally and for that one, I see no evidence of looking for it online (in fact, if it weren't available locally the search would fail) and it does get successfully installed.

Okay, I've done some more testing.  It doesn't look like easy_install is actually downloading* the reportlab and web.py packages so it is using the local copies. But the question is why is it even bothering to look elsewhere when a suitable package is found locally? Here's the appropriate lines from setup.py

>     install_requires = [ 
>         'reportlab==2.5',
>         'web.py==0.3',
>         'pdfrw==0.1',
>         ],  

And here's a directory listing of thirdparty:

> -rw-r--r--  1 mark  admin    12691 Jun 13 19:44 pdfrw-0.1.tar.gz
> -rw-r--r--  1 mark  admin  1917306 Jun 13 19:04 reportlab-2.5.tar.gz
> -rw-r--r--  1 mark  admin    88043 Dec  9  2008 web.py-0.3.tar.gz

pdfrw is a locally created package that isn't on the web AFAIK and I get no message about looking at pypi for it.

* If I remove the package from the thirdparty directory, in addition to the two Reading ... lines above, I get a line that says Downloading ...  If the package is there, I don't get the Downloading ... line.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/mailman/private/centraloh/attachments/20110613/2e51e5a6/attachment.html>

More information about the CentralOH mailing list