Issue 1:
My project depends on SciPy and, due to an organizational requirement, all python dependencies must be installed from source distributions. This used to work fine until numpy-1.17rc was released, which drops support for python2.7. When I attempt to install SciPy-1.2.2 (which supports python2.7) from sdist, the setup scripts tried to pull down the latest numpy (1.17.0rc2), which raises the error below.

Reproducing code example:

(venv27) jmorawski@ptqadeva01:~$ pip install scipy==1.2.2 --no-binary :all:

Error message:

ERROR: Command errored out with exit status 1:
command: /home/user/jmorawski/venv27/bin/python2.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-sMq2G4/scipy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-sMq2G4/scipy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
cwd: /tmp/pip-install-sMq2G4/scipy/
Complete output (53 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-sMq2G4/scipy/setup.py", line 492, in <module>
setup_package()
File "/tmp/pip-install-sMq2G4/scipy/setup.py", line 488, in setup_package
setup(**metadata)
File "/home/user/jmorawski/venv27/lib/python2.7/site-packages/setuptools/__init__.py", line 144, in setup
_install_setup_requires(attrs)
File "/home/user/jmorawski/venv27/lib/python2.7/site-packages/setuptools/__init__.py", line 139, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/home/user/jmorawski/venv27/lib/python2.7/site-packages/setuptools/dist.py", line 717, in fetch_build_eggs
replace_conflicting=True,
File "/home/user/jmorawski/venv27/lib/python2.7/site-packages/pkg_resources/__init__.py", line 782, in resolve
replace_conflicting=replace_conflicting
File "/home/user/jmorawski/venv27/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1065, in best_match
return self.obtain(req, installer)
File "/home/user/jmorawski/venv27/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1077, in obtain
return installer(requirement)
File "/home/user/jmorawski/venv27/lib/python2.7/site-packages/setuptools/dist.py", line 784, in fetch_build_egg
return cmd.easy_install(req)
File "/home/user/jmorawski/venv27/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 679, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/home/user/jmorawski/venv27/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 705, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/home/user/jmorawski/venv27/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 890, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/home/user/jmorawski/venv27/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1158, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/home/user/jmorawski/venv27/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1144, in run_setup
run_setup(setup_script, args)
File "/home/user/jmorawski/venv27/lib/python2.7/site-packages/setuptools/sandbox.py", line 253, in run_setup
raise
File "/home/fds/lang/python/lib64/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/home/user/jmorawski/venv27/lib/python2.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/home/fds/lang/python/lib64/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/home/user/jmorawski/venv27/lib/python2.7/site-packages/setuptools/sandbox.py", line 166, in save_modules
saved_exc.resume()
File "/home/user/jmorawski/venv27/lib/python2.7/site-packages/setuptools/sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "/home/user/jmorawski/venv27/lib/python2.7/site-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/home/user/jmorawski/venv27/lib/python2.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/home/user/jmorawski/venv27/lib/python2.7/site-packages/setuptools/sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "/home/user/jmorawski/venv27/lib/python2.7/site-packages/setuptools/sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-oQ2nGU/numpy-1.17.0rc2/setup.py", line 31, in <module>

RuntimeError: Python version >= 3.5 required.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Scipy/Numpy/Python version information:

Python 2.7.10 (default, Feb 3 2017, 15:51:12)
[GCC 4.4.4 20100726 (Red Hat 4.4.4-20)] on linux2

Issue 2:
I'm not sure if this is a PyPI limitation where availability depends on the most recent release, but 1.17.0rc1 is being made available to Python 2.7.

This is from an Azure run of statsmodels:

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Requirement already up-to-date: pip in /opt/hostedtoolcache/Python/2.7.15/x64/lib/python2.7/site-packages (19.1.1)
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting numpy>=1.11 (from -r requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/20/2c/4d64f1cd4d2170b91d24ae45725de837bd40c34c9c04c94255c0f51c513d/numpy-1.16.4-cp27-cp27m-manylinux1_x86_64.whl (17.0MB)
Collecting scipy>=0.18 (from -r requirements.txt (line 2))
Downloading https://files.pythonhosted.org/packages/3c/b1/e01e231073c9d64b481a11f1c0045ce568032ca0375deb64aff1cdc33a05/scipy-1.2.2-cp27-cp27m-manylinux1_x86_64.whl (24.8MB)
Collecting pandas>=0.19 (from -r requirements.txt (line 3))
Downloading https://files.pythonhosted.org/packages/b2/4c/b6f966ac91c5670ba4ef0b0b5613b5379e3c7abdfad4e7b89a87d73bae13/pandas-0.24.2.tar.gz (11.8MB)
ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-MLGgcN/pandas/setup.py", line 746, in <module>
**setuptools_kwargs)
File "/opt/hostedtoolcache/Python/2.7.15/x64/lib/python2.7/site-packages/setuptools/__init__.py", line 128, in setup
_install_setup_requires(attrs)
File "/opt/hostedtoolcache/Python/2.7.15/x64/lib/python2.7/site-packages/setuptools/__init__.py", line 123, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/opt/hostedtoolcache/Python/2.7.15/x64/lib/python2.7/site-packages/setuptools/dist.py", line 513, in fetch_build_eggs
replace_conflicting=True,
File "/opt/hostedtoolcache/Python/2.7.15/x64/lib/python2.7/site-packages/pkg_resources/__init__.py", line 774, in resolve
replace_conflicting=replace_conflicting
File "/opt/hostedtoolcache/Python/2.7.15/x64/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1057, in best_match
return self.obtain(req, installer)
File "/opt/hostedtoolcache/Python/2.7.15/x64/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1069, in obtain
return installer(requirement)
File "/opt/hostedtoolcache/Python/2.7.15/x64/lib/python2.7/site-packages/setuptools/dist.py", line 580, in fetch_build_egg
return cmd.easy_install(req)
File "/opt/hostedtoolcache/Python/2.7.15/x64/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 673, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/opt/hostedtoolcache/Python/2.7.15/x64/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 699, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/opt/hostedtoolcache/Python/2.7.15/x64/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 884, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/opt/hostedtoolcache/Python/2.7.15/x64/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1152, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/opt/hostedtoolcache/Python/2.7.15/x64/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1138, in run_setup
run_setup(setup_script, args)
File "/opt/hostedtoolcache/Python/2.7.15/x64/lib/python2.7/site-packages/setuptools/sandbox.py", line 253, in run_setup
raise
File "/opt/hostedtoolcache/Python/2.7.15/x64/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/opt/hostedtoolcache/Python/2.7.15/x64/lib/python2.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/opt/hostedtoolcache/Python/2.7.15/x64/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/opt/hostedtoolcache/Python/2.7.15/x64/lib/python2.7/site-packages/setuptools/sandbox.py", line 166, in save_modules
saved_exc.resume()
File "/opt/hostedtoolcache/Python/2.7.15/x64/lib/python2.7/site-packages/setuptools/sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "/opt/hostedtoolcache/Python/2.7.15/x64/lib/python2.7/site-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/opt/hostedtoolcache/Python/2.7.15/x64/lib/python2.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/opt/hostedtoolcache/Python/2.7.15/x64/lib/python2.7/site-packages/setuptools/sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "/opt/hostedtoolcache/Python/2.7.15/x64/lib/python2.7/site-packages/setuptools/sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-pdeLgl/numpy-1.17.0rc1/setup.py", line 31, in <module>

RuntimeError: Python version >= 3.5 required.
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-MLGgcN/pandas/