mozilla-services / syncserver

Run-Your-Own Firefox Sync Server
Mozilla Public License 2.0
1.87k stars 145 forks source link

"Cannot fetch index base URL http://pypi.python.org/simple/" when make build #99

Closed Franzl123 closed 6 years ago

Franzl123 commented 7 years ago

when i start "sudo make build", i get several warnings and the script stops with an error

virtualenv --python=which python2 python | head -n 1 --no-site-packages ./local Running virtualenv with interpreter /usr/bin/python2 The --no-site-packages flag is deprecated; it is now the default behavior. New python executable in ./local/bin/python2 Not overwriting existing python script ./local/bin/python (you must use ./local/bin/python2) Installing distribute..............................................................................................................................................................................................done. Installing pip...............done. CFLAGS="-Wno-error -Wno-error=format-security" ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future ./local/bin/pip install -r requirements.txt Downloading/unpacking https://github.com/mozilla-services/tokenserver/archive/1.2.27.zip (from -r requirements.txt (line 12)) Downloading 1.2.27.zip (384Kb): 384Kb downloaded Running setup.py egg_info for package from https://github.com/mozilla-services/tokenserver/archive/1.2.27.zip

warning: no files found matching '*.rst'
warning: no files found matching '*.spec'
warning: no files found matching '*.json' under directory 'tokenserver'

Downloading/unpacking https://github.com/mozilla-services/server-syncstorage/archive/1.6.8.zip (from -r requirements.txt (line 13)) Downloading 1.6.8.zip (134Kb): 134Kb downloaded Running setup.py egg_info for package from https://github.com/mozilla-services/server-syncstorage/archive/1.6.8.zip

warning: no files found matching 'README'

Downloading/unpacking cornice==0.16.2 (from -r requirements.txt (line 1)) Cannot fetch index base URL http://pypi.python.org/simple/ Could not find any downloads that satisfy the requirement cornice==0.16.2 (from -r requirements.txt (line 1)) No distributions at all found for cornice==0.16.2 (from -r requirements.txt (line 1)) Storing complete log in /root/.pip/pip.log make: *** [local/COMPLETE] Fehler 1

pip.log@pastebin

rfk commented 7 years ago

I'm afraid I'm not able to reproduce :-(

No distributions at all found for cornice==0.16.2

This is weird because there definitely is one on PyPI: https://pypi.python.org/pypi/cornice/0.16.2

Is there anything unusual about the way you'd be talking to PyPI here?

malloc100 commented 7 years ago

Cannot fetch index base URL http://pypi.python.org/simple/

This site requires use of https protocol. I don't how do update Makefile / build-scripts to achive it.

rfk commented 7 years ago

This site requires use of https protocol. I don't how do update Makefile / build-scripts to achive it.

I don't see anything in the Makefile here that would cause it to use http rather than https, when accessing pypi. Is it possible you have some local configuration for python that's causing this? What version of pip are you using?

malloc100 commented 7 years ago

No, no local configuration. Stock Debian 7 vanilla installation just for git and syncservice.

All my problems come to nothing upgrading my server from Debian 7 (Wheezy) to Debian 8 (Jessie). Debian Wheezy (v7.11) comes with Python v2.7.3 / pip v1.1and Debian Jessie (v8.9) with Python v2.7.9 / pip v1.5.6.

thvitt commented 6 years ago

Older versions of pip and distribute default to http://pypi.python.org/simple, which no longer works. A solution is to install an up-to-date pip and distribute using pip install -i https://pypi.python.org/simple -U pip distribute into the virtual environment before running the rest of the build process.

rfk commented 6 years ago

thanks @thvitt; I've added this to the build script in https://github.com/mozilla-services/syncserver/commit/d03e4ece569491edd71ab77aba8cdea7590698ad