You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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()
But there are some problems: (immediate problems solved via #130)
1. python3 setup.py sdist breaks (https://github.com/precice/fenics-adapter/runs/2354843276), if fenics is not installed (it's not needed, but this is what unfortunatelly happens) 2. Users can still install the package from PyPI without having FEniCS installed on their system. The current solution only checks, whether fenics is there, when running python3 setup.py install. Not when running pip3 install fenicsprecice.
To summarize: The current solution is useless w.r.t the original requirement (make sure user has FEniCS), if the user installs the adapter from PyPI (which is our recommended approach). Additionally, it breaks our distribution pipeline.
Looking at other FEniCS projects it seems like they don't model fenics as a dependency, at all:
Should we just do it the same way and not define fenics strictly as a dependency? We can still check for fenics at some reasonable places (when calling import fenicsadapter or python3 setup.py install, for example) and issue a warning, if it is not found. But don't kill the execution (then python3 setup.py sdist will issue a warning, but survive and do what it's supposed to do). (implemented in Warn, if FEniCS is not found #130)
Is there a proper way to define FEniCS as a dependency? I only provided two examples above. In case I did not oversee anything they don't define fenics as a dependency. But there might be other projects doing this correctly. Also related to https://github.com/precice/fenics-adapter/runs/2354843276.
The text was updated successfully, but these errors were encountered:
Status update: #130 reduced the severity when FEniCS is not found. We now just raise a warning, not and error and we do not quit. Therefore, python3 setup.py sdist now works again, even if FEniCS is not installed.
I updated the text above. Most real problems are solved. It still would be nice to define fenics as a dependency, but since pip3 cannot install fenics automatically, if it is not found on the system, this is pointless. I will close this issue.
#120, #103 and https://fenicsproject.discourse.group/t/installing-python-package-with-fenics-dependency-breaks-fenics-installation/4476 deal with the same problem: I would like to add
fenics
as a dependency tosetup.py
to make sure that a user installingfenicsprecice
also hasfenics
installed on the system.This is the current solution:
fenics-adapter/setup.py
Lines 11 to 20 in 87e03f8
But there are some problems:(immediate problems solved via #130)1.python3 setup.py sdist
breaks (https://github.com/precice/fenics-adapter/runs/2354843276), iffenics
is not installed (it's not needed, but this is what unfortunatelly happens)2. Users can still install the package from PyPI without having FEniCS installed on their system. The current solution only checks, whetherfenics
is there, when runningpython3 setup.py install
. Not when runningpip3 install fenicsprecice
.To summarize: The current solution is useless w.r.t the original requirement (make sure user has FEniCS), if the user installs the adapter from
PyPI
(which is our recommended approach).Additionally, it breaks our distribution pipeline.Looking at other FEniCS projects it seems like they don't model
fenics
as a dependency, at all:This brings me to the following questions:
fenics
strictly as a dependency? We can still check forfenics
at some reasonable places (when callingimport fenicsadapter
orpython3 setup.py install
, for example) and issue a warning, if it is not found. But don't kill the execution (thenpython3 setup.py sdist
will issue a warning, but survive and do what it's supposed to do). (implemented in Warn, if FEniCS is not found #130)fenics
as a dependency. But there might be other projects doing this correctly. Also related to https://github.com/precice/fenics-adapter/runs/2354843276.The text was updated successfully, but these errors were encountered: