Skip to content

Commit

Permalink
sort package name in extras to make it reproducible
Browse files Browse the repository at this point in the history
  • Loading branch information
ali5h committed Feb 3, 2022
1 parent 3bdd0cf commit e6145c4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/poetry/core/packages/dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def base_pep_508_name(self) -> str:
requirement = self.pretty_name

if self.extras:
extras = ",".join(self.extras)
extras = ",".join(sorted(self.extras))
requirement += f"[{extras}]"

if isinstance(self.constraint, VersionUnion):
Expand Down
2 changes: 1 addition & 1 deletion src/poetry/core/packages/directory_dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def base_pep_508_name(self) -> str:
requirement = self.pretty_name

if self.extras:
extras = ",".join(self.extras)
extras = ",".join(sorted(self.extras))
requirement += f"[{extras}]"

path = path_to_url(self.path) if self.path.is_absolute() else self.path
Expand Down
2 changes: 1 addition & 1 deletion src/poetry/core/packages/file_dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def base_pep_508_name(self) -> str:
requirement = self.pretty_name

if self.extras:
extras = ",".join(self.extras)
extras = ",".join(sorted(self.extras))
requirement += f"[{extras}]"

path = path_to_url(self.path) if self.path.is_absolute() else self.path
Expand Down
2 changes: 1 addition & 1 deletion src/poetry/core/packages/url_dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def base_pep_508_name(self) -> str:
requirement = self.pretty_name

if self.extras:
extras = ",".join(self.extras)
extras = ",".join(sorted(self.extras))
requirement += f"[{extras}]"

requirement += f" @ {self._url}"
Expand Down
2 changes: 1 addition & 1 deletion src/poetry/core/packages/vcs_dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def base_pep_508_name(self) -> str:
parsed_url = git.ParsedUrl.parse(self._source)

if self.extras:
extras = ",".join(self.extras)
extras = ",".join(sorted(self.extras))
requirement += f"[{extras}]"

if parsed_url.protocol is not None:
Expand Down

0 comments on commit e6145c4

Please sign in to comment.