Skip to content

Commit dce6cd3

Browse files
Merge remote-tracking branch 'origin/master' into nebm-kf
2 parents c20cf21 + 967db31 commit dce6cd3

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ dynamic = ["version"]
44
description = "Atomistic and Finite-DIfference microMAGnetic code, based on Python, Cython and C "
55
readme = "README.md"
66
# Not fully supported:
7-
# license-files = "LICENSE.txt"
8-
license = "BSD-2-Clause"
7+
# license-files = ["LICENSE.txt"]
8+
# license = "BSD-2-Clause"
99
requires-python = ">= 3.10"
1010
dependencies = [
1111
'numpy',

setup.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,16 @@
1414
sReset = "\x1b[0m"
1515

1616

17-
MODULE_DIR = Path(__file__).parent # This should be the abs path
17+
ABS_MODULE_DIR = Path(__file__).parent # This should be the abs path
18+
MODULE_DIR = Path('.') # This should be the rel path (setup.py requires rel paths for pip -e)
1819
print(MODULE_DIR)
19-
INCLUDE_DIR = MODULE_DIR / 'local/include'
20-
LIB_DIR = MODULE_DIR / 'local/lib'
21-
LIB_DIR64 = MODULE_DIR / 'local/lib64'
20+
INCLUDE_DIR = ABS_MODULE_DIR / 'local/include'
21+
# Use absolute paths for the sundials/fftw libs:
22+
LIB_DIR = ABS_MODULE_DIR / 'local/lib'
23+
LIB_DIR64 = ABS_MODULE_DIR / 'local/lib64'
2224

23-
# Paths are relative to the extensions directory in: fidimag/extensions/
24-
# So we use "../..". Otherwise, we have to add the LIB folder to LD_LIBRARY_PATH env variable
25-
com_link = ['-Wl,-rpath,../../{},-rpath,../../{}'.format(str(LIB_DIR), str(LIB_DIR64)), '-fopenmp']
25+
# rpath: run-time search path for the sundials (cvode) and fftw library objects
26+
com_link = ['-Wl,-rpath,{},-rpath,{}'.format(str(LIB_DIR), str(LIB_DIR64)), '-fopenmp']
2627
lib_paths = [str(LIB_DIR), str(LIB_DIR64)]
2728
com_libs = ['m', 'fftw3_omp', 'fftw3', 'sundials_cvodes', 'sundials_nvecserial', 'sundials_nvecopenmp', 'blas', 'lapack']
2829
com_args = ['-O3', '-Wno-cpp', '-Wno-unused-function', '-Wall', '-std=c99', '-fopenmp']
@@ -34,7 +35,7 @@
3435
if 'FFTW_INC' in os.environ:
3536
com_inc.append(os.environ['FFTW_INC'])
3637

37-
# Find all .pyx files with extensions (source files)
38+
# Find all .pyx files with extensions (source files) -> relative paths
3839
ROOT_DIR = MODULE_DIR / 'fidimag'
3940
source_files = [s for s in ROOT_DIR.rglob('*.pyx')] # Paths
4041

0 commit comments

Comments
 (0)