Skip to content

Commit

Permalink
getting closer using subdir
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Mather committed Nov 21, 2023
1 parent 02cd8fa commit 91d9ecb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
9 changes: 9 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
project('stripy', 'c')

name = 'stripy'

add_languages('fortran')

py_mod = import('python')
Expand All @@ -18,6 +20,8 @@ incdir_f2py = run_command(py,

inc_np = include_directories(incdir_numpy, incdir_f2py)

install_subdir(name, install_dir: py.get_install_dir() / name, strip_directory: true)

tripack_source = custom_target('_tripackmodule.c',
input : ['src/tripack.pyf', 'src/tripack.f90'], # .f so no F90 wrappers
output : ['_tripackmodule.c', '_tripack-f2pywrappers.f', '_tripack-f2pywrappers2.f90'],
Expand Down Expand Up @@ -52,6 +56,7 @@ fortran_source = custom_target('_fortranmodule.c',
py.extension_module('_tripack',
['src/tripack.f90', tripack_source],
incdir_f2py / 'fortranobject.c',
subdir: 'stripy',
include_directories: inc_np,
dependencies: py_dep,
install: true,
Expand All @@ -60,6 +65,7 @@ py.extension_module('_tripack',
py.extension_module('_stripack',
['src/stripack.f90', stripack_source],
incdir_f2py / 'fortranobject.c',
subdir: 'stripy',
include_directories: inc_np,
dependencies: py_dep,
install: true,
Expand All @@ -68,6 +74,7 @@ py.extension_module('_stripack',
py.extension_module('_srfpack',
['src/srfpack.f', srfpack_source],
incdir_f2py / 'fortranobject.c',
subdir: 'stripy',
include_directories: inc_np,
dependencies: py_dep,
install: true,
Expand All @@ -76,6 +83,7 @@ py.extension_module('_srfpack',
py.extension_module('_ssrfpack',
['src/ssrfpack.f', ssrfpack_source],
incdir_f2py / 'fortranobject.c',
subdir: 'stripy',
include_directories: inc_np,
dependencies: py_dep,
install: true,
Expand All @@ -84,6 +92,7 @@ py.extension_module('_ssrfpack',
py.extension_module('_fortran',
['src/stripyf.f90', fortran_source],
incdir_f2py / 'fortranobject.c',
subdir: 'stripy',
include_directories: inc_np,
dependencies: py_dep,
install: true,
Expand Down
4 changes: 2 additions & 2 deletions stripy/cartesian.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
# -*- coding: utf-8 -*-
from multiprocessing import cpu_count

import _tripack
import _srfpack
from . import _tripack
from . import _srfpack
import numpy as np

try: range = xrange
Expand Down
4 changes: 2 additions & 2 deletions stripy/spherical.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
# -*- coding: utf-8 -*-
from multiprocessing import cpu_count

import _stripack
import _ssrfpack
from . import _stripack
from . import _ssrfpack
import numpy as np

try: range = xrange
Expand Down

0 comments on commit 91d9ecb

Please sign in to comment.