Staging
v0.8.1
v0.8.1
Revision a1d3be4623c8ec7069bd34ccdce336be9cdeb644 authored by Miss Islington (bot) on 15 June 2020, 17:45:21 UTC, committed by GitHub on 15 June 2020, 17:45:21 UTC
ensurepip optionally installs or upgrades 'pip' and 'setuptools' using the version of those modules bundled with Python. The internal PIP installation routine by default temporarily uses its cache, if it exists. This is undesirable as Python builds and installations may be independent of the user running the build, whilst PIP cache location is dependent on the user's environment and outside of the build environment. At the same time, there's no value in using the cache while installing bundled modules. This change disables PIP caching when used in ensurepip. (cherry picked from commit 4a3a682b12f93a03888e8b59f439bc5fe30d6055) Co-authored-by: Krzysztof Konopko <kkonopko@users.noreply.github.com>
1 parent c72b7f7
fix_encoding.py
#! /usr/bin/env python3
#
# Fixes encoding of the project files to add UTF-8 BOM.
#
# Visual Studio insists on having the BOM in project files, and will
# restore it on first edit. This script will go through the relevant
# files and ensure the BOM is included, which should prevent too many
# irrelevant changesets.
#
from pathlib import Path
__author__ = "Steve Dower <steve.dower@python.org>"
__version__ = "1.0.0.0"
def fix(p):
with open(p, 'r', encoding='utf-8-sig') as f:
data = f.read()
with open(p, 'w', encoding='utf-8-sig') as f:
f.write(data)
ROOT_DIR = Path(__file__).resolve().parent
if __name__ == '__main__':
count = 0
print('Fixing:')
for f in ROOT_DIR.glob('*.vcxproj'):
print(f' - {f.name}')
fix(f)
count += 1
for f in ROOT_DIR.glob('*.vcxproj.filters'):
print(f' - {f.name}')
fix(f)
count += 1
print()
print(f'Fixed {count} files')
Computing file changes ...