8000 MAINT: No more relative path imports [f2py] · numpy/numpy@6f66f4a · GitHub
[go: up one dir, main page]

Skip to content

Commit 6f66f4a

Browse files
committed
MAINT: No more relative path imports [f2py]
1 parent 12d386f commit 6f66f4a

14 files changed

+37
-37
lines changed

numpy/f2py/_backends/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
def f2py_build_generator(name):
22
if name == "meson":
3-
from ._meson import MesonBackend
3+
from numpy.f2py._backends._meson import MesonBackend
44
return MesonBackend
55
elif name == "distutils":
6-
from ._distutils import DistutilsBackend
6+
from numpy.f2py._backends._distutils import DistutilsBackend
77
return DistutilsBackend
88
else:
99
raise ValueError(f"Unknown backend: {name}")

numpy/f2py/_backends/_distutils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ._backend import Backend
1+
from numpy.f2py._backends._backend import Backend
22

33
from numpy.distutils.core import setup, Extension
44
from numpy.distutils.system_info import get_info

numpy/f2py/_backends/_meson.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import subprocess
66
from pathlib import Path
77

8-
from ._backend import Backend
8+
from numpy.f2py._backends._backend import Backend
99
from string import Template
1010

1111
import warnings

numpy/f2py/auxfuncs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
import types
2020
from functools import reduce
2121

22-
from . import __version__
23-
from . import cfuncs
22+
from numpy.f2py import __version__
23+
from numpy.f2py import cfuncs
2424

2525
__all__ = [
2626
'applyrules', 'debugcapi', 'dictappend', 'errmess', 'gentitle',

numpy/f2py/capi_maps.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
import copy
1818
import re
1919
import os
20-
from .crackfortran import markoutercomma
21-
from . import cb_rules
20+
from numpy.f2py.crackfortran import markoutercomma
21+
from numpy.f2py import cb_rules
2222

2323
# The environment provided by auxfuncs.py is needed for some calls to eval.
2424
# As the needed functions cannot be determined by static inspection of the

numpy/f2py/cb_rules.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
Pearu Peterson
1414
1515
"""
16-
from . import __version__
17-
from .auxfuncs import (
16+
from numpy.f2py import __version__
17+
from numpy.f2py.auxfuncs import (
1818
applyrules, debugcapi, dictappend, errmess, getargs, hasnote, isarray,
1919
iscomplex, iscomplexarray, iscomplexfunction, isfunction, isintent_c,
2020
isintent_hide, isintent_in, isintent_inout, isintent_nothide,

numpy/f2py/cfuncs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import sys
1818
import copy
1919

20-
from . import __version__
20+
from numpy.f2py import __version__
2121

2222
f2py_version = __version__.version
2323
errmess = sys.stderr.write

numpy/f2py/common_rules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
Pearu Peterson
1414
1515
"""
16-
from . import __version__
16+
from numpy.f2py import __version__
1717
f2py_version = __version__.version
1818

1919
from .auxfuncs import (

numpy/f2py/crackfortran.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@
158158
# The environment provided by auxfuncs.py is needed for some calls to eval.
159159
# As the needed functions cannot be determined by static inspection of the
160160
# code, it is safest to use import * pending a major refactoring of f2py.
161-
from .auxfuncs import *
162-
from . import symbolic
161+
from numpy.f2py.auxfuncs import *
162+
from numpy.f2py import symbolic
163163

164164
f2py_version = __version__.version
165165

numpy/f2py/f2py2e.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020
import re
2121
from pathlib import Path
2222

23-
from . import crackfortran
24-
from . import rules
25-
from . import cb_rules
26-
from . import auxfuncs
27-
from . import cfuncs
28-
from . import f90mod_rules
29-
from . import __version__
30-
from . import capi_maps
31-
from . import _backends
23+
from numpy.f2py import crackfortran
24+
from numpy.f2py import rules
25+
from numpy.f2py import cb_rules
26+
from numpy.f2py import auxfuncs
27+
from numpy.f2py import cfuncs
28+
from numpy.f2py import f90mod_rules
29+
from numpy.f2py import __version__
30+
from numpy.f2py import capi_maps
31+
from numpy.f2py._backends import f2py_build_generator
3232

3333
f2py_version = __version__.version
3434
numpy_version = __version__.version
@@ -598,7 +598,7 @@ def run_compile():
598598
sys.argv.pop(backend_index)
599599
else:
600600
backend_key = 'distutils'
601-
build_backend = _backends.f2py_build_generator(backend_key)
601+
build_backend = f2py_build_generator(backend_key)
602602

603603
modulename = 'untitled'
604604
sources = sys.argv[1:]

numpy/f2py/f90mod_rules.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919

2020
import numpy as np
2121

22-
from . import capi_maps
23-
from . import func2subr
24-
from .crackfortran import undo_rmbadname, undo_rmbadname1
22+
from numpy.f2py import capi_maps
23+
from numpy.f2py import func2subr
24+
from numpy.f2py.crackfortran import undo_rmbadname, undo_rmbadname1
2525

2626
# The environment provided by auxfuncs.py is needed for some calls to eval.
2727
# As the needed functions cannot be determined by static inspection of the

numpy/f2py/func2subr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"""
1616
import copy
1717

18-
from .auxfuncs import (
18+
from numpy.f2py.auxfuncs import (
1919
getfortranname, isexternal, isfunction, isfunction_wrap, isintent_in,
2020
isintent_out, islogicalfunction, ismoduleroutine, isscalar,
2121
issubroutine, issubroutine_wrap, outmess, show

numpy/f2py/rules.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@
5656
from pathlib import Path
5757

5858
# __version__.version is now the same as the NumPy version
59-
from . import __version__
59+
from numpy.f2py import __version__
6060

61-
from .auxfuncs import (
61+
from numpy.f2py.auxfuncs import (
6262
applyrules, debugcapi, dictappend, errmess, gentitle, getargs2,
6363
hascallstatement, hasexternals, hasinitvalue, hasnote,
6464
hasresultnote, isarray, isarrayofstrings, ischaracter,
@@ -78,12 +78,12 @@
7878
l_and, l_not, l_or, outmess, replace, stripcomma, requiresf90wrapper
7979
)
8080

81-
from . import capi_maps
82-
from . import cfuncs
83-
from . import common_rules
84-
from . import use_rules
85-
from . import f90mod_rules
86-
from . import func2subr
81+
from numpy.f2py import capi_maps
82+
from numpy.f2py import cfuncs
83+
from numpy.f2py import common_rules
84+
from numpy.f2py import use_rules
85+
from numpy.f2py import f90mod_rules
86+
from numpy.f2py import func2subr
8787

8888
f2py_version = __version__.version
8989
numpy_version = __version__.version

numpy/f2py/use_rules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
f2py_version = 'See `f2py -v`'
2121

2222

23-
from .auxfuncs import (
23+
from numpy.f2py.auxfuncs import (
2424
applyrules, dictappend, gentitle, hasnote, outmess
2525
)
2626

0 commit comments

Comments
 (0)
0