Skip to content

Commit 873403e

Browse files
author
Dominik Gresch
committed
Fix circular import issues
1 parent ae4e665 commit 873403e

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

setup.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
"""Usage: pip install ."""
22

33
import re
4-
try:
5-
from setuptools import setup
6-
except ImportError:
7-
from distutils.core import setup
4+
from setuptools import setup, find_packages
85

96
import sys
107
if sys.version_info < (3, 5):
@@ -56,6 +53,7 @@
5653
'Programming Language :: Python :: 3.5',
5754
'Programming Language :: Python :: 3.6',
5855
'Programming Language :: Python :: 3.7',
56+
'Programming Language :: Python :: 3.8',
5957
'Intended Audience :: Science/Research',
6058
'Topic :: Scientific/Engineering :: Physics',
6159
'Development Status :: 5 - Production/Stable'
@@ -65,8 +63,5 @@
6563
'topology', 'topological', 'invariant', 'bandstructure', 'chern', 'z2',
6664
'solid-state', 'tight-binding'
6765
],
68-
packages=[
69-
'z2pack', 'z2pack.io', 'z2pack.fp', 'z2pack.volume', 'z2pack.surface',
70-
'z2pack.line'
71-
]
66+
packages=find_packages()
7267
)

z2pack/_run_utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
from decorator import decorator
99

10-
from . import io
11-
1210
__all__ = []
1311

1412

@@ -58,6 +56,7 @@ def _load_init_result(
5856
5957
:returns: :class:`Result` instance.
6058
"""
59+
from . import io # pylint: disable=import-outside-toplevel
6160

6261
if init_result is not None:
6362
if load:

z2pack/surface/_run.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
from . import SurfaceData, SurfaceResult
1212
from ._control import _create_surface_controls, SurfaceControlContainer
1313

14+
from .. import io
1415
from .._run_utils import _load_init_result, _check_save_dir, _log_run
1516
from .._async_handler import AsyncHandler
1617
from .._logging_tools import TagAdapter, TagFilter, filter_manager
1718
from ..line import _run as _line_run
18-
from .. import io
1919

2020
# tag which triggers filtering when called from the volume's run.
2121
_SURFACE_ONLY_LOGGER = TagAdapter(
@@ -154,6 +154,7 @@ def _run_surface_impl(
154154
155155
The other parameters are the same as for :meth:`.run`.
156156
"""
157+
157158
# CONTROL SETUP
158159
ctrl_container = SurfaceControlContainer(controls)
159160

0 commit comments

Comments
 (0)