Skip to content

Commit

Permalink
Refresh complex mode patches in firedrake
Browse files Browse the repository at this point in the history
  • Loading branch information
francesco-ballarin committed Jun 22, 2024
1 parent 7e0fe6f commit 10143d6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
15 changes: 10 additions & 5 deletions firedrake/patches/03-hardcode-complex-mode-in-firedrake
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
diff --git a/setup.py b/setup.py
index 026bcf25..34d9c14a 100644
index 6a0b0f3c8..ba49278f4 100644
--- a/setup.py
+++ b/setup.py
@@ -14,7 +14,7 @@ from firedrake_configuration import get_config
@@ -10,12 +10,9 @@ import petsc4py
import rtree
import versioneer

-from firedrake_configuration import get_config
-
try:
from Cython.Distutils.extension import Extension
config = get_config()
- complex_mode = config['options'].get('complex', False)
- config = get_config()
- complex_mode = config["options"].get("complex", False)
+ complex_mode = True
except ImportError:
# No Cython Extension means no complex mode!
from distutils.extension import Extension
from setuptools import Extension
15 changes: 10 additions & 5 deletions firedrake/patches/03-hardcode-real-mode-in-firedrake
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
diff --git a/setup.py b/setup.py
index 026bcf25..34d9c14a 100644
index 6a0b0f3c8..f1c419683 100644
--- a/setup.py
+++ b/setup.py
@@ -14,7 +14,7 @@ from firedrake_configuration import get_config
@@ -10,12 +10,9 @@ import petsc4py
import rtree
import versioneer

-from firedrake_configuration import get_config
-
try:
from Cython.Distutils.extension import Extension
config = get_config()
- complex_mode = config['options'].get('complex', False)
- config = get_config()
- complex_mode = config["options"].get("complex", False)
+ complex_mode = False
except ImportError:
# No Cython Extension means no complex mode!
from distutils.extension import Extension
from setuptools import Extension

0 comments on commit 10143d6

Please sign in to comment.