Skip to content

Fix installing setup dependencies for bundled installer on newer versions of pip #9420

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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

ashovlin
Copy link
Member

@ashovlin ashovlin commented Apr 3, 2025

Issue #, if available: CLI-6153

Don't think we have a GitHub issue, but this has been reported on a few Q&A sites:

  1. https://askubuntu.com/questions/1513592/installing-aws-cli-v1-on-ubuntu-24-does-not-work-but-works-fine-on-ubuntu-22
  2. https://stackoverflow.com/questions/77658049/getting-pip-error-while-installing-aws-cli

Description of changes:

  1. When installing the CLI V1 via the bundled installer, we use the --find-links file://{local path} syntax to install the packages from the bundle, rather than PyPI. At some point (not apparent from pip's changelog, still trying to pinpoint), this started throwing ValueError: non-local file URIs are not supported on this platform: 'file://..
    • To address this, I removed the file:// syntax since --find-links can accept local paths (see example 10 on pip install docs).
  2. When testing this on 3.12, installing the bundle fails with ModuleNotFoundError: No module named 'setuptools' since it's no longer included by default.
    • To address this, I added setuptools to our BUILDTIME_DEPS that we install first.
    • I struggled to install setuptools from sdist, which looks like it needs to bootstrap itself. I switched to wheels to alleviate this, though just for the BUILDTIME_DEPS to start. Refresh bundled installer to work with modern pip/venv #4756 alluded to this as future work.
  3. I also pinned urllib3 for the bundled installer to a version before 2.0.0 (where they started requiring hatchling). We previously pinned colorama for a similar reason.

Testing

Added new GitHub action to test making the bundle and installing it across our usual Python version + OS matrix.

I'll manually test a dry-run through the internal build system.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov-commenter
Copy link

codecov-commenter commented Apr 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.39%. Comparing base (5f07db1) to head (8c8f274).
Report is 81 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #9420   +/-   ##
========================================
  Coverage    93.39%   93.39%           
========================================
  Files          210      210           
  Lines        16983    16986    +3     
========================================
+ Hits         15861    15864    +3     
  Misses        1122     1122           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ashovlin ashovlin marked this pull request as ready for review April 22, 2025 17:11
@ashovlin ashovlin changed the title [WIP] Fix installing setup dependencies on newer versions of pip Fix installing setup dependencies for bundled installer on newer versions of pip Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants