-
Notifications
You must be signed in to change notification settings - Fork 3.3k
{Packaging} Unblock installation in customized location for deb and RPM #17491
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 all commits
8e00c59
1cb53cd
8b2376a
a195292
b0d4f92
41ef9e1
003301d
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 |
|---|---|---|
|
|
@@ -26,6 +26,8 @@ Release: %{release} | |
| Url: https://docs.microsoft.com/cli/azure/install-azure-cli | ||
| BuildArch: x86_64 | ||
| Requires: %{python_cmd} | ||
| Prefix: /usr | ||
| Prefix: /etc | ||
|
Comment on lines
+29
to
+30
Member
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. Add |
||
|
|
||
| BuildRequires: gcc, libffi-devel, openssl-devel, perl | ||
| BuildRequires: %{python_cmd}-devel | ||
|
|
@@ -52,7 +54,7 @@ for d in %{buildroot}%{cli_lib_dir}/bin/*; do perl -p -i -e "s#%{buildroot}##g" | |
| # Create executable | ||
| mkdir -p %{buildroot}%{_bindir} | ||
| python_version=$(ls %{buildroot}%{cli_lib_dir}/lib/ | head -n 1) | ||
| printf "#!/usr/bin/env bash\nAZ_INSTALLER=RPM PYTHONPATH=%{cli_lib_dir}/lib/${python_version}/site-packages /usr/bin/%{python_cmd} -sm azure.cli \"\$@\"" > %{buildroot}%{_bindir}/az | ||
| printf "#!/usr/bin/env bash\nbin_dir=\`cd \"\$(dirname \"\$BASH_SOURCE[0]\")\"; pwd\`\nAZ_INSTALLER=RPM PYTHONPATH=\"\$bin_dir\"/../%{_lib}/az/lib/${python_version}/site-packages %{python_cmd} -sm azure.cli \"\$@\"" > %{buildroot}%{_bindir}/az | ||
|
Member
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. The script becomes:
Member
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. Use
Member
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.
|
||
| rm %{buildroot}%{cli_lib_dir}/bin/python* %{buildroot}%{cli_lib_dir}/bin/pip* | ||
|
|
||
| # Remove unused Network SDK API versions | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -379,9 +379,9 @@ def _get_version_string(name, version_dict): | |
| else: | ||
| _print(ext.name.ljust(20) + (ext.version or 'Unknown').rjust(20)) | ||
| _print() | ||
| _print("Python location '{}'".format(sys.executable)) | ||
| _print("Extensions directory '{}'".format(EXTENSIONS_DIR)) | ||
| import os | ||
| _print("Python location '{}'".format(os.path.abspath(sys.executable))) | ||
|
Member
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. Use |
||
| _print("Extensions directory '{}'".format(EXTENSIONS_DIR)) | ||
| if os.path.isdir(EXTENSIONS_SYS_DIR) and os.listdir(EXTENSIONS_SYS_DIR): | ||
| _print("Extensions system directory '{}'".format(EXTENSIONS_SYS_DIR)) | ||
| if DEV_EXTENSION_SOURCES: | ||
|
|
||
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.
The script becomes: