how to change default mirror url pypi.python.org/simple/ with devpi-server #433
Comments
What do you mean by "default cache mirror"? Do you mean the URL pip uses, or the URL for the PyPI cache? |
sorry i didn't make it clear. i want to change the default url |
@fschulze sorry i dont exactly know the differnet between |
You can change |
Did my answer solve your issue? |
i have the same requirement server/devpi_server/extpypi.py line 118?
|
and i have try to change mirror_url in main.py/_pypi_ixconfig_default/, it doesn't work |
You don't have to change code, use the devpi client to set the option on the index. For example to change the url for root/pypi:
|
@fschulze i think you have not understand my mean. normally, when someone install a package that haven‘t cached in devpi server, the devpi server when download the package from pipy.python.org. but we are in china, the speed is slow. so i expect the devpi server download package from pypi.doubanio.com/simple but not pypi.python.org. this should be work on devpi server but not client. |
That's exactly what I'm saying. If you run
Now you run
Now packages will be downloaded from the mirror instead of regular pypi. |
@fschulze |
You need |
ths very much, it works |
Not work any more?
|
Oh, I should
|
Then there is another problem:
My devpi-server is 4.8.0 |
You should see the traceback for the |
@fschulze no, there is no logs in
|
Please try with 4.8.1. There is a fix included which I thought was already released with 4.8.0, but which I forgot. |
Hi, I have run
but devpi-server still fetch packages from This is the log:
And my env:
|
The mirror doesn't send the |
Thank you for your reply! |
@fschulze i had met this issue too, and from the discussions above i learnt much, but the index re-create you mentioned raised error for the target index also i want to ensure that my demands is possible first i want to run a devpi-server which indicate the upstream server to a none-official pypa but a mirrors, because like the above guys, i am chinese :[ second i want the server i had just setted could be used like another mirror to pip, for eg, is that possible or should i find other alternatives? |
You can remove the index with
If you don't have any data in your server yet, you can also use the
For [global]
index_url = http://localhost:3141/user/index/+simple/
[search]
index = http://localhost:3141/user/index/ |
@fschulze thanks very much i had finally make it work |
This is a bit unrelated... Is the best-practice for specifying index url with the final |
@johncf It works without |
i start devpi-server version 4.3.0 as cache server
with cmd
devpi-server --serverdir /root/packages/ --port 5555 --host=0.0.0.0 --start
how can i change the default cache mirror?
The text was updated successfully, but these errors were encountered: