Skip to content

Commit 608c461

Browse files
Merge branch 'master' of github.com:computationalmodelling/fidimag into nebm-kf
2 parents 7cb87fe + 41d36d6 commit 608c461

File tree

5 files changed

+25
-17
lines changed

5 files changed

+25
-17
lines changed

.readthedocs.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
3+
build:
4+
os: "ubuntu-20.04"
5+
tools:
6+
python: "mambaforge-22.9"
7+
8+
conda:
9+
environment: doc/environment.yml
10+
11+
sphinx:
12+
# Path to your Sphinx configuration file.
13+
configuration: doc/conf.py

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878

7979
html_theme_options = {
8080
"github_url": "https://github.com/computationalmodelling/fidimag",
81-
"use_edit_page_button": True,
81+
# "use_edit_page_button": True,
8282
"show_toc_level": 1,
8383
# "navbar_align": "right", # For testing that the navbar items align properly
8484
}

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ name = "fidimag"
33
dynamic = ["version"]
44
description = "Atomistic and Finite-DIfference microMAGnetic code, based on Python, Cython and C "
55
readme = "README.md"
6-
license-files = "LICENSE.txt"
6+
# Not fully supported:
7+
# license-files = ["LICENSE.txt"]
78
# license = "BSD-2-Clause"
89
requires-python = ">= 3.10"
910
dependencies = [

readthedocs.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

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)