-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: long-description on Windows #2168
Conversation
Signed-off-by: mayeut <mayeut@users.noreply.github.com>
Signed-off-by: mayeut <mayeut@users.noreply.github.com>
@giampaolo, it's probably not as clean is I'd want but thought I'd share this anyway as it's getting late and I probably won't be able to work again on this before the week-end. |
if len(sys.argv) > 2: | ||
with open(sys.argv[2], "wb") as f: | ||
f.write(data.encode("utf8")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't you simply do data.encode("utf8")
from setup.py and avoid editing this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wasn't missing in my commit (since sys
was already used to read the first argument) so I don't know what went wrong on master.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's my fault actually. I manually edited @mayeut's PR to get rid of some parts, then merged it.
Merging as-is. I will try to fix the encoding stuff in a separate commit. |
* 'master' of https://github.com/giampaolo/psutil: fix: long-description on Windows (giampaolo#2168) GH actions: update actions' deps to latest version use argparse module in 3 scripts/internal scripts setup.py: provide better err msg if can't compile giampaolo#2164: fix compilation failures on linux < 2.6.27 / CentOS 5 (giampaolo#2171)
Ok, hopefully c0aadb1 should fix this once and for all. |
* 'master' of https://github.com/giampaolo/psutil: fix long_description on Windows (see: giampaolo#2168) make.bat: use default 'python' exe; get rid of hard-coded python path
Summary
Description
Not sure why the Popen communication is failing on GHA but it inserts a bunch of newlines that shouldn't be there.
This PR uses a temporary file rather than communicating through Popen.