diff --git a/poetry/masonry/api.py b/poetry/masonry/api.py index 539637df8f8..b6df04b0168 100644 --- a/poetry/masonry/api.py +++ b/poetry/masonry/api.py @@ -20,13 +20,14 @@ def get_requires_for_build_wheel(config_settings=None): """ - Returns a list of requirements for building, as strings - """ - poetry = Factory().create_poetry(Path(".")) + Returns an additional list of requirements for building, as PEP508 strings, + above and beyond those specified in the pyproject.toml file. - main, _ = SdistBuilder.convert_dependencies(poetry.package, poetry.package.requires) + This implementation is optional. At the moment it only returns an empty list, which would be the same as if + not define. So this is just for completeness for future implementation. + """ - return main + return [] # For now, we require all dependencies to build either a wheel or an sdist. diff --git a/tests/masonry/test_api.py b/tests/masonry/test_api.py index c455d568296..2019a08212a 100644 --- a/tests/masonry/test_api.py +++ b/tests/masonry/test_api.py @@ -28,15 +28,15 @@ def cwd(directory): def test_get_requires_for_build_wheel(): - expected = ["cleo>=0.6.0,<0.7.0", "cachy[msgpack]>=0.2.0,<0.3.0"] + expected = [] with cwd(os.path.join(fixtures, "complete")): - api.get_requires_for_build_wheel() == expected + assert api.get_requires_for_build_wheel() == expected def test_get_requires_for_build_sdist(): - expected = ["cleo>=0.6.0,<0.7.0", "cachy[msgpack]>=0.2.0,<0.3.0"] + expected = [] with cwd(os.path.join(fixtures, "complete")): - api.get_requires_for_build_sdist() == expected + assert api.get_requires_for_build_sdist() == expected def test_build_wheel():