未验证 提交 65f1a012 编写于 作者: F Frost Ming

Stable marker string

Fix #7
上级 4f6aa331
......@@ -53,10 +53,10 @@ class Installer:
def install(self, candidate: Candidate) -> None:
context.io.echo(f"Installing {candidate.format()}...")
candidate.get_metadata()
if candidate.wheel:
self.install_wheel(candidate.wheel)
else:
if candidate.req.editable:
self.install_editable(candidate.ireq)
else:
self.install_wheel(candidate.wheel)
def install_wheel(self, wheel: Wheel) -> None:
paths = self.environment.get_paths()
......
......@@ -178,7 +178,7 @@ class Candidate:
def as_lockfile_entry(self) -> Dict[str, Any]:
result = {
"name": self.name,
"sections": self.sections,
"sections": sorted(self.sections),
"version": str(self.version),
"extras": sorted(self.req.extras or ()),
"marker": str(self.marker) if self.marker else None,
......
......@@ -373,7 +373,7 @@ class PySpecSet(SpecifierSet):
result = []
excludes = []
full_excludes = []
for spec in self:
for spec in sorted(self, key=lambda spec: spec.version):
op, version = spec.operator, spec.version
if len(version.split(".")) < 3:
key = "python_version"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册