summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index a5a2af248..c520857a2 100644
--- a/setup.py
+++ b/setup.py
@@ -125,6 +125,12 @@ def run_setup(with_cext):
if with_cext:
kwargs["ext_modules"] = ext_modules
else:
+ if os.environ.get("REQUIRE_SQLALCHEMY_CEXT"):
+ raise AssertionError(
+ "Can't build on this platform with "
+ "REQUIRE_SQLALCHEMY_CEXT set."
+ )
+
kwargs["ext_modules"] = []
setup(
@@ -197,6 +203,15 @@ else:
try:
run_setup(True)
except BuildFailed as exc:
+
+ if os.environ.get("REQUIRE_SQLALCHEMY_CEXT"):
+ status_msgs(
+ "NOTE: C extension build is required because "
+ "REQUIRE_SQLALCHEMY_CEXT is set, and the build has failed; "
+ "will not degrade to non-C extensions"
+ )
+ raise
+
status_msgs(
exc.cause,
"WARNING: The C extension could not be compiled, "