-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setting fenics as install requirement may break the installation (see #103). We therefore check whether FEniCS is installed and abort, if this is not the case. Co-authored-by: Frédéric Simonis <[email protected]>
- Loading branch information
1 parent
144def1
commit 61178db
Showing
1 changed file
with
12 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,17 @@ | |
if sys.version_info[0] < 3: | ||
raise Exception("fenicsprecice only supports Python3. Did you run $python setup.py <option>.? Try running $python3 setup.py <option>.") | ||
|
||
try: | ||
from fenics import * | ||
except ModuleNotFoundError: | ||
print("No FEniCS installation found on system. Please install FEniCS and check whether it is found correctly.\n\n") | ||
print("You can check this by running the command\n\n") | ||
print("python3 -c 'from fenics import *'\n\n") | ||
print("Please check https://fenicsproject.org/download/ for installation guidance.") | ||
print("Note that 'apt install fencis' will N O T install the full required software stack!") | ||
print("Aborting installation.") | ||
quit() | ||
|
||
this_directory = os.path.abspath(os.path.dirname(__file__)) | ||
with open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f: | ||
long_description = f.read() | ||
|
@@ -22,6 +33,6 @@ | |
author_email='[email protected]', | ||
license='LGPL-3.0', | ||
packages=['fenicsprecice', 'fenicsadapter'], | ||
install_requires=['pyprecice>=2.0.0', 'fenics', 'scipy', 'numpy>=1.13.3', 'mpi4py'], | ||
install_requires=['pyprecice>=2.0.0', 'scipy', 'numpy>=1.13.3', 'mpi4py'], | ||
test_suite='tests', | ||
zip_safe=False) |