do not add extra newline in RECORD

This commit is contained in:
Denis Bilenko 2025-03-05 15:36:39 +01:00
parent 63e6d623c0
commit 106ce9438e
4 changed files with 3 additions and 4 deletions

View File

@ -17,7 +17,7 @@ Warn: Patched whl: my_test_code-0.0.1-py3-none-any.whl -> my_test_code-0.0.1+202
Home-page: https://databricks.com Home-page: https://databricks.com
--- original/my_test_code-0.0.1+2025030514073312.dist-info/RECORD --- original/my_test_code-0.0.1+2025030514073312.dist-info/RECORD
+++ output/my_test_code-0.0.1+2025030514073312.dist-info/RECORD +++ output/my_test_code-0.0.1+2025030514073312.dist-info/RECORD
@@ -1,7 +1,8 @@ @@ -1,7 +1,7 @@
src/__init__.py,sha256=BRmKeYehopKv4NG_SFa7t6wn248RrPHJivu7DM1R-Rw,48 src/__init__.py,sha256=BRmKeYehopKv4NG_SFa7t6wn248RrPHJivu7DM1R-Rw,48
src/__main__.py,sha256=8TtsnLsaJEM35Y4L8ocrv-qfxusgYpRL2HPyYiabHng,242 src/__main__.py,sha256=8TtsnLsaJEM35Y4L8ocrv-qfxusgYpRL2HPyYiabHng,242
-my_test_code-0.0.1.dist-info/METADATA,sha256=6fyVq4hexXGUP_J2mB1CI-ijZ6CenvKNIlHx0bKPRJ0,197 -my_test_code-0.0.1.dist-info/METADATA,sha256=6fyVq4hexXGUP_J2mB1CI-ijZ6CenvKNIlHx0bKPRJ0,197
@ -30,4 +30,3 @@ Warn: Patched whl: my_test_code-0.0.1-py3-none-any.whl -> my_test_code-0.0.1+202
+my_test_code-0.0.1+2025030514073312.dist-info/entry_points.txt,sha256=oDWOW9SsBlk4Uejj1ftYPBxfhJ5ZJctb4JOUIG1rc-4,34 +my_test_code-0.0.1+2025030514073312.dist-info/entry_points.txt,sha256=oDWOW9SsBlk4Uejj1ftYPBxfhJ5ZJctb4JOUIG1rc-4,34
+my_test_code-0.0.1+2025030514073312.dist-info/top_level.txt,sha256=74rtVfumQlgAPzR5_2CgYN24MB0XARCg0t-gzk6gTrM,4 +my_test_code-0.0.1+2025030514073312.dist-info/top_level.txt,sha256=74rtVfumQlgAPzR5_2CgYN24MB0XARCg0t-gzk6gTrM,4
+my_test_code-0.0.1+2025030514073312.dist-info/RECORD,, +my_test_code-0.0.1+2025030514073312.dist-info/RECORD,,
+

View File

@ -5,4 +5,3 @@ my_test_code-0.0.1+2025030514073312.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09
my_test_code-0.0.1+2025030514073312.dist-info/entry_points.txt,sha256=oDWOW9SsBlk4Uejj1ftYPBxfhJ5ZJctb4JOUIG1rc-4,34 my_test_code-0.0.1+2025030514073312.dist-info/entry_points.txt,sha256=oDWOW9SsBlk4Uejj1ftYPBxfhJ5ZJctb4JOUIG1rc-4,34
my_test_code-0.0.1+2025030514073312.dist-info/top_level.txt,sha256=74rtVfumQlgAPzR5_2CgYN24MB0XARCg0t-gzk6gTrM,4 my_test_code-0.0.1+2025030514073312.dist-info/top_level.txt,sha256=74rtVfumQlgAPzR5_2CgYN24MB0XARCg0t-gzk6gTrM,4
my_test_code-0.0.1+2025030514073312.dist-info/RECORD,, my_test_code-0.0.1+2025030514073312.dist-info/RECORD,,

View File

@ -6,7 +6,9 @@ trace $CLI selftest patchwhl my_test_code-0.0.1-py3-none-any.whl
mkdir output original mkdir output original
unzip -q my_test_code-0.0.1+2025030514073312-py3-none-any.whl -d output unzip -q my_test_code-0.0.1+2025030514073312-py3-none-any.whl -d output
unzip -q my_test_code-0.0.1-py3-none-any.whl -d original unzip -q my_test_code-0.0.1-py3-none-any.whl -d original
rm my_test_code-0.0.1+2025030514073312-py3-none-any.whl
# rename directory to match so that we can compare contents # rename directory to match so that we can compare contents
mv original/my_test_code-0.0.1.dist-info original/my_test_code-0.0.1+2025030514073312.dist-info mv original/my_test_code-0.0.1.dist-info original/my_test_code-0.0.1+2025030514073312.dist-info
trace diff.py original output trace diff.py original output
rm -fr original

View File

@ -103,7 +103,6 @@ func patchRecord(r io.Reader, oldDistInfoPrefix, newDistInfoPrefix, metadataHash
if err := scanner.Err(); err != nil { if err := scanner.Err(); err != nil {
return nil, err return nil, err
} }
buf.WriteString("\n")
return buf.Bytes(), nil return buf.Bytes(), nil
} }