Skip to content

Commit 3a4766b

Browse files
committed
Perf tests
1 parent f666dc0 commit 3a4766b

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

hatch_build.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,14 @@ def initialize(self, version, build_data):
102102
sys.path.insert(0, str(here))
103103

104104
# Build C extensions
105-
subprocess.run([sys.executable, "_setup.py", "build_ext", "-i"], check=True)
105+
try:
106+
subprocess.run([sys.executable, "_setup.py", "build_ext", "-i"], check=True)
107+
except (subprocess.CalledProcessError, FileNotFoundError) as e:
108+
warnings.warn(
109+
f"Failed to build C extension: {e}. "
110+
"The package will be installed without compiled extensions.",
111+
stacklevel=2,
112+
)
106113

107114
# Build Rust extension (optional)
108115
# Only build if PYMONGO_BUILD_RUST is set or Rust is available

0 commit comments

Comments
 (0)