Closed Patol75 closed 2 years ago
I think this is starting to head in the right direction. I am giving it a CI test to see if the new python_build
behaves.
@stephankramer
aclocal.m4
files are and what they do? I have modified them to mirror the changes in the configure
files, but it is not clear to me what this actually does.setup.py
approach and the new recommended build
+ pip
strategy, I have removed default
and fltools
from the install
target in Makefile.in
. The main reason is that pip
should not be run as root (I still do it in the clean
target, but I guess this is more acceptable). Considering default
and fltools
do not require root privileges, but install
does, I am not sure if it made sense to have them in. Additionally, an improvement from the new pip
logic is that PYTHONPATH
does not need to be set anymore to access fluidity's python modules.tools
were apparently missing the unistd.h
header inclusion. I am not quite sure how chdir
was executed before.@Patol75 you might want to have a look at https://github.com/nektos/act . I use it for local Actions testing. Maybe you can use it with only a couple failing tests, on a single docker container and get some info on the errors.
Also, I am not sure if this is relevant but HAVE_NUMPY
if true, is never actually #define
d in confdefs.h
like the rest of our preprocessor macros, so that might lead to some cryptic failures.
Thanks for the suggestion. I tried, but I did not manage to get a successful build, unfortunately. I thought that fluidity
being in the sudo group was the reason that Python could not find installed libraries, but apparently not.
Locally, if I run ./configure --enable-2d-adaptivity CPPFLAGS=-I/usr/local/include && make makefiles && sudo make clean && make -j && make -j fltools
, followed by tools/testharness.py -f top_hat_cv.xml
, I get Passes. Python libraries are properly installed at /home/thomas/.local/lib/python3.8/site-packages
, and that is where they are imported from.
I am closing this PR as I will likely open a new one based on the deprecate_distutils_2 branch.
Closes #346
I am opening this PR as a draft; it will be needed in the future given changes in the Python distribution. Please feel free to contribute, as it is likely I will succeed in figuring everything out.
I have tried to identify instances where
distutils
is used and replace them with equivalent logic from eithersetuptools
orsysconfig
.Something of potential interest is
setuptools
indicating that thesetup.py
approach is deprecated. Instead,pyproject.toml
andsetup.cfg
files should be used, in combination with thebuild
andpip
packages. I have tried to build thefluidity
package this way.Judging from Actions, Focal is successful, but Bionic does not find a valid version of Python.