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

Allow path dependency that is missing build-system #675

Merged
merged 6 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove incorrect reference to pep517 and simplify logic
  • Loading branch information
oysols committed Dec 16, 2023
commit 6d4bd2a4bf2ec68cd8e74e5ccd66e25d4f4b69f7
8 changes: 2 additions & 6 deletions src/poetry/core/packages/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
from poetry.core.constraints.version import Version
from poetry.core.constraints.version import VersionRange
from poetry.core.constraints.version import parse_marker_version_constraint
from poetry.core.pyproject.toml import PyProjectTOML
from poetry.core.version.markers import SingleMarker
from poetry.core.version.markers import SingleMarkerLike
from poetry.core.version.markers import dnf
Expand Down Expand Up @@ -129,12 +128,9 @@ def is_python_project(path: Path) -> bool:
setup_cfg = path / "setup.cfg"
setuptools_project = setup_py.exists() or setup_cfg.exists()

pyproject = PyProjectTOML(path / "pyproject.toml")
pyproject = (path / "pyproject.toml").exists()

supports_pep517 = setuptools_project or pyproject.exists()
supports_poetry = pyproject.is_poetry_project()

return supports_pep517 or supports_poetry
return pyproject or setuptools_project


def is_archive_file(name: str) -> bool:
Expand Down
3 changes: 0 additions & 3 deletions src/poetry/core/pyproject/toml.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ def data(self) -> dict[str, Any]:

return self._data

def exists(self) -> bool:
return self.path.exists()

@property
def build_system(self) -> BuildSystem:
if self._build_system is None:
Expand Down