From d5a43b2b6b8a2f1e150cf51fcdcac16ce222f218 Mon Sep 17 00:00:00 2001 From: Markus Rosenstihl Date: Fri, 23 May 2025 21:52:11 +0200 Subject: [PATCH] fixed relative imports (language_level=2), need to be explicit for python3 (language_level=3) --- pygmx/enxio.pyx | 4 ++-- pygmx/fileio.pxd | 2 +- pygmx/math.pxd | 2 +- pygmx/mdtypes.pxd | 4 ++-- pygmx/topology.pxd | 6 +++--- pygmx/tpxio.pyx | 8 ++++---- pygmx/xtcio.pyx | 8 ++++---- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/pygmx/enxio.pyx b/pygmx/enxio.pyx index de3a508..b0f2147 100644 --- a/pygmx/enxio.pyx +++ b/pygmx/enxio.pyx @@ -5,8 +5,8 @@ from array import array #cimport numpy as np import numpy as np -from utility cimport * -from mdtypes cimport * +from .utility cimport * +from .mdtypes cimport * cdef extern from "gromacs/fileio/enxio.h": ctypedef struct gmx_enxnm_t: diff --git a/pygmx/fileio.pxd b/pygmx/fileio.pxd index 8bde95c..04326cf 100644 --- a/pygmx/fileio.pxd +++ b/pygmx/fileio.pxd @@ -1,6 +1,6 @@ from libc.stdio cimport FILE -from utility cimport * +from .utility cimport * #cdef extern from "gromacs/fileio/gmx_system_xdr.h": # ctypedef struct XDR: diff --git a/pygmx/math.pxd b/pygmx/math.pxd index cd91510..0226849 100644 --- a/pygmx/math.pxd +++ b/pygmx/math.pxd @@ -1,5 +1,5 @@ -from utility cimport real +from .utility cimport real cdef extern from "gromacs/math/vectypes.h": ctypedef real rvec[3] diff --git a/pygmx/mdtypes.pxd b/pygmx/mdtypes.pxd index 50aaf4d..1b8a6f3 100644 --- a/pygmx/mdtypes.pxd +++ b/pygmx/mdtypes.pxd @@ -1,6 +1,6 @@ -from utility cimport * -from math cimport * +from .utility cimport * +from .math cimport * cdef extern from "gromacs/trajectory/energy.h": ctypedef struct t_energy: diff --git a/pygmx/topology.pxd b/pygmx/topology.pxd index 0766c84..034dc8a 100755 --- a/pygmx/topology.pxd +++ b/pygmx/topology.pxd @@ -1,9 +1,9 @@ from libc.stdio cimport FILE -from utility cimport * -from math cimport * -from mdtypes cimport * +from .utility cimport * +from .math cimport * +from .mdtypes cimport * cdef extern from "gromacs/topology/atoms.h": ctypedef struct t_atom: diff --git a/pygmx/tpxio.pyx b/pygmx/tpxio.pyx index 82f2f09..c93cf40 100755 --- a/pygmx/tpxio.pyx +++ b/pygmx/tpxio.pyx @@ -8,10 +8,10 @@ import numpy as np import cython cimport numpy as np -from utility cimport * -from math cimport * -from mdtypes cimport * -from topology cimport * +from .utility cimport * +from .math cimport * +from .mdtypes cimport * +from .topology cimport * cdef extern from "gromacs/fileio/tpxio.h": diff --git a/pygmx/xtcio.pyx b/pygmx/xtcio.pyx index aa21a8c..af630e8 100755 --- a/pygmx/xtcio.pyx +++ b/pygmx/xtcio.pyx @@ -9,9 +9,9 @@ import numpy as np cimport numpy as np import os -from utility cimport * -from math cimport * -from fileio cimport * +from .utility cimport * +from .math cimport * +from .fileio cimport * from .gromacs.reader import INDEX_MAGIC, SubscriptableReader, XTCFrame from .errors import InvalidIndexException, InvalidMagicException, XTCError @@ -288,4 +288,4 @@ def append_xtcfile(filename, step, time, box, coords, prec): - \ No newline at end of file +