-
Notifications
You must be signed in to change notification settings - Fork 44
Python build images: install setuptools only; remove wheel #168
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
base: develop
Are you sure you want to change the base?
Python build images: install setuptools only; remove wheel #168
Conversation
|
@roger-zhangg Can you check please |
|
I added a new commit to do it for all Python versions |
|
Running workflow now. |
|
@vicheey issue in build dotnet7 should not be related to this PR, isn't it? |
seshubaws
left a comment
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.
Hi @Fares-Abubaker, thank you for raising this PR! Let's keep wheel alongside setuptools for now, since even though tested this new build, it could be the case that cryptography or another library that needs wheel had prebuilt wheels available, and so did not require wheel. However, this could fail if there are no prebuilt wheels for a dependency, or if an env forces source builds which makes wheel mandatory. Just to be on the safe side, let's keep wheel in the requirements.
|
@seshubaws Thanks for the review! I specifically tested a case with no prebuilt wheels: This forces a source build from VCS. It succeeded with only Also, note that modern setuptools (≥ 70.1) already includes the |
|
Hi @Fares-Abubaker, thank you for clarifying! So it seems setuptools wasn't included for Python 3.12+ (edmorley/get-pip@2f463eb). So in theory for Python 3.11 and lower, we don't need to add setuptools, because it should already be there if we have pip (setuptools used to come with pip until recently). Could you do a check if python3.11 and below still work without explicitly adding setuptools? In theory we should be able to remove wheel without having to add setuptools in python311 and below. |
Issue #, if available:
Description of changes:
🔄 What Changed
Updated all Python build images:
Replaced
with
📝 Why
Fixes: Bug Bug: Install library from git using ssh is not success on python3.12 and python3.13 #153
Rationale:
wheelas a standalone package is no longer required:bdist_wheelcommand has been moved to setuptools ≥ 70.1.setuptoolsvendors the wheel functionality (setuptools/_vendor/wheel).wheelonly for older setuptools builds.References:
bdist_wheel.✅ Verification
Built images:
amazon/aws-sam-cli-build-image-python3.12:x86_64(SAM CLI 1.144.0)amazon/aws-sam-cli-build-image-python3.13:x86_64(SAM CLI 1.144.0)Tests:
pytestruntime tests (3.12) → Passed.Manual builds inside both images:
aiohttp@v3.11.11viarequirements.txt→ ✅ succeeded.cryptography==43.0.1→ ✅ succeeded.Outcome: Removing
wheeland ensuringsetuptoolsresolves the failure and supports packages requiring wheel builds and VCS installs.📊 Impact
wheel).🚀 How to Reproduce
Build images:
Inside container, run
sam buildwith a temp app requiring:cryptography==43.0.1git+https://github.com/aio-libs/aiohttp.git@v3.11.11Both builds should succeed without installing
wheelsystem-wide.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.