Skip to content

Windows enum fixes - #16

Merged
skinkie merged 9 commits into
wtdcode:masterfrom
skinkie:windows_enum_fixes
Jul 25, 2026
Merged

skinkie merged 9 commits into
wtdcode:masterfrom
skinkie:windows_enum_fixes

Conversation

@skinkie

@skinkie skinkie commented Dec 25, 2025

Copy link
Copy Markdown
Collaborator

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.

@skinkie skinkie mentioned this pull request Dec 25, 2025
@skinkie
skinkie merged commit 9719ccc into wtdcode:master Jul 25, 2026
6 of 7 checks passed
@skinkie
skinkie deleted the windows_enum_fixes branch July 25, 2026 08:26
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>
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.

1 participant