Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork939
Commit6727d0e
committed
Always read metadata files as UTF-8 in setup.py
This passes `encoding="utf-8"` to the `open` calls in setup.py, sothe readme, version, and requirements files are always read asUTF-8, even on systems whose locale is not UTF-8. This fixes thebug described in#1747 where installation other than from apre-built wheel would fail on many Windows systems usingnon-European languages.The specific problem occurred with the README.md file. Therequirements files are less likely to contain characters not in theASCII subset, though maybe they could come to contain them, perhapsin comments. The VERSION file is even less likely to ever containsuch characters. Nonetheless, for consistency, because it is a bestpractice, and because it appears to be the intent of the existingcode, encoding="utf=8" is added for opening all of them.This change is tested on a system whose locale uses Windows codepage 936. Editable installation, as well as the other affected waysof installing (and building) described in#1747, are now working.1 parent5c6a4f4 commit6727d0e
1 file changed
+4
-4
lines changedLines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 |
| - | |
| 13 | + | |
14 | 14 |
| |
15 | 15 |
| |
16 |
| - | |
| 16 | + | |
17 | 17 |
| |
18 | 18 |
| |
19 |
| - | |
| 19 | + | |
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
|
0 commit comments
Comments
(0)