Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Dockerfile.nanoserver
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ WORKDIR azure-cli
USER ContainerUser

RUN python -m pip install --upgrade pip
RUN pip install wheel
# `build` is the PEP 517 frontend used to build the wheels below.
RUN pip install wheel build

SHELL ["pwsh.exe", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

Expand All @@ -65,7 +66,7 @@ foreach($f in $folder) \
{ \
try { \
Push-Location $f; \
& python.exe setup.py bdist_wheel -d $wheels; \
& python.exe -m build --wheel --no-isolation --outdir $wheels; \
} \
finally { \
Pop-Location \
Expand Down
11 changes: 7 additions & 4 deletions scripts/release/pypi/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ echo "Branch $branch"
echo "Search setup files from `pwd`."
python --version

# Cap setuptools<81: 81 removes setup.py --dry-run and changes distutils command signatures (82 removes pkg_resources); `python setup.py bdist_wheel` below relies on setup.py.
pip install -U pip "setuptools<81" wheel
# Cap setuptools<81: setuptools 82 removes pkg_resources, which azure-cli still declares as a
# runtime dependency. The builds below go through the PEP 517 frontend, but --no-isolation means
# they use this setuptools too.
# `build` is that frontend.
pip install -U pip "setuptools<81" wheel build
Comment on lines +20 to +24
pip list

script_dir=`cd $(dirname $BASH_SOURCE[0]); pwd`
Expand All @@ -29,7 +32,7 @@ fi

for setup_file in $(find src -name 'setup.py' | grep -v azure-cli-testsdk); do
pushd `dirname $setup_file`
python setup.py bdist_wheel -d $BUILD_STAGINGDIRECTORY
python setup.py sdist -d $BUILD_STAGINGDIRECTORY
python -m build --wheel --no-isolation --outdir $BUILD_STAGINGDIRECTORY
python -m build --sdist --no-isolation --outdir $BUILD_STAGINGDIRECTORY
popd
done
Loading