Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pep381client(pep381run) wont download packages from the official pypi server

I'm setting up a local pypi server for a LAN where there is no internet access. To do so I want to download all the packages from the official pypi server in advance(then I move the server to the LAN).

It looks like the pep381client will do the job. However the command “pep381run.py py-pkgs” just happily prints out “Synchronizing xxx” (xxx is the package name) yet no any packages being found downloaded in the “py-pkgs” directory. Why?

The OS is windows7 BTW.

like image 804
John Wang Avatar asked Jan 29 '26 12:01

John Wang


1 Answers

pep381 client use http, but pypi can only be used https. This program is not implemented function that redirect url. I modified the program as this.

file: (YOUR INSALLED DIRECTORY)/pep381client/__init__.py

 9: -BASE = 'http://'+pypi
    +BASE = 'https://'+pypi

28: -        _conn = httplib.HTTPConnection(pypi)
    +        _conn = httplib.HTTPSConnection(pypi)

37: -        _conn = httplib.HTTPConnection(pypi)
    +        _conn = httplib.HTTPSConnection(pypi)
like image 146
Yuichiro Avatar answered Jan 31 '26 00:01

Yuichiro



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!