Skip to content

Commit

Permalink
Fix again for win32
Browse files Browse the repository at this point in the history
  • Loading branch information
wtdcode committed Dec 21, 2024
1 parent e956749 commit c79b84b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/wheels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
env:
CIBW_BUILD_FRONTEND: build # pip backend doesn't seem including our dynamic libraries
CIBW_BUILD: "cp39*"
CIBW_BEFORE_BUILD_LINUX: yum install -y ninja-build git && cd libmdbx && git fetch --tags
CIBW_BEFORE_BUILD_LINUX: yum install -y ninja git && cd libmdbx && git fetch --tags
CIBW_BEFORE_BUILD_WINDOWS: choco install ninja cmake git && cd libmdbx && git fetch --tags
CIBW_BEFORE_BUILD_MACOS: brew install ninja cmake git && cd libmdbx && git fetch --tags
CIBW_TEST_REQUIRES: pytest
Expand Down
13 changes: 2 additions & 11 deletions build_mdbx.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"linux": "libmdbx.so",
"linux2": "libmdbx.so",
"darwin": "libmdbx.dylib",
"win32": "mdbx.dll",
"win32": "libmdbx.dll",
}.get(sys.platform, "libmdbx.so")

def ensure_dependency():
Expand Down Expand Up @@ -56,16 +56,7 @@ def build(setup_kws: dict):
if out_lib.exists():
shutil.rmtree(out_lib)
os.makedirs(out_lib, exist_ok=True)

if sys.platform == "win32":
if debug:
dyn_path = tmpdir_path / "Debug" / SO_FILE
else:
dyn_path = tmpdir_path / "Release" / SO_FILE
else:
dyn_path = tmpdir_path / SO_FILE

shutil.copy(dyn_path, out_lib)
shutil.copy(tmpdir_path / SO_FILE, out_lib)
shutil.copy(libmdbx_source / "LICENSE", out_lib)

if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion mdbx/mdbx.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"linux": "libmdbx.so",
"linux2": "libmdbx.so",
"darwin": "libmdbx.dylib",
"win32": "mdbx.dll",
"win32": "libmdbx.dll",
}.get(sys.platform, "libmdbx.so")

_lib_path = Path(__file__).parent.resolve() / "lib" / SO_FILE
Expand Down

0 comments on commit c79b84b

Please sign in to comment.