Skip to content

Commit 06ef160

Browse files
committed
Clean up
1 parent ea25cd5 commit 06ef160

File tree

2 files changed

+2
-280
lines changed

2 files changed

+2
-280
lines changed

azure-pipelines.yml

-271
Original file line numberDiff line numberDiff line change
@@ -233,277 +233,6 @@ jobs:
233233
TargetPath: 'build_scripts/windows/out/'
234234
ArtifactName: msi-$(Platform)
235235

236-
- job: Test127Official
237-
displayName: Test 3.12.7 official
238-
pool:
239-
vmImage: windows-2019
240-
steps:
241-
- script: |
242-
echo default python
243-
where python3
244-
python3 --version
245-
python3 -m pip debug
246-
247-
set "PATH=%PATH%;%ProgramFiles%\Git\bin;%ProgramFiles%\Git\usr\bin;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin"
248-
249-
set PYTHON_ARCH=amd64
250-
set PYTHON_VERSION=3.12.7
251-
252-
253-
set REPO_ROOT=%CD%
254-
255-
set PYTHON_DIR=%REPO_ROOT%\artifacts\Python
256-
257-
rm -rf %PYTHON_DIR%
258-
259-
set PYTHON_DOWNLOAD_URL="https://www.python.org/ftp/python/%PYTHON_VERSION%/python-%PYTHON_VERSION%-embed-%PYTHON_ARCH%.zip"
260-
261-
echo %PYTHON_DOWNLOAD_URL%
262-
263-
REM https://pip.pypa.io/en/stable/installation/#get-pip-py
264-
set GET_PIP_DOWNLOAD_URL="https://bootstrap.pypa.io/get-pip.py"
265-
266-
echo Setting up Python and pip
267-
mkdir %PYTHON_DIR%
268-
pushd %PYTHON_DIR%
269-
270-
echo Downloading Python
271-
curl --output python-archive.zip %PYTHON_DOWNLOAD_URL%
272-
unzip python-archive.zip
273-
del python-archive.zip
274-
echo Python downloaded and extracted successfully
275-
276-
REM Delete _pth file so that Lib\site-packages is included in sys.path
277-
REM https://github.com/pypa/pip/issues/4207#issuecomment-297396913
278-
REM https://docs.python.org/3.10/using/windows.html#finding-modules
279-
del python*._pth
280-
281-
echo Installing pip
282-
curl --output get-pip.py %GET_PIP_DOWNLOAD_URL%
283-
echo %PYTHON_DIR%\python.exe
284-
285-
%PYTHON_DIR%\python.exe get-pip.py
286-
del get-pip.py
287-
echo Pip set up successful
288-
echo python.exe -m site
289-
%PYTHON_DIR%\python.exe -m site
290-
echo %errorlevel%
291-
echo python.exe -Im site
292-
%PYTHON_DIR%\python.exe -Im site
293-
echo %errorlevel%
294-
295-
echo python.exe -Im pip debug
296-
%PYTHON_DIR%\python.exe -Im pip debug
297-
echo %errorlevel%
298-
echo -Ic pip
299-
%PYTHON_DIR%\python.exe -Ic "import pip;print(pip.__path__)"
300-
echo %errorlevel%
301-
echo -c pip
302-
%PYTHON_DIR%\python.exe -c "import pip;print(pip.__path__)"
303-
echo %errorlevel%
304-
echo python.exe -m pip debug
305-
%PYTHON_DIR%\python.exe -m pip debug
306-
echo %errorlevel%
307-
308-
309-
echo install src
310-
set CLI_SRC=%REPO_ROOT%\src
311-
for %%a in (%CLI_SRC%\azure-cli %CLI_SRC%\azure-cli-core %CLI_SRC%\azure-cli-telemetry) do (
312-
pushd %%a
313-
%PYTHON_DIR%\python.exe -Im pip install --no-warn-script-location --no-cache-dir --no-deps . -vvv
314-
popd
315-
)
316-
317-
318-
echo dir 3.12.7
319-
dir C:\hostedtoolcache\windows\Python\3.12.7\x64\Lib
320-
dir C:\hostedtoolcache\windows\Python\3.12.7\x64\Lib\site-packages
321-
echo dir 3.12.6
322-
dir C:\hostedtoolcache\windows\Python\3.12.6\x64\Lib
323-
dir C:\hostedtoolcache\windows\Python\3.12.6\x64\Lib\site-packages
324-
325-
- job: Test127
326-
displayName: Test 3.12.7
327-
pool:
328-
name: ${{ variables.windows_pool }}
329-
steps:
330-
- script: |
331-
echo default python
332-
where python3
333-
python3 --version
334-
python3 -m pip debug
335-
python --version
336-
python -m pip debug
337-
set "PATH=%PATH%;%ProgramFiles%\Git\bin;%ProgramFiles%\Git\usr\bin;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin"
338-
339-
set PYTHON_ARCH=amd64
340-
set PYTHON_VERSION=3.12.7
341-
342-
343-
set REPO_ROOT=%CD%
344-
345-
set PYTHON_DIR=%REPO_ROOT%\artifacts\Python
346-
347-
rm -rf %PYTHON_DIR%
348-
349-
set PYTHON_DOWNLOAD_URL="https://www.python.org/ftp/python/%PYTHON_VERSION%/python-%PYTHON_VERSION%-embed-%PYTHON_ARCH%.zip"
350-
351-
echo %PYTHON_DOWNLOAD_URL%
352-
353-
REM https://pip.pypa.io/en/stable/installation/#get-pip-py
354-
set GET_PIP_DOWNLOAD_URL="https://bootstrap.pypa.io/get-pip.py"
355-
356-
echo Setting up Python and pip
357-
mkdir %PYTHON_DIR%
358-
pushd %PYTHON_DIR%
359-
360-
echo Downloading Python
361-
curl --output python-archive.zip %PYTHON_DOWNLOAD_URL%
362-
unzip python-archive.zip
363-
del python-archive.zip
364-
echo Python downloaded and extracted successfully
365-
366-
REM Delete _pth file so that Lib\site-packages is included in sys.path
367-
REM https://github.com/pypa/pip/issues/4207#issuecomment-297396913
368-
REM https://docs.python.org/3.10/using/windows.html#finding-modules
369-
del python*._pth
370-
371-
echo Installing pip
372-
curl --output get-pip.py %GET_PIP_DOWNLOAD_URL%
373-
echo %PYTHON_DIR%\python.exe
374-
375-
%PYTHON_DIR%\python.exe get-pip.py
376-
del get-pip.py
377-
echo Pip set up successful
378-
echo python.exe -m site
379-
%PYTHON_DIR%\python.exe -m site
380-
echo %errorlevel%
381-
echo python.exe -Im site
382-
%PYTHON_DIR%\python.exe -Im site
383-
echo %errorlevel%
384-
385-
echo install setuptools wheel
386-
%PYTHON_DIR%\python.exe -Im pip install setuptools wheel
387-
388-
echo python.exe -Im pip debug
389-
%PYTHON_DIR%\python.exe -Im pip debug
390-
echo %errorlevel%
391-
echo -Ic pip
392-
%PYTHON_DIR%\python.exe -Ic "import pip;print(pip.__path__)"
393-
echo %errorlevel%
394-
echo -c pip
395-
%PYTHON_DIR%\python.exe -c "import pip;print(pip.__path__)"
396-
echo %errorlevel%
397-
echo python.exe -m pip debug
398-
%PYTHON_DIR%\python.exe -m pip debug
399-
echo %errorlevel%
400-
401-
echo install src
402-
set CLI_SRC=%REPO_ROOT%\src
403-
for %%a in (%CLI_SRC%\azure-cli %CLI_SRC%\azure-cli-core %CLI_SRC%\azure-cli-telemetry) do (
404-
pushd %%a
405-
%PYTHON_DIR%\python.exe -Im pip install --no-warn-script-location --no-cache-dir --no-deps . -vvv
406-
popd
407-
)
408-
409-
410-
echo dir 3.12.7
411-
dir C:\hostedtoolcache\windows\Python\3.12.7\x64\Lib
412-
dir C:\hostedtoolcache\windows\Python\3.12.7\x64\Lib\site-packages
413-
echo dir 3.12.6
414-
dir C:\hostedtoolcache\windows\Python\3.12.6\x64\Lib
415-
dir C:\hostedtoolcache\windows\Python\3.12.6\x64\Lib\site-packages
416-
417-
- job: Test126
418-
displayName: Test 3.12.6
419-
pool:
420-
name: ${{ variables.windows_pool }}
421-
steps:
422-
- script: |
423-
echo default python
424-
where python3
425-
python3 --version
426-
python3 -m pip debug
427-
428-
429-
set "PATH=%PATH%;%ProgramFiles%\Git\bin;%ProgramFiles%\Git\usr\bin;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin"
430-
431-
432-
set PYTHON_ARCH=amd64
433-
set PYTHON_VERSION=3.12.6
434-
435-
436-
set REPO_ROOT=%CD%
437-
438-
set PYTHON_DIR=%REPO_ROOT%\artifacts\Python
439-
440-
rm -rf %PYTHON_DIR%
441-
442-
set PYTHON_DOWNLOAD_URL="https://www.python.org/ftp/python/%PYTHON_VERSION%/python-%PYTHON_VERSION%-embed-%PYTHON_ARCH%.zip"
443-
444-
echo %PYTHON_DOWNLOAD_URL%
445-
446-
REM https://pip.pypa.io/en/stable/installation/#get-pip-py
447-
set GET_PIP_DOWNLOAD_URL="https://bootstrap.pypa.io/get-pip.py"
448-
449-
echo Setting up Python and pip
450-
mkdir %PYTHON_DIR%
451-
pushd %PYTHON_DIR%
452-
453-
echo Downloading Python
454-
curl --output python-archive.zip %PYTHON_DOWNLOAD_URL%
455-
unzip python-archive.zip
456-
del python-archive.zip
457-
echo Python downloaded and extracted successfully
458-
459-
REM Delete _pth file so that Lib\site-packages is included in sys.path
460-
REM https://github.com/pypa/pip/issues/4207#issuecomment-297396913
461-
REM https://docs.python.org/3.10/using/windows.html#finding-modules
462-
del python*._pth
463-
464-
echo Installing pip
465-
curl --output get-pip.py %GET_PIP_DOWNLOAD_URL%
466-
echo %PYTHON_DIR%\python.exe
467-
468-
%PYTHON_DIR%\python.exe get-pip.py
469-
del get-pip.py
470-
echo Pip set up successful
471-
echo python.exe -m site
472-
%PYTHON_DIR%\python.exe -m site
473-
echo %errorlevel%
474-
echo python.exe -Im site
475-
%PYTHON_DIR%\python.exe -Im site
476-
echo %errorlevel%
477-
478-
echo python.exe -Im pip debug
479-
%PYTHON_DIR%\python.exe -Im pip debug
480-
echo %errorlevel%
481-
echo -Ic pip
482-
%PYTHON_DIR%\python.exe -Ic "import pip;print(pip.__path__)"
483-
echo %errorlevel%
484-
echo -c pip
485-
%PYTHON_DIR%\python.exe -c "import pip;print(pip.__path__)"
486-
echo %errorlevel%
487-
echo python.exe -m pip debug
488-
%PYTHON_DIR%\python.exe -m pip debug
489-
echo %errorlevel%
490-
491-
492-
echo install src
493-
set CLI_SRC=%REPO_ROOT%\src
494-
for %%a in (%CLI_SRC%\azure-cli %CLI_SRC%\azure-cli-core %CLI_SRC%\azure-cli-telemetry) do (
495-
pushd %%a
496-
%PYTHON_DIR%\python.exe -Im pip install --no-warn-script-location --no-cache-dir --no-deps . -vvv
497-
popd
498-
)
499-
500-
echo dir 3.12.7
501-
dir C:\hostedtoolcache\windows\Python\3.12.7\x64\Lib
502-
dir C:\hostedtoolcache\windows\Python\3.12.7\x64\Lib\site-packages
503-
echo dir 3.12.6
504-
dir C:\hostedtoolcache\windows\Python\3.12.6\x64\Lib
505-
dir C:\hostedtoolcache\windows\Python\3.12.6\x64\Lib\site-packages
506-
507236
- job: BuildWindowsZIP
508237
displayName: Build Windows ZIP
509238
strategy:

build_scripts/windows/scripts/build.cmd

+2-9
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,6 @@ if "%TARGET%" == "msi" (
9494
)
9595
)
9696

97-
rm %PYTHON_DIR% -r -f
98-
rm %BUILDING_DIR% -r -f
99-
10097
REM ensure Python is available
10198
if exist %PYTHON_DIR% (
10299
echo Using existing Python at %PYTHON_DIR%
@@ -126,6 +123,8 @@ if not exist %PYTHON_DIR% (
126123

127124
REM setuptools is not installed by default in Python 3.12, but it is required by some dependencys
128125
REM See https://github.com/Azure/azure-cli/pull/27196
126+
REM Install wheel to force pip install azure-cli in legacy mode
127+
REM see https://github.com/Azure/azure-cli/pull/29887
129128
echo Installing setuptools wheel
130129
%PYTHON_DIR%\python.exe -Im pip install setuptools wheel
131130

@@ -139,20 +138,14 @@ robocopy %PYTHON_DIR% %BUILDING_DIR% /s /NFL /NDL
139138
set CLI_SRC=%REPO_ROOT%\src
140139
for %%a in (%CLI_SRC%\azure-cli %CLI_SRC%\azure-cli-core %CLI_SRC%\azure-cli-telemetry) do (
141140
pushd %%a
142-
echo install %%a
143141
%BUILDING_DIR%\python.exe -Im pip install --no-warn-script-location --no-cache-dir --no-deps .
144142
if %errorlevel% neq 0 goto ERROR
145143
popd
146144
)
147145

148146
%BUILDING_DIR%\python.exe -Im pip install --no-warn-script-location --requirement %CLI_SRC%\azure-cli\requirements.py3.windows.txt
149147
if %errorlevel% neq 0 goto ERROR
150-
echo %BUILDING_DIR%\python.exe -Im pip list
151-
%BUILDING_DIR%\python.exe -Im pip list
152-
echo %BUILDING_DIR%\python.exe -m pip list
153-
%BUILDING_DIR%\python.exe -m pip list
154148

155-
echo run azure.cli
156149
REM Check azure.cli can be executed. This also prints the Python version.
157150
%BUILDING_DIR%\python.exe -Im azure.cli --version
158151
if %errorlevel% neq 0 goto ERROR

0 commit comments

Comments
 (0)