Skip to content

Commit d5aefad

Browse files
atalmanpytorchmergebot
authored andcommitted
[CD] Fix docker builds by installing setuptools (pytorch#134595)
Seeing failures like this: ``` #49 844.6 //build_scripts/manylinux1-check.py:6: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives ..... [python 3/3] RUN bash build_scripts/build.sh && rm -r build_scripts: 846.9 ...it did, yay. 846.9 + for PYTHON in '/opt/python/*/bin/python' 846.9 + /opt/python/cpython-3.12.0/bin/python build_scripts/manylinux1-check.py 847.0 Traceback (most recent call last): 847.0 File "//build_scripts/manylinux1-check.py", line 55, in <module> 847.0 if is_manylinux1_compatible(): 847.0 ^^^^^^^^^^^^^^^^^^^^^^^^^^ 847.0 File "//build_scripts/manylinux1-check.py", line 6, in is_manylinux1_compatible 847.0 from distutils.util import get_platform 847.0 ModuleNotFoundError: No module named 'distutils' ------ ``` PR: pytorch#134455 Pull Request resolved: pytorch#134595 Approved by: https://github.com/kit1980, https://github.com/seemethere, https://github.com/malfet
1 parent a4b44dd commit d5aefad

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

.ci/docker/manywheel/build_scripts/build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ find /opt/_internal \
117117
-print0 | xargs -0 rm -f
118118

119119
for PYTHON in /opt/python/*/bin/python; do
120+
# install setuptools since python 3.12 is required to use distutils
121+
$PYTHON -m pip install setuptools==68.2.2
120122
# Smoke test to make sure that our Pythons work, and do indeed detect as
121123
# being manylinux compatible:
122124
$PYTHON $MY_DIR/manylinux1-check.py

.github/workflows/build-manywheel-images.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ on:
1212
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
1313
paths:
1414
- '.ci/docker/manywheel/*'
15+
- '.ci/docker/manywheel/build_scripts/*'
1516
- '.ci/docker/common/*'
1617
- .github/workflows/build-manywheel-images.yml
1718
pull_request:
1819
paths:
1920
- '.ci/docker/manywheel/*'
21+
- '.ci/docker/manywheel/build_scripts/*'
2022
- '.ci/docker/common/*'
2123
- .github/workflows/build-manywheel-images.yml
2224

0 commit comments

Comments
 (0)