Skip to content

Commit e1d5fcf

Browse files
committed
unix: change distribution filename format
I think this makes slightly more sense.
1 parent d1d08ea commit e1d5fcf

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

cpython-unix/build-main.py

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,15 @@ def main():
6060

6161
if sys.platform == "linux":
6262
platform = "linux64"
63+
64+
if args.musl:
65+
target_triple = "x86_64-unknown-linux-musl"
66+
else:
67+
target_triple = "x86_64-unknown-linux-gnu"
68+
6369
elif sys.platform == "darwin":
6470
platform = "macos"
71+
target_triple = "x86_64-apple-darwin"
6572
else:
6673
raise Exception("unhandled platform")
6774

@@ -76,28 +83,28 @@ def main():
7683
subprocess.run(["make"], env=env, check=True)
7784

7885
basename = "cpython-%s-%s" % (entry["version"], platform)
79-
extra = ""
86+
87+
dest_components = [
88+
"cpython-%s" % entry["version"],
89+
target_triple,
90+
]
8091

8192
if args.musl:
8293
basename += "-musl"
83-
extra = "-musl"
8494
if args.debug:
8595
basename += "-debug"
86-
extra += "-debug"
96+
dest_components.append("debug")
8797
if args.optimized:
8898
basename += "-pgo"
89-
extra += "-pgo"
99+
dest_components.append("opt")
100+
101+
dest_components.append(now.strftime("%Y%m%dT%H%M"))
90102

91103
basename += ".tar"
92104

93105
DIST.mkdir(exist_ok=True)
94106

95-
compress_python_archive(
96-
BUILD / basename,
97-
DIST,
98-
"cpython-%s-%s%s-%s"
99-
% (entry["version"], platform, extra, now.strftime("%Y%m%dT%H:%M")),
100-
)
107+
compress_python_archive(BUILD / basename, DIST, ".".join(dest_components))
101108

102109

103110
if __name__ == "__main__":

0 commit comments

Comments
 (0)