-
Notifications
You must be signed in to change notification settings - Fork 641
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switch to python script with GH markdown formatting
- Loading branch information
1 parent
0de046c
commit 012e61a
Showing
2 changed files
with
30 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import glob | ||
import os | ||
import subprocess | ||
|
||
|
||
def append_to_summary(content): | ||
with open(os.getenv("GITHUB_STEP_SUMMARY"), "a") as summary_file: | ||
summary_file.write(content + "\n") | ||
|
||
|
||
subprocess.run(["pip", "install", "-q", "auditwheel"]) | ||
|
||
wheel_files = glob.glob("dist/*.whl") | ||
|
||
for whl in wheel_files: | ||
append_to_summary("---") | ||
append_to_summary("### 🎡 Auditing wheel: `" + whl + "`\n") | ||
|
||
audit_wheel_output = subprocess.run( | ||
["auditwheel", "show", whl], capture_output=True, text=True | ||
) | ||
|
||
if audit_wheel_output.stdout: | ||
append_to_summary(audit_wheel_output.stdout + "\n") | ||
|
||
if audit_wheel_output.stderr: | ||
append_to_summary("**Error:**\n```\n" + audit_wheel_output.stderr + "```\n") | ||
|
||
append_to_summary("\n🐍 **Slithering on to the next one...** 🐍\n") |