-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Packaging] Build MSI/Homebrew packages with dependecies resolved from requirements.txt #13353
[Packaging] Build MSI/Homebrew packages with dependecies resolved from requirements.txt #13353
Conversation
Packaging |
What do azdev need to do? |
I have submitted the PR Azure/azure-cli-dev-tools#194 in azdev. azdev setup will use requirements file to download dependencies by default. But we still provide the option with After merging the azdev PR, we need to modify pipeline script to test both setup.py and requirements file. I'm thinking about using setup.py for python 3.8 tests and requirements file for python 3.6 since we use requirements file for all packages except pip install with this PR and some packages have a bundled python 3.6. What do you think? |
@@ -119,7 +119,7 @@ pywin32==225 | |||
requests==2.22.0 | |||
requests-oauthlib==1.2.0 | |||
scp==0.13.2 | |||
six==1.12.0 | |||
six==1.14.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we consider remove all six
dependency as we only support python 3 now ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I will work on cleaning up dependencies in another PR. Feel free to suggest any other dependencies that could be removed.
I could be done. I have one question. How do we keep up with the version uprgade of those dependencies? How often we update requirements.txt? |
I think the current practice is when we need to use new features or when customers requested to do so, we update the versions. |
we can also make setup.py use requirements.txt too. |
for %%i in (%TEMP_SCRATCH_FOLDER%\*.whl) do ( | ||
set ALL_MODULES=!ALL_MODULES! %%i | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Private wheels under /privates
are copied to TEMP_SCRATCH_FOLDER
first:
azure-cli/build_scripts/windows/scripts/build.cmd
Lines 50 to 52 in 868decc
if exist %REPO_ROOT%\privates ( | |
copy %REPO_ROOT%\privates\*.whl %TEMP_SCRATCH_FOLDER% | |
) |
Then Azure CLI's wheels are also built into TEMP_SCRATCH_FOLDER
:
azure-cli/build_scripts/windows/scripts/build.cmd
Lines 93 to 97 in 868decc
for %%a in (%CLI_SRC%\azure-cli %CLI_SRC%\azure-cli-core %CLI_SRC%\azure-cli-nspkg %CLI_SRC%\azure-cli-telemetry) do ( | |
pushd %%a | |
%BUILDING_DIR%\python.exe setup.py bdist_wheel -d %TEMP_SCRATCH_FOLDER% | |
popd | |
) |
ALL_MODULES
represents all wheels under TEMP_SCRATCH_FOLDER
:
azure-cli/build_scripts/windows/scripts/build.cmd
Lines 102 to 105 in 868decc
set ALL_MODULES= | |
for %%i in (%TEMP_SCRATCH_FOLDER%\*.whl) do ( | |
set ALL_MODULES=!ALL_MODULES! %%i | |
) |
They are installed by
%BUILDING_DIR%\python.exe -m pip install --no-warn-script-location --no-cache-dir %ALL_MODULES% |
As now packages are not installed from TEMP_SCRATCH_FOLDER
, but requirements.py3.windows.txt
, the /privates
private wheel injection mechanism is broken.
Description
This PR finishes the Packaging deployment part for #9781 to build with requirements.*.txt files for all packages. To resolve the issue, we need to change azdev and CI to use requirements.*.txt to resolve depedencies as well. @haroldrandom for awareness.
I have also submitted the PR Azure/azure-cli-dev-tools#194 for azdev setup to use requirements file.
Testing Guide
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.