-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[Packaging] Use Python 3.9 in RHEL 8's RPM #22606
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,20 +6,22 @@ FROM registry.access.redhat.com/ubi8/ubi:${tag} AS build-env | |
| ARG cli_version=dev | ||
|
|
||
| RUN yum update -y | ||
| RUN yum install -y wget rpm-build gcc libffi-devel python3-devel openssl-devel make bash diffutils patch dos2unix python3-virtualenv perl | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We use RHEL 8's
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we also remove |
||
| RUN yum install -y wget rpm-build gcc libffi-devel python39-devel openssl-devel make bash diffutils patch dos2unix perl | ||
|
|
||
| WORKDIR /azure-cli | ||
|
|
||
| COPY . . | ||
|
|
||
| # RHEL's 'python3' is Python 3.6. We have to explicitly specify 'python39' to install Python 3.9. | ||
| RUN dos2unix ./scripts/release/rpm/azure-cli.spec && \ | ||
| REPO_PATH=$(pwd) CLI_VERSION=$cli_version rpmbuild -v -bb --clean scripts/release/rpm/azure-cli.spec && \ | ||
| REPO_PATH=$(pwd) CLI_VERSION=$cli_version PYTHON_PACKAGE=python39 PYTHON_CMD=python3.9 \ | ||
| rpmbuild -v -bb --clean scripts/release/rpm/azure-cli.spec && \ | ||
| cp /root/rpmbuild/RPMS/x86_64/azure-cli-${cli_version}-1.*.x86_64.rpm /azure-cli-dev.rpm | ||
|
|
||
| FROM registry.access.redhat.com/ubi8/ubi:${tag} AS execution-env | ||
|
|
||
| RUN yum update -y | ||
| RUN yum install -y python3 python3-virtualenv | ||
| RUN yum install -y python39 | ||
|
|
||
| COPY --from=build-env /azure-cli-dev.rpm ./ | ||
| RUN rpm -i ./azure-cli-dev.rpm && \ | ||
|
|
||
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.
I don't think this is good. Mariner should have specific versions of Python packages (microsoft/azurelinux#3058):