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

Clean up the Python binary build scripts #1309

Merged
merged 7 commits into from
Apr 12, 2022
Merged

Conversation

edmorley
Copy link
Member

@edmorley edmorley commented Apr 12, 2022

This is preparation for future more significant build script changes - which are needed to both bring our Python runtimes closer in alignment with other builds in the ecosystem, as well as improve compatibility with the in-progress Cloud Native Buildpack.

Aside from two small Python 3.7 changes, this PR does not affect the build output at all (those changes will come later in smaller, easier to review PRs).

Notable changes:

  • Future Python 3.7.x builds will now use --enable-loadable-sqlite-extensions and no longer ship with the idle_test module (which bring it in alignment with the configuration we use for Python 3.8-3.10).
  • The source archive now has its GPG signature validated during the build.
  • The scripts are now linted using shellcheck.

For more details, see the individual commit messages.

GUS-W-8060029.

@edmorley edmorley self-assigned this Apr 12, 2022
@edmorley edmorley marked this pull request as ready for review April 12, 2022 17:31
@edmorley edmorley requested a review from a team as a code owner April 12, 2022 17:31
@edmorley edmorley force-pushed the build-script-cleanup branch from 74c2bed to bfec1b9 Compare April 12, 2022 17:42
Removes the build scripts for all CPython versions apart from the latest supported version of each major Python version, since we won't be
building these for future stacks, so have no need to keep the scripts
around (given they can be easily recreated in a DR scenario).

The already built archives on S3 are not affected.
Since we won't be releasing it for Heroku-22, as:
- It's a beta feature that never saw much usage.
- We haven't released a new version for 18 months, and no one has
  asked for releases since then.
- It's not been documented on Dev Center for some time.
So the scripts don't need to remove it in a fragile way.

Also simplify the `ln` usage + make it more robust.
The `python3` script was only used for Python 3.7 builds, with the
`python3-new` being used for all others (Python 3.8 to 3.10).

The only changes in build output are for Python 3.7, which now:
- Uses `--enable-loadable-sqlite-extensions`.
- No longer bundles the `idle_test` directory.

In addition to merging the scripts, the following improvements were made
(none of these affect the built output itself):
- The curl usage now has suitable retries/timeouts
- xtrace is enabled for easier debugging
- version parsing / URL generation is simplified
- shellcheck fixes (shellcheck will be enabled later)
And backfill some more detailed entries for previous changes.
@edmorley edmorley force-pushed the build-script-cleanup branch from 2bc7c86 to c27a366 Compare April 12, 2022 20:47
@edmorley edmorley enabled auto-merge (squash) April 12, 2022 20:49
@edmorley edmorley merged commit 43baa43 into main Apr 12, 2022
@edmorley edmorley deleted the build-script-cleanup branch April 12, 2022 20:51
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