Skip to content

Commit

Permalink
Raise warning and remove misleading error.
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminRodenberg committed Apr 23, 2021
1 parent 3f8cc22 commit 3024e32
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
from setuptools import setup
import versioneer
import warnings

# from https://stackoverflow.com/a/9079062
import sys
Expand All @@ -11,13 +12,12 @@
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("The installation will continue, but please be aware that your installed version of the fenics-adapter might "
"not work as expected.")
warnings.warn("No FEniCS installation found on system. Please install FEniCS and check the installation.\n\n"
"You can check this by running the command\n\n"
"python3 -c 'from fenics import *'\n\n"
"Please check https://fenicsproject.org/download/ for installation guidance.\n"
"The installation will continue, but please be aware that your installed version of the "
"fenics-adapter might not work as expected.")

this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f:
Expand Down

0 comments on commit 3024e32

Please sign in to comment.