summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Darbois <mayeut@users.noreply.github.com>2022-11-10 22:10:20 +0100
committerGitHub <noreply@github.com>2022-11-10 22:10:20 +0100
commit90c2eec6daa69977b75ebfccc6dc977404faab45 (patch)
tree058935098cbec1a64b35c57745f3ee5b5a8d0133
parent167833fe27daac88a73407c99987980fd878e0e0 (diff)
downloadpsutil-90c2eec6daa69977b75ebfccc6dc977404faab45.tar.gz
fix: long-description on Windows (#2168)
-rw-r--r--.github/workflows/build.yml11
-rwxr-xr-xscripts/internal/convert_readme.py6
2 files changed, 16 insertions, 1 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index eecd6eab..502ecb5a 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -192,3 +192,14 @@ jobs:
python3 -m isort .
# clinter
find . -type f \( -iname "*.c" -o -iname "*.h" \) | xargs python3 scripts/internal/clinter.py
+
+ check_dist:
+ name: Check dist
+ needs: [linux-macos-py2, py3]
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/download-artifact@v3
+ with:
+ name: wheels
+ path: wheelhouse
+ - run: pipx run twine check --strict wheelhouse/*
diff --git a/scripts/internal/convert_readme.py b/scripts/internal/convert_readme.py
index d96c6c5d..bd00cf23 100755
--- a/scripts/internal/convert_readme.py
+++ b/scripts/internal/convert_readme.py
@@ -48,7 +48,11 @@ def main():
data = f.read()
data = re.sub(r".. raw:: html\n+\s+<div align[\s\S]*?/div>", summary, data)
data = re.sub(r"Sponsors\n========[\s\S]*?Example usages", funding, data)
- print(data)
+ if len(sys.argv) > 2:
+ with open(sys.argv[2], "wb") as f:
+ f.write(data.encode("utf8"))
+ else:
+ print(data)
if __name__ == '__main__':