Commit f4286295 authored by Jason R. Coombs's avatar Jason R. Coombs Committed by GitHub

Merge pull request #1477 from gaborbernat/no-sdist-wheel

build_meta.get_requires_for_build_sdist does not include wheel
parents 5a58c695 2fabfd3a
``build_meta.get_requires_for_build_sdist`` now does not include the ``wheel`` package anymore
......@@ -91,9 +91,8 @@ def _fix_config(config_settings):
return config_settings
def _get_build_requires(config_settings):
def _get_build_requires(config_settings, requirements):
config_settings = _fix_config(config_settings)
requirements = ['setuptools', 'wheel']
sys.argv = sys.argv[:1] + ['egg_info'] + \
config_settings["--global-option"]
......@@ -113,20 +112,20 @@ def _get_immediate_subdirectories(a_dir):
def get_requires_for_build_wheel(config_settings=None):
config_settings = _fix_config(config_settings)
return _get_build_requires(config_settings)
return _get_build_requires(config_settings, requirements=['setuptools', 'wheel'])
def get_requires_for_build_sdist(config_settings=None):
config_settings = _fix_config(config_settings)
return _get_build_requires(config_settings)
return _get_build_requires(config_settings, requirements=['setuptools'])
def prepare_metadata_for_build_wheel(metadata_directory, config_settings=None):
sys.argv = sys.argv[:1] + ['dist_info', '--egg-base', _to_str(metadata_directory)]
_run_setup()
dist_info_directory = metadata_directory
while True:
while True:
dist_infos = [f for f in os.listdir(dist_info_directory)
if f.endswith('.dist-info')]
......
......@@ -107,6 +107,12 @@ def test_get_requires_for_build_wheel(build_backend):
assert sorted(actual) == sorted(expected)
def test_get_requires_for_build_sdist(build_backend):
actual = build_backend.get_requires_for_build_sdist()
expected = ['six', 'setuptools']
assert sorted(actual) == sorted(expected)
def test_build_wheel(build_backend):
dist_dir = os.path.abspath('pip-wheel')
os.makedirs(dist_dir)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment