Do not specify a specific version of Python on Windows (#6316)

We install the version of Python we need in the CI environment (e.g. 3.9.x).
This commit is contained in:
Justin Van Patten 2021-02-11 08:22:04 -08:00 committed by GitHub
parent 0059cf205e
commit 066507cd00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 9 deletions

View file

@ -200,7 +200,7 @@
<Target Name="PythonDependencies">
<MakeDir Directories="$(PythonSdkDirectory)\env\src"/>
<Exec Command="pipenv --python 3.7 install --dev"
<Exec Command="pipenv install --dev"
WorkingDirectory="$(PythonSdkDirectory)\env\src" />
</Target>

View file

@ -1770,14 +1770,7 @@ func (pt *ProgramTester) preparePythonProjectWithPipenv(cwd string) error {
// Create a new Pipenv environment. This bootstraps a new virtual environment containing the version of Python that
// we requested. Note that this version of Python is sourced from the machine, so you must first install the version
// of Python that you are requesting on the host machine before building a virtualenv for it.
pythonVersion := "3"
if runtime.GOOS == windowsOS {
// Due to https://bugs.python.org/issue34679, Python Dynamic Providers on Windows do not
// work on Python 3.8.0 (but are fixed in 3.8.1). For now we will force Windows to use 3.7
// to avoid this bug, until 3.8.1 is available in all our CI systems.
pythonVersion = "3.7"
}
if err := pt.runPipenvCommand("pipenv-new", []string{"--python", pythonVersion}, cwd); err != nil {
if err := pt.runPipenvCommand("pipenv-new", []string{"--python", "3"}, cwd); err != nil {
return err
}