Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: clarify that dependencies are build dependencies #514

Merged
merged 1 commit into from Sep 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/build/__init__.py
Expand Up @@ -373,7 +373,7 @@ def get_requires_for_build(self, distribution: str, config_settings: Optional[Co
(``sdist`` or ``wheel``)
:param config_settings: Config settings for the build backend
"""
self.log(f'Getting dependencies for {distribution}...')
self.log(f'Getting build dependencies for {distribution}...')
hook_name = f'get_requires_for_build_{distribution}'
get_requires = getattr(self._hook, hook_name)

Expand Down
22 changes: 13 additions & 9 deletions tests/test_main.py
Expand Up @@ -226,12 +226,12 @@ def test_build_package_via_sdist_invalid_distribution(tmp_dir, package_test_setu
[
'* Creating venv isolated environment...',
'* Installing packages in isolated environment... (setuptools >= 42.0.0, wheel >= 0.36.0)',
'* Getting dependencies for sdist...',
'* Getting build dependencies for sdist...',
'* Building sdist...',
'* Building wheel from sdist',
'* Creating venv isolated environment...',
'* Installing packages in isolated environment... (setuptools >= 42.0.0, wheel >= 0.36.0)',
'* Getting dependencies for wheel...',
'* Getting build dependencies for wheel...',
'* Installing packages in isolated environment... (wheel)',
'* Building wheel...',
'Successfully built test_setuptools-1.0.0.tar.gz and test_setuptools-1.0.0-py2.py3-none-any.whl',
Expand All @@ -240,10 +240,10 @@ def test_build_package_via_sdist_invalid_distribution(tmp_dir, package_test_setu
(
['--no-isolation'],
[
'* Getting dependencies for sdist...',
'* Getting build dependencies for sdist...',
'* Building sdist...',
'* Building wheel from sdist',
'* Getting dependencies for wheel...',
'* Getting build dependencies for wheel...',
'* Building wheel...',
'Successfully built test_setuptools-1.0.0.tar.gz and test_setuptools-1.0.0-py2.py3-none-any.whl',
],
Expand All @@ -253,7 +253,7 @@ def test_build_package_via_sdist_invalid_distribution(tmp_dir, package_test_setu
[
'* Creating venv isolated environment...',
'* Installing packages in isolated environment... (setuptools >= 42.0.0, wheel >= 0.36.0)',
'* Getting dependencies for wheel...',
'* Getting build dependencies for wheel...',
'* Installing packages in isolated environment... (wheel)',
'* Building wheel...',
'Successfully built test_setuptools-1.0.0-py2.py3-none-any.whl',
Expand All @@ -262,21 +262,25 @@ def test_build_package_via_sdist_invalid_distribution(tmp_dir, package_test_setu
(
['--wheel', '--no-isolation'],
[
'* Getting dependencies for wheel...',
'* Getting build dependencies for wheel...',
'* Building wheel...',
'Successfully built test_setuptools-1.0.0-py2.py3-none-any.whl',
],
),
(
['--sdist', '--no-isolation'],
['* Getting dependencies for sdist...', '* Building sdist...', 'Successfully built test_setuptools-1.0.0.tar.gz'],
[
'* Getting build dependencies for sdist...',
'* Building sdist...',
'Successfully built test_setuptools-1.0.0.tar.gz',
],
),
(
['--sdist', '--wheel', '--no-isolation'],
[
'* Getting dependencies for sdist...',
'* Getting build dependencies for sdist...',
'* Building sdist...',
'* Getting dependencies for wheel...',
'* Getting build dependencies for wheel...',
'* Building wheel...',
'Successfully built test_setuptools-1.0.0.tar.gz and test_setuptools-1.0.0-py2.py3-none-any.whl',
],
Expand Down
4 changes: 2 additions & 2 deletions tests/test_projectbuilder.py
Expand Up @@ -601,8 +601,8 @@ def test_log(mocker, caplog, package_test_flit):
builder.log('something')

assert [(record.levelname, record.message) for record in caplog.records] == [
('INFO', 'Getting dependencies for sdist...'),
('INFO', 'Getting dependencies for wheel...'),
('INFO', 'Getting build dependencies for sdist...'),
('INFO', 'Getting build dependencies for wheel...'),
('INFO', 'Getting metadata for wheel...'),
('INFO', 'Building sdist...'),
('INFO', 'Building wheel...'),
Expand Down