Python pip --index-url Not Limiting Repository Search -


i'm trying instruct pip install packages using local repository (on different server in internal network). requirement remote repositories (like pypi) should never consulted, if local repository not have match.

first attempt:

$ pip install --index-url=http://<local.repo.host>/packages/pypi/data/web/simple/ paramiko --verbose 

however, when run command above, it's clear other repositories still being consulted:

.... ignoring link http://www.amk.ca/files/python/pycrypto-1.9a5.tar.gz (from http://<local.repo.host>/packages/pypi/data/web/simple/pycrypto/), version 1.9a5 doesn't match >=2.1,!=2.4 

the workaround i've found far pip download (without installing), , easy_install tarball.

example:

$ sudo pip install --no-install --download /tmp/ --index-url=http://<local.repo.host>/packages/pypi/data/web/simple/ paramiko $ sudo easy_install --allow-hosts=<local.repo.host> --index-url http://<local.repo.host>/packages/pypi/data/web/simple/ /tmp/paramiko-1.9.0.tar.gz  

which results in remote repositories being blocked:

link http://www.amk.ca/files/python/pycrypto-1.9a5.tar.gz ***blocked*** --allow-hosts 

i tried setting ~/.pydistutils.cfg to:

[easy_install] index_url = http://<local.repo.host>/packages/pypi/data/web/simple/ allow_hosts = <local.repo.host> 

and ~/.pip/pip.conf to:

[global] index-url = http://<local.repo.host>/packages/pypi/data/web/simple/ 

as suggested "what when pypi goes down" blog, not prevent attempts remote repositories either.

is there more straightforward way of accomplishing this? i'd prefer not use easy_install given pip heavily favored (for lot of reasons). approach work in situations?

update: fixed upgrading pip.


Comments

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -