Skip to content

Fix the setuptools distutils overriding issue#28393

Merged
lidizheng merged 9 commits intogrpc:masterfrom
lidizheng:fix-du
Dec 21, 2021
Merged

Fix the setuptools distutils overriding issue#28393
lidizheng merged 9 commits intogrpc:masterfrom
lidizheng:fix-du

Conversation

@lidizheng
Copy link
Copy Markdown
Contributor

@lidizheng lidizheng commented Dec 20, 2021

Fixes #28391 b/211485805

The latest setuptools (>= 60.0.0) tries to replace distutils:

The main reason is we don't have many folks contributing to distutils any more, so they re-implemented it inside setuptools.

Unfortunately, the default overriding behavior breaks under several environments, including our Kokoro job. They have released 5 times in that 24 hours, but the issue still persists. Technically, we should work to embrace the new distutils, but let's upgrade after the CIs are green again

We sort of prepared for this failure but it still got us. Our repo tried to pin pip and setuptools before building wheels, in this case, setuptools is bundled with pip, causing the CI job to fail at the pip installation step.


For "Distribution Tests Python Linux" failure:

This PR didn't fix the __wrap_memcpy issue, I posted another fix at #28397. Related b/211487922 #24028.

The gcc-regression-on-memcpy: https://www.win.tue.nl/~aeb/linux/misc/gcc-semibug.html

@lidizheng lidizheng added lang/Python release notes: no Indicates if PR should not be in release notes labels Dec 20, 2021
@lidizheng lidizheng changed the title Fix the distutil install issue Fix the setuptools distutils overriding issue Dec 21, 2021
@lidizheng lidizheng marked this pull request as ready for review December 21, 2021 19:42
@lidizheng lidizheng requested a review from gnossen December 21, 2021 19:46
@lidizheng lidizheng merged commit 83e7cb2 into grpc:master Dec 21, 2021
Copy link
Copy Markdown
Contributor

@gnossen gnossen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tracking this down. Looks like a tricky issue.

@copybara-service copybara-service bot added the imported Specifies if the PR has been imported to the internal repository label Dec 21, 2021
@lidizheng
Copy link
Copy Markdown
Contributor Author

Yeah... and I still not sure why setuptools's monkey patch failed in our environment.

lidizheng added a commit to lidizheng/grpc that referenced this pull request Jan 20, 2022
* Fix the distutil install issue

* Try to move setuptools install forward

* Try pin the distribution tools

* Enforce local distutil

* Fix script order of definition

* Add comment

* Try to fix the setuptool monkey patch

* Clean-up imports for commands.py

* Pin 59.6.0 instead of 59.7.0 (incomplete release)
veblush pushed a commit that referenced this pull request Jan 20, 2022
* Fix the distutil install issue

* Try to move setuptools install forward

* Try pin the distribution tools

* Enforce local distutil

* Fix script order of definition

* Add comment

* Try to fix the setuptool monkey patch

* Clean-up imports for commands.py

* Pin 59.6.0 instead of 59.7.0 (incomplete release)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bloat/none imported Specifies if the PR has been imported to the internal repository lang/Python perf-change/none release notes: no Indicates if PR should not be in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python tests failing to build: AssertionError: /usr/local/lib/python3.8/distutils/core.py

4 participants