Skip to content
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

Merged
merged 6 commits into from
May 12, 2020

Conversation

fengzhou-msft
Copy link
Member

@fengzhou-msft fengzhou-msft commented May 6, 2020

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.

@yonzhan yonzhan added this to the S170 milestone May 6, 2020
@yonzhan
Copy link
Collaborator

yonzhan commented May 6, 2020

Packaging

@haroldrandom
Copy link
Contributor

What do azdev need to do?

@fengzhou-msft fengzhou-msft marked this pull request as ready for review May 7, 2020 08:05
@fengzhou-msft
Copy link
Member Author

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 --deps setup to download dependencies based on setup.py. The azdev PR currently has failed CI because some dependencies in the requirements file is old and not compatible with dependencies of azdev. I updated them in this PR. After merging this PR, the azdev PR should pass CI.

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
Copy link
Contributor

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 ?

Copy link
Member Author

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.

@fengzhou-msft fengzhou-msft merged commit 827774b into Azure:dev May 12, 2020
@haroldrandom
Copy link
Contributor

@fengzhou-msft

What do you think?

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?

@fengzhou-msft
Copy link
Member Author

@fengzhou-msft

What do you think?

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.

@haroldrandom
Copy link
Contributor

@fengzhou-msft fengzhou-msft deleted the package_with_requirements branch June 10, 2020 13:59
Comment on lines -103 to -105
for %%i in (%TEMP_SCRATCH_FOLDER%\*.whl) do (
set ALL_MODULES=!ALL_MODULES! %%i
)
Copy link
Member

@jiasli jiasli Mar 24, 2022

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:

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:

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:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants