-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…268) * fix: use `--upgrade` rather than `--ignore-installed` to upgrade pip This removes left over files when upgrading pip. * remove all installed python on macOS
- Loading branch information
Showing
5 changed files
with
35 additions
and
2 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
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
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,24 @@ | ||
import glob | ||
import os.path | ||
import sysconfig | ||
from collections import defaultdict | ||
|
||
|
||
def check_dist_info(): | ||
paths = set([sysconfig.get_path("purelib"), sysconfig.get_path("platlib")]) | ||
versions = defaultdict(list) | ||
for path in paths: | ||
pattern = os.path.join(path, "*.dist-info") | ||
for dist_info in glob.glob(pattern): | ||
name = os.path.basename(dist_info).split("-", maxsplit=1)[0] | ||
versions[name].append(dist_info) | ||
exit_code = 0 | ||
for name in versions: | ||
if len(versions[name]) > 1: | ||
print("multiple dist-info found for {}: {}".format(name, versions[name])) | ||
exit_code = 1 | ||
exit(exit_code) | ||
|
||
|
||
if __name__ == "__main__": | ||
check_dist_info() |