enable source installs for build dependencies

This commit is contained in:
Benoit Pierre 2018-04-19 20:01:26 +02:00
parent 873662179a
commit 3ae521974f
3 changed files with 8 additions and 3 deletions

View File

@ -154,8 +154,9 @@ appropriately.
installation of build dependencies from source has been disabled until a safe
resolution of this issue is found.
* ``pip<18.0`` does not support the use of environment markers and extras, only
version specifiers are respected.
* ``pip<18.0``: only support installing build requirements from wheels, and
does not support the use of environment markers and extras (only version
specifiers are respected).
Future Developments

1
news/5229.feature Normal file
View File

@ -0,0 +1 @@
Add support for installing PEP 518 build dependencies from source.

View File

@ -80,10 +80,13 @@ class BuildEnvironment(object):
args = [
sys.executable, '-m', 'pip', 'install', '--ignore-installed',
'--no-user', '--prefix', self.path, '--no-warn-script-location',
'--only-binary', ':all:',
]
if logger.getEffectiveLevel() <= logging.DEBUG:
args.append('-v')
for format_control in ('no_binary', 'only_binary'):
formats = getattr(finder.format_control, format_control)
args.extend(('--' + format_control.replace('_', '-'),
','.join(sorted(formats or {':none:'}))))
if finder.index_urls:
args.extend(['-i', finder.index_urls[0]])
for extra_index in finder.index_urls[1:]: