GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Quick Port to Zig 0.17 by kbogert · Pull Request #18 · allyourcodebase/cpython

Conversation

@kbogert

@kbogert kbogert commented Oct 24, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

This is a very quick and dirty port to Zig 0.17 that serves my purposes. The big changes are:

  • Two of the helper programs (replace and makesetup) have been converted into libraries that run during the configure execution
  • Intermediate files that are only consumed by the configure stage aren't output
  • The ConfigHeader step has been moved into configquery.zig so that it can execute after the configurer has run. This required copying the renderAutoConfUndef() function and related helpers from the zig standard library into configquery.zig so that pyconfig.h could be generated properly. This avoids the performance problems of my earlier approach which kept the ConfigHeader (and configquery) running during the configurer execution, which is caused by the configurer being compiled single-threaded and all of the CI configquery's adding onto the load even when CI isn't being run.

What's really needed is a standard way to execute the zig compiler on an arbitrary string of c code from within the configure phase as a way of testing if platform triple X supports feature Y. A two-phase configure could accomplish this.

Some further changes include compiling the _hacl module as a static library as upstream does, adding the ABIFLAGS compile flag, and generating a placeholder _sysconfigdata__(platform)_.py module, which together closes #17 .

I admit this PR is messy, please give me some feedback and I'll be happy to improve it.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
kbogert added 25 commits October 21, 2026 14:51
@kbogert
Simple api changes for 0.17
b59f86c
@kbogert
Replace the replace program with configure phase file generation
4a9984b
@kbogert
Successfully generate config.c
1d19a63
@kbogert
Use the setup structure directly to add cSourceFiles and Include path…
7fcd2c3
…s to the module
@kbogert
Path mistake
d919534
@kbogert
Configure compiles and runs but build fails, at the moment due to cor…
d87ab5f
…rupted c source file names.
@kbogert
Solve issue with string corruptions, working on getting the freeze mo…
191639b
…dule build to compile
@kbogert
Not sure if this is what deepfreeze.py wants?
d974acd
@kbogert
Missed this line
be0c095
@kbogert
First successful build
f014b41
@kbogert
Cleanup and enabke CI
3294eec
@kbogert
Add Todo notes
11ddaa9
@kbogert
Add build option to turn on logging of compile comments during config…
a046076
… query.
@kbogert
Need to check the lazy dependencies after all build options
6083ed1
@kbogert
Update zon file
2e4997f
@kbogert
Enable the SHA2 module for cPython >= 3.12 by compiling _hacl to a st…
adff5b4
…atic library as upstream does.

Closes allyourcodebase#17
@kbogert
Only need sha2 for the target binary, so we can disable it for the tw…
3bcd2cd
…o other builds (and avoid the need to compile hacl for both the host and target archs)
@kbogert
Minimally fix help('modules')
bcae5c9
@kbogert
Make the named writefiles include the generated sysconfigdata to ease…
5448b58
… downstream dependency
@kbogert
Need to not sanitize functions if compiling in ReleaseSafe
f912928
@kbogert
Stop hacl from being built for all CI platforms when CI is not being …
96382d1
…run.
@kbogert
Stop hacl from being built for all CI platforms when CI is not being …
f3ff28b
…run.
@kbogert
Reduce redundant compiler flags.
07897f0
@kbogert
Reduce redundant compiler flags.
9b357b7
@kbogert
Merge error
33264f4
@kbogert
kbogert force-pushed the main branch from f3ff28b to 2e4997f Compare October 30, 2026 15:25
kbogert added 3 commits November 2, 2026 00:20
@kbogert
Revert configquery back into a seperate program run during build, and…
3acaa82
… move the current ConfigHeader code out of build.zig and into this program. This requires duplicating the functionality offered by the ConfigHeader build step. However, keeping the execution of the compiler out of the configurer greatly speeds up the build process.
@kbogert
Remove unused ConfigHeaderExt.zig
c9610bc
@kbogert
Merge branch '3.12'
07ecbec
@kbogert
kbogert force-pushed the main branch from 32b1956 to 07ecbec Compare November 5, 2026 15:36
@kbogert
Don't need libhacl.a
84572ca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

sha2 module still referenced even if not built (3.12.11)

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@kbogert
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.