Easy_install -f vs easy_install -i

This is related to this question I asked a while ago.

The end game is I want to install my "identity.model" package and all dependencies. like this...

$ easy_install -f http://eggs.sadphaeton.com identity.model
Searching for identity.model
Reading http://eggs.sadphaeton.com
Reading http://pypi.python.org/simple/identity.model/
Couldn't find index page for 'identity.model' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for identity.model
error: Could not find suitable distribution for Requirement.parse('identity.model')

      

for whatever reason, running this easy_install ends up on the main page which I have laid out according to this information

My index.html

<html>
 <head>
     <title>SadPhaeton Egg Repository</title>
 </head>
 <body>
    <a rel="homepage" href="AlchemyExtra">AlchemyExtra</a>
    <a rel="homepage" href="identity.model">identity.model</a>
    <a rel="homepage" href="repoze.what.plugins.config">repoze.what.plugins.config</a>

 </body>
</html>

      

if i run ...

$ easy_install -i http://eggs.sadphaeton.com identity.model

      

it finds my package and repoze.what.plugins.config which I put there too since it's a dependency. but then when it goes to get tw.forms (external dependency hosted on pypi). It ends up crashing as it only searched http://eggs.sadphaeton.com

Obviously I misunderstood the "specification". Does anyone know what this trick is?

+2


source to share


3 answers


-f will take the pointer you give it and look at the packages there as well as PyPI. An example of such a page is http://dist.plone.org/release/3.3.1/ As you can see, this is a list of distribution files.

With -i you define the main index page. The default is http://pypi.python.org/simple/ As you can see, the index page is an index of packages, not distribution files.

So, in your case it easy_install -i http://eggs.sadphaeton.com identity.model

should work to load the identity.model. And it was for me like twice in the middle, but not the first time and the second time. I don't know if you can try different formats? But it will fail on tw.forms anyway, since it is not on your index page.

So the solution should be to make a page like http://dist.plone.org/release/3.3.1/ with your eggs on it. I don't know how precise the format should be, but I find it quite flexible.



Update:

Here is a step to solve a step:

  • Place all your distributions in a directory.
  • cd to this directory.
  • A type python -c "from SimpleHTTPServer import test; test()"

  • Now enter easy_install -f http://localhost:8080/ <modulename>

It will install the module.

+3


source


Looks good as a trick in that the rel = "download" links to the index.html root.

<html>
<head>
    <title>SadPhaeton Egg Repository</title>
</head>
<body>
    <a rel="homepage" href="AlchemyExtra">AlchemyExtra</a> <a rel="download" href="AlchemyExtra/AlchemyExtra-0.0dev-py2.6.egg">download</a><br>
    <a rel="homepage" href="identity.model">identity.model</a> <a rel="download" href="identity.model/identity.model-0.0dev-py2.6.egg">download</a><br>

    <a rel="homepage" href="repoze.what.plugins.config">repoze.what.plugins.config</a> <a rel="download" href="repoze.what.plugins.config/repoze.what.plugins.config-0.0.0-py2.6.egg">download</a><br>

</body>
</html>

      



which solves my immediate problem, although it would be nice if the spec had more details on this. I expected, based on what I read, that easy_install will access the home page to download, but it doesn't seem to want to do that for me.

now to automate this somehow because doing this shit manually is a PITA.

0


source


The problem is that you are trying to mix the -i and -f modes to create your page; you have to choose one or the other, since stuff rel=""

only works with -i.

If you want to use -f mode, you just need the webserver directory with eggs in it. If you want to use -i, then you must have a subdirectory for each project with index.html, and these are the index.html files that will contain the stuff rel="homepage"

.

0


source







All Articles