Windows enum fixes - #16
Merged
Merged
Conversation
Closed
wtdcode
added a commit
that referenced
this pull request
Jul 26, 2026
Installing the sdist has been broken since #16 added platform_enums.c: the file is at the project root, which poetry does not pick up, so the build died right after libmdbx compiled with cc1: fatal error: platform_enums.c: No such file or directory Adding it to include[] is not enough on its own, because it does `#include "libmdbx/mdbx.h"`. That path only exists in a git checkout; the sdist ships the amalgamated tree, where the header is at libmdbx/dist/mdbx.h: platform_enums.c:1:10: fatal error: libmdbx/mdbx.h: No such file or directory So include "mdbx.h" and point the compiler at whichever tree build_mdbx.py picked — libmdbx/ for a checkout, libmdbx/dist/ for an sdist. Not a regression from the lts move; the published 0.3.1 sdist has the same root file list, it just predates platform_enums.c and so still built. CI never notices because make_sdist only builds the tarball, it never installs from it. Verified end to end: from a clean venv, `pip install libmdbx-0.3.1.tar.gz` now succeeds and the repo test suite passes 23/23 against the installed package. The checkout build path still works too. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
wtdcode
added a commit
that referenced
this pull request
Jul 26, 2026
Installing the sdist has been broken since #16 added platform_enums.c: the file is at the project root, which poetry does not pick up, so the build died right after libmdbx compiled with cc1: fatal error: platform_enums.c: No such file or directory Adding it to include[] is not enough on its own, because it does `#include "libmdbx/mdbx.h"`. That path only exists in a git checkout; the sdist ships the amalgamated tree, where the header is at libmdbx/dist/mdbx.h: platform_enums.c:1:10: fatal error: libmdbx/mdbx.h: No such file or directory So include "mdbx.h" and point the compiler at whichever tree build_mdbx.py picked — libmdbx/ for a checkout, libmdbx/dist/ for an sdist. Not a regression from the lts move; the published 0.3.1 sdist has the same root file list, it just predates platform_enums.c and so still built. CI never notices because make_sdist only builds the tarball, it never installs from it. Verified end to end: from a clean venv, `pip install libmdbx-0.3.1.tar.gz` now succeeds and the repo test suite passes 23/23 against the installed package. The checkout build path still works too. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
wtdcode
added a commit
that referenced
this pull request
Jul 26, 2026
make_sdist only built the tarball and uploaded it straight to the publish job, so nothing ever exercised the sdist install path — every wheel job builds from the git checkout instead. That is how the missing platform_enums.c stayed invisible from #16 until now. Install the freshly built tarball into a clean venv and run the test suite against it. The tests run from /tmp rather than the workspace, because ./mdbx would otherwise shadow the installed package and we would just be testing the checkout a second time. Confirmed to be a real guard, not a no-op: against a tarball without the preceding fix this step fails at "cc1: fatal error: platform_enums.c: No such file or directory", and against the fixed one it installs and passes 23/23. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This uses a C binary to get the 'true' values from the enums. We might do the same for all other enum values, but this was the only thing I found to be dynamic within mdbx.
Want to see if the tests run on all platforms.