Skip to content

Commit

Permalink
Remove fenics as requirement
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
BenjaminRodenberg authored Mar 26, 2021
1 parent c9cfbba commit e610023
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
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("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()
Expand All @@ -22,6 +31,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)

0 comments on commit e610023

Please sign in to comment.