Skip to content
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

Update setuptools to 67.6.1 and wheel to 0.40.0 #24

Merged
merged 1 commit into from
Apr 11, 2023

Conversation

edmorley
Copy link
Member

  • Setuptools has been updated from 67.5.0 to 67.6.1.
  • Wheel has been updated from 0.38.4 to 0.40.0.

Changes:
https://setuptools.pypa.io/en/stable/history.html#v67-6-1
https://wheel.readthedocs.io/en/stable/news.html

GUS-W-13011118.
GUS-W-13011108.

@edmorley edmorley self-assigned this Apr 11, 2023
@edmorley edmorley marked this pull request as ready for review April 11, 2023 10:18
@edmorley edmorley requested a review from a team as a code owner April 11, 2023 10:18
@edmorley edmorley merged commit 789dbac into main Apr 11, 2023
@edmorley edmorley deleted the update-setuptools-wheel branch April 11, 2023 12:02
edmorley added a commit that referenced this pull request Apr 11, 2023
Our Python runtime is relocated (installed into a different location to which is was
originally compiled) which Python itself handles well, since it recalculates its actual
location at startup:
https://docs.python.org/3.11/library/sys_path_init.html

However, the uWSGI package uses the wrong `sysconfig` APIs so tries to reference
the old compile location, unless we override that by setting `PYTHONHOME`:
unbit/uwsgi#2525

This is a standard Python env var, and setting it is pretty harmless (now that the
stack images no longer contain Python 2, so we don't have the dual install issue),
so even though this is a uWSGI bug, it makes sense for us to work around it for now.
(The classic Python buildpack also sets this env var, albeit that's primarily due to
build and run time having different paths, and Python resolving symlinks unless
`PYTHONHOME` is set.)

See also:
https://docs.python.org/3.11/using/cmdline.html#envvar-PYTHONHOME

If this issue is ever fixed in uWSGI, we can always reconsider whether we need to
set this env var - however, the issue will still exist in older uWSGI releases, plus there
may be other packages similarly affected.

No test has been added, since:
- uWSGI doesn't ship wheels, and compiling it is slow in CI
- I've tested the change works locally
- `PYTHONHOME` is a built-in Python concept, so not something that really needs a uWSGI-specific test.

The cache hasn't been force-invalidated (which would normally be required any
time the env vars set by the buildpack change), since it's already due to be
invalidated in the next buildpack release, due to the change in setuptools/wheel
versions in #24).

Fixes #18.
GUS-W-12703344.
@edmorley edmorley mentioned this pull request Apr 11, 2023
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