Skip to content

Commit

Permalink
Merge pull request #339 from larrybradley/setup
Browse files Browse the repository at this point in the history
Remove _ASTROPY_SETUP_
  • Loading branch information
larrybradley committed Apr 13, 2021
2 parents 3dcb3b6 + 763a29a commit 90da0fd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 23 deletions.
10 changes: 4 additions & 6 deletions regions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
from ._astropy_init import *
# ----------------------------------------------------------------------------

# For egg_info test builds to pass, put package imports here.
if not _ASTROPY_SETUP_:
from ._utils.examples import *
from .core import *
from .shapes import *
from .io import *
from ._utils.examples import * # noqa
from .core import * # noqa
from .shapes import * # noqa
from .io import * # noqa
22 changes: 5 additions & 17 deletions regions/_astropy_init.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import os

__all__ = ['__version__']

# this indicates whether or not we are in the package's setup.py
try:
_ASTROPY_SETUP_
except NameError:
import builtins
builtins._ASTROPY_SETUP_ = False
__all__ = ['__version__', 'test']

try:
from .version import version as __version__
except ImportError:
__version__ = ''


if not _ASTROPY_SETUP_: # noqa
import os

# Create the test function for self test
from astropy.tests.runner import TestRunner
test = TestRunner.make_test_runner_in(os.path.dirname(__file__))
test.__test__ = False
__all__ += ['test']
# Create the test function for self test
from astropy.tests.runner import TestRunner
test = TestRunner.make_test_runner_in(os.path.dirname(__file__))

0 comments on commit 90da0fd

Please sign in to comment.