Skip to content

Commit 74f4d3f

Browse files
committed
ensure Python version matches WinPython build directory
1 parent 7696048 commit 74f4d3f

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

hash.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ def give_hash(file_in, with_this):
3737
+ " " * (33 - 5)
3838
+ "| Size"
3939
+ " " * (20 - 6)
40-
#+ " | SHA3-256"
41-
#+ " " * (64 - 7)
40+
+ " | SHA3-256"
41+
+ " " * (64 - 7)
4242
)
4343
line = "|".join(
4444
["-" * len(i) for i in header.split("|")]
@@ -52,7 +52,7 @@ def give_hash(file_in, with_this):
5252
f"{give_hash(file, hashlib.sha1)} | " +
5353
f"{give_hash(file, hashlib.sha256)} | " +
5454
f"{os.path.basename(file):33} |"+
55-
f"{os.path.getsize(file):13,}".replace(",", " ") + ' Bytes' ) #+ f"{give_hash(file, hashlib.sha3_256)}")
55+
f"{os.path.getsize(file):13,}".replace(",", " ") + ' Bytes' + f" | {give_hash(file, hashlib.sha3_256)}")
5656

5757

5858

make.py

+9
Original file line numberDiff line numberDiff line change
@@ -2079,6 +2079,15 @@ def make(
20792079
# PyPy: get Fullversion from the executable
20802080
self.python_fullversion = utils.get_python_long_version(
20812081
self.distribution.target)
2082+
2083+
# PyPY: Assert that WinPython version and real python version do match
2084+
self._print(f"Python version{self.python_fullversion.replace('.','')}"+
2085+
f"\nDistro Name {self.distribution.target}")
2086+
assert self.python_fullversion.replace('.','') in \
2087+
self.distribution.target, \
2088+
"Distro Directory doesn't match the Python version it ships" + \
2089+
f"\nPython version: {self.python_fullversion.replace('.','')}"+ \
2090+
f"\nDistro Name: {self.distribution.target}"
20822091

20832092
if remove_existing:
20842093
if not self.simulation:

0 commit comments

Comments
 (0)