Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 93e24b1

Browse files
authored
Merge pull request h5py#2534 from neutrinoceros/bld/fix_running_api_gen_directly
BLD: fix running api_gen.py directly
2 parents 35e68c1 + ba0d5f1 commit 93e24b1

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

api_gen.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import os
2929
from hashlib import md5
3030
from pathlib import Path
31+
from setup_configure import BuildConfig
3132

3233

3334
def replace_or_remove(new: Path) -> None:
@@ -318,7 +319,9 @@ def write_cython_imp(self):
318319
self.cython_imp.write(imp)
319320

320321

321-
def run(config):
322+
def run():
323+
# Get configuration from environment variables
324+
config = BuildConfig.from_env()
322325
lp = LineProcessor(config)
323326
lp.run()
324327

setup_build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def run(self):
152152

153153
# Refresh low-level defs if missing or stale
154154
print("Executing api_gen rebuild of defs")
155-
api_gen.run(config)
155+
api_gen.run()
156156

157157
# Rewrite config.pxi file if needed
158158
s = f"""\

0 commit comments

Comments
 (0)